Program: 13642
Project: 13642
Buggy source:
public void testHtmlModeToggleTextTransfer() throws InterruptedException, IllegalEditorStateException {
  waitForOnDomLoaded();
  final View view=mFragment.getView();
  if (view == null) {
    throw (new IllegalStateException("String_Node_Str"));
  }
  final ToggleButton htmlButton=(ToggleButton)view.findViewById(R.id.format_bar_button_html);
  String content=mFragment.getContent().toString();
  final EditTextWithKeyBackListener titleText=(EditTextWithKeyBackListener)view.findViewById(R.id.sourceview_title);
  final EditTextWithKeyBackListener contentText=(EditTextWithKeyBackListener)view.findViewById(R.id.sourceview_content);
  final CountDownLatch uiThreadLatch1=new CountDownLatch(1);
  mActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      htmlButton.performClick();
      uiThreadLatch1.countDown();
    }
  }
);
  uiThreadLatch1.await();
  waitFor(500);
  assertEquals("String_Node_Str",titleText.getText().toString());
  assertEquals(content,contentText.getText().toString());
  final CountDownLatch uiThreadLatch2=new CountDownLatch(1);
  mActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      titleText.setText("String_Node_Str");
      contentText.setText("String_Node_Str");
      try {
        assertEquals("String_Node_Str",mFragment.getTitle());
        assertEquals("String_Node_Str",mFragment.getContent());
      }
 catch (      IllegalEditorStateException e) {
        throw new RuntimeException();
      }
      htmlButton.performClick();
      uiThreadLatch2.countDown();
    }
  }
);
  uiThreadLatch2.await();
  waitFor(300);
  assertEquals("String_Node_Str",mFragment.getTitle());
  assertEquals("String_Node_Str",mFragment.getContent());
}

Fixed version (ground truth):
public void testHtmlModeToggleTextTransfer() throws InterruptedException, EditorFragmentNotAddedException {
  waitForOnDomLoaded();
  final View view=mFragment.getView();
  if (view == null) {
    throw (new IllegalStateException("String_Node_Str"));
  }
  final ToggleButton htmlButton=(ToggleButton)view.findViewById(R.id.format_bar_button_html);
  String content=mFragment.getContent().toString();
  final EditTextWithKeyBackListener titleText=(EditTextWithKeyBackListener)view.findViewById(R.id.sourceview_title);
  final EditTextWithKeyBackListener contentText=(EditTextWithKeyBackListener)view.findViewById(R.id.sourceview_content);
  final CountDownLatch uiThreadLatch1=new CountDownLatch(1);
  mActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      htmlButton.performClick();
      uiThreadLatch1.countDown();
    }
  }
);
  uiThreadLatch1.await();
  waitFor(500);
  assertEquals("String_Node_Str",titleText.getText().toString());
  assertEquals(content,contentText.getText().toString());
  final CountDownLatch uiThreadLatch2=new CountDownLatch(1);
  mActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      titleText.setText("String_Node_Str");
      contentText.setText("String_Node_Str");
      try {
        assertEquals("String_Node_Str",mFragment.getTitle());
        assertEquals("String_Node_Str",mFragment.getContent());
      }
 catch (      EditorFragmentNotAddedException e) {
        throw new RuntimeException();
      }
      htmlButton.performClick();
      uiThreadLatch2.countDown();
    }
  }
);
  uiThreadLatch2.await();
  waitFor(300);
  assertEquals("String_Node_Str",mFragment.getTitle());
  assertEquals("String_Node_Str",mFragment.getContent());
}