nus-yam/ex-repair huggingface dataset:
Program: 20063
Project: 20063
Buggy source:
/** 
 * Constructs a default FeatureExtractor.
 * @param context the context of the SphinxProperties to use
 */
public FeatureExtractor(String context){
  super("String_Node_Str",context);
  initSphinxProperties();
  cepstraBuffer=new float[LIVEBUFBLOCKSIZE][];
  inputQueue=new InputQueue();
}

Fixed version (ground truth):
/** 
 * Constructs a default FeatureExtractor.
 * @param context the context of the SphinxProperties to use
 */
public FeatureExtractor(String context){
  super("String_Node_Str",context);
  initSphinxProperties();
  cepstraBuffer=new float[cepstraBufferSize][];
  peekableQueue=new PeekableQueue();
}
Program: 20064
Project: 20064
Buggy source:
/** 
 * Returns the next Data object, which is a FeatureFrame produced by this FeatureExtractor.
 * @return the next available Data object, returns null if noData object is available
 * @see Feature
 * @see FeatureFrame
 */
public Data read() throws IOException {
  Data input=inputQueue.removeNext();
  if (input == null) {
    return null;
  }
 else {
    if (input instanceof EndPointSignal) {
      EndPointSignal signal=(EndPointSignal)input;
      if (signal.equals(EndPointSignal.FRAME_START)) {
        Data featureFrame=process(readCepstra());
        segmentStart=false;
        segmentEnd=false;
        return featureFrame;
      }
 else       if (signal.equals(EndPointSignal.SEGMENT_START)) {
        segmentStart=true;
        return input;
      }
 else {
        return input;
      }
    }
 else {
      return read();
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the next Data object, which is a FeatureFrame produced by this FeatureExtractor. It can also be other Data type objects, such as EndPointSignal.FRAME_START.
 * @return the next available Data object, returns null if noData object is available
 * @throws java.io.IOException if there is an error readingthe Data objects
 * @see Feature
 * @see FeatureFrame
 */
public Data read() throws IOException {
  Data input=peekableQueue.removeNext();
  if (input == null) {
    return null;
  }
 else {
    if (input instanceof EndPointSignal) {
      EndPointSignal signal=(EndPointSignal)input;
      if (signal.equals(EndPointSignal.FRAME_START)) {
        Data featureFrame=process(readCepstra());
        segmentStart=false;
        segmentEnd=false;
        return featureFrame;
      }
 else       if (signal.equals(EndPointSignal.SEGMENT_START)) {
        segmentStart=true;
        return input;
      }
 else {
        return input;
      }
    }
 else {
      return read();
    }
  }
}
Program: 20065
Project: 20065
Buggy source:
/** 
 * Replicate the given cepstrum into the last window number of frames in the cepstraBuffer.
 */
private void replicateFirstFrame(Cepstrum cepstrum){
  Arrays.fill(cepstraBuffer,0,window,cepstrum.getCepstrumData());
  bufferPosition=window;
  bufferPosition%=LIVEBUFBLOCKSIZE;
  currentPosition=bufferPosition;
  jp1=currentPosition - 1;
  jp2=currentPosition - 2;
  jp3=currentPosition - 3;
  jf1=currentPosition + 1;
  jf2=currentPosition + 2;
  jf3=currentPosition + 3;
  if (jp3 > BUFFER_EDGE) {
    jf3%=LIVEBUFBLOCKSIZE;
    jf2%=LIVEBUFBLOCKSIZE;
    jf1%=LIVEBUFBLOCKSIZE;
    jp1%=LIVEBUFBLOCKSIZE;
    jp2%=LIVEBUFBLOCKSIZE;
    jp3%=LIVEBUFBLOCKSIZE;
  }
}

Fixed version (ground truth):
/** 
 * Replicate the given cepstrum into the first window number of frames in the cepstraBuffer.
 * @param cepstrum the Cepstrum to replicate
 */
private void replicateFirstFrame(Cepstrum cepstrum){
  Arrays.fill(cepstraBuffer,0,window,cepstrum.getCepstrumData());
  bufferPosition=window;
  bufferPosition%=cepstraBufferSize;
  currentPosition=window;
  jp1=currentPosition - 1;
  jp2=currentPosition - 2;
  jp3=currentPosition - 3;
  jf1=currentPosition + 1;
  jf2=currentPosition + 2;
  jf3=currentPosition + 3;
  if (jp3 > cepstraBufferEdge) {
    jf3%=cepstraBufferSize;
    jf2%=cepstraBufferSize;
    jf1%=cepstraBufferSize;
    jp1%=cepstraBufferSize;
    jp2%=cepstraBufferSize;
    jp3%=cepstraBufferSize;
  }
}
Program: 20066
Project: 20066
Buggy source:
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void initSphinxProperties(){
  SphinxProperties properties=getSphinxProperties();
  featureLength=properties.getInt(PROP_FEATURE_LENGTH,39);
  window=properties.getInt(PROP_FEATURE_WINDOW,3);
  cepstrumLength=properties.getInt(FrontEnd.PROP_CEPSTRUM_SIZE,13);
}

Fixed version (ground truth):
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void initSphinxProperties(){
  SphinxProperties properties=getSphinxProperties();
  featureLength=properties.getInt(PROP_FEATURE_LENGTH,39);
  window=properties.getInt(PROP_FEATURE_WINDOW,3);
  cepstrumLength=properties.getInt(FrontEnd.PROP_CEPSTRUM_SIZE,13);
  cepstraBufferSize=properties.getInt(PROP_CEP_BUFFER_SIZE,256);
  cepstraBufferEdge=cepstraBufferSize - 8;
}
Program: 20067
Project: 20067
Buggy source:
/** 
 * Reads all the cepstra until we hit the next EndPointSignal. Returns the number of cepstra read. The last EndPointSignal is removed from the inputQueue.
 * @return the number of cepstra read
 * @throws java.io.IOException if error reading the cepstra
 */
private int readMiddleCepstra() throws IOException {
  int totalCepstra=0;
  Data nextFrame=null;
  while (!((nextFrame=inputQueue.removeNext()) instanceof EndPointSignal)) {
    if (nextFrame instanceof Cepstrum) {
      Cepstrum cepstrum=(Cepstrum)nextFrame;
      cepstraBuffer[bufferPosition++]=cepstrum.getCepstrumData();
      totalCepstra++;
      if (bufferPosition == LIVEBUFBLOCKSIZE) {
        bufferPosition=0;
      }
    }
  }
  return totalCepstra;
}

Fixed version (ground truth):
/** 
 * Reads all the cepstra until we hit the next EndPointSignal. Returns the number of cepstra read. The last EndPointSignal is removed from the peekableQueue.
 * @return the number of cepstra read
 * @throws java.io.IOException if error reading the cepstra
 */
private int readMiddleCepstra() throws IOException {
  int totalCepstra=0;
  Data nextFrame=null;
  while (!((nextFrame=peekableQueue.removeNext()) instanceof EndPointSignal)) {
    if (nextFrame instanceof Cepstrum) {
      Cepstrum cepstrum=(Cepstrum)nextFrame;
      cepstraBuffer[bufferPosition++]=cepstrum.getCepstrumData();
      totalCepstra++;
      if (bufferPosition == cepstraBufferSize) {
        bufferPosition=0;
      }
    }
  }
  return totalCepstra;
}
Program: 20068
Project: 20068
Buggy source:
/** 
 * Returns the total number of features that should result from the read Cepstra. This method is called after an EndPointSignal.FRAME_START is read. It will read all the Cepstrum in between the read EndPointSignal.FRAME_START and the next EndPointSignal.FRAME_END, and insert these Cepstrum into the cepstraBuffer.
 * @returns the number of features that should result from theread Cepstrum
 * @throws java.io.IOException if there is an error reading Cepstrum
 */
private int readCepstra() throws IOException {
  int totalFeatures=0;
  int residualVectors=0;
  Data firstFrame=inputQueue.peekNext();
  if (firstFrame instanceof Cepstrum) {
    if (segmentStart) {
      replicateFirstFrame((Cepstrum)inputQueue.removeNext());
      residualVectors-=window;
    }
    totalFeatures+=readMiddleCepstra();
    Data nextFrame=inputQueue.peekNext();
    if (nextFrame instanceof EndPointSignal) {
      EndPointSignal signal=(EndPointSignal)nextFrame;
      if (signal.equals(EndPointSignal.SEGMENT_END)) {
        replicateLastFrame();
        residualVectors+=window;
      }
    }
  }
  return totalFeatures + residualVectors;
}

Fixed version (ground truth):
/** 
 * Reads all the Cepstrum objects between the read EndPointSignal.FRAME_START and the next EndPointSignal.FRAME_END, and insert these Cepstrum into the cepstraBuffer. Returns the total number of features that should result from the read Cepstra. This method is called after an EndPointSignal.FRAME_START is read.
 * @returns the number of features that should result from theread Cepstrum
 * @throws java.io.IOException if there is an error reading Cepstrum
 */
private int readCepstra() throws IOException {
  int totalFeatures=0;
  int residualVectors=0;
  Data firstFrame=peekableQueue.peekNext();
  if (firstFrame instanceof Cepstrum) {
    if (segmentStart) {
      replicateFirstFrame((Cepstrum)firstFrame);
      residualVectors-=window;
    }
    totalFeatures+=readMiddleCepstra();
    Data nextFrame=peekableQueue.peekNext();
    if (nextFrame instanceof EndPointSignal) {
      EndPointSignal signal=(EndPointSignal)nextFrame;
      if (signal.equals(EndPointSignal.SEGMENT_END)) {
        replicateLastFrame();
        residualVectors+=window;
      }
    }
  }
  return totalFeatures + residualVectors;
}
Program: 20069
Project: 20069
Buggy source:
/** 
 * Process data, creating the mel cepstrum from an input audio frame.
 * @param input a MelSpectrum frame
 * @return a mel Cepstrum frame
 */
private Cepstrum process(MelSpectrum input) throws IllegalArgumentException {
  getTimer().start();
  double[] melspectrum=input.getMelSpectrumData();
  if (melspectrum.length != numberMelFilters) {
    throw new IllegalArgumentException("String_Node_Str" + melspectrum.length + "String_Node_Str"+ numberMelFilters);
  }
  for (int i=0; i < melspectrum.length; ++i) {
    if (melspectrum[i] > 0) {
      melspectrum[i]=Math.log(melspectrum[i]);
    }
 else {
      melspectrum[i]=-1.0e+5;
    }
  }
  float[] cepstrumData=applyMelCosine(melspectrum);
  getTimer().stop();
  Cepstrum cepstrum=new Cepstrum(cepstrumData);
  if (getDump()) {
    System.out.println(cepstrum.toString());
  }
  return cepstrum;
}

Fixed version (ground truth):
/** 
 * Process data, creating the mel cepstrum from an input audio frame.
 * @param input a MelSpectrum frame
 * @return a mel Cepstrum frame
 */
private Cepstrum process(MelSpectrum input) throws IllegalArgumentException {
  getTimer().start();
  double[] melspectrum=input.getMelSpectrumData();
  if (melspectrum.length != numberMelFilters) {
    throw new IllegalArgumentException("String_Node_Str" + melspectrum.length + "String_Node_Str"+ numberMelFilters);
  }
  for (int i=0; i < melspectrum.length; ++i) {
    if (melspectrum[i] > 0) {
      melspectrum[i]=Math.log(melspectrum[i]);
    }
 else {
      melspectrum[i]=-1.0e+5;
    }
  }
  float[] cepstrumData=applyMelCosine(melspectrum);
  getTimer().stop();
  Cepstrum cepstrum=new Cepstrum(cepstrumData);
  if (getDump()) {
    System.out.println("String_Node_Str" + cepstrum.toString());
  }
  return cepstrum;
}
Program: 20070
Project: 20070
Buggy source:
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like a EndPointSignal.
 * @return the next available Data object, returns null if noData object is available
 */
public Data read() throws IOException {
  Data input=getSource().read();
  if (input instanceof MelSpectrum) {
    input=process((MelSpectrum)input);
  }
  return input;
}

Fixed version (ground truth):
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like a EndPointSignal.
 * @return the next available Data object, returns null if noData object is available
 * @throws java.io.IOException if there is an error readingthe Data objects
 */
public Data read() throws IOException {
  Data input=getSource().read();
  if (input instanceof MelSpectrum) {
    input=process((MelSpectrum)input);
  }
  return input;
}
Program: 20072
Project: 20072
Buggy source:
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output+=spectrum[this.initialFreqIndex + i] * this.weight[i];
    }
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output+=spectrum[indexSpectrum] * this.weight[i];
    }
  }
  return output;
}
Program: 20073
Project: 20073
Buggy source:
/** 
 * Compute mel frequency from linear frequency. Since we don't have <code>log10()</code>, we have to compute it using natural log: <b>log10(x) = ln(x) / ln(10)</b>
 * @param inputFreq the input frequency in linear scale
 * @return the frequency in a mel scale
 */
