nus-yam/ex-repair huggingface dataset:
Program: 141903
Project: 141903
Buggy source:
@Override public void open(Map conf,TopologyContext context,SpoutOutputCollector collector){
  q=InMemTestQueue.getQueue(qName);
  this.collector=collector;
}

Fixed version (ground truth):
@Override public void open(Map conf,TopologyContext context,SpoutOutputCollector collector){
  q=InMemTestQueue.getQueue(qName);
  failures=InMemTestQueue.getFailed(qName);
  this.collector=collector;
  rand=new Random();
  outstanding=new ConcurrentHashMap<Integer,byte[]>();
}
Program: 141904
Project: 141904
Buggy source:
public void onGlobalLayout(){
  Log.d(ControlActivity.TAG,"String_Node_Str");
  if (cc == null || fader == null) {
    return;
  }
  if (cc.getMode() == CrossControl.MODE_POINTER_PLAIN) {
    fader.setVisibility(View.GONE);
  }
 else {
    fader.setVisibility(View.VISIBLE);
  }
  fader.setValue(cc.getSpeed() / 100.0f,0);
  setCrrSelected();
  setEnableLock();
  softpultLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
}

Fixed version (ground truth):
public void onGlobalLayout(){
  Log.d(ControlActivity.TAG,"String_Node_Str");
  if (cc == null || fader == null) {
    return;
  }
  if (cc.getMode() == CrossControl.MODE_POINTER_PLAIN) {
    fader.setVisibility(View.GONE);
  }
 else {
    fader.setVisibility(View.VISIBLE);
  }
  fader.setValue(cc.getSpeed() / 100.0f,0);
  setCrrSelected();
  setEnableLock();
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
    softpultLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
  }
 else {
    softpultLayout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
  }
}
Program: 141907
Project: 141907
Buggy source:
public Object getItems(){
  this.items=DeviceGroupWrapper.get().getWrappedDeviceFromSelection().getGobos();
  return this.items;
}

Fixed version (ground truth):
public Object getItems(){
  EntityDevice selection=DeviceGroupWrapper.get().getLastWrappedDeviceFromSelection();
  if (selection != null) {
    this.items=selection.getGobos();
  }
  return this.items;
}
Program: 141908
Project: 141908
Buggy source:
@Override public View getView(int index,View convertView,ViewGroup parent){
  ImageView imageView=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.gobo_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.goboicon);
      imageView.setPadding(2,2,2,2);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.goboicon);
    }
    if (this.items == null) {
      imageView.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    if (!images.contains(this.items[index].getValue())) {
      images.add(new ImageWithKey(this.items[index].getImage(ctx),this.items[index].getValue()));
    }
    imageView.setImageBitmap(images.get(this.items[index].getValue()).getBitmap());
    if (DeviceGroupWrapper.get().getLastWrappedDeviceFromSelection().getSelectedValueIndices().contains(items[index].getIndex())) {
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int index,View convertView,ViewGroup parent){
  ImageView imageView=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.gobo_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.goboicon);
      imageView.setPadding(2,2,2,2);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.goboicon);
    }
    if (this.items == null) {
      imageView.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    if (!images.contains(this.items[index].getValue())) {
      images.add(new ImageWithKey(this.items[index].getImage(ctx),this.items[index].getValue()));
    }
    imageView.setImageBitmap(images.get(this.items[index].getValue()).getBitmap());
    if (DeviceGroupWrapper.get().getLastWrappedDeviceFromSelection().getSelectedValueIndices().contains(items[index].getIndex())) {
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    Log.d("String_Node_Str",DMXControlApplication.stackTraceToString(e));
  }
  return view;
}
Program: 141909
Project: 141909
Buggy source:
private void stopAllThings(){
  if (this.animatorZoom != null) {
    this.animatorZoom.cancel();
  }
  if (this.animatorZoom != null) {
    this.animatorFocus.cancel();
  }
  if (this.animatorZoom != null) {
    this.animatorIris.cancel();
  }
  if (this.animatorZoom != null) {
    this.animatorFrost.cancel();
  }
}

