Buggy code:
public class Multi_View_Deconvolution implements PlugIn { private final String myURL = "http:////fly.mpi-cbg.de//preibisch" ; @ Override public void run ( String arg0 ) { } public static boolean fusionUseContentBasedStatic = false ; public static boolean displayFusedImageStatic = true ; public static boolean saveFusedImageStatic = true ; public static int defaultMinNumIterations = 20 ; public static int defaultMaxNumIterations = 50 ; public static boolean defaultUseTikhonovRegularization = true ; public static double defaultLambda = 0.006 ; public static int defaultParalellViews = 0 ; public static boolean showAveragePSF = true ; public static int defaultDeconvolutionScheme = 0 ; public static int defaultContainer = 0 ; public static String [ ] deconvolutionScheme = new String [ ] { "Multiplicative" , "Additive" } ; public static String [ ] imglibContainer = new String [ ] { "Array<seq2seq4repair_space>container" , "Planar<seq2seq4repair_space>container" , "Cell<seq2seq4repair_space>container" } ; int minNumIterations ; int maxNumIterations ; int paralellViews ; int container ; boolean useTikhonovRegularization = true ; double lambda = 0.006 ; boolean multiplicative = true ; protected SPIMConfiguration getParameters ( ) { final GenericDialogPlus gd = new GenericDialogPlus ( "Multi-View<seq2seq4repair_space>Deconvolution" ) ; gd . addDirectoryField ( "SPIM_data_directory" , spimDataDirectory ) ; gd . addStringField ( "Pattern_of_SPIM<seq2seq4repair_space>files" , fileNamePattern , 25 ) ; gd . addStringField ( "Timepoints_to_process" , timepoints ) ; gd . addStringField ( "Angles<seq2seq4repair_space>to<seq2seq4repair_space>process" , angles ) ; gd . addMessage ( "" ) ; gd . addMessage ( ( "This<seq2seq4repair_space>Plugin<seq2seq4repair_space>is<seq2seq4repair_space>developed<seq2seq4repair_space>by<seq2seq4repair_space>Stephan<seq2seq4repair_space>Preibisch\n" + ( myURL ) ) ) ; MultiLineLabel text = ( ( MultiLineLabel ) ( gd . getMessage ( ) ) ) ; Bead_Registration . addHyperLinkListener ( text , myURL ) ; gd . showDialog ( ) ; if ( gd . wasCanceled ( ) ) return null ; Bead_Registration . spimDataDirectory = gd . getNextString ( ) ; <START_BUG> Bead_Registration . fileNamePatternMC = gd . getNextString ( ) ; <END_BUG> Bead_Registration . timepoints = gd . getNextString ( ) ; Bead_Registration . angles = gd . getNextString ( ) ; int numViews = 0 ; try { numViews = SPIMConfiguration . parseIntegerString ( angles ) . size ( ) ; } catch ( ConfigurationParserException e ) { IOFunctions . printErr ( ( "Cannot<seq2seq4repair_space>understand//parse<seq2seq4repair_space>the<seq2seq4repair_space>channels:<seq2seq4repair_space>" + ( Bead_Registration . angles ) ) ) ; return null ; } ArrayList < Integer > channels ; channels = new ArrayList < Integer > ( ) ; channels . add ( 0 ) ; final SPIMConfiguration conf = new SPIMConfiguration ( ) ; conf . timepointPattern = Bead_Registration . timepoints ; conf . anglePattern = Bead_Registration . angles ; conf . channelPattern = "" ; conf . channelsToRegister = "" ; conf . channelsToFuse = "" ; conf . inputFilePattern = Bead_Registration . fileNamePattern ; conf . inputdirectory = Bead_Registration . spimDataDirectory ; if ( ! ( Bead_Registration . init ( conf ) ) ) return null ; final ArrayList < ArrayList < Integer > > timepoints = new ArrayList < ArrayList < Integer > > ( ) ; int numChoices = 0 ; conf . zStretching = - 1 ; for ( int c = 0 ; c < ( channels . size ( ) ) ; ++ c ) { timepoints . add ( new ArrayList < Integer > ( ) ) ; final String name = conf . file [ 0 ] [ c ] [ 0 ] . getName ( ) ; final File regDir = new File ( conf . registrationFiledirectory ) ; if ( ! ( regDir . isDirectory ( ) ) ) { IOFunctions . println ( ( ( conf . registrationFiledirectory ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>directory.<seq2seq4repair_space>" ) ) ; return null ; } final String [ ] entries = regDir . list ( new FilenameFilter ( ) { @ Override public boolean accept ( File directory , String filename ) { if ( ( filename . contains ( name ) ) && ( filename . contains ( ".registration" ) ) ) return true ; else return false ; } } ) ; final String [ ] entriesBeads = regDir . list ( new FilenameFilter ( ) { @ Override public boolean accept ( File directory , String filename ) { if ( ( filename . contains ( name ) ) && ( filename . contains ( ".beads.txt" ) ) ) return true ; else return false ; } } ) ; for ( final String s : entries ) { if ( s . endsWith ( ".registration" ) ) { String query = s . substring ( 0 , ( ( s . length ( ) ) - ( new String ( "registration" ) . length ( ) ) ) ) ; boolean isPresent = false ; for ( final String beadFile : entriesBeads ) if ( beadFile . contains ( query ) ) isPresent = true ; if ( ( ! ( timepoints . get ( c ) . contains ( ( - 1 ) ) ) ) && isPresent ) { timepoints . get ( c ) . add ( ( - 1 ) ) ; numChoices ++ ; } } else { final int timepoint = Integer . parseInt ( s . substring ( ( ( s . indexOf ( ".registration.to_" ) ) + 17 ) , s . length ( ) ) ) ; String query = s . substring ( 0 , ( ( s . length ( ) ) - ( new String ( ( "registration.to_" + timepoint ) ) . length ( ) ) ) ) ; boolean isPresent = false ; for ( final String beadFile : entriesBeads ) if ( beadFile . contains ( query ) ) isPresent = true ; if ( ( ! ( timepoints . get ( c ) . contains ( timepoint ) ) ) && isPresent ) { timepoints . get ( c ) . add ( timepoint ) ; numChoices ++ ; } }

Fix:
Bead_Registration . fileNamePattern = gd . getNextString ( ) ;