private double linToMelFreq(double inputFreq){
  return (2595.0 + (Math.log(1.0 + inputFreq / 700.0) / Math.log(10.0)));
}

Fixed version (ground truth):
/** 
 * Compute mel frequency from linear frequency. Since we don't have <code>log10()</code>, we have to compute it using natural log: <b>log10(x) = ln(x) / ln(10)</b>
 * @param inputFreq the input frequency in linear scale
 * @return the frequency in a mel scale
 */
private double linToMelFreq(double inputFreq){
  return (2595.0 * (Math.log(1.0 + inputFreq / 700.0) / Math.log(10.0)));
}
Program: 20074
Project: 20074
Buggy source:
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input Power Spectrum
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private MelSpectrum process(Spectrum input) throws IllegalArgumentException {
  MelSpectrum outputMelSpectrum;
  getTimer().start();
  double[] in=input.getSpectrumData();
  if (in.length != (NPoint >> 1)) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ NPoint);
  }
  double[] outputMelFilterbank=new double[numberFilters];
  for (int i=0; i < numberFilters; i++) {
    outputMelFilterbank[i]=filter[i].filterOutput(in);
  }
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputMelFilterbank,"String_Node_Str",20,10));
  }
  outputMelSpectrum=new MelSpectrum(outputMelFilterbank);
  return outputMelSpectrum;
}

