Program: 16076
Project: 16076
Buggy source:
/** 
 * Parses desktop-config. 
 */
private static void parseDesktopConfig(Configuration config,Element conf) throws Exception {
  for (Iterator it=conf.getElements("String_Node_Str").iterator(); it.hasNext(); ) {
    final Element el=(Element)it.next();
    final String uri=el.getText(true);
    if (uri.length() != 0)     config.addThemeURI(uri);
  }
  for (Iterator it=conf.getElements("String_Node_Str").iterator(); it.hasNext(); ) {
    final Element el=(Element)it.next();
    final String uri=el.getText(true);
    if (uri.length() != 0)     config.addDisabledThemeURI(uri);
  }
  Class cls=null;
  if (!_customThemeProvider) {
    cls=parseClass(conf,"String_Node_Str",ThemeProvider.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       _customThemeProvider=true;
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      config.setThemeProvider((ThemeProvider)cls.newInstance());
    }
  }
  if (!_customThemeRegistry) {
    cls=parseClass(conf,"String_Node_Str",ThemeRegistry.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       _customThemeRegistry=true;
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      ThemeFns.setThemeRegistry((ThemeRegistry)cls.newInstance());
    }
  }
  if (!_customThemeResolver) {
    cls=parseClass(conf,"String_Node_Str",ThemeResolver.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       _customThemeResolver=true;
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      ThemeFns.setThemeResolver((ThemeResolver)cls.newInstance());
    }
  }
  Integer v=parseInteger(conf,"String_Node_Str",ANY_VALUE);
  if (v != null)   config.setDesktopMaxInactiveInterval(v.intValue());
  v=parseInteger(conf,"String_Node_Str",POSITIVE_ONLY);
  if (v != null)   Library.setProperty("String_Node_Str",v.toString());
  v=parseInteger(conf,"String_Node_Str",POSITIVE_ONLY);
  if (v != null)   Library.setProperty("String_Node_Str",v.toString());
  String s=conf.getElementValue("String_Node_Str",true);
  if (s != null)   config.setRepeatUuid(!"String_Node_Str".equals(s));
}

Fixed version (ground truth):
/** 
 * Parses desktop-config. 
 */
private static void parseDesktopConfig(Configuration config,Element conf) throws Exception {
  for (Iterator<Element> it=conf.getElements("String_Node_Str").iterator(); it.hasNext(); ) {
    final Element el=(Element)it.next();
    final String uri=el.getText(true);
    if (uri.length() != 0)     config.addThemeURI(uri);
  }
  for (Iterator<Element> it=conf.getElements("String_Node_Str").iterator(); it.hasNext(); ) {
    final Element el=(Element)it.next();
    final String uri=el.getText(true);
    if (uri.length() != 0)     config.addDisabledThemeURI(uri);
  }
  Class<?> cls=null;
  if (!config.isCustomThemeProvider()) {
    cls=parseClass(conf,"String_Node_Str",ThemeProvider.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       config.setCustomThemeProvider(true);
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      config.setThemeProvider((ThemeProvider)cls.newInstance());
    }
  }
  if (!config.isCustomThemeRegistry()) {
    cls=parseClass(conf,"String_Node_Str",ThemeRegistry.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       config.setCustomThemeRegistry(true);
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      ThemeFns.setThemeRegistry((ThemeRegistry)cls.newInstance());
    }
  }
  if (!config.isCustomThemeResolver()) {
    cls=parseClass(conf,"String_Node_Str",ThemeResolver.class);
    if (cls != null) {
      if (!cls.getName().startsWith("String_Node_Str"))       config.setCustomThemeResolver(true);
      if (log.isDebugEnabled())       log.debug("String_Node_Str" + cls.getName());
      ThemeFns.setThemeResolver((ThemeResolver)cls.newInstance());
    }
  }
  Integer v=parseInteger(conf,"String_Node_Str",ANY_VALUE);
  if (v != null)   config.setDesktopMaxInactiveInterval(v.intValue());
  v=parseInteger(conf,"String_Node_Str",POSITIVE_ONLY);
  if (v != null)   Library.setProperty("String_Node_Str",v.toString());
  v=parseInteger(conf,"String_Node_Str",POSITIVE_ONLY);
  if (v != null)   Library.setProperty("String_Node_Str",v.toString());
  String s=conf.getElementValue("String_Node_Str",true);
  if (s != null)   config.setRepeatUuid(!"String_Node_Str".equals(s));
}