Fixed version (ground truth):
private void stopAllThings(){
  if (this.animatorZoom != null) {
    this.animatorZoom.cancel();
  }
  if (this.animatorFocus != null) {
    this.animatorFocus.cancel();
  }
  if (this.animatorIris != null) {
    this.animatorIris.cancel();
  }
  if (this.animatorFrost != null) {
    this.animatorFrost.cancel();
  }
}
Program: 141910
Project: 141910
Buggy source:
@Override public View getView(int index,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Devices.get(index);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    imageView.setImageBitmap(ent.getImage(ctx));
    editText.setText(ent.getName());
    if (mEntityManager.isInEntitySelection(Type.DEVICE,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int index,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Devices.get(index);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    if (!images.contains(ent.getImageName())) {
      images.add(new ImageWithKey(ent.getImage(ctx),ent.getImageName()));
    }
    imageView.setImageBitmap(images.get(ent.getImageName()).getBitmap());
    editText.setText(ent.getName());
    editText.setText(ent.getName());
    if (mEntityManager.isInEntitySelection(Type.DEVICE,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}
Program: 141911
Project: 141911
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Groups.get(position);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    imageView.setImageBitmap(ent.getImage(ctx));
    editText.setText(ent.getName());
    if (mEntityManager.isInEntitySelection(Type.GROUP,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  ImageView imageView=null;
  TextView editText=null;
  View view=null;
  try {
    if (convertView == null) {
      LayoutInflater inflater=(LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      View rowView=inflater.inflate(R.layout.device_cell,parent,false);
      view=rowView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      imageView.setPadding(8,8,8,8);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
 else {
      view=(View)convertView;
      imageView=(ImageView)view.findViewById(R.id.deviceCell_icon);
      editText=(TextView)view.findViewById(R.id.deviceCell_name);
    }
    Entity ent=ReceivedData.get().Groups.get(position);
    if (ent == null) {
      imageView.setVisibility(View.INVISIBLE);
      editText.setVisibility(View.INVISIBLE);
      return view;
    }
    imageView.setVisibility(View.VISIBLE);
    if (!images.contains(ent.getImageName())) {
      images.add(new ImageWithKey(ent.getImage(ctx),ent.getImageName()));
    }
    imageView.setImageBitmap(images.get(ent.getImageName()).getBitmap());
    editText.setText(ent.getName());
    if (mEntityManager.isInEntitySelection(Type.GROUP,mEntitySelection,ent.getId())) {
      imageView.setBackgroundColor(SelectionColor);
    }
 else {
      imageView.setBackgroundColor(Color.TRANSPARENT);
    }
  }
 catch (  Exception e) {
    e.toString();
  }
  return view;
}
Program: 141912
Project: 141912
Buggy source:
public Bitmap getImage(Context context){
  File imgFile=new File(IconStorageName + File.separator + mImage);
  if (imgFile.isFile()) {
    if (imgFile.exists()) {
      return BitmapFactory.decodeFile(imgFile.getAbsolutePath());
    }
  }
  return BitmapFactory.decodeResource(context.getResources(),R.drawable.icon);
}

Fixed version (ground truth):
public Bitmap getImage(Context context){
  try {
    File imgFile=new File(IconStorageName + File.separator + mImage);
    if (imgFile.isFile()) {
      if (imgFile.exists()) {
        return BitmapFactory.decodeFile(imgFile.getAbsolutePath());
      }
    }
  }
 catch (  Exception e) {
  }
  return BitmapFactory.decodeResource(context.getResources(),R.drawable.icon);
}
Program: 141914
Project: 141914
Buggy source:
@Override public void onNameChanged(String name){
  finalEditText.setText(name);
  finalView.invalidate();
}

Fixed version (ground truth):
@Override public void onNameChanged(String name){
  finalEditText.setText(name);
  notifyDataSetChanged();
}
Program: 141916
Project: 141916
Buggy source:
@Override public void onNameChanged(String name){
  finalEditText.setText(name);
  finalView.invalidate();
}

Fixed version (ground truth):
@Override public void onNameChanged(String name){
  finalEditText.setText(name);
  notifyDataSetChanged();
}
Program: 141917
Project: 141917
Buggy source:
@Override public Object instantiateItem(ViewGroup container,int position){
  if (position >= base.size()) {
    Logger.log("String_Node_Str","String_Node_Str" + position + "String_Node_Str"+ base.size()+ "String_Node_Str");
    return null;
  }
  Controller controller=base.get(position);
  LayoutInflater inflater=LayoutInflater.from(host.getActivity());
  View view=inflater.inflate(controller.getView(),container,false);
  controller.attach(view,host);
  controller.connect(view,host);
  container.addView(view);
  view.setTag(controller);
  return controller;
}

Fixed version (ground truth):
@Override public Object instantiateItem(ViewGroup container,int position){
  if (position >= base.size()) {
    Logger.log("String_Node_Str","String_Node_Str" + position + "String_Node_Str"+ base.size()+ "String_Node_Str");
    return null;
  }
  Controller controller=base.get(position);
  Logger.log("String_Node_Str","String_Node_Str" + position + "String_Node_Str"+ controller);
  LayoutInflater inflater=LayoutInflater.from(host.getActivity());
  View view=inflater.inflate(controller.getView(),container,false);
  controller.attach(view,host);
  controller.connect(view,host);
  container.addView(view);
  view.setTag(controller);
  return controller;
}
Program: 141918
Project: 141918
Buggy source:
@Override public void destroyItem(ViewGroup container,int position,Object object){
  if (object instanceof Controller)   ((Controller)object).disconnect(host);
  View toRemove=container.findViewWithTag(object);
  if (toRemove != null) {
    container.removeView(toRemove);
  }
}

Fixed version (ground truth):
@Override public void destroyItem(ViewGroup container,int position,Object object){
  if (object instanceof Controller)   ((Controller)object).disconnect(host);
  Logger.log("String_Node_Str","String_Node_Str" + position + "String_Node_Str"+ object);
}
Program: 141919
Project: 141919
Buggy source:
@Override public void onDestroy(){
  super.onDestroy();
  chatIconController.disconnect(this);
}

Fixed version (ground truth):
@Override public void onDestroy(){
  super.onDestroy();
  if (chatIconController != null) {
    chatIconController.disconnect(this);
  }
}
Program: 141921
Project: 141921
Buggy source:
@Override public void onSaveInstanceState(Bundle savedInstanceState){
  super.onSaveInstanceState(savedInstanceState);
  savedInstanceState.putSerializable("String_Node_Str",stats);
  savedInstanceState.putSerializable("String_Node_Str",navigation);
}

Fixed version (ground truth):
@Override public void onSaveInstanceState(Bundle savedInstanceState){
  super.onSaveInstanceState(savedInstanceState);
  savedInstanceState.putSerializable("String_Node_Str",stats);
  savedInstanceState.putSerializable("String_Node_Str",navigation);
  savedInstanceState.putSerializable("String_Node_Str",chatIconController);
}
Program: 141922
Project: 141922
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  getMenuInflater().inflate(R.menu.game_screen,menu);
  View chatIconView=menu.findItem(R.id.action_chat).getActionView();
  chatIconController.attach(chatIconView,this);
  chatIconController.connect(chatIconView,this);
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  getMenuInflater().inflate(R.menu.game_screen,menu);
  View chatIconView=menu.findItem(R.id.action_chat).getActionView();
  if (chatIconController != null) {
    chatIconController.attach(chatIconView,this);
    chatIconController.connect(chatIconView,this);
  }
  return true;
}
Program: 141923
Project: 141923
Buggy source:
public String getCharInfo(){
  String level="String_Node_Str" + extractInt(lastUpdate.html,0,LEVEL);
  String text=extractString(lastUpdate.html,null,LEVEL_TEXT);
  if (text == null)   return level;
 else   return level + "String_Node_Str" + text;
}

Fixed version (ground truth):
public String getCharInfo(){
  if (inAstralPlane()) {
    return "String_Node_Str";
  }
  String level="String_Node_Str" + extractInt(lastUpdate.html,0,LEVEL);
  String text=extractString(lastUpdate.html,null,LEVEL_TEXT);
  if (text == null)   return level;
 else   return level + "String_Node_Str" + text;
}
Program: 141924
Project: 141924
Buggy source:
public MessageController(MessageModel model){
  super(model);
}

Fixed version (ground truth):
public MessageController(E model){
  super(model);
}
Program: 141925
Project: 141925
Buggy source:
@Override public void attach(View view,MessageModel model,Screen host){
  view.setBackgroundColor(model.visitErrorType(new MessageModel.ErrorTypeVisitor<Integer>(){
    @Override public Integer forNone(){
      return 0xFF0000FF;
    }
    @Override public Integer forError(){
      return 0xFFBB0000;
    }
    @Override public Integer forSevere(){
      return 0xFFBB0000;
    }
  }
));
  TextView title=(TextView)view.findViewById(R.id.message_title);
  title.setText(model.getTitle());
  TextView txtMessage=(TextView)view.findViewById(R.id.message_text);
  txtMessage.setText(model.getMessage());
  Button actionButton=(Button)view.findViewById(R.id.message_action);
  if (model.hasAction()) {
    actionButton.setText(model.getActionText());
    actionButton.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        getModel().triggerAction();
      }
    }
);
  }
 else {
    actionButton.setVisibility(View.GONE);
  }
}

Fixed version (ground truth):
@Override public void attach(View view,E model,Screen host){
  view.setBackgroundColor(model.visitErrorType(new MessageModel.ErrorTypeVisitor<Integer>(){
    @Override public Integer forNone(){
      return 0xFF0000FF;
    }
    @Override public Integer forError(){
      return 0xFFBB0000;
    }
    @Override public Integer forSevere(){
      return 0xFFBB0000;
    }
  }
));
  TextView title=(TextView)view.findViewById(R.id.message_title);
  title.setText(model.getTitle());
  TextView txtMessage=(TextView)view.findViewById(R.id.message_text);
  txtMessage.setText(model.getMessage());
  Button actionButton=(Button)view.findViewById(R.id.message_action);
  if (model.hasAction()) {
    actionButton.setText(model.getActionText());
    actionButton.setOnClickListener(new View.OnClickListener(){
      @Override public void onClick(      View v){
        getModel().triggerAction();
      }
    }
);
  }
 else {
    actionButton.setVisibility(View.GONE);
  }
}
Program: 141926
Project: 141926
Buggy source:
private void openChatFailure(Screen host,MessageModel message){
  Logger.log("String_Node_Str","String_Node_Str" + message.getMessage());
  MessageController error=new MessageController(message);
  host.getViewContext().getPrimaryRoute().execute(error);
}

Fixed version (ground truth):
private void openChatFailure(Screen host,MessageModel message){
  Logger.log("String_Node_Str","String_Node_Str" + message.getMessage());
  MessageController<MessageModel> error=new MessageController<MessageModel>(message);
  host.getViewContext().getPrimaryRoute().execute(error);
}
Program: 141927
Project: 141927
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Thread.setDefaultUncaughtExceptionHandler(new ErrorHandler(this));
  this.setContentView(this.getContentView());
  this.base=this.createViewContext();
  Controller controller=null;
  if (savedInstanceState != null && savedInstanceState.containsKey("String_Node_Str")) {
    controller=(Controller)savedInstanceState.getSerializable("String_Node_Str");
    Logger.log(this.getClass().getSimpleName(),"String_Node_Str" + controller);
  }
 else   if (getIntent() != null && getIntent().hasExtra("String_Node_Str")) {
    controller=ControllerPasser.popController((UUID)getIntent().getSerializableExtra("String_Node_Str"));
    if (controller == null) {
      Logger.log(this.getClass().getSimpleName(),"String_Node_Str");
    }
 else {
      Logger.log(this.getClass().getSimpleName(),"String_Node_Str" + controller);
    }
  }
 else {
    Logger.log(this.getClass().getSimpleName(),"String_Node_Str");
  }
  controller=this.setup(savedInstanceState,controller);
  if (controller == null) {
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController(error);
  }
  this.currentController=controller;
  displayController(controller,false);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Thread.setDefaultUncaughtExceptionHandler(new ErrorHandler(this));
  this.setContentView(this.getContentView());
  this.base=this.createViewContext();
  Controller controller=null;
  if (savedInstanceState != null && savedInstanceState.containsKey("String_Node_Str")) {
    controller=(Controller)savedInstanceState.getSerializable("String_Node_Str");
    Logger.log(this.getClass().getSimpleName(),"String_Node_Str" + controller);
  }
 else   if (getIntent() != null && getIntent().hasExtra("String_Node_Str")) {
    controller=ControllerPasser.popController((UUID)getIntent().getSerializableExtra("String_Node_Str"));
    if (controller == null) {
      Logger.log(this.getClass().getSimpleName(),"String_Node_Str");
    }
 else {
      Logger.log(this.getClass().getSimpleName(),"String_Node_Str" + controller);
    }
  }
 else {
    Logger.log(this.getClass().getSimpleName(),"String_Node_Str");
  }
  controller=this.setup(savedInstanceState,controller);
  if (controller == null) {
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController<MessageModel>(error);
  }
  this.currentController=controller;
  displayController(controller,false);
}
Program: 141928
Project: 141928
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController(error);
    Logger.log("String_Node_Str","String_Node_Str");
  }
  int layoutId=controller.getView();
  View view=inflater.inflate(layoutId,container,false);
  controller.attach(view,this);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController<MessageModel>(error);
    Logger.log("String_Node_Str","String_Node_Str");
  }
  int layoutId=controller.getView();
  View view=inflater.inflate(layoutId,container,false);
  controller.attach(view,this);
  return view;
}
Program: 141929
Project: 141929
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    Logger.log("String_Node_Str","String_Node_Str");
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController(error);
  }
  int layoutId=controller.getView();
  View view=inflater.inflate(layoutId,container,false);
  controller.attach(view,this);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    Logger.log("String_Node_Str","String_Node_Str");
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController<MessageModel>(error);
  }
  int layoutId=controller.getView();
  View view=inflater.inflate(layoutId,container,false);
  controller.attach(view,this);
  return view;
}
Program: 141930
Project: 141930
Buggy source:
@Override public void uncaughtException(Thread thread,Throwable ex){
  Logger.log("String_Node_Str","String_Node_Str" + ex);
  String error="String_Node_Str";
  error+="String_Node_Str" + BuildConfig.VERSION_CODE + "String_Node_Str";
  error+="String_Node_Str" + Build.VERSION.RELEASE + "String_Node_Str";
  error+="String_Node_Str" + Build.MODEL + "String_Node_Str";
  error+="String_Node_Str" + Build.MANUFACTURER + "String_Node_Str";
  error+="String_Node_Str" + Log.getStackTraceString(ex);
  settings.setImmediately(ErrorReportingModel.ERROR_SETTING,error);
  System.exit(2);
}