Fixed version (ground truth):
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input Power Spectrum
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private MelSpectrum process(Spectrum input) throws IllegalArgumentException {
  MelSpectrum outputMelSpectrum;
  getTimer().start();
  double[] in=input.getSpectrumData();
  if (in.length != (NPoint >> 1)) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ NPoint);
  }
  double[] outputMelFilterbank=new double[numberFilters];
  for (int i=0; i < numberFilters; i++) {
    outputMelFilterbank[i]=filter[i].filterOutput(in);
  }
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputMelFilterbank,"String_Node_Str",12,5));
  }
  outputMelSpectrum=new MelSpectrum(outputMelFilterbank);
  return outputMelSpectrum;
}
Program: 20075
Project: 20075
Buggy source:
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 * @param context the context of the SphinxProperties used
 */
private void initSphinxProperties(String context){
  setSphinxProperties(context);
  SphinxProperties properties=getSphinxProperties();
  sampleRate=properties.getInt(FrontEnd.PROP_SAMPLE_RATE,8000);
  NPoint=properties.getInt(PROP_NPOINT,512);
  numberFilters=properties.getInt(PROP_NUMBER_FILTERS,40);
  minFreq=properties.getDouble(PROP_MIN_FREQ,133.33334);
  maxFreq=properties.getDouble(PROP_MAX_FREQ,6855.4976);
}

Fixed version (ground truth):
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 * @param context the context of the SphinxProperties used
 */
private void initSphinxProperties(String context){
  setSphinxProperties(context);
  SphinxProperties properties=getSphinxProperties();
  sampleRate=properties.getInt(FrontEnd.PROP_SAMPLE_RATE,8000);
  NPoint=properties.getInt(PROP_NPOINT,512);
  numberFilters=properties.getInt(PROP_NUMBER_FILTERS,31);
  minFreq=properties.getDouble(PROP_MIN_FREQ,200);
  maxFreq=properties.getDouble(PROP_MAX_FREQ,3500);
}
Program: 20077
Project: 20077
Buggy source:
/** 
 * Sets the given frequency to the nearest frequency bin from the DFT.  The DFT can be thought of as a sampling of the actual spectrum of a signal. We use this function to find the sampling point of the spectrum that is closest to the given frequency.
 * @param inFreq the input frequency
 * @param stepFreq the distance between frequency bins
 * @return the closest frequency bin
 * @throw IllegalArgumentException
 */
