Program: 134689
Project: 134689
Buggy source:
@Override public List<PanelString> getStringData(int displaySettings,ICardWrapper card,boolean showLabels){
  List<PanelString> result=new LinkedList<PanelString>();
  PanelString line;
  double totalAmount=0;
  double totalCapacity=0;
  boolean showEach=(displaySettings & DISPLAY_EACH) > 0;
  boolean showSummary=(displaySettings & DISPLAY_TOTAL) > 0;
  boolean showName=(displaySettings & DISPLAY_NAME) > 0;
  boolean showAmount=true;
  boolean showFree=(displaySettings & DISPLAY_FREE) > 0;
  boolean showCapacity=(displaySettings & DISPLAY_CAPACITY) > 0;
  boolean showPercentage=(displaySettings & DISPLAY_PERCENTAGE) > 0;
  int cardCount=getCardCount(card);
  for (int i=0; i < cardCount; i++) {
    int amount=card.getInt(String.format("String_Node_Str",i));
    int capacity=card.getInt(String.format("String_Node_Str",i));
    boolean isOutOfRange=amount == STATUS_OUT_OF_RANGE;
    boolean isNotFound=amount == STATUS_NOT_FOUND;
    if (showSummary && !isOutOfRange && !isNotFound) {
      totalAmount+=amount;
      totalCapacity+=capacity;
    }
    if (showEach) {
      if (isOutOfRange) {
        line=new PanelString();
        line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1);
        result.add(line);
      }
 else       if (isNotFound) {
        line=new PanelString();
        line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1);
        result.add(line);
      }
 else {
        if (showName) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,card.getString(String.format("String_Node_Str",i)));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",amount,false);
          result.add(line);
        }
        if (showAmount) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",amount,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",amount,false);
          result.add(line);
        }
        if (showFree) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity - amount,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity - amount,false);
          result.add(line);
        }
        if (showCapacity) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity,false);
          result.add(line);
        }
        if (showPercentage) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity == 0 ? 100 : (((double)amount) * 100L / capacity),false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity == 0 ? 100 : (((double)amount) * 100L / capacity),false);
          result.add(line);
        }
      }
    }
  }
  if (showSummary) {
    if (showAmount) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalAmount,showLabels);
      result.add(line);
    }
    if (showFree) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity - totalAmount,showLabels);
      result.add(line);
    }
    if (showName) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity,showLabels);
      result.add(line);
    }
    if (showPercentage) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity == 0 ? 100 : (totalAmount * 100 / totalCapacity),showLabels);
      result.add(line);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public List<PanelString> getStringData(int displaySettings,ICardWrapper card,boolean showLabels){
  List<PanelString> result=new LinkedList<PanelString>();
  PanelString line;
  double totalAmount=0;
  double totalCapacity=0;
  boolean showEach=(displaySettings & DISPLAY_EACH) > 0;
  boolean showSummary=(displaySettings & DISPLAY_TOTAL) > 0;
  boolean showName=(displaySettings & DISPLAY_NAME) > 0;
  boolean showAmount=true;
  boolean showFree=(displaySettings & DISPLAY_FREE) > 0;
  boolean showCapacity=(displaySettings & DISPLAY_CAPACITY) > 0;
  boolean showPercentage=(displaySettings & DISPLAY_PERCENTAGE) > 0;
  int cardCount=getCardCount(card);
  for (int i=0; i < cardCount; i++) {
    int amount=card.getInt(String.format("String_Node_Str",i));
    int capacity=card.getInt(String.format("String_Node_Str",i));
    boolean isOutOfRange=amount == STATUS_OUT_OF_RANGE;
    boolean isNotFound=amount == STATUS_NOT_FOUND;
    if (showSummary && !isOutOfRange && !isNotFound) {
      totalAmount+=amount;
      totalCapacity+=capacity;
    }
    if (showEach) {
      if (isOutOfRange) {
        line=new PanelString();
        line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1);
        result.add(line);
      }
 else       if (isNotFound) {
        line=new PanelString();
        line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1);
        result.add(line);
      }
 else {
        if (showName) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,card.getString(String.format("String_Node_Str",i)));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",amount,false);
          result.add(line);
        }
        if (showAmount) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",amount,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",amount,false);
          result.add(line);
        }
        if (showFree) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity - amount,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity - amount,false);
          result.add(line);
        }
        if (showCapacity) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity,false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity,false);
          result.add(line);
        }
        if (showPercentage) {
          line=new PanelString();
          if (showLabels)           line.textLeft=StringUtils.getFormattedKey("String_Node_Str",i + 1,StringUtils.getFormatted("String_Node_Str",capacity == 0 ? 100 : (((double)amount / capacity) * 100),false));
 else           line.textLeft=StringUtils.getFormatted("String_Node_Str",capacity == 0 ? 100 : (((double)amount / capacity) * 100),false);
          result.add(line);
        }
      }
    }
  }
  if (showSummary) {
    if (showAmount) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalAmount,showLabels);
      result.add(line);
    }
    if (showFree) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity - totalAmount,showLabels);
      result.add(line);
    }
    if (showName) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity,showLabels);
      result.add(line);
    }
    if (showPercentage) {
      line=new PanelString();
      line.textLeft=StringUtils.getFormatted("String_Node_Str",totalCapacity == 0 ? 100 : ((totalAmount / totalCapacity) * 100),showLabels);
      result.add(line);
    }
  }
  return result;
}