Fixed version (ground truth):
@Override public void uncaughtException(Thread thread,Throwable ex){
  Logger.log("String_Node_Str","String_Node_Str" + ex);
  String error=getPhoneInfo();
  settings.setImmediately(ErrorReportingModel.ERROR_SETTING,error);
  System.exit(2);
}
Program: 141933
Project: 141933
Buggy source:
@Override public DataCache<String,RawItem> getItemCache(){
  if (itemsCache.isLoadRequired()) {
synchronized (itemsCache) {
      if (itemsCache.isLoadRequired()) {
        itemsCache.load(this);
      }
    }
  }
  return itemsCache;
}

Fixed version (ground truth):
@Override public DataCache<String,RawItem> getItemCache(){
  return itemsCache;
}
Program: 141934
Project: 141934
Buggy source:
@Override public DataCache<String,RawSkill> getSkillCache(){
  if (skillsCache.isLoadRequired()) {
synchronized (skillsCache) {
      if (skillsCache.isLoadRequired()) {
        skillsCache.load(this);
      }
    }
  }
  return skillsCache;
}

Fixed version (ground truth):
@Override public DataCache<String,RawSkill> getSkillCache(){
  return skillsCache;
}
Program: 141935
Project: 141935
Buggy source:
@Override public void connect(View view,M model,Screen host){
  final CustomFragmentTabHost tabHost=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tab_host);
  tabHost.setup(host.getActivity(),host.getChildFragmentManager());
  for (  C child : model.getChildren()) {
    Controller c=getController(child);
    Bundle bundle=FragmentScreen.prepare(c);
    TabSpec tab=tabHost.newTabSpec(child.getTitle()).setIndicator(child.getTitle());
    tabHost.addTab(tab,FragmentScreen.class,bundle);
  }
  tabHost.setCurrentTab(model.getActiveChild());
}

