Program: 32206
Project: 32206
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_member_details);
  Intent intent=getIntent();
  if (!intent.hasExtra(EXTRA_ROOM_ID)) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mRoomId=intent.getStringExtra(EXTRA_ROOM_ID);
  if (!intent.hasExtra(EXTRA_MEMBER_ID)) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mMemberId=intent.getStringExtra(EXTRA_MEMBER_ID);
  mSession=getSession(intent);
  if (null == mSession) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mRoom=mSession.getDataHandler().getRoom(mRoomId);
  if (null == mRoom) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  Collection<RoomMember> members=mRoom.getMembers();
  for (  RoomMember member : members) {
    if (member.getUserId().equals(mMemberId)) {
      mMember=member;
      break;
    }
  }
  if (null == mMember) {
    Log.e(LOG_TAG,"String_Node_Str" + mMemberId + "String_Node_Str"+ mRoomId);
    finish();
    return;
  }
  mButtonsList=new ArrayList<Button>();
  mButtonsList.add((Button)findViewById(R.id.contact_button_1));
  mButtonsList.add((Button)findViewById(R.id.contact_button_2));
  mButtonsList.add((Button)findViewById(R.id.contact_button_3));
  mButtonsList.add((Button)findViewById(R.id.contact_button_4));
  for (  Button button : mButtonsList) {
    button.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        String text=(String)((Button)v).getText();
        final View refreshingView=findViewById(R.id.profile_mask);
        final ApiCallback callback=new SimpleApiCallback<Void>(MemberDetailsActivity.this){
          @Override public void onMatrixError(          MatrixError e){
            if (MatrixError.FORBIDDEN.equals(e.errcode)) {
              Toast.makeText(MemberDetailsActivity.this,e.error,Toast.LENGTH_LONG).show();
            }
            MemberDetailsActivity.this.refresh();
          }
          @Override public void onSuccess(          Void info){
            MemberDetailsActivity.this.refresh();
          }
        }
;
        for (        Button button : mButtonsList) {
          button.setEnabled(false);
        }
        if (text.equals(getResources().getString(R.string.kick))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.kick(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.ban))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.ban(mMember.getUserId(),null,callback);
        }
 else         if (text.equals(getResources().getString(R.string.unban))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.unban(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.invite))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.invite(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.chat))) {
          refreshingView.setVisibility(View.VISIBLE);
          MemberDetailsActivity.this.runOnUiThread(new Runnable(){
            @Override public void run(){
              CommonActivityUtils.goToOneToOneRoom(mMemberId,MemberDetailsActivity.this,new SimpleApiCallback<Void>(MemberDetailsActivity.this){
                @Override public void onMatrixError(                MatrixError e){
                  if (MatrixError.FORBIDDEN.equals(e.errcode)) {
                    Toast.makeText(MemberDetailsActivity.this,e.error,Toast.LENGTH_LONG).show();
                  }
                  MemberDetailsActivity.this.refresh();
                }
                @Override public void onNetworkError(                Exception e){
                  Toast.makeText(MemberDetailsActivity.this,e.getLocalizedMessage(),Toast.LENGTH_LONG).show();
                  MemberDetailsActivity.this.refresh();
                }
                @Override public void onUnexpectedError(                Exception e){
                  Toast.makeText(MemberDetailsActivity.this,e.getLocalizedMessage(),Toast.LENGTH_LONG).show();
                  MemberDetailsActivity.this.refresh();
                }
              }
);
            }
          }
);
        }
 else         if (text.equals(getResources().getString(R.string.set_power_level))) {
          String title=getResources().getString(R.string.set_power_level);
          String initText=mRoom.getLiveState().getPowerLevels().getUserPowerLevel(mMemberId) + "String_Node_Str";
          final AlertDialog alert=CommonActivityUtils.createEditTextAlert(MemberDetailsActivity.this,title,null,initText,new CommonActivityUtils.OnSubmitListener(){
            @Override public void onSubmit(            String text){
              if (text.length() == 0) {
                return;
              }
              int newPowerLevel=-1;
              try {
                newPowerLevel=Integer.parseInt(text);
              }
 catch (              Exception e) {
              }
              if (newPowerLevel >= 0) {
                refreshingView.setVisibility(View.VISIBLE);
                mRoom.updateUserPowerLevels(mMember.getUserId(),newPowerLevel,callback);
              }
 else {
                MemberDetailsActivity.this.refresh();
              }
            }
            @Override public void onCancelled(){
              MemberDetailsActivity.this.refresh();
            }
          }
);
          MemberDetailsActivity.this.runOnUiThread(new Runnable(){
            @Override public void run(){
              alert.show();
            }
          }
);
        }
      }
    }
);
  }
  mSession.getDataHandler().getRoom(mRoom.getRoomId()).addEventListener(mEventListener);
  mThumbnailImageView=(ImageView)findViewById(R.id.avatar_img);
  mMatrixIdTextView=(TextView)findViewById(R.id.textView_matrixid);
  refresh();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_member_details);
  Intent intent=getIntent();
  if (!intent.hasExtra(EXTRA_ROOM_ID)) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mRoomId=intent.getStringExtra(EXTRA_ROOM_ID);
  if (!intent.hasExtra(EXTRA_MEMBER_ID)) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mMemberId=intent.getStringExtra(EXTRA_MEMBER_ID);
  mSession=getSession(intent);
  if (null == mSession) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  mRoom=mSession.getDataHandler().getRoom(mRoomId);
  if (null == mRoom) {
    Log.e(LOG_TAG,"String_Node_Str");
    finish();
    return;
  }
  Collection<RoomMember> members=mRoom.getMembers();
  for (  RoomMember member : members) {
    if (member.getUserId().equals(mMemberId)) {
      mMember=member;
      break;
    }
  }
  if (null == mMember) {
    Log.e(LOG_TAG,"String_Node_Str" + mMemberId + "String_Node_Str"+ mRoomId);
    finish();
    return;
  }
  mButtonsList=new ArrayList<Button>();
  mButtonsList.add((Button)findViewById(R.id.contact_button_1));
  mButtonsList.add((Button)findViewById(R.id.contact_button_2));
  mButtonsList.add((Button)findViewById(R.id.contact_button_3));
  mButtonsList.add((Button)findViewById(R.id.contact_button_4));
  for (  Button button : mButtonsList) {
    button.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        String text=(String)((Button)v).getText();
        final View refreshingView=findViewById(R.id.profile_mask);
        final ApiCallback callback=new SimpleApiCallback<Void>(MemberDetailsActivity.this){
          @Override public void onMatrixError(          MatrixError e){
            if (MatrixError.FORBIDDEN.equals(e.errcode)) {
              Toast.makeText(MemberDetailsActivity.this,e.error,Toast.LENGTH_LONG).show();
            }
            MemberDetailsActivity.this.refresh();
          }
          @Override public void onSuccess(          Void info){
            MemberDetailsActivity.this.refresh();
          }
        }
;
        for (        Button button : mButtonsList) {
          button.setEnabled(false);
        }
        if (text.equals(getResources().getString(R.string.kick))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.kick(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.ban))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.ban(mMember.getUserId(),null,callback);
        }
 else         if (text.equals(getResources().getString(R.string.unban))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.unban(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.invite))) {
          refreshingView.setVisibility(View.VISIBLE);
          mRoom.invite(mMember.getUserId(),callback);
        }
 else         if (text.equals(getResources().getString(R.string.chat))) {
          refreshingView.setVisibility(View.VISIBLE);
          MemberDetailsActivity.this.runOnUiThread(new Runnable(){
            @Override public void run(){
              CommonActivityUtils.goToOneToOneRoom(mSession,mMemberId,MemberDetailsActivity.this,new SimpleApiCallback<Void>(MemberDetailsActivity.this){
                @Override public void onMatrixError(                MatrixError e){
                  if (MatrixError.FORBIDDEN.equals(e.errcode)) {
                    Toast.makeText(MemberDetailsActivity.this,e.error,Toast.LENGTH_LONG).show();
                  }
                  MemberDetailsActivity.this.refresh();
                }
                @Override public void onNetworkError(                Exception e){
                  Toast.makeText(MemberDetailsActivity.this,e.getLocalizedMessage(),Toast.LENGTH_LONG).show();
                  MemberDetailsActivity.this.refresh();
                }
                @Override public void onUnexpectedError(                Exception e){
                  Toast.makeText(MemberDetailsActivity.this,e.getLocalizedMessage(),Toast.LENGTH_LONG).show();
                  MemberDetailsActivity.this.refresh();
                }
              }
);
            }
          }
);
        }
 else         if (text.equals(getResources().getString(R.string.set_power_level))) {
          String title=getResources().getString(R.string.set_power_level);
          String initText=mRoom.getLiveState().getPowerLevels().getUserPowerLevel(mMemberId) + "String_Node_Str";
          final AlertDialog alert=CommonActivityUtils.createEditTextAlert(MemberDetailsActivity.this,title,null,initText,new CommonActivityUtils.OnSubmitListener(){
            @Override public void onSubmit(            String text){
              if (text.length() == 0) {
                return;
              }
              int newPowerLevel=-1;
              try {
                newPowerLevel=Integer.parseInt(text);
              }
 catch (              Exception e) {
              }
              if (newPowerLevel >= 0) {
                refreshingView.setVisibility(View.VISIBLE);
                mRoom.updateUserPowerLevels(mMember.getUserId(),newPowerLevel,callback);
              }
 else {
                MemberDetailsActivity.this.refresh();
              }
            }
            @Override public void onCancelled(){
              MemberDetailsActivity.this.refresh();
            }
          }
);
          MemberDetailsActivity.this.runOnUiThread(new Runnable(){
            @Override public void run(){
              alert.show();
            }
          }
);
        }
      }
    }
);
  }
  mSession.getDataHandler().getRoom(mRoom.getRoomId()).addEventListener(mEventListener);
  mThumbnailImageView=(ImageView)findViewById(R.id.avatar_img);
  mMatrixIdTextView=(TextView)findViewById(R.id.textView_matrixid);
  refresh();
}