Program: 39745
Project: 39745
Buggy source:
public SnsInfo parseTimelineXML(String xmlResult) throws Throwable {
  SnsInfo currentSns=new SnsInfo();
  Pattern userIdPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern contentPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaTokenPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaIdxPattern=Pattern.compile("String_Node_Str");
  Pattern timestampPattern=Pattern.compile("String_Node_Str");
  Matcher userIdMatcher=userIdPattern.matcher(xmlResult);
  Matcher contentMatcher=contentPattern.matcher(xmlResult);
  Matcher mediaMatcher=mediaPattern.matcher(xmlResult);
  Matcher mediaTokenMatcher=mediaTokenPattern.matcher(xmlResult);
  Matcher mediaIdxMatcher=mediaIdxPattern.matcher(xmlResult);
  Matcher timestampMatcher=timestampPattern.matcher(xmlResult);
  currentSns.id=getTimelineId(xmlResult);
  currentSns.rawXML=xmlResult;
  Log.d("String_Node_Str",xmlResult);
  if (timestampMatcher.find()) {
    currentSns.timestamp=Integer.parseInt(timestampMatcher.group(1));
  }
  if (userIdMatcher.find()) {
    currentSns.authorId=userIdMatcher.group(1);
  }
  if (contentMatcher.find()) {
    currentSns.content=contentMatcher.group(1);
  }
  while (mediaMatcher.find()) {
    boolean flag=true;
    for (int i=0; i < currentSns.mediaList.size(); i++) {
      if (currentSns.mediaList.get(i).equals(mediaMatcher.group(1))) {
        flag=false;
        break;
      }
    }
    if (flag) {
      String url=mediaMatcher.group(1);
    }
  }
  while (mediaTokenMatcher.find()) {
    boolean flag=true;
    if (flag) {
      String url=mediaTokenMatcher.group(1);
      String urltoken=mediaTokenMatcher.group(2);
      String urlidx=mediaTokenMatcher.group(3);
      String urlenc=mediaTokenMatcher.group(4);
      String urlenckey=mediaTokenMatcher.group(3);
      Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ urltoken+ "String_Node_Str");
      Log.d("String_Node_Str","String_Node_Str" + urlidx + "String_Node_Str"+ urlenc+ "String_Node_Str"+ urlenckey);
      url=url + "String_Node_Str" + urltoken+ "String_Node_Str"+ "String_Node_Str"+ urlenc+ "String_Node_Str"+ urlenckey;
      if (ModelClass2 == null)       ModelClass2=ModelClass.newInstance();
      Object JpegObject2=JpegObject.newInstance();
      String path=Config.EXT_DIR + "String_Node_Str";
      Method loadMethod=ModelClass.getMethod("String_Node_Str",String.class);
      Method decodeAsBitmapMethod=JpegObject.getMethod("String_Node_Str",String.class);
      if (!inited) {
        try {
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
        }
 catch (        Exception e) {
          Log.d("String_Node_Str","String_Node_Str");
        }
      }
      Method isProgressive=JpegObject.getMethod("String_Node_Str",String.class);
      Method IsJpegFile=JpegObject.getMethod("String_Node_Str",String.class);
      if ((boolean)IsJpegFile.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str")) {
        Log.d("String_Node_Str","String_Node_Str");
        if ((boolean)isProgressive.invoke(ModelClass,path))         Log.d("String_Node_Str","String_Node_Str");
 else         Log.d("String_Node_Str","String_Node_Str");
      }
 else {
        Log.d("String_Node_Str","String_Node_Str");
      }
      if ((boolean)IsJpegFile.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str")) {
        Log.d("String_Node_Str","String_Node_Str");
        if ((boolean)isProgressive.invoke(ModelClass,path))         Log.d("String_Node_Str","String_Node_Str");
 else         Log.d("String_Node_Str","String_Node_Str");
      }
 else {
        Log.d("String_Node_Str","String_Node_Str");
      }
      Method decodeFileMethod=null;
      Method decodeFileMethod2=null;
      Method nativeCheckIsImageLegalMethod=null;
      BitmapFactory.Options options=new BitmapFactory.Options();
      Method[] methods=ModelClass.getDeclaredMethods();
      String[] initlib=new String[]{Config.EXT_DIR + "String_Node_Str"};
      for (      Method method : methods) {
        method.setAccessible(true);
        if (method.getName() == "String_Node_Str")         decodeFileMethod=method;
        if (method.getName() == "String_Node_Str")         decodeFileMethod2=method;
        if ("String_Node_Str" == method.getName() && (!inited))         if ((boolean)method.invoke(ModelClass,new Object[]{initlib})) {
          Log.d("String_Node_Str","String_Node_Str");
          inited=true;
        }
        if ("String_Node_Str" == method.getName())         nativeCheckIsImageLegalMethod=method;
      }
      inited=true;
      methods=sfsObject.getDeclaredMethods();
      Method sfsread=null;
      for (      Method method : methods) {
        method.setAccessible(true);
        if (method.getName() == "String_Node_Str")         sfsread=method;
      }
      File file1=new File(path);
      int filesize=(int)file1.length();
      byte[] fileData=new byte[filesize];
      try {
        InputStream fileIutputStream=new FileInputStream(file1);
        int read=fileIutputStream.read(fileData,0,filesize);
        if (read == -1) {
        }
        fileIutputStream.close();
      }
 catch (      Throwable e) {
        Log.d("String_Node_Str","String_Node_Str");
      }
      String msg="String_Node_Str";
      for (int i=0; i < 30; i++) {
        msg+=fileData[i] + "String_Node_Str";
      }
      Log.d("String_Node_Str","String_Node_Str" + msg);
      msg="String_Node_Str";
      for (int i=0; i < 30; i++) {
        msg+=fileData[i] + "String_Node_Str";
      }
      Log.d("String_Node_Str","String_Node_Str" + msg);
      File file4=new File(path);
      InputStream fileIutputStream4=new FileInputStream(file4);
      File file2=new File(path);
      InputStream fileIutputStream2=new FileInputStream(file2);
      int re=(int)nativeCheckIsImageLegalMethod.invoke(ModelClass,fileIutputStream2,new byte[8192],null);
      Log.d("String_Node_Str","String_Node_Str" + re);
      InputStream inputStream5=null;
      Method FileOp_openread=sfsObject.getMethod("String_Node_Str",String.class);
      inputStream5=(InputStream)FileOp_openread.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str");
      Bitmap bitmap=(Bitmap)decodeFileMethod.invoke(ModelClass,fileData,0,(int)file1.length(),null,null,new int[0]);
      if (bitmap != null)       Log.d("String_Node_Str","String_Node_Str" + bitmap.getByteCount());
      if (bitmap != null) {
        Log.d("String_Node_Str","String_Node_Str" + bitmap.getByteCount());
        File file=new File(path + "String_Node_Str");
        if (file.exists()) {
        }
        try {
          OutputStream fileOutputStream=new FileOutputStream(file);
          bitmap.compress(Bitmap.CompressFormat.PNG,100,fileOutputStream);
          fileOutputStream.close();
        }
 catch (        Throwable e) {
          Log.d("String_Node_Str","String_Node_Str");
        }
      }
      currentSns.mediaList.add(url);
    }
  }
  while (mediaIdxMatcher.find()) {
    boolean flag=true;
    if (flag) {
      String url=mediaIdxMatcher.group(1);
      Log.d("String_Node_Str","String_Node_Str" + url);
    }
  }
  return currentSns;
}