Fixed version (ground truth):
@CallSuper @Override public void connect(View view,M model,Screen host){
  final CustomFragmentTabHost tabHost=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tab_host);
  tabHost.setup(host.getActivity(),host.getChildFragmentManager());
  for (  C child : model.getChildren()) {
    Controller c=getController(child);
    Bundle bundle=FragmentScreen.prepare(c);
    TabSpec tab=tabHost.newTabSpec(child.getTitle()).setIndicator(child.getTitle());
    tabHost.addTab(tab,FragmentScreen.class,bundle);
  }
  tabHost.setCurrentTab(model.getActiveChild());
}
Program: 141936
Project: 141936
Buggy source:
@Override public void connect(View view,M model,Screen host){
  super.connect(view,model,host);
  final CustomFragmentTabHost tabHost=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tab_host);
  tabHost.setOnCreateFragmentListener(new OnCreateFragmentListener(){
    @SuppressWarnings("String_Node_Str") @Override public void setup(    Fragment f,    String tag){
      FragmentScreen screen=(FragmentScreen)f;
      UpdatableController<C> controller=(UpdatableController<C>)screen.getController();
      linkChild(controller,tag);
    }
  }
);
}

Fixed version (ground truth):
@CallSuper @Override public void connect(View view,M model,Screen host){
  super.connect(view,model,host);
  final CustomFragmentTabHost tabHost=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tab_host);
  tabHost.setOnCreateFragmentListener(new OnCreateFragmentListener(){
    @SuppressWarnings("String_Node_Str") @Override public void setup(    Fragment f,    String tag){
      FragmentScreen screen=(FragmentScreen)f;
      UpdatableController<C> controller=(UpdatableController<C>)screen.getController();
      linkChild(controller,tag);
    }
  }
);
}
Program: 141937
Project: 141937
Buggy source:
@Override public void disconnect(Screen host){
  if (callback != null) {
    callback.close();
  }
}

