文本处理小程序有bug

就这么多 code format="java" public void chuli(String filename) throws Exception{

FileInputStream s = new FileInputStream(filename); BufferedReader b = new BufferedReader(new InputStreamReader(s)); String a1=b.readLine;

while(a1!=null){

//System.out.println("一层"+a1.toString); if(a1.equals("(@"))             {                  a1=b.readLine;

String[] temp=new String[1000]; int i=1;

while((!a1.equals(")@"))){                    // a1=b.readLine;                     // System.out.print("erer层");                     temp[i]=a1;                     // j++;                     // System.out.print("erer层");                     i++;                      a1=b.readLine;                      }

i=1; a1=b.readLine; if(!a1.contains("&")){ String b5=a1;a1=b.readLine; temp[0]=b5+" "+a1; a1=b.readLine; }                 else; while(!a1.equals("(@")&&a1!=null){                     if(a1.contains("&"))                      {                          String[] te=a1.split("&");                          for(int k=0;k<temp.length;k++){                             String[] tm= temp[k].split(" ");                             String tem="";                             for(int g=0;g<tm.length;g++){                                 if(!tm[g].equals(""))                                 {                                     tem=tm[g];                                     break;                                 }                             }                              if(tem.equals(te[1]))                                  {                                  temp[k]=b.readLine+","+temp[k];                                  a1=b.readLine;                                  break;                                  } }                     }                      else a1=b.readLine; }                 System.out.println; System.out.println; System.out.println; for(int k=0;k<1000;k++) if(temp[k]!=null) System.out.println(temp[k]); else break; }         }        } code