Program: 110243
Project: 110243
Buggy source:
private void initInternal(@SecureMode int secureMode){
  display=eglGetDisplay(EGL_DEFAULT_DISPLAY);
  Assertions.checkState(display != null,"String_Node_Str");
  int[] version=new int[2];
  boolean eglInitialized=eglInitialize(display,version,0,version,1);
  Assertions.checkState(eglInitialized,"String_Node_Str");
  int[] eglAttributes=new int[]{EGL_RENDERABLE_TYPE,EGL_OPENGL_ES2_BIT,EGL_RED_SIZE,8,EGL_GREEN_SIZE,8,EGL_BLUE_SIZE,8,EGL_ALPHA_SIZE,8,EGL_DEPTH_SIZE,0,EGL_CONFIG_CAVEAT,EGL_NONE,EGL_SURFACE_TYPE,EGL_WINDOW_BIT,EGL_NONE};
  EGLConfig[] configs=new EGLConfig[1];
  int[] numConfigs=new int[1];
  boolean eglChooseConfigSuccess=eglChooseConfig(display,eglAttributes,0,configs,0,1,numConfigs,0);
  Assertions.checkState(eglChooseConfigSuccess && numConfigs[0] > 0 && configs[0] != null,"String_Node_Str");
  EGLConfig config=configs[0];
  int[] glAttributes;
  if (secureMode == SECURE_MODE_NONE) {
    glAttributes=new int[]{EGL_CONTEXT_CLIENT_VERSION,2,EGL_NONE};
  }
 else {
    glAttributes=new int[]{EGL_CONTEXT_CLIENT_VERSION,2,EGL_PROTECTED_CONTENT_EXT,EGL_TRUE,EGL_NONE};
  }
  context=eglCreateContext(display,config,android.opengl.EGL14.EGL_NO_CONTEXT,glAttributes,0);
  Assertions.checkState(context != null,"String_Node_Str");
  EGLSurface surface;
  if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) {
    surface=EGL_NO_SURFACE;
  }
 else {
    int[] pbufferAttributes;
    if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) {
      pbufferAttributes=new int[]{EGL_WIDTH,1,EGL_HEIGHT,1,EGL_PROTECTED_CONTENT_EXT,EGL_TRUE,EGL_NONE};
    }
 else {
      pbufferAttributes=new int[]{EGL_WIDTH,1,EGL_HEIGHT,1,EGL_NONE};
    }
    pbuffer=eglCreatePbufferSurface(display,config,pbufferAttributes,0);
    Assertions.checkState(pbuffer != null,"String_Node_Str");
    surface=pbuffer;
  }
  boolean eglMadeCurrent=eglMakeCurrent(display,surface,surface,context);
  Assertions.checkState(eglMadeCurrent,"String_Node_Str");
  glGenTextures(1,textureIdHolder,0);
  surfaceTexture=new SurfaceTexture(textureIdHolder[0]);
  surfaceTexture.setOnFrameAvailableListener(this);
  this.surface=new DummySurface(this,surfaceTexture,secureMode != SECURE_MODE_NONE);
}

Fixed version (ground truth):
private void initInternal(@SecureMode int secureMode){
  display=eglGetDisplay(EGL_DEFAULT_DISPLAY);
  Assertions.checkState(display != null,"String_Node_Str");
  int[] version=new int[2];
  boolean eglInitialized=eglInitialize(display,version,0,version,1);
  Assertions.checkState(eglInitialized,"String_Node_Str");
  int[] eglAttributes=new int[]{EGL_RENDERABLE_TYPE,EGL_OPENGL_ES2_BIT,EGL_RED_SIZE,8,EGL_GREEN_SIZE,8,EGL_BLUE_SIZE,8,EGL_ALPHA_SIZE,8,EGL_DEPTH_SIZE,0,EGL_CONFIG_CAVEAT,EGL_NONE,EGL_SURFACE_TYPE,EGL_WINDOW_BIT,EGL_NONE};
  EGLConfig[] configs=new EGLConfig[1];
  int[] numConfigs=new int[1];
  boolean eglChooseConfigSuccess=eglChooseConfig(display,eglAttributes,0,configs,0,1,numConfigs,0);
  Assertions.checkState(eglChooseConfigSuccess && numConfigs[0] > 0 && configs[0] != null,"String_Node_Str");
  EGLConfig config=configs[0];
  int[] glAttributes;
  if (secureMode == SECURE_MODE_NONE) {
    glAttributes=new int[]{EGL_CONTEXT_CLIENT_VERSION,2,EGL_NONE};
  }
 else {
    glAttributes=new int[]{EGL_CONTEXT_CLIENT_VERSION,2,EGL_PROTECTED_CONTENT_EXT,EGL_TRUE,EGL_NONE};
  }
  context=eglCreateContext(display,config,android.opengl.EGL14.EGL_NO_CONTEXT,glAttributes,0);
  Assertions.checkState(context != null,"String_Node_Str");
  EGLSurface surface;
  if (secureMode == SECURE_MODE_SURFACELESS_CONTEXT) {
    surface=EGL14.EGL_NO_SURFACE;
  }
 else {
    int[] pbufferAttributes;
    if (secureMode == SECURE_MODE_PROTECTED_PBUFFER) {
      pbufferAttributes=new int[]{EGL_WIDTH,1,EGL_HEIGHT,1,EGL_PROTECTED_CONTENT_EXT,EGL_TRUE,EGL_NONE};
    }
 else {
      pbufferAttributes=new int[]{EGL_WIDTH,1,EGL_HEIGHT,1,EGL_NONE};
    }
    pbuffer=eglCreatePbufferSurface(display,config,pbufferAttributes,0);
    Assertions.checkState(pbuffer != null,"String_Node_Str");
    surface=pbuffer;
  }
  boolean eglMadeCurrent=eglMakeCurrent(display,surface,surface,context);
  Assertions.checkState(eglMadeCurrent,"String_Node_Str");
  glGenTextures(1,textureIdHolder,0);
  surfaceTexture=new SurfaceTexture(textureIdHolder[0]);
  surfaceTexture.setOnFrameAvailableListener(this);
  this.surface=new DummySurface(this,surfaceTexture,secureMode != SECURE_MODE_NONE);
}