private double setToNearestFrequencyBin(double inFreq,double stepFreq) throws IllegalArgumentException {
  if (stepFreq == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return stepFreq * Math.round(inFreq / stepFreq);
}

Fixed version (ground truth):
/** 
 * Sets the given frequency to the nearest frequency bin from the DFT.  The DFT can be thought of as a sampling of the actual spectrum of a signal. We use this function to find the sampling point of the spectrum that is closest to the given frequency.
 * @param inFreq the input frequency
 * @param stepFreq the distance between frequency bins
 * @return the closest frequency bin
 * @throws IllegalArgumentException
 */
private double setToNearestFrequencyBin(double inFreq,double stepFreq) throws IllegalArgumentException {
  if (stepFreq == 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return stepFreq * Math.round(inFreq / stepFreq);
}
Program: 20079
Project: 20079
Buggy source:
/** 
 * Constructs a Spectrum with the given spectra data.
 * @params melSpectralData a vector containing a frame's mel spectrum
 */
public MelSpectrum(double[] melSpectralData){
  this.melSpectralData=melSpectralData;
}

Fixed version (ground truth):
/** 
 * Constructs a Spectrum with the given spectra data.
 * @param melSpectralData a vector containing a frame's mel spectrum
 */
public MelSpectrum(double[] melSpectralData){
  this.melSpectralData=melSpectralData;
}
Program: 20080
Project: 20080
Buggy source:
/** 
 * Constructs a Spectrum with the given spectra data.
 * @params spectraData a frame's spectral data
 */
public Spectrum(double[] spectraData){
  this.spectraData=spectraData;
}

Fixed version (ground truth):
/** 
 * Constructs a Spectrum with the given spectra data.
 * @param spectraData a frame's spectral data
 */
public Spectrum(double[] spectraData){
  this.spectraData=spectraData;
}
Program: 20081
Project: 20081
Buggy source:
/** 
 * Process data, creating the mel cepstrum from an input audio frame.
 * @param input a MelSpectrum frame
 * @return a mel Cepstrum frame
 */
private Cepstrum process(Spectrum input) throws IllegalArgumentException {
  getTimer().start();
  double[] melspectrum=input.getSpectrumData();
  if (melspectrum.length != numberMelFilters) {
    throw new IllegalArgumentException("String_Node_Str" + melspectrum.length + "String_Node_Str"+ numberMelFilters);
  }
  for (int i=0; i < melspectrum.length; ++i) {
    if (melspectrum[i] > 0) {
      melspectrum[i]=Math.log(melspectrum[i]);
    }
 else {
      melspectrum[i]=-1.0e+5;
    }
  }
  float[] cepstrumData=applyMelCosine(melspectrum);
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpFloatArray(cepstrumData,"String_Node_Str"));
  }
  return (new Cepstrum(cepstrumData));
}

Fixed version (ground truth):
/** 
 * Process data, creating the mel cepstrum from an input audio frame.
 * @param input a MelSpectrum frame
 * @return a mel Cepstrum frame
 */
private Cepstrum process(MelSpectrum input) throws IllegalArgumentException {
  getTimer().start();
  double[] melspectrum=input.getMelSpectrumData();
  if (melspectrum.length != numberMelFilters) {
    throw new IllegalArgumentException("String_Node_Str" + melspectrum.length + "String_Node_Str"+ numberMelFilters);
  }
  for (int i=0; i < melspectrum.length; ++i) {
    if (melspectrum[i] > 0) {
      melspectrum[i]=Math.log(melspectrum[i]);
    }
 else {
      melspectrum[i]=-1.0e+5;
    }
  }
  float[] cepstrumData=applyMelCosine(melspectrum);
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpFloatArray(cepstrumData,"String_Node_Str"));
  }
  return (new Cepstrum(cepstrumData));
}
Program: 20082
Project: 20082
Buggy source:
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like a EndPointSignal.
 * @return the next available Data object, returns null if noData object is available
 */
public Data read() throws IOException {
  Data input=getSource().read();
  if (input instanceof Spectrum) {
    input=process((Spectrum)input);
  }
  return input;
}

Fixed version (ground truth):
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like a EndPointSignal.
 * @return the next available Data object, returns null if noData object is available
 */
public Data read() throws IOException {
  Data input=getSource().read();
  if (input instanceof MelSpectrum) {
    input=process((MelSpectrum)input);
  }
  return input;
}
Program: 20083
Project: 20083
Buggy source:
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output=spectrum[indexSpectrum] * this.weight[i];
    }
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output+=spectrum[indexSpectrum] * this.weight[i];
    }
  }
  return output;
}
Program: 20084
Project: 20084
Buggy source:
public MelFilter(){
}

Fixed version (ground truth):
/** 
 * Constructs a filter from the parameters. In the current implementation, the filter is a bandpass filter with a triangular shape.  We're given the left and right edges and the center frequency, so we can determine the right and left slopes, which could be not only assymmetric but completely different. We're also given the initial frequency, which may or may not coincide with the left edge, and the frequency step.
 * @param leftEdge the filter's lowest passing frequency
 * @param centerFreq the filter's center frequency
 * @param rightEdge the filter's highest passing frequency
 * @param initialFreq the first frequency bin in the pass band
 * @param deltaFreq the step in the frequency axis betweenfrequency bins
 * @param samplingRate sampling frequency
 */
public MelFilter(double leftEdge,double centerFreq,double rightEdge,double initialFreq,double deltaFreq){
  double filterHeight;
  double leftSlope;
  double rightSlope;
  double currentFreq;
  int indexFilterWeight;
  int numberElementsWeightField;
  numberElementsWeightField=(int)Math.round((rightEdge - leftEdge) / deltaFreq + 1);
  weight=new double[numberElementsWeightField];
  filterHeight=2.0f / (rightEdge - leftEdge);
  leftSlope=filterHeight / (centerFreq - leftEdge);
  rightSlope=filterHeight / (centerFreq - rightEdge);
  for (currentFreq=initialFreq, indexFilterWeight=0; currentFreq <= rightEdge; currentFreq+=deltaFreq, indexFilterWeight++) {
    if (currentFreq < centerFreq) {
      weight[indexFilterWeight]=leftSlope * (currentFreq - leftEdge);
    }
 else {
      weight[indexFilterWeight]=filterHeight + rightSlope * (currentFreq - centerFreq);
    }
  }
  this.initialFreqIndex=(int)Math.round(initialFreq / deltaFreq);
}
Program: 20085
Project: 20085
Buggy source:
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output+=spectrum[indexSpectrum] * this.weight[i];
    }
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Compute the output of a filter. We're given a power spectrum, to which we apply the appropriate weights.
 * @param spectrum the input power spectrum to be filtered
 * @return the filtered value, in fact a weighted average of power inthe frequency range of the filter pass band
 */
