Program: 70657
Project: 70657
Buggy source:
/** 
 * Renders captured data to a movie with the specified file name.
 */
public void render(String fn) throws Exception {
  if (lastFrameCount == 0) {
    Main.getMain().getLogger().info("String_Node_Str");
    return;
  }
  myViewer.awaitScreenShotCompletion();
  Method method=myMethodMap.get(myMethodName);
  if (myMethodName.equals(INTERNAL_METHOD)) {
    String frameFileNames[]=new String[lastFrameCount];
    for (int i=1; i <= lastFrameCount; i++) {
      frameFileNames[i - 1]=getFrameFileName(i);
    }
    new MakeMovieFromData(frameFileNames,dataPath,fn + "String_Node_Str");
  }
 else   if (myMethodName.equals(ANIMATED_GIF_METHOD)) {
    String opts=method.command;
    opts=opts.replaceAll("String_Node_Str","String_Node_Str" + frameRate);
    String frameFileNames[]=new String[lastFrameCount];
    for (int i=1; i <= lastFrameCount; i++) {
      frameFileNames[i - 1]=getFrameFileName(i);
    }
    File outFile=new File(dataPath + File.separator + fn+ "String_Node_Str");
    DoubleHolder delayHolder=new DoubleHolder(0);
    IntHolder loopHolder=new IntHolder(0);
    AnimatedGifWriter.parseArgs(opts,delayHolder,loopHolder);
    AnimatedGifWriter.write(outFile,frameFileNames,delayHolder.value,loopHolder.value);
  }
 else {
    String cmd=method.command;
    cmd=cmd.replaceAll("String_Node_Str","String_Node_Str" + frameRate);
    cmd=cmd.replaceAll("String_Node_Str",myFormat);
    String[] cmdArray=cmd.split("String_Node_Str");
    String finalCmd="String_Node_Str";
    for (int i=0; i < cmdArray.length; i++) {
      cmdArray[i]=cmdArray[i].replaceAll("String_Node_Str",fn);
      finalCmd=finalCmd + "String_Node_Str" + cmdArray[i];
    }
    Main.getMain().getLogger().info("String_Node_Str" + finalCmd);
    ProcessBuilder procBuild=new ProcessBuilder(cmdArray);
    procBuild.directory(new File(dataPath));
    Process proc=procBuild.start();
    StreamGobbler errorGobbler=new StreamGobbler(proc.getErrorStream(),System.err,"String_Node_Str");
    StreamGobbler outputGobbler=new StreamGobbler(proc.getInputStream(),System.out,"String_Node_Str");
    outputGobbler.start();
    errorGobbler.start();
    int exitVal=proc.waitFor();
    if (exitVal != 0) {
      Main.getMain().getLogger().error("String_Node_Str" + exitVal + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Renders captured data to a movie with the specified file name.
 */
public void render(String fn) throws Exception {
  if (lastFrameCount == 0) {
    Main.getMain().getLogger().info("String_Node_Str");
    return;
  }
  myViewer.awaitScreenShotCompletion();
  Method method=myMethodMap.get(myMethodName);
  if (myMethodName.equals(INTERNAL_METHOD)) {
    String frameFileNames[]=new String[lastFrameCount];
    for (int i=1; i <= lastFrameCount; i++) {
      frameFileNames[i - 1]=getFrameFileName(i);
    }
    new MakeMovieFromData(frameFileNames,dataPath,fn + "String_Node_Str");
  }
 else   if (myMethodName.equals(ANIMATED_GIF_METHOD)) {
    String opts=method.command;
    opts=opts.replace("String_Node_Str","String_Node_Str" + frameRate);
    String frameFileNames[]=new String[lastFrameCount];
    for (int i=1; i <= lastFrameCount; i++) {
      frameFileNames[i - 1]=getFrameFileName(i);
    }
    File outFile=new File(dataPath,fn + "String_Node_Str");
    DoubleHolder delayHolder=new DoubleHolder(0);
    IntHolder loopHolder=new IntHolder(0);
    AnimatedGifWriter.parseArgs(opts,delayHolder,loopHolder);
    AnimatedGifWriter.write(outFile,frameFileNames,delayHolder.value,loopHolder.value);
  }
 else {
    String cmd=method.command;
    cmd=cmd.replace("String_Node_Str","String_Node_Str" + frameRate);
    cmd=cmd.replace("String_Node_Str",myFormat);
    String[] cmdArray=cmd.split("String_Node_Str");
    String finalCmd="String_Node_Str";
    for (int i=0; i < cmdArray.length; i++) {
      cmdArray[i]=cmdArray[i].replace("String_Node_Str",fn);
      finalCmd=finalCmd + "String_Node_Str" + cmdArray[i];
    }
    Main.getMain().getLogger().info("String_Node_Str" + finalCmd);
    ProcessBuilder procBuild=new ProcessBuilder(cmdArray);
    procBuild.directory(new File(dataPath));
    Process proc=procBuild.start();
    StreamGobbler errorGobbler=new StreamGobbler(proc.getErrorStream(),System.err,"String_Node_Str");
    StreamGobbler outputGobbler=new StreamGobbler(proc.getInputStream(),System.out,"String_Node_Str");
    outputGobbler.start();
    errorGobbler.start();
    int exitVal=proc.waitFor();
    if (exitVal != 0) {
      Main.getMain().getLogger().error("String_Node_Str" + exitVal + "String_Node_Str");
    }
  }
}