Program: 163694
Project: 163694
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (DEBUG)   println("String_Node_Str" + Thread.currentThread().getName());
  Window window=getWindow();
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
  window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  DisplayMetrics dm=new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(dm);
  screenWidth=dm.widthPixels;
  screenHeight=dm.heightPixels;
  if (DEBUG)   println("String_Node_Str" + dm);
  int sw=sketchWidth();
  int sh=sketchHeight();
  if (sketchRenderer().equals(A2D)) {
    surfaceView=new SketchSurfaceView2D(this,sw,sh);
  }
 else   if (sketchRenderer().equals(A3D)) {
    surfaceView=new SketchSurfaceView3D(this,sw,sh);
  }
  g=((SketchSurfaceView)surfaceView).getGraphics();
  if (sw == screenWidth && sh == screenHeight) {
    window.setContentView(surfaceView);
  }
 else {
    RelativeLayout overallLayout=new RelativeLayout(this);
    RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
    lp.addRule(RelativeLayout.CENTER_IN_PARENT);
    LinearLayout layout=new LinearLayout(this);
    layout.addView(surfaceView,sketchWidth(),sketchHeight());
    overallLayout.addView(layout,lp);
    window.setContentView(overallLayout);
  }
  finished=false;
  looping=true;
  redraw=true;
  firstMotion=true;
  Context context=getApplicationContext();
  sketchPath=context.getFilesDir().getAbsolutePath();
  handler=new Handler();
  println("String_Node_Str");
  println("String_Node_Str");
  start();
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (DEBUG)   println("String_Node_Str" + Thread.currentThread().getName());
  Window window=getWindow();
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
  window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  DisplayMetrics dm=new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(dm);
  screenWidth=dm.widthPixels;
  screenHeight=dm.heightPixels;
  if (DEBUG)   println("String_Node_Str" + dm);
  int sw=sketchWidth();
  int sh=sketchHeight();
  if (sketchRenderer().equals(A2D)) {
    surfaceView=new SketchSurfaceView2D(this,sw,sh);
  }
 else   if (sketchRenderer().equals(A3D)) {
    surfaceView=new SketchSurfaceView3D(this,sw,sh);
  }
  g=((SketchSurfaceView)surfaceView).getGraphics();
  if (sw == screenWidth && sh == screenHeight) {
    window.setContentView(surfaceView);
  }
 else {
    RelativeLayout overallLayout=new RelativeLayout(this);
    RelativeLayout.LayoutParams lp=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
    lp.addRule(RelativeLayout.CENTER_IN_PARENT);
    LinearLayout layout=new LinearLayout(this);
    layout.addView(surfaceView,sketchWidth(),sketchHeight());
    overallLayout.addView(layout,lp);
    window.setContentView(overallLayout);
  }
  finished=false;
  looping=true;
  redraw=true;
  firstMotion=true;
  sizeMethods=new RegisteredMethods();
  preMethods=new RegisteredMethods();
  drawMethods=new RegisteredMethods();
  postMethods=new RegisteredMethods();
  mouseEventMethods=new RegisteredMethods();
  keyEventMethods=new RegisteredMethods();
  disposeMethods=new RegisteredMethods();
  Context context=getApplicationContext();
  sketchPath=context.getFilesDir().getAbsolutePath();
  handler=new Handler();
  println("String_Node_Str");
  println("String_Node_Str");
  start();
}