public double filterOutput(double[] spectrum){
  double output=0.0f;
  int indexSpectrum;
  for (int i=0; i < this.weight.length; i++) {
    indexSpectrum=this.initialFreqIndex + i;
    if (indexSpectrum < spectrum.length) {
      output=spectrum[indexSpectrum] * this.weight[i];
    }
  }
  return output;
}
Program: 20086
Project: 20086
Buggy source:
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input Power Spectrum
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private MelSpectrum process(Spectrum input) throws IllegalArgumentException {
  MelSpectrum outputMelSpectrum;
  getTimer().start();
  double[] in=input.getSpectrumData();
  if (in.length != (NPoint >> 1)) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ NPoint);
  }
  double[] outputMelFilterbank=new double[numberFilters];
  for (int i=0; i < numberFilters; i++) {
    outputMelFilterbank[i]=filter[i].filterOutput(in);
  }
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputMelFilterbank,"String_Node_Str",12,5));
  }
  outputMelSpectrum=new MelSpectrum(outputMelFilterbank);
  return outputMelSpectrum;
}

Fixed version (ground truth):
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input Power Spectrum
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private MelSpectrum process(Spectrum input) throws IllegalArgumentException {
  MelSpectrum outputMelSpectrum;
  getTimer().start();
  double[] in=input.getSpectrumData();
  if (in.length != (NPoint >> 1)) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ NPoint);
  }
  double[] outputMelFilterbank=new double[numberFilters];
  for (int i=0; i < numberFilters; i++) {
    outputMelFilterbank[i]=filter[i].filterOutput(in);
  }
  getTimer().stop();
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputMelFilterbank,"String_Node_Str",9,5));
  }
  outputMelSpectrum=new MelSpectrum(outputMelFilterbank);
  return outputMelSpectrum;
}
Program: 20088
Project: 20088
Buggy source:
/** 
 * Returns a FeatureFrame, EndPointSignal.SEGMENT_START, or EndPointSignal.SEGMENT_END signals produced by this FrontEnd. Return null if no Data available
 * @return a Data object, which is usually a FeatureFrame, or nullif no Data available
 */
public Data read(){
synchronized (queue) {
    if (queue.size() == 0) {
      return null;
    }
 else {
      Object data=queue.get(0);
      if (data == null) {
        return null;
      }
 else {
        return (Data)data;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the next Data object produced by the FrontEnd, which can be a FeatureFrame, EndPointSignal.SEGMENT_START, or EndPointSignal.SEGMENT_END signals produced by this FrontEnd. Return null if no Data available
 * @return a Data object, which is usually a FeatureFrame, or nullif no Data available
 */
public Data read(){
synchronized (queue) {
    if (queue.size() == 0) {
      return null;
    }
 else {
      Object data=queue.remove(0);
      if (data == null) {
        return null;
      }
 else {
        return (Data)data;
      }
    }
  }
}
Program: 20089
Project: 20089
Buggy source:
/** 
 * Initializes the <b>Wk[]</b> vector. <b>Wk[k] = w ^ k</b> where: <b>w = exp(-2 * PI * i / N)</b> <b>i</b> is a complex number such that <b>i * i = -1</b> and <b>N</b> is the number of points in the FFT. Since <b>w</b> is complex, this is the same as <b>Re(Wk[k]) = cos ( -2 * PI * k / N)</b> <b>Im(Wk[k]) = sin ( -2 * PI * k / N)</b>
 * @param N number of points in the FFT
 * @param invert whether it's direct (false) or inverse (true) FFT
 */
private void createWk(int N,boolean invert){
  Wk=new Complex[N >> 1];
  double w=-2 * Math.PI / N;
  if (invert == true) {
    w=-w;
  }
  for (int k=0; k < N / 2; k++) {
    Wk[k]=new Complex(Math.cos(w * k),Math.sin(w * k));
  }
}

Fixed version (ground truth):
/** 
 * Initializes the <b>Wk[]</b> vector. <b>Wk[k] = w ^ k</b> where: <b>w = exp(-2 * PI * i / N)</b> <b>i</b> is a complex number such that <b>i * i = -1</b> and <b>N</b> is the number of points in the FFT. Since <b>w</b> is complex, this is the same as <b>Re(Wk[k]) = cos ( -2 * PI * k / N)</b> <b>Im(Wk[k]) = sin ( -2 * PI * k / N)</b>
 * @param N number of points in the FFT
 * @param invert whether it's direct (false) or inverse (true) FFT
 */
private void createWk(int N,boolean invert){
  Wk=new Complex[N >> 1];
  double w=-2 * Math.PI / N;
  if (invert == true) {
    w=-w;
  }
  for (int k=0; k < (N / 2); k++) {
    Wk[k]=new Complex(Math.cos(w * k),Math.sin(w * k));
  }
}
Program: 20090
Project: 20090
Buggy source:
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input audio frame
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private Spectrum process(AudioFrame input) throws IllegalArgumentException {
  double[] in=input.getAudioSamples();
  if (in.length != windowSize) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ windowSize);
  }
  Complex[] inputSeq=new Complex[NPoint];
  if (NPoint < windowSize) {
    for (int i=0; i < NPoint; i++) {
      inputSeq[i]=new Complex((double)in[i]);
    }
    for (int i=NPoint; i < windowSize; i++) {
      inputSeq[i % NPoint].addComplex(inputSeq[i % NPoint],new Complex((double)in[i]));
    }
  }
 else {
    for (int i=0; i < windowSize; i++) {
      inputSeq[i]=new Complex((double)in[i]);
    }
    for (int i=windowSize; i < NPoint; i++) {
      inputSeq[i]=new Complex();
    }
  }
  double[] outputSpectrum=new double[NPoint];
  recurseFFT(inputSeq,outputSpectrum,NPoint,false);
  Spectrum output=new Spectrum(outputSpectrum);
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputSpectrum,"String_Node_Str"));
  }
  return output;
}

