Program: 150753
Project: 150753
Buggy source:
@Override public void changeInput(String name,int index){
  stopWorker();
  processedInputImage=false;
  String videoName=inputRefs.get(index).getPath();
  String path=videoName.substring(0,videoName.lastIndexOf('/'));
  ConfigThreshold configThreshold=ConfigThreshold.local(ThresholdType.LOCAL_SQUARE,10);
  if (name.compareTo(SQUARE_NUMBER) == 0) {
    detector=FactoryFiducial.squareBinary(new ConfigFiducialBinary(0.1),configThreshold,imageClass);
  }
 else   if (name.compareTo(SQUARE_PICTURE) == 0) {
    double length=0.1;
    detector=FactoryFiducial.squareImage(new ConfigFiducialImage(),configThreshold,imageClass);
    SquareImage_to_FiducialDetector<I> d=(SquareImage_to_FiducialDetector<I>)detector;
    String pathImg=new File(path,"String_Node_Str").getPath();
    List<String> names=new ArrayList<>();
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    for (    String foo : names) {
      BufferedImage img=media.openImage(new File(pathImg,foo).getPath());
      if (img == null)       throw new RuntimeException("String_Node_Str" + new File(pathImg,foo).getPath());
      d.addPatternImage(ConvertBufferedImage.convertFromSingle(img,null,imageClass),125,length);
    }
  }
 else   if (name.compareTo(CALIB_CHESS) == 0) {
    detector=FactoryFiducial.calibChessboard(new ConfigChessboard(7,5,0.03),imageClass);
  }
 else   if (name.compareTo(CALIB_SQUARE_GRID) == 0) {
    detector=FactoryFiducial.calibSquareGrid(new ConfigSquareGrid(4,3,0.03,0.03),imageClass);
  }
 else   if (name.compareTo(CALIB_SQUARE_BINARY_GRID) == 0) {
    File configFile=new File(path,"String_Node_Str");
    try {
      ConfigSquareGridBinary config=ConfigSquareGridBinary.parseSimple(new BufferedReader(new FileReader(configFile)));
      detector=FactoryFiducial.calibSquareGridBinary(config,imageClass);
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
  intrinsic=CalibrationIO.load(media.openFile(path + "String_Node_Str"));
  detector.setLensDistortion(new LensDistortionRadialTangential(intrinsic));
  fiducialInfo.clear();
  stabilityMax.location=0.05;
  stabilityMax.orientation=0.02;
  SimpleImageSequence<Planar<I>> video=media.openVideo(videoName,ImageType.pl(3,imageClass));
  if (video == null) {
    System.err.println("String_Node_Str" + videoName);
    System.exit(1);
  }
  process(video);
}

Fixed version (ground truth):
@Override public void changeInput(String name,int index){
  stopWorker();
  processedInputImage=false;
  String videoName=inputRefs.get(index).getPath();
  String path=videoName.substring(0,videoName.lastIndexOf('/'));
  ConfigThreshold configThreshold=ConfigThreshold.local(ThresholdType.LOCAL_SQUARE,10);
  if (name.compareTo(SQUARE_NUMBER) == 0) {
    detector=FactoryFiducial.squareBinary(new ConfigFiducialBinary(0.1),configThreshold,imageClass);
  }
 else   if (name.compareTo(SQUARE_PICTURE) == 0) {
    double length=0.1;
    detector=FactoryFiducial.squareImage(new ConfigFiducialImage(),configThreshold,imageClass);
    SquareImage_to_FiducialDetector<I> d=(SquareImage_to_FiducialDetector<I>)detector;
    String pathImg=new File(path,"String_Node_Str").getPath();
    List<String> names=new ArrayList<>();
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    for (    String foo : names) {
      BufferedImage img=media.openImage(new File(pathImg,foo).getPath());
      if (img == null)       throw new RuntimeException("String_Node_Str" + new File(pathImg,foo).getPath());
      d.addPatternImage(ConvertBufferedImage.convertFromSingle(img,null,imageClass),125,length);
    }
  }
 else   if (name.compareTo(CALIB_CHESS) == 0) {
    detector=FactoryFiducial.calibChessboard(new ConfigChessboard(7,5,0.03),imageClass);
  }
 else   if (name.compareTo(CALIB_SQUARE_GRID) == 0) {
    detector=FactoryFiducial.calibSquareGrid(new ConfigSquareGrid(4,3,0.03,0.03),imageClass);
  }
 else   if (name.compareTo(CALIB_SQUARE_BINARY_GRID) == 0) {
    File configFile=new File(path,"String_Node_Str");
    try {
      ConfigSquareGridBinary config=ConfigSquareGridBinary.parseSimple(new BufferedReader(new FileReader(configFile)));
      detector=FactoryFiducial.calibSquareGridBinary(config,imageClass);
    }
 catch (    IOException e) {
      throw new RuntimeException(e);
    }
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
  intrinsic=CalibrationIO.load(media.openFile(path + "String_Node_Str"));
  detector.setLensDistortion(new LensDistortionRadialTangential(intrinsic));
  fiducialInfo.clear();
  stabilityMax.location=0.01;
  stabilityMax.orientation=0.02;
  SimpleImageSequence<Planar<I>> video=media.openVideo(videoName,ImageType.pl(3,imageClass));
  if (video == null) {
    System.err.println("String_Node_Str" + videoName);
    System.exit(1);
  }
  process(video);
}