Fixed version (ground truth):
@CallSuper @Override public void disconnect(Screen host){
  if (callback != null) {
    callback.close();
  }
}
Program: 141938
Project: 141938
Buggy source:
@Override public void connect(final View view,final Screen host){
  if (callback != null) {
    callback.close();
  }
  this.callback=new HandlerCallback<C>(){
    @Override public void receiveProgress(    C message){
      LinkedModelController.this.receiveProgress(view,getModel(),message,host);
    }
  }
;
  getModel().attachCallback(callback.weak());
  super.connect(view,host);
}

Fixed version (ground truth):
@CallSuper @Override public void connect(final View view,final Screen host){
  if (callback != null) {
    callback.close();
  }
  this.callback=new HandlerCallback<C>(){
    @Override public void receiveProgress(    C message){
      LinkedModelController.this.receiveProgress(view,getModel(),message,host);
    }
  }
;
  getModel().attachCallback(callback.weak());
  super.connect(view,host);
}
Program: 141939
Project: 141939
Buggy source:
@Override public void disconnect(Screen host){
  super.disconnect(host);
  this.currentView=new WeakReference<>(null);
  this.currentScreen=new WeakReference<>(null);
}

Fixed version (ground truth):
@CallSuper @Override public void disconnect(Screen host){
  super.disconnect(host);
  this.currentView=new WeakReference<>(null);
  this.currentScreen=new WeakReference<>(null);
}
Program: 141940
Project: 141940
Buggy source:
@Override public void connect(final View view,final Screen host){
  this.currentView=new WeakReference<>(view);
  this.currentScreen=new WeakReference<>(host);
  super.connect(view,host);
}

Fixed version (ground truth):
@CallSuper @Override public void connect(final View view,final Screen host){
  this.currentView=new WeakReference<>(view);
  this.currentScreen=new WeakReference<>(host);
  super.connect(view,host);
}
Program: 141941
Project: 141941
Buggy source:
@Override public void disconnect(Screen host){
  badge=null;
}

Fixed version (ground truth):
@Override public void disconnect(Screen host){
  super.disconnect(host);
  badge=null;
}
Program: 141942
Project: 141942
Buggy source:
@Override public void disconnect(Screen host){
  if (updateReceiver != null) {
    Logger.log("String_Node_Str",this.getClass().getSimpleName() + "String_Node_Str");
    ChatBroadcaster.unregisterListener(host,updateReceiver);
    updateReceiver=null;
  }
  if (sendCommand != null) {
    sendCommand.close();
    sendCommand=null;
  }
}

Fixed version (ground truth):
@Override public void disconnect(Screen host){
  super.disconnect(host);
  if (updateReceiver != null) {
    Logger.log("String_Node_Str",this.getClass().getSimpleName() + "String_Node_Str");
    ChatBroadcaster.unregisterListener(host,updateReceiver);
    updateReceiver=null;
  }
  if (sendCommand != null) {
    sendCommand.close();
    sendCommand=null;
  }
}
Program: 141943
Project: 141943
Buggy source:
@Override public void onClick(View arg0){
  String message=text.getText().toString();
  getModel().submitCommand(new ChatModel.ChatModelCommand.SubmitChatMessage(getModel().getCurrentChannel(),message));
  text.setText("String_Node_Str");
  InputMethodManager inputManager=(InputMethodManager)host.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
  inputManager.hideSoftInputFromWindow(host.getActivity().getCurrentFocus().getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
}

Fixed version (ground truth):
@Override public void onClick(View arg0){
  String message=text.getText().toString();
  getModel().submitCommand(new ChatModel.ChatModelCommand.SubmitChatMessage(getModel().getCurrentChannel(),message));
  text.setText("String_Node_Str");
  InputMethodManager inputManager=(InputMethodManager)host.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
  View focus=host.getActivity().getCurrentFocus();
  if (focus != null) {
    inputManager.hideSoftInputFromWindow(focus.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
  }
}
Program: 141944
Project: 141944
Buggy source:
@Override public void doConnect(View view,ChatSubmissionStubModel model,final Screen host){
  final EditText text=(EditText)view.findViewById(R.id.chat_submission_input);
  Button submit=(Button)view.findViewById(R.id.chat_submission_submit);
  submit.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View arg0){
      String message=text.getText().toString();
      getModel().submitCommand(new ChatModel.ChatModelCommand.SubmitChatMessage(getModel().getCurrentChannel(),message));
      text.setText("String_Node_Str");
      InputMethodManager inputManager=(InputMethodManager)host.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
      inputManager.hideSoftInputFromWindow(host.getActivity().getCurrentFocus().getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
    }
  }
);
  onPartialTextFillCallback=new HandlerCallback<String>(){
    @Override protected void receiveProgress(    String message){
      if (text != null) {
        text.setText(message);
      }
    }
  }
;
  getModel().setPartialChatCallback(onPartialTextFillCallback.weak());
}

