Program: 80075
Project: 80075
Buggy source:
public LwjglRasteriser(DisplayType type,final int displayWidth,final int displayHeight,final int colourDepth,final int alphaBits,final int depthBits,final int numSamples) throws Exception {
  this.type=type;
  this.width=displayWidth;
  this.height=displayHeight;
  keyCodeMap=new HashMap<Integer,Integer>();
  keyCodeMap.put(KeyEvent.VK_0,Keyboard.KEY_0);
  keyCodeMap.put(KeyEvent.VK_1,Keyboard.KEY_1);
  keyCodeMap.put(KeyEvent.VK_2,Keyboard.KEY_2);
  keyCodeMap.put(KeyEvent.VK_3,Keyboard.KEY_3);
  keyCodeMap.put(KeyEvent.VK_4,Keyboard.KEY_4);
  keyCodeMap.put(KeyEvent.VK_5,Keyboard.KEY_5);
  keyCodeMap.put(KeyEvent.VK_6,Keyboard.KEY_6);
  keyCodeMap.put(KeyEvent.VK_7,Keyboard.KEY_7);
  keyCodeMap.put(KeyEvent.VK_8,Keyboard.KEY_8);
  keyCodeMap.put(KeyEvent.VK_9,Keyboard.KEY_9);
  keyCodeMap.put(KeyEvent.VK_UP,Keyboard.KEY_UP);
  keyCodeMap.put(KeyEvent.VK_DOWN,Keyboard.KEY_DOWN);
  keyCodeMap.put(KeyEvent.VK_LEFT,Keyboard.KEY_LEFT);
  keyCodeMap.put(KeyEvent.VK_RIGHT,Keyboard.KEY_RIGHT);
  keyCodeMap.put(KeyEvent.VK_SPACE,Keyboard.KEY_SPACE);
  keyCodeMap.put(KeyEvent.VK_MINUS,Keyboard.KEY_MINUS);
  keyCodeMap.put(KeyEvent.VK_EQUALS,Keyboard.KEY_EQUALS);
  keyCodeMap.put(KeyEvent.VK_BACK_SPACE,Keyboard.KEY_BACK);
  keyCodeMap.put(KeyEvent.VK_A,Keyboard.KEY_A);
  keyCodeMap.put(KeyEvent.VK_B,Keyboard.KEY_B);
  keyCodeMap.put(KeyEvent.VK_C,Keyboard.KEY_C);
  keyCodeMap.put(KeyEvent.VK_D,Keyboard.KEY_D);
  keyCodeMap.put(KeyEvent.VK_E,Keyboard.KEY_E);
  keyCodeMap.put(KeyEvent.VK_F,Keyboard.KEY_F);
  keyCodeMap.put(KeyEvent.VK_G,Keyboard.KEY_G);
  keyCodeMap.put(KeyEvent.VK_H,Keyboard.KEY_H);
  keyCodeMap.put(KeyEvent.VK_I,Keyboard.KEY_I);
  keyCodeMap.put(KeyEvent.VK_J,Keyboard.KEY_J);
  keyCodeMap.put(KeyEvent.VK_K,Keyboard.KEY_K);
  keyCodeMap.put(KeyEvent.VK_L,Keyboard.KEY_L);
  keyCodeMap.put(KeyEvent.VK_M,Keyboard.KEY_M);
  keyCodeMap.put(KeyEvent.VK_N,Keyboard.KEY_N);
  keyCodeMap.put(KeyEvent.VK_O,Keyboard.KEY_O);
  keyCodeMap.put(KeyEvent.VK_P,Keyboard.KEY_P);
  keyCodeMap.put(KeyEvent.VK_Q,Keyboard.KEY_Q);
  keyCodeMap.put(KeyEvent.VK_R,Keyboard.KEY_R);
  keyCodeMap.put(KeyEvent.VK_S,Keyboard.KEY_S);
  keyCodeMap.put(KeyEvent.VK_T,Keyboard.KEY_T);
  keyCodeMap.put(KeyEvent.VK_U,Keyboard.KEY_U);
  keyCodeMap.put(KeyEvent.VK_V,Keyboard.KEY_V);
  keyCodeMap.put(KeyEvent.VK_W,Keyboard.KEY_W);
  keyCodeMap.put(KeyEvent.VK_X,Keyboard.KEY_X);
  keyCodeMap.put(KeyEvent.VK_Y,Keyboard.KEY_Y);
  keyCodeMap.put(KeyEvent.VK_Z,Keyboard.KEY_Z);
  prevKeyStates=new HashMap<Integer,Boolean>();
  Drawable drawable=Display.getDrawable();
  System.out.println("String_Node_Str" + drawable);
  ArrayList<PixelFormat> pixelFormats=new ArrayList<PixelFormat>();
  pixelFormats.add(new PixelFormat(colourDepth,alphaBits,depthBits,0,numSamples));
  pixelFormats.add(new PixelFormat(colourDepth,alphaBits,depthBits,0,0));
  pixelFormats.add(new PixelFormat(colourDepth,0,depthBits,0,0));
  pixelFormats.add(new PixelFormat(16,0,depthBits,0,0));
  pixelFormats.add(new PixelFormat(16,0,16,0,0));
  pixelFormats.add(new PixelFormat(0,0,1,0,0));
  PixelFormat usedPixelFormat=null;
  LWJGLException pbufferException=null;
  if (type == DisplayType.Offscreen) {
    for (    PixelFormat pf : pixelFormats) {
      try {
        pbuffer=new Pbuffer(displayWidth,displayHeight,pf,drawable);
        usedPixelFormat=pf;
        break;
      }
 catch (      LWJGLException e) {
        pbufferException=e;
      }
    }
    if (pbuffer != null) {
      System.out.println("String_Node_Str" + pbuffer);
      System.out.println("String_Node_Str" + usedPixelFormat.getBitsPerPixel() + "String_Node_Str"+ usedPixelFormat.getDepthBits()+ "String_Node_Str"+ usedPixelFormat.getAlphaBits()+ "String_Node_Str"+ usedPixelFormat.getStencilBits()+ "String_Node_Str"+ usedPixelFormat.getSamples());
    }
 else {
      System.err.println("String_Node_Str" + colourDepth + "String_Node_Str"+ alphaBits+ "String_Node_Str"+ depthBits+ "String_Node_Str"+ numSamples+ "String_Node_Str");
      throw pbufferException;
    }
    pbuffer.makeCurrent();
    resetState();
  }
 else   if (type == DisplayType.Window) {
    Display.setDisplayMode(new DisplayMode(displayWidth,displayHeight));
    Display.setLocation((Display.getDisplayMode().getWidth() - displayWidth) / 2,(Display.getDisplayMode().getHeight() - displayHeight) / 2);
    Display.setTitle("String_Node_Str");
    Display.create(new PixelFormat(32,0,16,0,4));
  }
 else {
    throw new RuntimeException("String_Node_Str" + type);
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public LwjglRasteriser(DisplayType type,final int displayWidth,final int displayHeight,final int colourDepth,final int alphaBits,final int depthBits,final int numSamples) throws Exception {
  this.type=type;
  this.width=displayWidth;
  this.height=displayHeight;
  keyCodeMap=new HashMap<Integer,Integer>();
  keyCodeMap.put(KeyEvent.VK_0,Keyboard.KEY_0);
  keyCodeMap.put(KeyEvent.VK_1,Keyboard.KEY_1);
  keyCodeMap.put(KeyEvent.VK_2,Keyboard.KEY_2);
  keyCodeMap.put(KeyEvent.VK_3,Keyboard.KEY_3);
  keyCodeMap.put(KeyEvent.VK_4,Keyboard.KEY_4);
  keyCodeMap.put(KeyEvent.VK_5,Keyboard.KEY_5);
  keyCodeMap.put(KeyEvent.VK_6,Keyboard.KEY_6);
  keyCodeMap.put(KeyEvent.VK_7,Keyboard.KEY_7);
  keyCodeMap.put(KeyEvent.VK_8,Keyboard.KEY_8);
  keyCodeMap.put(KeyEvent.VK_9,Keyboard.KEY_9);
  keyCodeMap.put(KeyEvent.VK_UP,Keyboard.KEY_UP);
  keyCodeMap.put(KeyEvent.VK_DOWN,Keyboard.KEY_DOWN);
  keyCodeMap.put(KeyEvent.VK_LEFT,Keyboard.KEY_LEFT);
  keyCodeMap.put(KeyEvent.VK_RIGHT,Keyboard.KEY_RIGHT);
  keyCodeMap.put(KeyEvent.VK_SPACE,Keyboard.KEY_SPACE);
  keyCodeMap.put(KeyEvent.VK_MINUS,Keyboard.KEY_MINUS);
  keyCodeMap.put(KeyEvent.VK_EQUALS,Keyboard.KEY_EQUALS);
  keyCodeMap.put(KeyEvent.VK_BACK_SPACE,Keyboard.KEY_BACK);
  keyCodeMap.put(KeyEvent.VK_A,Keyboard.KEY_A);
  keyCodeMap.put(KeyEvent.VK_B,Keyboard.KEY_B);
  keyCodeMap.put(KeyEvent.VK_C,Keyboard.KEY_C);
  keyCodeMap.put(KeyEvent.VK_D,Keyboard.KEY_D);
  keyCodeMap.put(KeyEvent.VK_E,Keyboard.KEY_E);
  keyCodeMap.put(KeyEvent.VK_F,Keyboard.KEY_F);
  keyCodeMap.put(KeyEvent.VK_G,Keyboard.KEY_G);
  keyCodeMap.put(KeyEvent.VK_H,Keyboard.KEY_H);
  keyCodeMap.put(KeyEvent.VK_I,Keyboard.KEY_I);
  keyCodeMap.put(KeyEvent.VK_J,Keyboard.KEY_J);
  keyCodeMap.put(KeyEvent.VK_K,Keyboard.KEY_K);
  keyCodeMap.put(KeyEvent.VK_L,Keyboard.KEY_L);
  keyCodeMap.put(KeyEvent.VK_M,Keyboard.KEY_M);
  keyCodeMap.put(KeyEvent.VK_N,Keyboard.KEY_N);
  keyCodeMap.put(KeyEvent.VK_O,Keyboard.KEY_O);
  keyCodeMap.put(KeyEvent.VK_P,Keyboard.KEY_P);
  keyCodeMap.put(KeyEvent.VK_Q,Keyboard.KEY_Q);
  keyCodeMap.put(KeyEvent.VK_R,Keyboard.KEY_R);
  keyCodeMap.put(KeyEvent.VK_S,Keyboard.KEY_S);
  keyCodeMap.put(KeyEvent.VK_T,Keyboard.KEY_T);
  keyCodeMap.put(KeyEvent.VK_U,Keyboard.KEY_U);
  keyCodeMap.put(KeyEvent.VK_V,Keyboard.KEY_V);
  keyCodeMap.put(KeyEvent.VK_W,Keyboard.KEY_W);
  keyCodeMap.put(KeyEvent.VK_X,Keyboard.KEY_X);
  keyCodeMap.put(KeyEvent.VK_Y,Keyboard.KEY_Y);
  keyCodeMap.put(KeyEvent.VK_Z,Keyboard.KEY_Z);
  prevKeyStates=new HashMap<Integer,Boolean>();
  Drawable drawable=Display.getDrawable();
  System.out.println("String_Node_Str" + drawable);
  ArrayList<PixelFormat> pixelFormats=new ArrayList<PixelFormat>();
  pixelFormats.add(new PixelFormat(colourDepth,alphaBits,depthBits,0,numSamples));
  pixelFormats.add(new PixelFormat(colourDepth,alphaBits,depthBits,0,0));
  pixelFormats.add(new PixelFormat(colourDepth,0,depthBits,0,0));
  pixelFormats.add(new PixelFormat(16,0,depthBits,0,0));
  pixelFormats.add(new PixelFormat(16,0,16,0,0));
  pixelFormats.add(new PixelFormat(0,0,1,0,0));
  PixelFormat usedPixelFormat=null;
  LWJGLException pbufferException=null;
  if (type == DisplayType.Offscreen) {
    for (    PixelFormat pf : pixelFormats) {
      try {
        pbuffer=new Pbuffer(displayWidth,displayHeight,pf,drawable);
        usedPixelFormat=pf;
        break;
      }
 catch (      LWJGLException e) {
        pbufferException=e;
      }
    }
    if (pbuffer != null) {
      System.out.println("String_Node_Str" + pbuffer);
      System.out.println("String_Node_Str" + usedPixelFormat.getBitsPerPixel() + "String_Node_Str"+ usedPixelFormat.getDepthBits()+ "String_Node_Str"+ usedPixelFormat.getAlphaBits()+ "String_Node_Str"+ usedPixelFormat.getStencilBits()+ "String_Node_Str"+ usedPixelFormat.getSamples());
    }
 else {
      System.err.println("String_Node_Str" + colourDepth + "String_Node_Str"+ alphaBits+ "String_Node_Str"+ depthBits+ "String_Node_Str"+ numSamples+ "String_Node_Str");
      throw pbufferException;
    }
    pbuffer.makeCurrent();
    resetState();
  }
 else   if (type == DisplayType.Window) {
    Display.setDisplayMode(new DisplayMode(displayWidth,displayHeight));
    Display.setLocation((Display.getDisplayMode().getWidth() - displayWidth) / 2,(Display.getDisplayMode().getHeight() - displayHeight) / 2);
    Display.setTitle("String_Node_Str");
    Display.create(new PixelFormat(32,0,depthBits,0,4));
  }
 else {
    throw new RuntimeException("String_Node_Str" + type);
  }
  System.out.println("String_Node_Str");
}