Program: 150934
Project: 150934
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('/'));
  if (name.compareTo(SQUARE_NUMBER) == 0) {
    detector=FactoryFiducial.squareBinaryFast(new ConfigFiducialBinary(0.1),100,imageClass);
  }
 else   if (name.compareTo(SQUARE_PICTURE) == 0) {
    double length=0.1;
    detector=FactoryFiducial.squareImageFast(new ConfigFiducialImage(),100,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<String>();
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    names.add("String_Node_Str");
    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(5,7,0.03),imageClass);
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
  intrinsic=UtilIO.loadXML(media.openFile(path + "String_Node_Str"));
  detector.setIntrinsic(intrinsic);
  SimpleImageSequence<MultiSpectral<I>> video=media.openVideo(videoName,ImageType.ms(3,imageClass));
  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('/'));
  if (name.compareTo(SQUARE_NUMBER) == 0) {
    detector=FactoryFiducial.squareBinaryFast(new ConfigFiducialBinary(0.1),100,imageClass);
  }
 else   if (name.compareTo(SQUARE_PICTURE) == 0) {
    double length=0.1;
    detector=FactoryFiducial.squareImageFast(new ConfigFiducialImage(),100,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<String>();
    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(5,7,0.03),imageClass);
  }
 else {
    throw new RuntimeException("String_Node_Str");
  }
  intrinsic=UtilIO.loadXML(media.openFile(path + "String_Node_Str"));
  detector.setIntrinsic(intrinsic);
  SimpleImageSequence<MultiSpectral<I>> video=media.openVideo(videoName,ImageType.ms(3,imageClass));
  process(video);
}