Fixed version (ground truth):
@Override public void doConnect(View view,ChatSubmissionStubModel model,final Screen host){
  final EditText text=(EditText)view.findViewById(R.id.chat_submission_input);
  Button submit=(Button)view.findViewById(R.id.chat_submission_submit);
  submit.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View arg0){
      String message=text.getText().toString();
      getModel().submitCommand(new ChatModel.ChatModelCommand.SubmitChatMessage(getModel().getCurrentChannel(),message));
      text.setText("String_Node_Str");
      InputMethodManager inputManager=(InputMethodManager)host.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
      View focus=host.getActivity().getCurrentFocus();
      if (focus != null) {
        inputManager.hideSoftInputFromWindow(focus.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
      }
    }
  }
);
  onPartialTextFillCallback=new HandlerCallback<String>(){
    @Override protected void receiveProgress(    String message){
      if (text != null) {
        text.setText(message);
      }
    }
  }
;
  getModel().setPartialChatCallback(onPartialTextFillCallback.weak());
}
Program: 141946
Project: 141946
Buggy source:
@Override public WebResourceResponse shouldInterceptRequest(WebView view,String url){
  if (url.startsWith("String_Node_Str"))   return null;
  if (url.contains("String_Node_Str")) {
    if ((url.startsWith("String_Node_Str") || url.startsWith("String_Node_Str") || url.startsWith("String_Node_Str")) && !INTERNAL_FULL_URL.matches(url)) {
      return null;
    }
    InputStream result=getModel().makeBlockingRequest(url);
    return new WebResourceResponse("String_Node_Str",null,result);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public WebResourceResponse shouldInterceptRequest(WebView view,String url){
  if (url.startsWith("String_Node_Str"))   return null;
  if (url.contains("String_Node_Str")) {
    if ((url.startsWith("String_Node_Str") || url.startsWith("String_Node_Str") || url.startsWith("String_Node_Str")) && !INTERNAL_FULL_URL.matches(url)) {
      return null;
    }
    InputStream result=getModel().makeBlockingRequest(url);
    return new WebResourceResponse("String_Node_Str",null,result);
  }
 else {
    return null;
  }
}
Program: 141949
Project: 141949
Buggy source:
public ChatController(ChatModel model){
  super(new ChatStubModel(model));
  submission=new ChatSubmissionController(model);
  this.currentTabs=new HashSet<>();
}

Fixed version (ground truth):
public ChatController(ChatModel model){
  super(new ChatStubModel(model));
  submission=new ChatSubmissionController(model);
  this.currentTabs=new HashSet<>();
  this.tabControllers=new HashMap<>();
}
Program: 141950
Project: 141950
Buggy source:
private void updateTabs(ChatModel model,Screen host){
  ArrayList<String> currentChannels=new ArrayList<>();
  for (  ChannelModel child : model.getChannels()) {
    if (child.isActive())     currentChannels.add(child.getName());
  }
  for (  String channel : currentChannels) {
    if (!currentTabs.contains(channel)) {
      addTab(channel,model,host);
    }
  }
  ArrayList<String> toRemove=new ArrayList<>();
  for (  String channel : currentTabs) {
    if (!currentChannels.contains(channel)) {
      toRemove.add(channel);
    }
  }
  for (  String channel : toRemove) {
    removeTab(channel);
  }
  String changeTabTo=model.getCurrentChannel();
  if (currentTabs.contains(changeTabTo)) {
    tabs.setCurrentTabByTag(changeTabTo);
  }
  View current=tabs.getCurrentTabView();
  if (current != null && current.getVisibility() == View.GONE && currentChannels.size() != 0) {
    tabs.setCurrentTabByTag(currentChannels.get(0));
  }
}

Fixed version (ground truth):
private void updateTabs(ChatModel model,Screen host){
  if (tabs == null)   return;
  ArrayList<String> currentChannels=new ArrayList<>();
  for (  ChannelModel child : model.getChannels()) {
    if (child.isActive())     currentChannels.add(child.getName());
  }
  for (  String channel : currentChannels) {
    if (!currentTabs.contains(channel)) {
      addTab(channel,model,host);
    }
  }
  ArrayList<String> toRemove=new ArrayList<>();
  for (  String channel : currentTabs) {
    if (!currentChannels.contains(channel)) {
      toRemove.add(channel);
    }
  }
  for (  String channel : toRemove) {
    removeTab(channel);
  }
  String changeTabTo=model.getCurrentChannel();
  if (currentTabs.contains(changeTabTo)) {
    tabs.setCurrentTabByTag(changeTabTo);
  }
  View current=tabs.getCurrentTabView();
  if (current != null && current.getVisibility() == View.GONE && currentChannels.size() != 0) {
    tabs.setCurrentTabByTag(currentChannels.get(0));
  }
}
Program: 141951
Project: 141951
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    Logger.log("String_Node_Str","String_Node_Str");
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController(error);
  }
  int layoutId=controller.getView();
  View view=inflater.inflate(layoutId,container,false);
  controller.connect(view,this);
  return view;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  this.controller=(Controller)this.getArguments().getSerializable("String_Node_Str");
  if (controller == null) {
    Logger.log("String_Node_Str","String_Node_Str");
    MessageModel error=new MessageModel("String_Node_Str",MessageModel.ErrorType.ERROR);
    controller=new MessageController(error);
  }
  int layoutId=controller.getView();
  return inflater.inflate(layoutId,container,false);
}
Program: 141952
Project: 141952
Buggy source:
protected void notifyView(Callback message){
  if (this.view != null)   this.view.reportProgress(message);
  ;
}

