Program: 103490
Project: 103490
Buggy source:
/** 
 * Retrieves (from the configuration service) preferences specified for various formats and assigns default ones to those that haven't been mentioned.
 */
public void initializeFormatPreferences(){
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,1100);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,1000);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,950);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,800);
  setEncodingPreference("String_Node_Str",32000,701);
  setEncodingPreference("String_Node_Str",16000,700);
  setEncodingPreference("String_Node_Str",8000,650);
  setEncodingPreference("String_Node_Str",8000,600);
  setEncodingPreference("String_Node_Str",8000,500);
  setEncodingPreference("String_Node_Str",8000,450);
  setEncodingPreference("String_Node_Str",8000,352);
  setEncodingPreference("String_Node_Str",8000,300);
  setEncodingPreference("String_Node_Str",16000,250);
  setEncodingPreference("String_Node_Str",8000,150);
  setEncodingPreference("String_Node_Str",8000,100);
  setEncodingPreference("String_Node_Str",8000,0);
  setEncodingPreference("String_Node_Str",8000,0);
  setEncodingPreference(Constants.TELEPHONE_EVENT,8000,1);
  ConfigurationService confService=NeomediaActivator.getConfigurationService();
  for (  String pName : confService.getPropertyNamesByPrefix(PROP_SDP_PREFERENCE,false)) {
    String prefStr=confService.getString(pName);
    String fmtName=pName.substring(pName.lastIndexOf('.') + 1);
    if (fmtName.contains("String_Node_Str")) {
      fmtName=fmtName.replaceAll("String_Node_Str","String_Node_Str");
      if (confService.getString(PROP_SDP_PREFERENCE + "String_Node_Str" + fmtName) != null)       continue;
    }
    int preference=-1;
    String encoding;
    double clockRate;
    try {
      preference=Integer.parseInt(prefStr);
      int encodingClockRateSeparator=fmtName.lastIndexOf('/');
      if (encodingClockRateSeparator > -1) {
        encoding=fmtName.substring(0,encodingClockRateSeparator);
        clockRate=Double.parseDouble(fmtName.substring(encodingClockRateSeparator + 1));
      }
 else {
        encoding=fmtName;
        clockRate=MediaFormatFactory.CLOCK_RATE_NOT_SPECIFIED;
      }
    }
 catch (    NumberFormatException nfe) {
      logger.warn("String_Node_Str" + fmtName + "String_Node_Str"+ prefStr+ "String_Node_Str",nfe);
      continue;
    }
    setEncodingPreference(encoding,clockRate,preference);
  }
  updateSupportedEncodings();
}

Fixed version (ground truth):
/** 
 * Retrieves (from the configuration service) preferences specified for various formats and assigns default ones to those that haven't been mentioned.
 */
public void initializeFormatPreferences(){
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,1100);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,1000);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,950);
  setEncodingPreference("String_Node_Str",VideoMediaFormatImpl.DEFAULT_CLOCK_RATE,800);
  setEncodingPreference("String_Node_Str",32000,701);
  setEncodingPreference("String_Node_Str",16000,700);
  setEncodingPreference("String_Node_Str",8000,675);
  setEncodingPreference("String_Node_Str",8000,650);
  setEncodingPreference("String_Node_Str",8000,600);
  setEncodingPreference("String_Node_Str",8000,500);
  setEncodingPreference("String_Node_Str",8000,450);
  setEncodingPreference("String_Node_Str",8000,352);
  setEncodingPreference("String_Node_Str",8000,300);
  setEncodingPreference("String_Node_Str",16000,250);
  setEncodingPreference("String_Node_Str",8000,150);
  setEncodingPreference("String_Node_Str",8000,100);
  setEncodingPreference("String_Node_Str",8000,0);
  setEncodingPreference(Constants.TELEPHONE_EVENT,8000,1);
  ConfigurationService confService=NeomediaActivator.getConfigurationService();
  for (  String pName : confService.getPropertyNamesByPrefix(PROP_SDP_PREFERENCE,false)) {
    String prefStr=confService.getString(pName);
    String fmtName=pName.substring(pName.lastIndexOf('.') + 1);
    if (fmtName.contains("String_Node_Str")) {
      fmtName=fmtName.replaceAll("String_Node_Str","String_Node_Str");
      if (confService.getString(PROP_SDP_PREFERENCE + "String_Node_Str" + fmtName) != null)       continue;
    }
    int preference=-1;
    String encoding;
    double clockRate;
    try {
      preference=Integer.parseInt(prefStr);
      int encodingClockRateSeparator=fmtName.lastIndexOf('/');
      if (encodingClockRateSeparator > -1) {
        encoding=fmtName.substring(0,encodingClockRateSeparator);
        clockRate=Double.parseDouble(fmtName.substring(encodingClockRateSeparator + 1));
      }
 else {
        encoding=fmtName;
        clockRate=MediaFormatFactory.CLOCK_RATE_NOT_SPECIFIED;
      }
    }
 catch (    NumberFormatException nfe) {
      logger.warn("String_Node_Str" + fmtName + "String_Node_Str"+ prefStr+ "String_Node_Str",nfe);
      continue;
    }
    setEncodingPreference(encoding,clockRate,preference);
  }
  updateSupportedEncodings();
}