Program: 76350
Project: 76350
Buggy source:
public void run(){
  int readWriteDataSizeInFrames=1024;
  TargetDataLine targetLine;
  int sampleSizeInBitsInt=16;
  int channels=1;
  int frameSizeInBits=sampleSizeInBitsInt;
  double frameRate=sampleRate;
  boolean signed=true;
  boolean bigEndian=true;
  AudioFormat format=new AudioFormat((float)sampleRate,sampleSizeInBitsInt,channels,signed,bigEndian);
  int frameSizeInBytes=format.getFrameSize();
  DataLine.Info targetInfo=new DataLine.Info(TargetDataLine.class,null,null,new Class[0],format,readWriteDataSizeInFrames * 4);
  if (!AudioSystem.isSupportedLine(targetInfo)) {
    shutDown("String_Node_Str" + targetInfo + "String_Node_Str");
    return;
  }
  try {
    targetLine=(TargetDataLine)AudioSystem.getLine(targetInfo);
    targetLine.open(format,targetLine.getBufferSize());
  }
 catch (  LineUnavailableException ex) {
    shutDown("String_Node_Str" + ex);
    return;
  }
  System.out.println("String_Node_Str" + "String_Node_Str" + targetLine.getBufferSize());
  int targetBufferLengthInBytes=readWriteDataSizeInFrames * frameSizeInBytes;
  byte[] targetData=new byte[targetBufferLengthInBytes];
  int numFramesRead;
  DataLine.Info sourceInfo=new DataLine.Info(SourceDataLine.class,null,null,new Class[0],format,readWriteDataSizeInFrames * 4);
  if (!AudioSystem.isSupportedLine(sourceInfo)) {
    shutDown("String_Node_Str" + sourceInfo + "String_Node_Str");
    return;
  }
  SourceDataLine sourceLine;
  try {
    sourceLine=(SourceDataLine)AudioSystem.getLine(sourceInfo);
    sourceLine.open(format,sourceLine.getBufferSize());
  }
 catch (  LineUnavailableException ex) {
    shutDown("String_Node_Str" + ex);
    return;
  }
  System.out.println("String_Node_Str" + "String_Node_Str" + sourceLine.getBufferSize());
  double[] audioInDoubleArray;
  byte[] audioOutByteArray;
  int numBytesRead=0;
  targetLine.start();
  sourceLine.start();
  if (thread == null) {
    System.out.println("String_Node_Str");
  }
  PitchDetector pd=new PitchDetector(readWriteDataSizeInFrames);
  PitchShift ps=new PitchShift();
  double[] psArray1=new double[readWriteDataSizeInFrames];
  double[] psArray2=new double[readWriteDataSizeInFrames];
  double[] currPitchArray;
  while (thread != null) {
    try {
      if ((numFramesRead=targetLine.read(targetData,0,readWriteDataSizeInFrames)) == -1) {
        break;
      }
      audioInDoubleArray=_byteArrayToDoubleArray(targetData,frameSizeInBytes);
      currPitchArray=pd.performPitchDetect(audioInDoubleArray,(int)sampleRate);
      audioInDoubleArray=ps.performPitchShift(audioInDoubleArray,(float)sampleRate,currPitchArray,pitchScaleIn1);
      audioOutByteArray=_doubleArrayToByteArray(audioInDoubleArray,frameSizeInBytes);
      int numFramesRemaining=numFramesRead;
      while (numFramesRemaining > 0) {
        numFramesRemaining-=sourceLine.write(audioOutByteArray,0,numFramesRemaining);
      }
    }
 catch (    Exception e) {
      shutDown("String_Node_Str" + e);
      break;
    }
  }
  if (thread != null) {
    sourceLine.drain();
  }
  sourceLine.stop();
  sourceLine.close();
  sourceLine=null;
  shutDown(null);
}