Fixed version (ground truth):
/** 
 * Process data, creating the power spectrum from an input audio frame.
 * @param input input audio frame
 * @return power spectrum
 * @throws java.lang.IllegalArgumentException
 */
private Spectrum process(AudioFrame input) throws IllegalArgumentException {
  double[] in=input.getAudioSamples();
  if (in.length != windowSize) {
    throw new IllegalArgumentException("String_Node_Str" + in.length + "String_Node_Str"+ windowSize);
  }
  Complex[] inputSeq=new Complex[NPoint];
  if (NPoint < windowSize) {
    for (int i=0; i < NPoint; i++) {
      inputSeq[i]=new Complex(in[i]);
    }
    for (int i=NPoint; i < windowSize; i++) {
      inputSeq[i % NPoint].addComplex(inputSeq[i % NPoint],new Complex(in[i]));
    }
  }
 else {
    for (int i=0; i < windowSize; i++) {
      inputSeq[i]=new Complex(in[i]);
    }
    for (int i=windowSize; i < NPoint; i++) {
      inputSeq[i]=new Complex();
    }
  }
  double[] outputSpectrum=new double[NPoint >> 1];
  recurseFFT(inputSeq,outputSpectrum,NPoint,false);
  Spectrum output=new Spectrum(outputSpectrum);
  if (getDump()) {
    System.out.println(Util.dumpDoubleArray(outputSpectrum,"String_Node_Str"));
  }
  return output;
}
Program: 20091
Project: 20091
Buggy source:
/** 
 * Make sure the number of points in the FFT is a power of 2 by computing its log base 2 and checking for remainders.
 * @throws java.lang.IllegalArgumentException
 */