Fixed version (ground truth):
protected void notifyView(Callback message){
  if (this.view != null)   this.view.reportProgress(message);
}
Program: 141953
Project: 141953
Buggy source:
@Override public void onCreateSetup(View view,InventoryModel base,Bundle savedInstanceState){
  final CustomFragmentTabHost host=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tabhost);
  host.setup(getActivity(),getChildFragmentManager(),R.id.tabs_tabcontent);
  addTab(host,"String_Node_Str","String_Node_Str",3);
  addTab(host,"String_Node_Str","String_Node_Str",0);
  addTab(host,"String_Node_Str","String_Node_Str",1);
  addTab(host,"String_Node_Str","String_Node_Str",2);
  host.setCurrentTab(base.getInitialChosen());
  host.setOnCreateFragmentListener(this);
  WebModel results=base.getResultsPane();
  if (results != null) {
    DialogFragment newFragment=new WebDialog();
    newFragment.setArguments(GameFragment.getModelBundle(results));
    newFragment.show(getFragmentManager(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onCreateSetup(View view,InventoryModel base,Bundle savedInstanceState){
  final CustomFragmentTabHost host=(CustomFragmentTabHost)view.findViewById(R.id.tabs_tabhost);
  host.setup(getActivity(),getChildFragmentManager(),R.id.tabs_tabcontent);
  addTab(host,"String_Node_Str","String_Node_Str",3);
  addTab(host,"String_Node_Str","String_Node_Str",0);
  addTab(host,"String_Node_Str","String_Node_Str",1);
  addTab(host,"String_Node_Str","String_Node_Str",2);
  int current=base.getInitialChosen();
  if (current == 3)   host.setCurrentTab(0);
 else   host.setCurrentTab(current + 1);
  host.setOnCreateFragmentListener(this);
  WebModel results=base.getResultsPane();
  if (results != null) {
    DialogFragment newFragment=new WebDialog();
    newFragment.setArguments(GameFragment.getModelBundle(results));
    newFragment.show(getFragmentManager(),"String_Node_Str");
  }
}
Program: 141954
Project: 141954
Buggy source:
@Override public void setup(Fragment f,String tag){
  @SuppressWarnings("String_Node_Str") final GroupSearchListFragment<InvItem> fragment=(GroupSearchListFragment<InvItem>)f;
  int slot=fragment.getArguments().getInt("String_Node_Str");
  final InvPocketModel model=getModel().getPocket(slot);
  fragment.setItems(model.getItems());
  model.connectView(new AndroidProgressHandler<LiveMessage>(){
    @Override public void recieveProgress(    LiveMessage message){
switch (message) {
case REFRESH:
        fragment.setItems(model.getItems());
      break;
  }
}
}
,new AndroidViewContext(getActivity()));
fragment.setOnSelectionX(new OnListSelection<InvItem>(){
/** 
 * Autogenerated by eclipse.
 */
private static final long serialVersionUID=-2669494607044823363L;
@Override public boolean selectItem(DialogFragment list,InvItem item){
  ItemDialog.create(item).show(getFragmentManager(),"String_Node_Str");
  return true;
}
}
);
}

Fixed version (ground truth):
@Override public void setup(Fragment f,String tag){
  @SuppressWarnings("String_Node_Str") final GroupSearchListFragment<InvItem> fragment=(GroupSearchListFragment<InvItem>)f;
  int slot=fragment.getArguments().getInt("String_Node_Str");
  final InvPocketModel model=getModel().getPocket(slot);
  fragment.setItems(model.getItems());
  model.connectView(new AndroidProgressHandler<LiveMessage>(){
    @Override public void recieveProgress(    LiveMessage message){
switch (message) {
case REFRESH:
        fragment.setItems(model.getItems());
      break;
  }
}
}
,new AndroidViewContext(getActivity()));
fragment.setOnSelectionX(new OnListSelection<InvItem>(){
@Override public boolean selectItem(DialogFragment list,InvItem item){
  ItemDialog.create(item).show(getFragmentManager(),"String_Node_Str");
  return true;
}
}
);
}
Program: 141955
Project: 141955
Buggy source:
public void updateFilePath(SqlStorage<FormDefRecord> formDefRecordStorage,String newFilePath){
  checkFilePath(newFilePath);
  File newFormFile=new File(newFilePath);
  try {
    if (new File(mFormFilePath).getCanonicalPath().equals(newFormFile.getCanonicalPath())) {
    }
 else {
      FileUtil.deleteFileOrDir(mFormFilePath);
    }
  }
 catch (  IOException ioe) {
  }
  mFormMediaPath=getMediaPath(newFilePath);
  formDefRecordStorage.write(this);
}

Fixed version (ground truth):
public void updateFilePath(SqlStorage<FormDefRecord> formDefRecordStorage,String newFilePath){
  checkFilePath(newFilePath);
  File newFormFile=new File(newFilePath);
  try {
    if (new File(mFormFilePath).getCanonicalPath().equals(newFormFile.getCanonicalPath())) {
    }
 else {
      FileUtil.deleteFileOrDir(mFormFilePath);
    }
  }
 catch (  IOException ioe) {
  }
  mFormFilePath=newFilePath;
  mFormMediaPath=getMediaPath(newFilePath);
  formDefRecordStorage.write(this);
}
Program: 141956
Project: 141956
Buggy source:
public void upgrade(SQLiteDatabase db,int oldVersion,int newVersion){
  if (oldVersion == 1) {
    if (upgradeOneTwo(db)) {
      oldVersion=2;
    }
  }
  if (oldVersion == 2) {
    if (upgradeTwoThree(db)) {
      oldVersion=3;
    }
  }
  if (oldVersion == 3) {
    if (upgradeThreeFour(db)) {
      oldVersion=4;
    }
  }
  if (oldVersion == 4) {
    if (upgradeFourFive(db)) {
      oldVersion=5;
    }
  }
  if (oldVersion == 5) {
    if (upgradeFiveSix(db)) {
      oldVersion=6;
    }
  }
  if (oldVersion == 6) {
    if (upgradeSixSeven(db)) {
      oldVersion=7;
    }
  }
  if (oldVersion == 7) {
    if (upgradeSevenEight(db)) {
      oldVersion=8;
    }
  }
  if (oldVersion == 8) {
    if (upgradeEightTen(db)) {
      oldVersion=10;
    }
  }
  if (oldVersion == 9) {
    if (upgradeNineTen(db)) {
      oldVersion=10;
    }
  }
}

Fixed version (ground truth):
public void upgrade(SQLiteDatabase db,int oldVersion,int newVersion){
  if (oldVersion == 1) {
    if (upgradeOneTwo(db)) {
      oldVersion=2;
    }
  }
  if (oldVersion == 2) {
    if (upgradeTwoThree(db)) {
      oldVersion=3;
    }
  }
  if (oldVersion == 3) {
    if (upgradeThreeFour(db)) {
      oldVersion=4;
    }
  }
  if (oldVersion == 4) {
    if (upgradeFourFive(db)) {
      oldVersion=5;
    }
  }
  if (oldVersion == 5) {
    if (upgradeFiveSix(db)) {
      oldVersion=6;
    }
  }
  if (oldVersion == 6) {
    if (upgradeSixSeven(db)) {
      oldVersion=7;
    }
  }
  if (oldVersion == 7) {
    if (upgradeSevenEight(db)) {
      oldVersion=8;
    }
  }
  if (oldVersion == 8) {
    if (upgradeEightTen(db)) {
      oldVersion=10;
    }
  }
  if (oldVersion == 9) {
    if (upgradeNineTen(db)) {
      oldVersion=10;
    }
  }
  if (oldVersion == 10) {
    if (upgradeTenEleven(db)) {
      oldVersion=11;
    }
  }
}
Program: 141957
Project: 141957
Buggy source:
private boolean upgradeFiveSix(SQLiteDatabase db){
  db.beginTransaction();
  try {
    db.execSQL(DatabaseIndexingUtils.indexOnTableCommand("String_Node_Str","String_Node_Str","String_Node_Str"));
    DbUtil.createNumbersTable(db);
    db.execSQL(EntityStorageCache.getTableDefinition());
    EntityStorageCache.createIndexes(db);
    db.execSQL(UserDbUpgradeUtils.getCreateV6AndroidCaseIndexTableSqlDef());
    AndroidCaseIndexTable.createIndexes(db);
    AndroidCaseIndexTable cit=new AndroidCaseIndexTable(db);
    SqlStorage<ACase> caseStorage=new SqlStorage<ACase>(ACase.STORAGE_KEY,ACasePreV6Model.class,new ConcreteAndroidDbHelper(c,db));
    for (    ACase c : caseStorage) {
      cit.indexCase(c);
    }
    db.setTransactionSuccessful();
    return true;
  }
  finally {
    db.endTransaction();
  }
}

Fixed version (ground truth):
private boolean upgradeFiveSix(SQLiteDatabase db){
  db.beginTransaction();
  try {
    db.execSQL(DatabaseIndexingUtils.indexOnTableCommand("String_Node_Str","String_Node_Str","String_Node_Str"));
    DbUtil.createNumbersTable(db);
    db.execSQL(EntityStorageCache.getTableDefinition());
    EntityStorageCache.createIndexes(db);
    db.execSQL(AndroidCaseIndexTableV1.getTableDefinition());
    AndroidCaseIndexTable.createIndexes(db);
    AndroidCaseIndexTableV1 cit=new AndroidCaseIndexTableV1(db);
    SqlStorage<ACase> caseStorage=new SqlStorage<ACase>(ACase.STORAGE_KEY,ACasePreV6Model.class,new ConcreteAndroidDbHelper(c,db));
    for (    ACase c : caseStorage) {
      cit.indexCase(c);
    }
    db.setTransactionSuccessful();
    return true;
  }
  finally {
    db.endTransaction();
  }
}