Fixed version (ground truth):
public void run(){
  int readWriteDataSizeInFrames=750;
  int jsBufferSizeOverReadWriteSize=8;
  TargetDataLine targetLine;
  int sampleSizeInBitsInt=16;
  int channels=1;
  int frameSizeInBits=sampleSizeInBitsInt;
  double frameRate=sampleRate;
  boolean signed=true;
  boolean bigEndian=true;
  AudioFormat format=new AudioFormat((float)sampleRate,sampleSizeInBitsInt,channels,signed,bigEndian);
  int frameSizeInBytes=format.getFrameSize();
  DataLine.Info targetInfo=new DataLine.Info(TargetDataLine.class,null,null,new Class[0],format,AudioSystem.NOT_SPECIFIED);
  if (!AudioSystem.isSupportedLine(targetInfo)) {
    shutDown("String_Node_Str" + targetInfo + "String_Node_Str");
    return;
  }
  try {
    targetLine=(TargetDataLine)AudioSystem.getLine(targetInfo);
    targetLine.open(format,readWriteDataSizeInFrames * jsBufferSizeOverReadWriteSize);
  }
 catch (  LineUnavailableException ex) {
    shutDown("String_Node_Str" + ex);
    return;
  }
  System.out.println("String_Node_Str" + "String_Node_Str" + targetLine.getBufferSize());
  int targetBufferLengthInBytes=readWriteDataSizeInFrames * frameSizeInBytes;
  byte[] targetData=new byte[targetBufferLengthInBytes];
  int numFramesRead;
  DataLine.Info sourceInfo=new DataLine.Info(SourceDataLine.class,null,null,new Class[0],format,AudioSystem.NOT_SPECIFIED);
  if (!AudioSystem.isSupportedLine(sourceInfo)) {
    shutDown("String_Node_Str" + sourceInfo + "String_Node_Str");
    return;
  }
  SourceDataLine sourceLine;
  try {
    sourceLine=(SourceDataLine)AudioSystem.getLine(sourceInfo);
    sourceLine.open(format,readWriteDataSizeInFrames * jsBufferSizeOverReadWriteSize);
  }
 catch (  LineUnavailableException ex) {
    shutDown("String_Node_Str" + ex);
    return;
  }
  System.out.println("String_Node_Str" + "String_Node_Str" + sourceLine.getBufferSize());
  double[] audioInDoubleArray;
  byte[] audioOutByteArray;
  int numBytesRead=0;
  targetLine.start();
  sourceLine.start();
  if (thread == null) {
    System.out.println("String_Node_Str");
  }
  PitchDetector pd=new PitchDetector(readWriteDataSizeInFrames);
  PitchShift ps=new PitchShift();
  double[] psArray1=new double[readWriteDataSizeInFrames];
  double[] psArray2=new double[readWriteDataSizeInFrames];
  double[] currPitchArray;
  while (thread != null) {
    try {
      if ((numFramesRead=targetLine.read(targetData,0,readWriteDataSizeInFrames)) == -1) {
        break;
      }
      audioInDoubleArray=_byteArrayToDoubleArray(targetData,frameSizeInBytes);
      currPitchArray=pd.performPitchDetect(audioInDoubleArray,(int)sampleRate);
      audioInDoubleArray=ps.performPitchShift(audioInDoubleArray,(float)sampleRate,currPitchArray,pitchScaleIn1);
      audioOutByteArray=_doubleArrayToByteArray(audioInDoubleArray,frameSizeInBytes);
      int numFramesRemaining=numFramesRead;
      while (numFramesRemaining > 0) {
        numFramesRemaining-=sourceLine.write(audioOutByteArray,0,numFramesRemaining);
      }
    }
 catch (    Exception e) {
      shutDown("String_Node_Str" + e);
      break;
    }
  }
  if (thread != null) {
    sourceLine.drain();
  }
  sourceLine.stop();
  sourceLine.close();
  sourceLine=null;
  shutDown(null);
}