Program: 26178
Project: 26178
Buggy source:
@Override protected void setUpInnerLayout(final View view){
  super.setUpInnerLayout(view);
  md5sumView=(TextView)view.findViewById(R.id.md5sum_view);
  noteView=(TextView)view.findViewById(R.id.note_view);
  ImageButton downloadButton=(ImageButton)view.findViewById(R.id.download_view);
  ImageButton changelogButton=(ImageButton)view.findViewById(R.id.changelog_view);
  if (md5sum != null)   md5sumView.setText(Html.fromHtml("String_Node_Str" + md5sum));
  setNoteView();
  downloadButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      Utils.confirmDialog(null,getContext().getString(R.string.install_confirm,version),new Utils.OnConfirmDialogListener(){
        @Override public void onDismiss(){
        }
        @Override public void onConfirm(){
          new DownloadTask(ROMSWITCHER_DOWNLOAD_PATH,"String_Node_Str",new DownloadTask.DownloadListener(){
            @Override public void downloadFinish(            DownloadTask.DownloadStatus status){
switch (status) {
case SUCCESS:
                if (onDownloadListener != null)                 onDownloadListener.onSuccess();
              break;
case CANCELED:
            Toast.makeText(getContext(),getContext().getString(R.string.download_cancel),Toast.LENGTH_SHORT).show();
          break;
case FAILED:
        Toast.makeText(getContext(),getContext().getString(R.string.download_failed),Toast.LENGTH_SHORT).show();
      break;
  }
}
}
,getContext()).execute(download);
}
}
,getContext());
}
}
);
changelogButton.setOnClickListener(new OnClickListener(){
@Override public void onClick(View v){
String[] changelogArray=changelog.split("String_Node_Str");
StringBuilder message=new StringBuilder();
for (String change : changelogArray) if (change.startsWith("String_Node_Str")) {
if (!message.toString().isEmpty()) message.append("String_Node_Str");
message.append(change.replace("String_Node_Str","String_Node_Str"));
}
 else {
if (!message.toString().isEmpty()) message.append("String_Node_Str");
message.append("String_Node_Str").append(change).append("String_Node_Str").append("String_Node_Str");
}
View dialogView=LayoutInflater.from(getContext()).inflate(R.layout.dialog_textview,(ViewGroup)getParent(),false);
((TextView)dialogView.findViewById(R.id.title_text)).setText(getContext().getString(R.string.changelog));
((TextView)dialogView.findViewById(R.id.text)).setText(Html.fromHtml(message.toString()));
AlertDialog.Builder dialog=new AlertDialog.Builder(getContext());
dialog.setView(dialogView).show();
}
}
);
}

Fixed version (ground truth):
@Override protected void setUpInnerLayout(final View view){
  super.setUpInnerLayout(view);
  downloadHeaderView=new DownloadHeaderView(getContext());
  setUpTitle();
  md5sumView=(TextView)view.findViewById(R.id.md5sum_view);
  noteView=(TextView)view.findViewById(R.id.note_view);
  if (md5sum != null)   md5sumView.setText(Html.fromHtml("String_Node_Str" + md5sum));
  setNoteView();
  downloadHeaderView.downloadButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      Utils.confirmDialog(null,getContext().getString(R.string.install_confirm,version),new Utils.OnConfirmDialogListener(){
        @Override public void onDismiss(){
        }
        @Override public void onConfirm(){
          new DownloadTask(ROMSWITCHER_DOWNLOAD_PATH,"String_Node_Str",new DownloadTask.DownloadListener(){
            @Override public void downloadFinish(            DownloadTask.DownloadStatus status){
switch (status) {
case SUCCESS:
                if (onDownloadListener != null)                 onDownloadListener.onSuccess();
              break;
case CANCELED:
            Toast.makeText(getContext(),getContext().getString(R.string.download_cancel),Toast.LENGTH_SHORT).show();
          break;
case FAILED:
        Toast.makeText(getContext(),getContext().getString(R.string.download_failed),Toast.LENGTH_SHORT).show();
      break;
  }
}
}
,getContext()).execute(download);
}
}
,getContext());
}
}
);
downloadHeaderView.changelogButton.setOnClickListener(new OnClickListener(){
@Override public void onClick(View v){
String[] changelogArray=changelog.split("String_Node_Str");
StringBuilder message=new StringBuilder();
for (String change : changelogArray) if (change.startsWith("String_Node_Str")) {
if (!message.toString().isEmpty()) message.append("String_Node_Str");
message.append(change.replace("String_Node_Str","String_Node_Str"));
}
 else {
if (!message.toString().isEmpty()) message.append("String_Node_Str");
message.append("String_Node_Str").append(change).append("String_Node_Str").append("String_Node_Str");
}
View dialogView=LayoutInflater.from(getContext()).inflate(R.layout.dialog_textview,(ViewGroup)getParent(),false);
((TextView)dialogView.findViewById(R.id.title_text)).setText(getContext().getString(R.string.changelog));
((TextView)dialogView.findViewById(R.id.text)).setText(Html.fromHtml(message.toString()));
AlertDialog.Builder dialog=new AlertDialog.Builder(getContext());
dialog.setView(dialogView).show();
}
}
);
}