Program: 54296
Project: 54296
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (System.getProxy() == null)   new FatalDialog("String_Node_Str","String_Node_Str",MITM.this).show();
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_sniffer_48,new OnClickListener(){
    @Override public void onClick(    View v){
      setStoppedState();
      startActivity(new Intent(MITM.this,Sniffer.class));
      overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_left);
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_passwords_48,new OnClickListener(){
    @Override public void onClick(    View v){
      setStoppedState();
      startActivity(new Intent(MITM.this,PasswordSniffer.class));
      overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_left);
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_kill_48,new OnClickListener(){
    @Override public void onClick(    View v){
      ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        if (System.getCurrentTarget().getType() != Target.Type.ENDPOINT)         new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
 else {
          setStoppedState();
          activity.setVisibility(View.VISIBLE);
          Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
          ConnectionKiller.start();
        }
      }
 else {
        ConnectionKiller.stop();
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_redirect_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new RedirectionDialog("String_Node_Str",MITM.this,new RedirectionDialogListener(){
          @Override public void onInputEntered(          String address,          String port){
            if (address.isEmpty() == false && port.isEmpty() == false) {
              try {
                int iport=Integer.parseInt(port);
                if (iport <= 0 || iport > 65535)                 throw new Exception();
                activity.setVisibility(View.VISIBLE);
                Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
                final String faddress=address;
                final int fport=iport;
                System.getEttercap().spoof(System.getCurrentTarget(),new OnReadyListener(){
                  @Override public void onReady(){
                    Proxy proxy=System.getProxy();
                    proxy.setRedirection(faddress,fport);
                    System.setForwarding(true);
                    new Thread(proxy).start();
                    System.getIPTables().portRedirect(80,System.HTTP_PROXY_PORT);
                  }
                }
).start();
              }
 catch (              Exception e) {
                new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
              }
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        setStoppedState();
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_image_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        activity.setVisibility(View.VISIBLE);
        startActivityForResult(mImagePicker,SELECT_PICTURE);
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_youtube_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new InputDialog("String_Node_Str","String_Node_Str","String_Node_Str",true,MITM.this,new InputDialogListener(){
          @Override public void onInputEntered(          String input){
            final String video=input.trim();
            Matcher matcher=YOUTUBE_PATTERN.matcher(input);
            if (video.isEmpty() == false && matcher != null && matcher.find()) {
              final String videoId=matcher.group(1);
              final Proxy proxy=System.getProxy();
              activity.setVisibility(View.VISIBLE);
              Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
              System.getEttercap().spoof(System.getCurrentTarget(),new OnReadyListener(){
                @Override public void onReady(){
                  System.setForwarding(true);
                  proxy.setFilter(new Proxy.ProxyFilter(){
                    @Override public String onDataReceived(                    String headers,                    String data){
                      if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
 else                       if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
 else                       if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
                      return data;
                    }
                  }
);
                  new Thread(proxy).start();
                  System.getIPTables().portRedirect(80,System.HTTP_PROXY_PORT);
                }
              }
).start();
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_injection_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new InputDialog("String_Node_Str","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str",true,MITM.this,new InputDialogListener(){
          @Override public void onInputEntered(          String input){
            final String js=input.trim();
            if (js.isEmpty() == false || js.startsWith("String_Node_Str") == false) {
              activity.setVisibility(View.VISIBLE);
              Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
              HTTPFilter.start(System.getProxy(),"String_Node_Str",js + "String_Node_Str");
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new CustomFilterDialog("String_Node_Str",MITM.this,new CustomFilterDialogListener(){
          @Override public void onInputEntered(          ArrayList<String> from,          ArrayList<String> to){
            if (from.isEmpty() == false && to.isEmpty() == false) {
              try {
                for (                String exp : from) {
                  Pattern.compile(exp);
                }
                activity.setVisibility(View.VISIBLE);
                Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
                HTTPFilter.start(System.getProxy(),from,to);
              }
 catch (              PatternSyntaxException e) {
                new ErrorDialog("String_Node_Str","String_Node_Str" + e.getDescription() + "String_Node_Str",MITM.this).show();
              }
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActionListView=(ListView)findViewById(R.id.actionListView);
  mActionAdapter=new ActionAdapter(R.layout.plugin_mitm_list_item,mActions);
  mActionListView.setAdapter(mActionAdapter);
  mImagePicker=new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
  mImagePicker.setType("String_Node_Str");
  mImagePicker.putExtra(Intent.EXTRA_LOCAL_ONLY,true);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (System.getProxy() == null)   new FatalDialog("String_Node_Str","String_Node_Str",MITM.this).show();
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_sniffer_48,new OnClickListener(){
    @Override public void onClick(    View v){
      setStoppedState();
      startActivity(new Intent(MITM.this,Sniffer.class));
      overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_left);
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_passwords_48,new OnClickListener(){
    @Override public void onClick(    View v){
      setStoppedState();
      startActivity(new Intent(MITM.this,PasswordSniffer.class));
      overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_left);
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_kill_48,new OnClickListener(){
    @Override public void onClick(    View v){
      ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        if (System.getCurrentTarget().getType() != Target.Type.ENDPOINT)         new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
 else {
          setStoppedState();
          activity.setVisibility(View.VISIBLE);
          Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
          ConnectionKiller.start();
        }
      }
 else {
        ConnectionKiller.stop();
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_redirect_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new RedirectionDialog("String_Node_Str",MITM.this,new RedirectionDialogListener(){
          @Override public void onInputEntered(          String address,          String port){
            if (address.isEmpty() == false && port.isEmpty() == false) {
              try {
                int iport=Integer.parseInt(port);
                if (iport <= 0 || iport > 65535)                 throw new Exception();
                activity.setVisibility(View.VISIBLE);
                Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
                final String faddress=address;
                final int fport=iport;
                System.getEttercap().spoof(System.getCurrentTarget(),new OnReadyListener(){
                  @Override public void onReady(){
                    Proxy proxy=System.getProxy();
                    proxy.setRedirection(faddress,fport);
                    System.setForwarding(true);
                    new Thread(proxy).start();
                    System.getIPTables().portRedirect(80,System.HTTP_PROXY_PORT);
                  }
                }
).start();
              }
 catch (              Exception e) {
                new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
              }
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        setStoppedState();
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_image_48,new OnClickListener(){
    @Override public void onClick(    View v){
      ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        mCurrentActivity=activity;
        startActivityForResult(mImagePicker,SELECT_PICTURE);
      }
 else {
        mCurrentActivity=null;
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_youtube_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new InputDialog("String_Node_Str","String_Node_Str","String_Node_Str",true,MITM.this,new InputDialogListener(){
          @Override public void onInputEntered(          String input){
            final String video=input.trim();
            Matcher matcher=YOUTUBE_PATTERN.matcher(input);
            if (video.isEmpty() == false && matcher != null && matcher.find()) {
              final String videoId=matcher.group(1);
              final Proxy proxy=System.getProxy();
              activity.setVisibility(View.VISIBLE);
              Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
              System.getEttercap().spoof(System.getCurrentTarget(),new OnReadyListener(){
                @Override public void onReady(){
                  System.setForwarding(true);
                  proxy.setFilter(new Proxy.ProxyFilter(){
                    @Override public String onDataReceived(                    String headers,                    String data){
                      if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
 else                       if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
 else                       if (data.matches("String_Node_Str"))                       data=data.replaceAll("String_Node_Str","String_Node_Str" + videoId);
                      return data;
                    }
                  }
);
                  new Thread(proxy).start();
                  System.getIPTables().portRedirect(80,System.HTTP_PROXY_PORT);
                }
              }
).start();
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",R.drawable.action_injection_48,new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new InputDialog("String_Node_Str","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str",true,MITM.this,new InputDialogListener(){
          @Override public void onInputEntered(          String input){
            final String js=input.trim();
            if (js.isEmpty() == false || js.startsWith("String_Node_Str") == false) {
              activity.setVisibility(View.VISIBLE);
              Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
              HTTPFilter.start(System.getProxy(),"String_Node_Str",js + "String_Node_Str");
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActions.add(new Action("String_Node_Str","String_Node_Str",new OnClickListener(){
    @Override public void onClick(    View v){
      final ProgressBar activity=(ProgressBar)v.findViewById(R.id.itemActivity);
      if (activity.getVisibility() == View.INVISIBLE) {
        setStoppedState();
        new CustomFilterDialog("String_Node_Str",MITM.this,new CustomFilterDialogListener(){
          @Override public void onInputEntered(          ArrayList<String> from,          ArrayList<String> to){
            if (from.isEmpty() == false && to.isEmpty() == false) {
              try {
                for (                String exp : from) {
                  Pattern.compile(exp);
                }
                activity.setVisibility(View.VISIBLE);
                Toast.makeText(MITM.this,"String_Node_Str",Toast.LENGTH_LONG).show();
                HTTPFilter.start(System.getProxy(),from,to);
              }
 catch (              PatternSyntaxException e) {
                new ErrorDialog("String_Node_Str","String_Node_Str" + e.getDescription() + "String_Node_Str",MITM.this).show();
              }
            }
 else             new ErrorDialog("String_Node_Str","String_Node_Str",MITM.this).show();
          }
        }
).show();
      }
 else {
        HTTPFilter.stop(System.getProxy());
        activity.setVisibility(View.INVISIBLE);
      }
    }
  }
));
  mActionListView=(ListView)findViewById(R.id.actionListView);
  mActionAdapter=new ActionAdapter(R.layout.plugin_mitm_list_item,mActions);
  mActionListView.setAdapter(mActionAdapter);
  mImagePicker=new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
  mImagePicker.setType("String_Node_Str");
  mImagePicker.putExtra(Intent.EXTRA_LOCAL_ONLY,true);
}