Program: 13521
Project: 13521
Buggy source:
public void onResume(){
  super.onResume();
  try {
    ImageView ivImage=(ImageView)findViewById(R.id.layoutInputImageView01);
    TextView tvImageDesc=(TextView)findViewById(R.id.layoutInputTextView01);
    Media m=(Media)input.table.rawget("String_Node_Str");
    if (m != null) {
      tvImageDesc.setText(UtilsGUI.simpleHtml(m.altText));
      try {
        byte[] is=Engine.mediaFile(m);
        Bitmap i=BitmapFactory.decodeByteArray(is,0,is.length);
        MainActivity.setBitmapToImageView(i,ivImage);
      }
 catch (      Exception e) {
      }
    }
 else {
      ivImage.setImageBitmap(Images.IMAGE_EMPTY_B);
    }
    TextView tvQuestion=(TextView)findViewById(R.id.layoutInputTextView02);
    String text=(String)input.table.rawget("String_Node_Str");
    tvQuestion.setText(UtilsGUI.simpleHtml(text));
    final EditText editText=(EditText)findViewById(R.id.layoutInputEditText);
    editText.setVisibility(View.GONE);
    final Spinner spinner=(Spinner)findViewById(R.id.layoutInputSpinner);
    spinner.setVisibility(View.GONE);
    String type=(String)input.table.rawget("String_Node_Str");
    mode=-1;
    if ("String_Node_Str".equals(type)) {
      editText.setText("String_Node_Str");
      editText.setVisibility(View.VISIBLE);
      mode=TEXT;
    }
 else     if ("String_Node_Str".equals(type)) {
      LuaTable choices=(LuaTable)input.table.rawget("String_Node_Str");
      String[] data=new String[choices.len()];
      for (int i=0; i < choices.len(); i++) {
        data[i]=(String)choices.rawget((double)(i + 1));
        if (data[i] == null)         data[i]="String_Node_Str";
      }
      ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,data);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner.setAdapter(adapter);
      spinner.setVisibility(View.VISIBLE);
      mode=MULTI;
    }
    CustomDialog.setBottom(this,Locale.getString(R.string.answer),new CustomDialog.OnClickListener(){
      @Override public boolean onClick(      CustomDialog dialog,      View v,      int btn){
        if (mode == TEXT) {
          Engine.callEvent(input,"String_Node_Str",editText.getText().toString());
        }
 else         if (mode == MULTI) {
          String item=String.valueOf(spinner.getSelectedItem());
          Engine.callEvent(input,"String_Node_Str",item);
        }
 else {
          Engine.callEvent(input,"String_Node_Str",null);
        }
        InputScreenActivity.this.finish();
        return true;
      }
    }
,null,null,null,null);
  }
 catch (  Exception e) {
    Logger.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void onResume(){
  super.onResume();
  try {
    ImageView ivImage=(ImageView)findViewById(R.id.layoutInputImageView01);
    TextView tvImageDesc=(TextView)findViewById(R.id.layoutInputTextView01);
    Media m=(Media)input.table.rawget("String_Node_Str");
    if (m != null) {
      tvImageDesc.setText(UtilsGUI.simpleHtml(m.altText));
      try {
        byte[] is=Engine.mediaFile(m);
        Bitmap i=BitmapFactory.decodeByteArray(is,0,is.length);
        MainActivity.setBitmapToImageView(i,ivImage);
      }
 catch (      Exception e) {
      }
    }
 else {
      ivImage.setImageBitmap(Images.IMAGE_EMPTY_B);
    }
    TextView tvQuestion=(TextView)findViewById(R.id.layoutInputTextView02);
    String text=(String)input.table.rawget("String_Node_Str");
    tvQuestion.setText(UtilsGUI.simpleHtml(text));
    final EditText editText=(EditText)findViewById(R.id.layoutInputEditText);
    editText.setVisibility(View.GONE);
    final Spinner spinner=(Spinner)findViewById(R.id.layoutInputSpinner);
    spinner.setVisibility(View.GONE);
    String type=(String)input.table.rawget("String_Node_Str");
    mode=-1;
    if ("String_Node_Str".equals(type)) {
      editText.setText("String_Node_Str");
      editText.setVisibility(View.VISIBLE);
      mode=TEXT;
    }
 else     if ("String_Node_Str".equals(type)) {
      LuaTable choices=(LuaTable)input.table.rawget("String_Node_Str");
      String[] data=new String[choices.len()];
      for (int i=0; i < choices.len(); i++) {
        data[i]=(String)choices.rawget((double)(i + 1));
        if (data[i] == null)         data[i]="String_Node_Str";
      }
      ArrayAdapter<String> adapter=new ArrayAdapter<>(this,android.R.layout.simple_spinner_item,data);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      spinner.setAdapter(adapter);
      spinner.setVisibility(View.VISIBLE);
      mode=MULTI;
    }
    CustomDialog.setBottom(this,Locale.getString(R.string.answer),new CustomDialog.OnClickListener(){
      @Override public boolean onClick(      CustomDialog dialog,      View v,      int btn){
        if (mode == TEXT) {
          Engine.callEvent(input,"String_Node_Str",editText.getText().toString());
        }
 else         if (mode == MULTI) {
          String item=String.valueOf(spinner.getSelectedItem());
          Engine.callEvent(input,"String_Node_Str",item);
        }
 else {
          Engine.callEvent(input,"String_Node_Str",null);
        }
        InputScreenActivity.this.finish();
        return true;
      }
    }
,null,null,null,null);
  }
 catch (  Exception e) {
    Logger.e(TAG,"String_Node_Str",e);
  }
}