Program: 160166
Project: 160166
Buggy source:
/** 
 * Get manacost score. Depends on chosen colors. Returns negative score for those cards that doesn't fit allowed colors. If allowed colors are not chosen, then score based on converted cost is returned with penalty for heavy colored cards.
 * @param card
 * @param allowedColors Can be null.
 * @return
 */
private static int getManaCostScore(Card card,List<Constants.ColoredManaSymbol> allowedColors){
  int converted=card.getManaCost().convertedManaCost();
  if (allowedColors == null) {
    int colorPenalty=0;
    for (    String symbol : card.getManaCost().getSymbols()) {
      if (isColoredMana(symbol)) {
        colorPenalty++;
      }
    }
    return 2 * (converted - colorPenalty + 1);
  }
  final Map<String,Integer> singleCount=new HashMap<String,Integer>();
  int maxSingleCount=0;
  for (  String symbol : card.getManaCost().getSymbols()) {
    int count=0;
    symbol=symbol.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    if (isColoredMana(symbol)) {
      for (      Constants.ColoredManaSymbol allowed : allowedColors) {
        if (allowed.toString().equals(symbol)) {
          count++;
        }
      }
      if (count == 0) {
        return -100;
      }
      Integer typeCount=singleCount.get(symbol);
      if (typeCount == null) {
        typeCount=new Integer(0);
      }
      typeCount+=1;
      singleCount.put(symbol,typeCount);
      maxSingleCount=Math.max(maxSingleCount,typeCount);
    }
  }
  return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]);
}

Fixed version (ground truth):
/** 
 * Get manacost score. Depends on chosen colors. Returns negative score for those cards that doesn't fit allowed colors. If allowed colors are not chosen, then score based on converted cost is returned with penalty for heavy colored cards.
 * @param card
 * @param allowedColors Can be null.
 * @return
 */
private static int getManaCostScore(Card card,List<Constants.ColoredManaSymbol> allowedColors){
  int converted=card.getManaCost().convertedManaCost();
  if (allowedColors == null) {
    int colorPenalty=0;
    for (    String symbol : card.getManaCost().getSymbols()) {
      if (isColoredMana(symbol)) {
        colorPenalty++;
      }
    }
    return 2 * (converted - colorPenalty + 1);
  }
  final Map<String,Integer> singleCount=new HashMap<String,Integer>();
  int maxSingleCount=0;
  for (  String symbol : card.getManaCost().getSymbols()) {
    int count=0;
    symbol=symbol.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
    if (isColoredMana(symbol)) {
      for (      Constants.ColoredManaSymbol allowed : allowedColors) {
        if (allowed.toString().equals(symbol)) {
          count++;
        }
      }
      if (count == 0) {
        return -100;
      }
      Integer typeCount=singleCount.get(symbol);
      if (typeCount == null) {
        typeCount=new Integer(0);
      }
      typeCount+=1;
      singleCount.put(symbol,typeCount);
      maxSingleCount=Math.max(maxSingleCount,typeCount);
    }
  }
  if (maxSingleCount > 5)   maxSingleCount=5;
  return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]);
}