private void computeLog2N() throws IllegalArgumentException {
  for (int k=NPoint, log2N=0; k > 1; k>>=1, log2N++) {
    if (((k % 2) != 0) || (NPoint < 0)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Make sure the number of points in the FFT is a power of 2 by computing its log base 2 and checking for remainders.
 * @throws java.lang.IllegalArgumentException
 */
private void computeLog2N() throws IllegalArgumentException {
  this.log2N=0;
  for (int k=this.NPoint; k > 1; k>>=1, this.log2N++) {
    if (((k % 2) != 0) || (this.NPoint < 0)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
}
Program: 20092
Project: 20092
Buggy source:
/** 
 * Establish the recursion. The FFT computation will be  computed by as a recursion. Each stage in the butterfly will be fully computed during recursion. In fact, we use the mechanism of recursion only because it's the simplest  way of switching the "input" and "output" vectors. The  output of a stage is the input to the next stage. The  butterfly computes elements in place, but we still need to switch the vectors. We could copy it (not very efficient...) or, in C, switch the pointers. We can avoid the pointers by using recursion.
 * @param input input sequence
 * @param output output sequence
 * @param NPoint number of points in the FFT
 * @param invert whether it's direct (false) or inverse (true) FFT
 */
private void recurseFFT(Complex[] input,double[] output,int NPoint,boolean invert){
  Complex[] from=new Complex[NPoint];
  Complex[] to=new Complex[NPoint];
  double divisor;
  if (invert == false) {
    divisor=1.0f;
  }
 else {
    divisor=(double)NPoint;
  }
  for (int i=0; i < NPoint; i++) {
    to[i]=new Complex();
    from[i]=new Complex();
    from[i].scaleComplex(input[i],divisor);
  }
  butterflyStage(from,to,NPoint,NPoint >> 1);
  if ((log2N & 1) == 0) {
    for (int i=0; i < NPoint; i++) {
      output[i]=to[i].squaredMagnitudeComplex();
    }
  }
 else {
    for (int i=0; i < NPoint; i++) {
      output[i]=from[i].squaredMagnitudeComplex();
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * Establish the recursion. The FFT computation will be  computed by as a recursion. Each stage in the butterfly will be fully computed during recursion. In fact, we use the mechanism of recursion only because it's the simplest  way of switching the "input" and "output" vectors. The  output of a stage is the input to the next stage. The  butterfly computes elements in place, but we still need to switch the vectors. We could copy it (not very efficient...) or, in C, switch the pointers. We can avoid the pointers by using recursion.
 * @param input input sequence
 * @param output output sequence
 * @param NPoint number of points in the FFT
 * @param invert whether it's direct (false) or inverse (true) FFT
 */
private void recurseFFT(Complex[] input,double[] output,int NPoint,boolean invert){
  Complex[] from=new Complex[NPoint];
  Complex[] to=new Complex[NPoint];
  double divisor;
  if (invert == false) {
    divisor=1.0f;
  }
 else {
    divisor=(double)NPoint;
  }
  for (int i=0; i < NPoint; i++) {
    to[i]=new Complex();
    from[i]=new Complex();
    from[i].scaleComplex(input[i],divisor);
  }
  butterflyStage(from,to,NPoint,NPoint >> 1);
  if ((this.log2N & 1) == 0) {
    for (int i=0; i < (NPoint >> 1); i++) {
      output[i]=from[i].squaredMagnitudeComplex();
    }
  }
 else {
    for (int i=0; i < (NPoint >> 1); i++) {
      output[i]=to[i].squaredMagnitudeComplex();
    }
  }
  return;
}
Program: 20093
Project: 20093
Buggy source:
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  int sampleRate=properties.getInt(FrontEnd.PROP_SAMPLE_RATE,8000);
  float windowSizeInMs=properties.getFloat(FrontEnd.PROP_WINDOW_SIZE_MS,25.625F);
  windowSize=Util.getSamplesPerWindow(sampleRate,windowSizeInMs);
  NPoint=properties.getInt(FrontEnd.PROP_FFT_NPOINT,256);
}

Fixed version (ground truth):
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  int sampleRate=properties.getInt(FrontEnd.PROP_SAMPLE_RATE,8000);
  float windowSizeInMs=properties.getFloat(FrontEnd.PROP_WINDOW_SIZE_MS,25.625F);
  windowSize=Util.getSamplesPerWindow(sampleRate,windowSizeInMs);
  NPoint=properties.getInt(FrontEnd.PROP_FFT_NPOINT,512);
}
Program: 20094
Project: 20094
Buggy source:
/** 
 * Compute one stage in the FFT butterfly. The name "butterfly" appears because this method computes elements in pairs, and a flowgraph of the computation (output "0" comes from input "0" and "1" and output "1" comes from input "0" and "1") resembles a butterfly. We repeat <code>butterflyStage</code> for <b>log_2(NPoint)</b> stages, by calling the recursion with the argument <code>currentDistance</code> divided by 2 at each call, and checking if it's still > 0.
 * @param from the input sequence at each stage
 * @param to the output sequence
 * @param NPoint the total number of points
 * @param currentDistance the "distance" between elements in the butterfly
 */
private void butterflyStage(Complex[] from,Complex[] to,int NPoint,int currentDistance){
  int ndx1From;
  int ndx2From;
  int ndx1To;
  int ndx2To;
  int ndxWk=0;
  Complex wkTimesF2=new Complex();
  if (currentDistance > 0) {
    for (int s=0; s < currentDistance; s++) {
      ndx1From=s;
      ndx2From=s + currentDistance;
      ndx1To=s;
      ndx2To=s + (NPoint >> 1);
      while (ndxWk < (NPoint >> 1)) {
        wkTimesF2.multiplyComplex(Wk[ndxWk],from[ndx2From]);
        to[ndx1To].addComplex(from[ndx1From],wkTimesF2);
        to[ndx2To].subtractComplex(from[ndx1From],wkTimesF2);
        ndx1From+=(2 * currentDistance);
        ndx2From+=(2 * currentDistance);
        ndx1To+=currentDistance;
        ndx2To+=currentDistance;
        ndxWk+=currentDistance;
      }
    }
    butterflyStage(to,from,NPoint,currentDistance >> 1);
  }
  return;
}

Fixed version (ground truth):
/** 
 * Compute one stage in the FFT butterfly. The name "butterfly" appears because this method computes elements in pairs, and a flowgraph of the computation (output "0" comes from input "0" and "1" and output "1" comes from input "0" and "1") resembles a butterfly. We repeat <code>butterflyStage</code> for <b>log_2(NPoint)</b> stages, by calling the recursion with the argument <code>currentDistance</code> divided by 2 at each call, and checking if it's still > 0.
 * @param from the input sequence at each stage
 * @param to the output sequence
 * @param NPoint the total number of points
 * @param currentDistance the "distance" between elements in the butterfly
 */
private void butterflyStage(Complex[] from,Complex[] to,int NPoint,int currentDistance){
  int ndx1From;
  int ndx2From;
  int ndx1To;
  int ndx2To;
  int ndxWk;
  Complex wkTimesF2=new Complex();
  if (currentDistance > 0) {
    for (int s=0; s < currentDistance; s++) {
      ndx1From=s;
      ndx2From=s + currentDistance;
      ndx1To=s;
      ndx2To=s + (NPoint >> 1);
      ndxWk=0;
      while (ndxWk < (NPoint >> 1)) {
        wkTimesF2.multiplyComplex(Wk[ndxWk],from[ndx2From]);
        to[ndx1To].addComplex(from[ndx1From],wkTimesF2);
        to[ndx2To].subtractComplex(from[ndx1From],wkTimesF2);
        ndx1From+=(2 * currentDistance);
        ndx2From+=(2 * currentDistance);
        ndx1To+=currentDistance;
        ndx2To+=currentDistance;
        ndxWk+=currentDistance;
      }
    }
    butterflyStage(to,from,NPoint,(currentDistance >> 1));
  }
  return;
}
Program: 20095
Project: 20095
Buggy source:
/** 
 * Method to scale a complex number by a real one. The input complex number is modified in place.
 * @param a the complex number
 * @param b the real scaling factor
 */
public void scaleComplex(Complex a,double b){
  this.real=a.real / b;
  this.imaginary=a.real / b;
}

Fixed version (ground truth):
/** 
 * Method to scale a complex number by a real one. The input complex number is modified in place.
 * @param a the complex number
 * @param b the real scaling factor
 */
public void scaleComplex(Complex a,double b){
  this.real=a.real / b;
  this.imaginary=a.imaginary / b;
}
Program: 20096
Project: 20096
Buggy source:
/** 
 * Method to divide two complex numbers. To divide two complexes, we multiply by the complex conjugate of the denominator, thus resulting in a real number in the denominator.
 * @param a the numerator
 * @param b the denominator
 * @return the ratio between the complex numbers a and b
 */
public Complex divideComplex(complex a,complex b){
  Complex Div=new Complex();
  Div.re=a.re * b.re + a.im * b.im;
  Div.im=a.im * b.re - a.re * b.im;
  scaleComplex(Div,squaredMagnitudeComplex(b));
  return Div;
}

Fixed version (ground truth):
/** 
 * Method to divide two complex numbers. To divide two complexes, we multiply by the complex conjugate of the denominator, thus resulting in a real number in the denominator.
 * @param a the numerator
 * @param b the denominator
 * @return the ratio between the complex numbers a and b
 */
public Complex divideComplex(Complex a,Complex b){
  Complex Div=new Complex();
  Div.re=a.re * b.re + a.im * b.im;
  Div.im=a.im * b.re - a.re * b.im;
  scaleComplex(Div,squaredMagnitudeComplex(b));
  return Div;
}
Program: 20097
Project: 20097
Buggy source:
/** 
 * Method to scale a complex number by a real one. The input complex number is modified in place.
 * @param a the complex number
 * @param b the real scaling factor
 */
public void scaleComplex(complex a,double b){
  a.re/=b;
  a.im/=b;
}

Fixed version (ground truth):
/** 
 * Method to scale a complex number by a real one. The input complex number is modified in place.
 * @param a the complex number
 * @param b the real scaling factor
 */
public void scaleComplex(Complex a,double b){
  a.re/=b;
  a.im/=b;
}
Program: 20098
Project: 20098
Buggy source:
/** 
 * Method to multiply two complex numbers.
 * @param a the first element to multiply
 * @param b the second element to multiply
 * @return the product the complex numbers a and b
 */
public Complex multiplyComplex(complex a,complex b){
  Complex Mult=new Complex();
  Mult.re=a.re * b.re - a.im * b.im;
  Mult.im=a.re * b.im + a.im * b.re;
  return Mult;
}

Fixed version (ground truth):
/** 
 * Method to multiply two complex numbers.
 * @param a the first element to multiply
 * @param b the second element to multiply
 * @return the product the complex numbers a and b
 */
public Complex multiplyComplex(Complex a,Complex b){
  Complex Mult=new Complex();
  Mult.re=a.re * b.re - a.im * b.im;
  Mult.im=a.re * b.im + a.im * b.re;
  return Mult;
}
Program: 20099
Project: 20099
Buggy source:
/** 
 * Method to compute the squared magnitude of a complex number.
 * @param a the complex number
 * @return the squared magnitude of the complex number
 */
public Complex squaredMagnitudeComplex(complex a){
  double squaredMag;
  squaredMag=a.re * a.re + a.im * a.im;
  return squaredMag;
}

Fixed version (ground truth):
/** 
 * Method to compute the squared magnitude of a complex number.
 * @param a the complex number
 * @return the squared magnitude of the complex number
 */
public double squaredMagnitudeComplex(Complex a){
  double squaredMag;
  squaredMag=a.re * a.re + a.im * a.im;
  return squaredMag;
}
Program: 20100
Project: 20100
Buggy source:
/** 
 * Method to add two complex numbers.
 * @param a the first element to be added
 * @param b the second element to be added
 * @return the sum of the complex numbers a and b
 */
public Complex addComplex(complex a,complex b){
  Complex Sum=new Complex();
  Sum.re=a.re + b.re;
  Sum.im=a.im + b.im;
  return Sum;
}

Fixed version (ground truth):
/** 
 * Method to add two complex numbers.
 * @param a the first element to be added
 * @param b the second element to be added
 * @return the sum of the complex numbers a and b
 */
public Complex addComplex(Complex a,Complex b){
  Complex Sum=new Complex();
  Sum.re=a.re + b.re;
  Sum.im=a.im + b.im;
  return Sum;
}
Program: 20101
Project: 20101
Buggy source:
/** 
 * Method to subtract two complex numbers.
 * @param a the element we subtract from
 * @param b the element to be subtracted
 * @return the difference between the complex numbers a and b
 */
public Complex subtractComplex(complex a,complex b){
  Complex Diff=new Complex();
  Diff.re=a.re - b.re;
  Diff.im=a.im - b.im;
  return Diff;
}

Fixed version (ground truth):
/** 
 * Method to subtract two complex numbers.
 * @param a the element we subtract from
 * @param b the element to be subtracted
 * @return the difference between the complex numbers a and b
 */
public Complex subtractComplex(Complex a,Complex b){
  Complex Diff=new Complex();
  Diff.re=a.re - b.re;
  Diff.im=a.im - b.im;
  return Diff;
}
Program: 20102
Project: 20102
Buggy source:
/** 
 * Create a default complex number;
 */
private Complex(){
  this.re=0;
  this.im=0;
}

Fixed version (ground truth):
/** 
 * Create a default complex number;
 */
private Complex(){
  this.re=0.0f;
  this.im=0.0f;
}
Program: 20103
Project: 20103
Buggy source:
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  initialMean=properties.getFloat(PROP_INITIAL_MEAN,12.0f);
  cepstrumLength=properties.getInt(CepstrumProducer.PROP_CEPSTRUM_SIZE,13);
  cmnWindow=properties.getInt(PROP_CMN_WINDOW,500);
  cmnShiftWindow=properties.getInt(PROP_CMN_SHIFT_WINDOW,800);
}

Fixed version (ground truth):
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  initialMean=properties.getFloat(PROP_INITIAL_MEAN,12.0f);
  cepstrumLength=properties.getInt(FrontEnd.PROP_CEPSTRUM_SIZE,13);
  cmnWindow=properties.getInt(PROP_CMN_WINDOW,500);
  cmnShiftWindow=properties.getInt(PROP_CMN_SHIFT_WINDOW,800);
}
Program: 20104
Project: 20104
Buggy source:
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  featureLength=properties.getInt(PROP_FEATURE_LENGTH,39);
  window=properties.getInt(PROP_FEATURE_WINDOW,3);
  cepstrumLength=properties.getInt(CepstrumProducer.PROP_CEPSTRUM_SIZE,13);
}

Fixed version (ground truth):
/** 
 * Reads the parameters needed from the static SphinxProperties object.
 */
private void getSphinxProperties(){
  SphinxProperties properties=SphinxProperties.getSphinxProperties("String_Node_Str");
  featureLength=properties.getInt(PROP_FEATURE_LENGTH,39);
  window=properties.getInt(PROP_FEATURE_WINDOW,3);
  cepstrumLength=properties.getInt(FrontEnd.PROP_CEPSTRUM_SIZE,13);
}