Problem to run a macro

I want to use a plugin on multiple image. So i created a java class to do it but when i run it still open a dialog and just give me the half of outputfiles. But i don’t get any error message.
This is my script in Java:.

for (File f : initial.listFiles()) {
            String objectif = "X(\\d+)";
            String wavelength = "L(\\d+)";
            String na = "NA(\\d+)";
            String micro = "M(\\d)";
            Pattern robjectif = Pattern.compile(objectif);
            Pattern rwavelength = Pattern.compile(wavelength);
            Pattern rna = Pattern.compile(na);
            Pattern rmicro = Pattern.compile(micro);
            Matcher mobjectif = robjectif.matcher(f.getName());
            Matcher mwavelength = rwavelength.matcher(f.getName());
            Matcher mna = rna.matcher(f.getName());
            Matcher mmicro = rmicro.matcher(f.getName());

            if (f.toString().endsWith(".czi")&&mobjectif.find( )&&mwavelength.find()&&mna.find()&&mmicro.find()) {
IJ.runPlugIn("Generate_fieldIlluminationReport", "steps=10 microscope=" + + " wavelength=" + + " na=" + + " pinhole=1 text1=[Sample infos:\n] text2=Comments:\n scale=5 save save=[C:\\Users\\Guy\\Desktop\\testout\\metroloJ\\Fieldilluminationreportforhomogeneitechamp_X" + + "_L" + + "_NA" + + "_M" + + ".pdf]");

I also tried with macro in Python but I get this error when it comes to run the plugins :java.lang.StringIndexOutOfBoundsException: String index out of range: -1

This is my macro in Python:

from ij import IJ
from ij.process import ImageStatistics as IS
import os
import re

folder = "/Users/Guy/Desktop/RawDataNucleus/test_metro/"

for filename in os.listdir(folder):
	if filename.endswith(".czi"):
		print "Processing ",filename"Bio-Formats Importer", "open="+folder+filename+" autoscale color_mode=Colorized rois_import=[ROI manager] view=Hyperstack stack_order=XYCZT")
		#imp = IJ.openImage(os.path.join(folder, filename))
		obj ="_X(\d+)",filename)
		na ="_NA(\d+)",filename)
		micro ="_M(\d+)",filename)
		if obj and wave and na and micro != None:
			Object =
			Wavelength =
			AN =
			mmicro =
			print(Object, Wavelength, AN, mmicro)"Generate field illumination report", "steps=10 microscope=Confocal wavelength=" + Wavelength + " na=" +AN+ " pinhole=1 text1=[Sample infos:TITOTOTOOT\n] text2=Comments:\n scale=5 save save=["+folder+"Field illumination_X" + Object + "_L" + Wavelength + "_NA" + AN + "_M" + mmicro + ".pdf]");		

Does anyone has any idea of how to solve this exception ?.
Thank you in advance.