Fixed version (ground truth):
public SnsInfo parseTimelineXML(String xmlResult) throws Throwable {
  SnsInfo currentSns=new SnsInfo();
  Pattern userIdPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern contentPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaTokenPattern=Pattern.compile("String_Node_Str",Pattern.DOTALL);
  Pattern mediaIdxPattern=Pattern.compile("String_Node_Str");
  Pattern timestampPattern=Pattern.compile("String_Node_Str");
  Matcher userIdMatcher=userIdPattern.matcher(xmlResult);
  Matcher contentMatcher=contentPattern.matcher(xmlResult);
  Matcher mediaMatcher=mediaPattern.matcher(xmlResult);
  Matcher mediaTokenMatcher=mediaTokenPattern.matcher(xmlResult);
  Matcher mediaIdxMatcher=mediaIdxPattern.matcher(xmlResult);
  Matcher timestampMatcher=timestampPattern.matcher(xmlResult);
  currentSns.id=getTimelineId(xmlResult);
  currentSns.rawXML=xmlResult;
  Log.d("String_Node_Str",xmlResult);
  if (timestampMatcher.find()) {
    currentSns.timestamp=Integer.parseInt(timestampMatcher.group(1));
  }
  if (userIdMatcher.find()) {
    currentSns.authorId=userIdMatcher.group(1);
  }
  if (contentMatcher.find()) {
    currentSns.content=contentMatcher.group(1);
  }
  while (mediaMatcher.find()) {
    boolean flag=true;
    for (int i=0; i < currentSns.mediaList.size(); i++) {
      if (currentSns.mediaList.get(i).equals(mediaMatcher.group(1))) {
        flag=false;
        break;
      }
    }
    if (flag) {
      String url=mediaMatcher.group(1);
    }
  }
  while (mediaTokenMatcher.find()) {
    boolean flag=true;
    if (flag) {
      String url=mediaTokenMatcher.group(1);
      String urltoken=mediaTokenMatcher.group(2);
      String urlidx=mediaTokenMatcher.group(3);
      String urlenc=mediaTokenMatcher.group(4);
      String urlenckey=mediaTokenMatcher.group(3);
      Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ urltoken+ "String_Node_Str");
      Log.d("String_Node_Str","String_Node_Str" + urlidx + "String_Node_Str"+ urlenc+ "String_Node_Str"+ urlenckey);
      url=url + "String_Node_Str" + urltoken+ "String_Node_Str"+ "String_Node_Str"+ urlenc+ "String_Node_Str"+ urlenckey;
      if (ModelClass2 == null)       ModelClass2=ModelClass.newInstance();
      Object JpegObject2=JpegObject.newInstance();
      String path=Config.EXT_DIR + "String_Node_Str";
      Method loadMethod=ModelClass.getMethod("String_Node_Str",String.class);
      Method decodeAsBitmapMethod=JpegObject.getMethod("String_Node_Str",String.class);
      if (!inited) {
        try {
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
          loadMethod.invoke(ModelClass,"String_Node_Str");
        }
 catch (        Exception e) {
          Log.d("String_Node_Str","String_Node_Str");
        }
      }
      Method isProgressive=JpegObject.getMethod("String_Node_Str",String.class);
      Method IsJpegFile=JpegObject.getMethod("String_Node_Str",String.class);
      if ((boolean)IsJpegFile.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str")) {
        Log.d("String_Node_Str","String_Node_Str");
        if ((boolean)isProgressive.invoke(ModelClass,path))         Log.d("String_Node_Str","String_Node_Str");
 else         Log.d("String_Node_Str","String_Node_Str");
      }
 else {
        Log.d("String_Node_Str","String_Node_Str");
      }
      if ((boolean)IsJpegFile.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str")) {
        Log.d("String_Node_Str","String_Node_Str");
        if ((boolean)isProgressive.invoke(ModelClass,path))         Log.d("String_Node_Str","String_Node_Str");
 else         Log.d("String_Node_Str","String_Node_Str");
      }
 else {
        Log.d("String_Node_Str","String_Node_Str");
      }
      Method decodeFileMethod=null;
      Method decodeFileMethod2=null;
      Method nativeCheckIsImageLegalMethod=null;
      BitmapFactory.Options options=new BitmapFactory.Options();
      Method[] methods=ModelClass.getDeclaredMethods();
      String[] initlib=new String[]{Config.EXT_DIR + "String_Node_Str"};
      for (      Method method : methods) {
        method.setAccessible(true);
        if (method.getName() == "String_Node_Str")         decodeFileMethod=method;
        if (method.getName() == "String_Node_Str")         decodeFileMethod2=method;
        if ("String_Node_Str" == method.getName() && (!inited))         if ((boolean)method.invoke(ModelClass,new Object[]{initlib})) {
          Log.d("String_Node_Str","String_Node_Str");
          inited=true;
        }
        if ("String_Node_Str" == method.getName())         nativeCheckIsImageLegalMethod=method;
      }
      inited=true;
      methods=sfsObject.getDeclaredMethods();
      Method sfsread=null;
      for (      Method method : methods) {
        method.setAccessible(true);
        if (method.getName() == "String_Node_Str")         sfsread=method;
      }
      File file1=new File(path);
      int filesize=(int)file1.length();
      byte[] fileData=new byte[filesize];
      try {
        InputStream fileIutputStream=new FileInputStream(file1);
        int read=fileIutputStream.read(fileData,0,filesize);
        if (read == -1) {
        }
        fileIutputStream.close();
      }
 catch (      Throwable e) {
        Log.d("String_Node_Str","String_Node_Str");
      }
      String msg="String_Node_Str";
      for (int i=0; i < 30; i++) {
        msg+=fileData[i] + "String_Node_Str";
      }
      Log.d("String_Node_Str","String_Node_Str" + msg);
      msg="String_Node_Str";
      for (int i=0; i < 30; i++) {
        msg+=fileData[i] + "String_Node_Str";
      }
      Log.d("String_Node_Str","String_Node_Str" + msg);
      File file4=new File(path);
      InputStream fileIutputStream4=new FileInputStream(file4);
      File file2=new File(path);
      InputStream fileIutputStream2=new FileInputStream(file2);
      int re=(int)nativeCheckIsImageLegalMethod.invoke(ModelClass,fileIutputStream2,new byte[8192],null);
      Log.d("String_Node_Str","String_Node_Str" + re);
      InputStream inputStream5=null;
      Method FileOp_openread=sfsObject.getMethod("String_Node_Str",String.class);
      inputStream5=(InputStream)FileOp_openread.invoke(ModelClass,Config.EXT_DIR + "String_Node_Str");
      Bitmap bitmap=(Bitmap)decodeFileMethod.invoke(ModelClass,fileData,0,(int)file1.length(),null,null,new int[0]);
      if (bitmap != null)       Log.d("String_Node_Str","String_Node_Str" + bitmap.getByteCount());
      if (bitmap != null) {
        Log.d("String_Node_Str","String_Node_Str" + bitmap.getByteCount());
        File file=new File(path + "String_Node_Str");
        if (file.exists()) {
        }
 else {
          try {
            OutputStream fileOutputStream=new FileOutputStream(file);
            bitmap.compress(Bitmap.CompressFormat.PNG,100,fileOutputStream);
            fileOutputStream.close();
          }
 catch (          Throwable e) {
            Log.d("String_Node_Str","String_Node_Str");
          }
        }
      }
      currentSns.mediaList.add(url);
    }
  }
  while (mediaIdxMatcher.find()) {
    boolean flag=true;
    if (flag) {
      String url=mediaIdxMatcher.group(1);
      Log.d("String_Node_Str","String_Node_Str" + url);
    }
  }
  return currentSns;
}