Program: 15517
Project: 15517
Buggy source:
@Override public TemplateNumberFormat get(String params,Locale locale,Environment env) throws InvalidFormatParametersException {
  NumberFormatKey fk=new NumberFormatKey(params,locale);
  NumberFormat jFormat=GLOBAL_NUMBER_FORMAT_CACHE.get(fk);
  if (jFormat == null) {
    if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getNumberInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getCurrencyInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getPercentInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=env.getCNumberFormat();
    }
 else {
      try {
        jFormat=new DecimalFormat(params,new DecimalFormatSymbols(locale));
      }
 catch (      IllegalArgumentException e) {
        String msg=e.getMessage();
        throw new InvalidFormatParametersException(msg != null ? msg : "String_Node_Str",e);
      }
    }
    if (GLOBAL_NUMBER_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
      boolean triggered=false;
synchronized (JavaTemplateNumberFormatFactory.class) {
        if (GLOBAL_NUMBER_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
          triggered=true;
          GLOBAL_NUMBER_FORMAT_CACHE.clear();
        }
      }
      if (triggered) {
        LOG.warn("String_Node_Str" + LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE + "String_Node_Str"+ "String_Node_Str");
      }
    }
    NumberFormat prevJFormat=GLOBAL_NUMBER_FORMAT_CACHE.putIfAbsent(fk,jFormat);
    if (prevJFormat != null) {
      jFormat=prevJFormat;
    }
    jFormat=(NumberFormat)jFormat.clone();
  }
  return new JavaTemplateNumberFormat(jFormat,params);
}

Fixed version (ground truth):
@Override public TemplateNumberFormat get(String params,Locale locale,Environment env) throws InvalidFormatParametersException {
  CacheKey cacheKey=new CacheKey(params,locale);
  NumberFormat jFormat=GLOBAL_FORMAT_CACHE.get(cacheKey);
  if (jFormat == null) {
    if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getNumberInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getCurrencyInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=NumberFormat.getPercentInstance(locale);
    }
 else     if ("String_Node_Str".equals(params)) {
      jFormat=env.getCNumberFormat();
    }
 else {
      try {
        jFormat=new DecimalFormat(params,new DecimalFormatSymbols(locale));
      }
 catch (      IllegalArgumentException e) {
        String msg=e.getMessage();
        throw new InvalidFormatParametersException(msg != null ? msg : "String_Node_Str",e);
      }
    }
    if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
      boolean triggered=false;
synchronized (JavaTemplateNumberFormatFactory.class) {
        if (GLOBAL_FORMAT_CACHE.size() >= LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE) {
          triggered=true;
          GLOBAL_FORMAT_CACHE.clear();
        }
      }
      if (triggered) {
        LOG.warn("String_Node_Str" + LEAK_ALERT_NUMBER_FORMAT_CACHE_SIZE + "String_Node_Str"+ "String_Node_Str");
      }
    }
    NumberFormat prevJFormat=GLOBAL_FORMAT_CACHE.putIfAbsent(cacheKey,jFormat);
    if (prevJFormat != null) {
      jFormat=prevJFormat;
    }
  }
  jFormat=(NumberFormat)jFormat.clone();
  return new JavaTemplateNumberFormat(jFormat,params);
}