Program: 822
Project: 822
Buggy source:
public void saveScreenshot(){
  if (!takeScreenshot) {
    return;
  }
  final FBO fboSceneFinal=getFBO("String_Node_Str");
  if (fboSceneFinal == null) {
    return;
  }
  final ByteBuffer buffer=BufferUtils.createByteBuffer(fboSceneFinal.width * fboSceneFinal.height * 4);
  fboSceneFinal.bindTexture();
  GL11.glGetTexImage(GL11.GL_TEXTURE_2D,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,buffer);
  fboSceneFinal.unbindTexture();
  Runnable task=new Runnable(){
    @Override public void run(){
      SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
      final String format=renderingConfig.getScreenshotFormat().toString();
      final String fileName="String_Node_Str" + sdf.format(new Date()) + "String_Node_Str"+ fboSceneFinal.width+ "String_Node_Str"+ fboSceneFinal.height+ "String_Node_Str"+ format;
      Path path=PathManager.getInstance().getScreenshotPath().resolve(fileName);
      BufferedImage image=new BufferedImage(fboSceneFinal.width,fboSceneFinal.height,BufferedImage.TYPE_INT_RGB);
      for (int x=0; x < fboSceneFinal.width; x++) {
        for (int y=0; y < fboSceneFinal.height; y++) {
          int i=(x + fboSceneFinal.width * y) * 4;
          int r=buffer.get(i) & 0xFF;
          int g=buffer.get(i + 1) & 0xFF;
          int b=buffer.get(i + 2) & 0xFF;
          image.setRGB(x,fboSceneFinal.height - (y + 1),(0xFF << 24) | (r << 16) | (g << 8)| b);
        }
      }
      try (OutputStream out=new BufferedOutputStream(Files.newOutputStream(path))){
        ImageIO.write(image,format,out);
        logger.info("String_Node_Str" + fileName + "String_Node_Str");
      }
 catch (      IOException e) {
        logger.warn("String_Node_Str",e);
      }
    }
  }
;
  CoreRegistry.get(GameEngine.class).submitTask("String_Node_Str",task);
  takeScreenshot=false;
  overwriteRtWidth=0;
  overwriteRtWidth=0;
  createOrUpdateFullscreenFbos();
}

Fixed version (ground truth):
public void saveScreenshot(){
  if (!takeScreenshot) {
    return;
  }
  final FBO fboSceneFinal=getFBO("String_Node_Str");
  if (fboSceneFinal == null) {
    return;
  }
  final ByteBuffer buffer=BufferUtils.createByteBuffer(fboSceneFinal.width * fboSceneFinal.height * 4);
  fboSceneFinal.bindTexture();
  GL11.glGetTexImage(GL11.GL_TEXTURE_2D,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,buffer);
  fboSceneFinal.unbindTexture();
  Runnable task=new Runnable(){
    @Override public void run(){
      SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
      final String format=renderingConfig.getScreenshotFormat().toString();
      final String fileName="String_Node_Str" + sdf.format(new Date()) + "String_Node_Str"+ fboSceneFinal.width+ "String_Node_Str"+ fboSceneFinal.height+ "String_Node_Str"+ format;
      Path path=PathManager.getInstance().getScreenshotPath().resolve(fileName);
      BufferedImage image=new BufferedImage(fboSceneFinal.width,fboSceneFinal.height,BufferedImage.TYPE_INT_RGB);
      for (int x=0; x < fboSceneFinal.width; x++) {
        for (int y=0; y < fboSceneFinal.height; y++) {
          int i=(x + fboSceneFinal.width * y) * 4;
          int r=buffer.get(i) & 0xFF;
          int g=buffer.get(i + 1) & 0xFF;
          int b=buffer.get(i + 2) & 0xFF;
          image.setRGB(x,fboSceneFinal.height - (y + 1),(0xFF << 24) | (r << 16) | (g << 8)| b);
        }
      }
      try (OutputStream out=new BufferedOutputStream(Files.newOutputStream(path))){
        ImageIO.write(image,format,out);
        logger.info("String_Node_Str" + fileName + "String_Node_Str");
      }
 catch (      IOException e) {
        logger.warn("String_Node_Str",e);
      }
    }
  }
;
  CoreRegistry.get(GameEngine.class).submitTask("String_Node_Str",task);
  takeScreenshot=false;
  overwriteRtWidth=0;
  overwriteRtHeight=0;
  createOrUpdateFullscreenFbos();
}