nus-yam/ex-repair huggingface dataset:
Program: 8602
Project: 8602
Buggy source:
private void addReplyToTicketWithAttachment(final String cancelTag,final HSTicket ticket,final HSUser user,final String message,HSUploadAttachment[] attachments,final RequestQueue queue,final OnFetchedSuccessListener successListener,final ErrorListener errorListener){
  Uri.Builder builder=new Uri.Builder();
  builder.encodedPath(getApiUrl());
  builder.appendEncodedPath("String_Node_Str");
  HSUploadAttachment attachmentObject=attachments[0];
  String attachmentFileName=getAttachmentFileName(attachmentObject);
  builder.appendQueryParameter("String_Node_Str",attachmentFileName);
  String attachmentUrl=builder.build().toString();
  ZendeskObjectRequest attachmentRequest=new ZendeskObjectRequest(cancelTag,attachmentUrl,attachmentObject,new Response.Listener<JSONObject>(){
    @Override public void onResponse(    JSONObject jsonObject){
      try {
        String attachmentToken=jsonObject.getJSONObject("String_Node_Str").getString("String_Node_Str");
        String[] attachmentTokenList=new String[1];
        attachmentTokenList[0]=attachmentToken;
        addReplyToTicket(cancelTag,ticket,user,message,attachmentTokenList,queue,successListener,errorListener);
      }
 catch (      JSONException e) {
        e.printStackTrace();
        errorListener.onErrorResponse(new VolleyError("String_Node_Str"));
      }
    }
  }
,errorListener);
  addRequestAndStartQueue(queue,attachmentRequest);
}

Fixed version (ground truth):
private void addReplyToTicketWithAttachment(final String cancelTag,final HSTicket ticket,final HSUser user,final String message,HSUploadAttachment[] attachments,final RequestQueue queue,final OnFetchedSuccessListener successListener,final ErrorListener errorListener){
  Uri.Builder builder=new Uri.Builder();
  builder.encodedPath(getApiUrl());
  builder.appendEncodedPath("String_Node_Str");
  final HSUploadAttachment attachmentObject=attachments[0];
  String attachmentFileName=getAttachmentFileName(attachmentObject);
  builder.appendQueryParameter("String_Node_Str",attachmentFileName);
  String attachmentUrl=builder.build().toString();
  ZendeskObjectRequest attachmentRequest=new ZendeskObjectRequest(cancelTag,attachmentUrl,attachmentObject,new Response.Listener<JSONObject>(){
    @Override public void onResponse(    JSONObject jsonObject){
      try {
        String attachmentToken=jsonObject.getJSONObject("String_Node_Str").getString("String_Node_Str");
        String[] attachmentTokenList=new String[1];
        attachmentTokenList[0]=attachmentToken;
        HSAttachment[] attachmentObjectList=new HSAttachment[1];
        attachmentObjectList[0]=attachmentObject.getAttachment();
        addReplyToTicket(cancelTag,ticket,user,message,attachmentTokenList,attachmentObjectList,queue,successListener,errorListener);
      }
 catch (      JSONException e) {
        e.printStackTrace();
        errorListener.onErrorResponse(new VolleyError("String_Node_Str"));
      }
    }
  }
,errorListener);
  addRequestAndStartQueue(queue,attachmentRequest);
}
Program: 8603
Project: 8603
Buggy source:
@Override public void addReplyOnATicket(final String cancelTag,final String message,final HSUploadAttachment[] attachments,final HSTicket ticket,final HSUser user,RequestQueue queue,final OnFetchedSuccessListener successListener,ErrorListener errorListener){
  if (attachments != null && attachments.length > 0) {
    addReplyToTicketWithAttachment(cancelTag,ticket,user,message,attachments,queue,successListener,errorListener);
  }
 else {
    addReplyToTicket(cancelTag,ticket,user,message,null,queue,successListener,errorListener);
  }
}

Fixed version (ground truth):
@Override public void addReplyOnATicket(final String cancelTag,final String message,final HSUploadAttachment[] attachments,final HSTicket ticket,final HSUser user,RequestQueue queue,final OnFetchedSuccessListener successListener,ErrorListener errorListener){
  if (attachments != null && attachments.length > 0) {
    addReplyToTicketWithAttachment(cancelTag,ticket,user,message,attachments,queue,successListener,errorListener);
  }
 else {
    addReplyToTicket(cancelTag,ticket,user,message,null,null,queue,successListener,errorListener);
  }
}
Program: 8604
Project: 8604
Buggy source:
public void addReplyOnATicket(String cancelTag,String message,HSAttachment[] attachments,HSTicket ticket,OnFetchedSuccessListener success,ErrorListener errorListener){
  if (gear.canUplaodMessageAsHtmlString()) {
    message=Html.toHtml(new SpannableString(message));
  }
  gear.addReplyOnATicket(cancelTag,message,convertAttachmentArrayToUploadAttachment(attachments),ticket,getUser(),mRequestQueue,new OnFetchedSuccessListenerWrapper(success,message,attachments){
    @Override public void onSuccess(    Object successObject){
      if (!gear.getWillSendTicketUpdateInformationAfterAddingReply()) {
        HSTicketUpdate update=HSTicketUpdate.createUpdateByUser(null,null,this.message,Calendar.getInstance().getTime(),this.attachments);
        super.onSuccess(update);
      }
 else {
        super.onSuccess(successObject);
      }
    }
  }
,new ErrorWrapper("String_Node_Str",errorListener));
}

Fixed version (ground truth):
public void addReplyOnATicket(String cancelTag,String message,HSAttachment[] attachments,HSTicket ticket,OnFetchedSuccessListener success,ErrorListener errorListener){
  if (gear.canUplaodMessageAsHtmlString()) {
    message=Html.toHtml(new SpannableString(message));
  }
  gear.addReplyOnATicket(cancelTag,message,convertAttachmentArrayToUploadAttachment(attachments),ticket,getUser(),mRequestQueue,new OnFetchedSuccessListenerWrapper(success,message,attachments){
    @Override public void onSuccess(    Object successObject){
      if (gear.canIgnoreTicketUpdateInformationAfterAddingReply()) {
        HSTicketUpdate update=HSTicketUpdate.createUpdateByUser(null,null,this.message,Calendar.getInstance().getTime(),this.attachments);
        super.onSuccess(update);
      }
 else {
        super.onSuccess(successObject);
      }
    }
  }
,new ErrorWrapper("String_Node_Str",errorListener));
}
Program: 8605
Project: 8605
Buggy source:
private void resetAttachmentImage(){
  if (selectedAttachment == null) {
    this.imageView1.setImageResource(R.drawable.hs_attachment_img);
  }
 else {
    try {
      Uri uri=Uri.parse(selectedAttachment.getUrl());
      Bitmap selectedBitmap;
      selectedBitmap=downscaleAndReadBitmap(getActivity(),uri);
      this.imageView1.setImageBitmap(selectedBitmap);
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
private void resetAttachmentImage(){
  if (selectedAttachment == null) {
    this.imageView1.setImageResource(R.drawable.hs_add_attachment_img);
  }
 else {
    try {
      Uri uri=Uri.parse(selectedAttachment.getUrl());
      Bitmap selectedBitmap;
      selectedBitmap=downscaleAndReadBitmap(getActivity(),uri);
      this.imageView1.setImageBitmap(selectedBitmap);
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
  }
}
Program: 8606
Project: 8606
Buggy source:
public void addSearchViewInMenuItem(Context context,MenuItem searchItem){
  MenuItemCompat.setShowAsAction(searchItem,MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
  SearchView searchView=new SearchView(context);
  MenuItemCompat.setActionView(searchItem,searchView);
  searchView.setQueryHint(getString(R.string.hs_search_hint));
  searchView.setSubmitButtonEnabled(false);
  searchView.setOnSearchClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      searchStarted();
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String q){
      doSearchForQuery(q);
      return true;
    }
    @Override public boolean onQueryTextChange(    String newText){
      doSearchForQuery(newText);
      return true;
    }
  }
);
  MenuItemCompat.setOnActionExpandListener(searchItem,new OnActionExpandListener(){
    @Override public boolean onMenuItemActionExpand(    MenuItem item){
      setVisibility(true);
      return true;
    }
    @Override public boolean onMenuItemActionCollapse(    MenuItem item){
      setVisibility(false);
      return true;
    }
  }
);
}

Fixed version (ground truth):
public void addSearchViewInMenuItem(Context context,MenuItem searchItem){
  MenuItemCompat.setShowAsAction(searchItem,MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
  searchView=new SearchView(context);
  MenuItemCompat.setActionView(searchItem,searchView);
  searchView.setSubmitButtonEnabled(false);
  searchView.setOnSearchClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      searchStarted();
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String q){
      doSearchForQuery(q);
      return true;
    }
    @Override public boolean onQueryTextChange(    String newText){
      doSearchForQuery(newText);
      return true;
    }
  }
);
  MenuItemCompat.setOnActionExpandListener(searchItem,new OnActionExpandListener(){
    @Override public boolean onMenuItemActionExpand(    MenuItem item){
      setVisibility(true);
      return true;
    }
    @Override public boolean onMenuItemActionCollapse(    MenuItem item){
      setVisibility(false);
      return true;
    }
  }
);
  if (Build.VERSION.SDK_INT >= 14) {
    searchView.setQueryHint(getString(R.string.hs_search_hint));
  }
}
Program: 8607
Project: 8607
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_article);
  if (savedInstanceState == null) {
    ArticleFragment articleFragment=new ArticleFragment();
    this.kbItem=(HSKBItem)getIntent().getSerializableExtra("String_Node_Str");
    articleFragment.kbItem=this.kbItem;
    getSupportActionBar().setTitle(this.kbItem.getSubject());
    getSupportFragmentManager().beginTransaction().add(R.id.container,articleFragment).commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_article);
  if (savedInstanceState == null) {
    HSKBItem kbItem=(HSKBItem)getIntent().getSerializableExtra("String_Node_Str");
    ArticleFragment sectionFragment=HSFragmentManager.getArticleFragment(this,kbItem);
    HSFragmentManager.putFragmentInActivity(this,R.id.container,sectionFragment,"String_Node_Str");
    getHelpStackActionBar().setTitle(kbItem.getSubject());
  }
}
Program: 8608
Project: 8608
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_attachment);
  boolean isLocalAttachment=getIntent().getExtras().getBoolean("String_Node_Str");
  if (savedInstanceState == null) {
    if (!isLocalAttachment) {
      AttachmentFragment attachmentFragment=new AttachmentFragment();
      HSFragmentManager.putFragmentInActivity(this,R.id.container,attachmentFragment,"String_Node_Str");
    }
 else {
      LocalAttachmentFragment attachmentFragment=new LocalAttachmentFragment();
      HSFragmentManager.putFragmentInActivity(this,R.id.container,attachmentFragment,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_attachment);
  if (savedInstanceState == null) {
    AttachmentFragment attachmentFragment=new AttachmentFragment();
    HSFragmentManager.putFragmentInActivity(this,R.id.container,attachmentFragment,"String_Node_Str");
  }
}
Program: 8609
Project: 8609
Buggy source:
public static void startNewIssueActivity(HSActivityParent context,HSUser user,int requestCode){
  Intent intent=new Intent(context,NewIssueActivity.class);
  intent.putExtra(NewIssueActivity.EXTRAS_USER,user);
  context.startActivityForResult(intent,requestCode);
}

Fixed version (ground truth):
public static void startNewIssueActivity(HSFragmentParent context,HSUser user,int requestCode){
  Intent intent=new Intent(context.getActivity(),NewIssueActivity.class);
  intent.putExtra(NewIssueActivity.EXTRAS_USER,user);
  context.startActivityForResult(intent,requestCode);
}
Program: 8610
Project: 8610
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_issue_detail);
  mIssueDetailFragment=HSFragmentManager.getIssueDetailFragment();
  HSFragmentManager.putFragmentInActivity(this,R.id.container,mIssueDetailFragment,"String_Node_Str");
  mIssueDetailFragment.setTicket((HSTicket)getIntent().getExtras().getSerializable(EXTRAS_TICKET));
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_issue_detail);
  if (savedInstanceState == null) {
    IssueDetailFragment mIssueDetailFragment=HSFragmentManager.getIssueDetailFragment();
    HSFragmentManager.putFragmentInActivity(this,R.id.container,mIssueDetailFragment,"String_Node_Str");
    HSTicket ticket=(HSTicket)getIntent().getExtras().getSerializable(EXTRAS_TICKET);
    mIssueDetailFragment.setTicket(ticket);
    getHelpStackActionBar().setTitle(ticket.getSubject());
  }
}
Program: 8611
Project: 8611
Buggy source:
@Override public void configureActionBar(ActionBar actionBar){
  super.configureActionBar(actionBar);
  actionBar.setDisplayHomeAsUpEnabled(true);
  HSTicket ticket=(HSTicket)getIntent().getExtras().getSerializable(EXTRAS_TICKET);
  if (ticket != null) {
    actionBar.setTitle(ticket.getSubject());
  }
}

Fixed version (ground truth):
@Override public void configureActionBar(ActionBar actionBar){
  super.configureActionBar(actionBar);
  actionBar.setDisplayHomeAsUpEnabled(true);
}
Program: 8612
Project: 8612
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_section);
  HSKBItem kbSectionItem=(HSKBItem)getIntent().getSerializableExtra("String_Node_Str");
  if (savedInstanceState == null) {
    SectionFragment sectionFragment=new SectionFragment();
    sectionFragment.kbItem=kbSectionItem;
    this.actionBar.setTitle(kbSectionItem.getSubject());
    getSupportFragmentManager().beginTransaction().add(R.id.container,sectionFragment).commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_section);
  if (savedInstanceState == null) {
    HSKBItem kbSectionItem=(HSKBItem)getIntent().getSerializableExtra(EXTRAS_SECTION_ITEM);
    SectionFragment sectionFragment=HSFragmentManager.getSectionFragment(this,kbSectionItem);
    HSFragmentManager.putFragmentInActivity(this,R.id.container,sectionFragment,"String_Node_Str");
    getHelpStackActionBar().setTitle(kbSectionItem.getSubject());
  }
}
Program: 8613
Project: 8613
Buggy source:
@Override public void configureActionBar(ActionBar actionBar){
  super.configureActionBar(actionBar);
  this.actionBar=actionBar;
  actionBar.setDisplayHomeAsUpEnabled(true);
}

Fixed version (ground truth):
@Override public void configureActionBar(ActionBar actionBar){
  super.configureActionBar(actionBar);
  actionBar.setDisplayHomeAsUpEnabled(true);
}
Program: 8614
Project: 8614
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_article,container,false);
  getHelpStackActivity().setProgressBarIndeterminateVisibility(true);
  WebView webview=(WebView)rootView.findViewById(R.id.webview);
  String content=this.kbItem.getBody();
  String contentText=String.format(HTML_WRAPPER_WITH_TITLE,this.kbItem.getSubject(),content);
  webview.loadData(contentText,"String_Node_Str",null);
  getHelpStackActivity().setProgressBarIndeterminateVisibility(false);
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_article,container,false);
  webview=(WebView)rootView.findViewById(R.id.webview);
  if (savedInstanceState != null) {
    kbItem=(HSKBItem)savedInstanceState.getSerializable("String_Node_Str");
  }
  webview.setWebChromeClient(new WebChromeClient(){
    public void onProgressChanged(    WebView view,    int progress){
      progress=progress * 100;
      getHelpStackActivity().setSupportProgressBarVisibility(progress < 98);
      getHelpStackActivity().setSupportProgress(progress);
    }
  }
);
  initializeView();
  return rootView;
}
Program: 8615
Project: 8615
Buggy source:
private void showAttachments(final HSAttachment[] attachmentsArray){
  ArrayList<String> attachments=new ArrayList<String>();
  for (  HSAttachment attachment : attachmentsArray) {
    attachments.add(attachment.getFileName());
  }
  String[] attachmentNames=attachments.toArray(new String[attachments.size()]);
  AlertDialog.Builder alertDialog=new AlertDialog.Builder(getActivity());
  LayoutInflater inflater=getActivity().getLayoutInflater();
  View convertView=(View)inflater.inflate(R.layout.attachment_dialog,null);
  alertDialog.setView(convertView);
  alertDialog.setTitle("String_Node_Str");
  ListView lv=(ListView)convertView.findViewById(R.id.listView1);
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,attachmentNames);
  lv.setAdapter(adapter);
  lv.setOnItemClickListener(new OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      HSAttachment attachmentToShow=attachmentsArray[position];
      openAttachment(attachmentToShow);
    }
  }
);
  alertDialog.show();
}

Fixed version (ground truth):
private void showAttachments(final HSAttachment[] attachmentsArray){
  ArrayList<String> attachments=new ArrayList<String>();
  for (  HSAttachment attachment : attachmentsArray) {
    attachments.add(attachment.getFileName());
  }
  String[] attachmentNames=attachments.toArray(new String[attachments.size()]);
  AlertDialog.Builder alertDialog=new AlertDialog.Builder(getActivity());
  LayoutInflater inflater=getActivity().getLayoutInflater();
  View convertView=(View)inflater.inflate(R.layout.attachment_dialog,null);
  alertDialog.setView(convertView);
  alertDialog.setTitle("String_Node_Str");
  final AlertDialog dialog=alertDialog.create();
  ListView lv=(ListView)convertView.findViewById(R.id.listView1);
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,attachmentNames);
  lv.setAdapter(adapter);
  lv.setOnItemClickListener(new OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      HSAttachment attachmentToShow=attachmentsArray[position];
      openAttachment(attachmentToShow);
      dialog.dismiss();
    }
  }
);
  dialog.show();
}
Program: 8616
Project: 8616
Buggy source:
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  HSAttachment attachmentToShow=attachmentsArray[position];
  openAttachment(attachmentToShow);
}

Fixed version (ground truth):
@Override public void onItemClick(AdapterView<?> parent,View view,int position,long id){
  HSAttachment attachmentToShow=attachmentsArray[position];
  openAttachment(attachmentToShow);
  dialog.dismiss();
}
Program: 8617
Project: 8617
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_issue_detail,null);
  replyEditTextView=(EditText)rootView.findViewById(R.id.replyEditText);
  sendButton=(Button)rootView.findViewById(R.id.button1);
  sendButton.setOnClickListener(sendReplyListener);
  mExpandableListView=(ExpandableListView)rootView.findViewById(R.id.expandableList);
  mAttachmentButton=(ImageView)rootView.findViewById(R.id.attachmentbutton);
  mAttachmentButton.setOnClickListener(attachmentClickListener);
  mAdapter=new LocalAdapter(getActivity());
  mExpandableListView.setAdapter(mAdapter);
  gearSource=new HSSource(getActivity());
  mAdapter.setOnChildItemClickListener(listChildClickListener);
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_issue_detail,null);
  replyEditTextView=(EditText)rootView.findViewById(R.id.replyEditText);
  sendButton=(Button)rootView.findViewById(R.id.button1);
  sendButton.setOnClickListener(sendReplyListener);
  mExpandableListView=(ExpandableListView)rootView.findViewById(R.id.expandableList);
  mAttachmentButton=(ImageView)rootView.findViewById(R.id.attachmentbutton);
  mAttachmentButton.setOnClickListener(attachmentClickListener);
  mAdapter=new LocalAdapter(getActivity());
  mExpandableListView.setAdapter(mAdapter);
  mExpandableListView.setTranscriptMode(ListView.TRANSCRIPT_MODE_ALWAYS_SCROLL);
  gearSource=new HSSource(getActivity());
  mAdapter.setOnChildItemClickListener(listChildClickListener);
  return rootView;
}
Program: 8618
Project: 8618
Buggy source:
@Override public void onSuccess(Object successObject){
  sendButton.setEnabled(true);
  HSTicketUpdate update=(HSTicketUpdate)successObject;
  ArrayList<HSTicketUpdate> updateList=new ArrayList<HSTicketUpdate>();
  updateList.addAll(Arrays.asList(fetchedUpdates));
  updateList.add(update);
  HSTicketUpdate[] updateArray=new HSTicketUpdate[0];
  fetchedUpdates=updateList.toArray(updateArray);
  refreshList();
  selectedAttachment=null;
  replyEditTextView.setText("String_Node_Str");
  getHelpStackActivity().setProgressBarIndeterminateVisibility(false);
  scrollListToBottom();
}

Fixed version (ground truth):
@Override public void onSuccess(Object successObject){
  sendButton.setEnabled(true);
  HSTicketUpdate update=(HSTicketUpdate)successObject;
  ArrayList<HSTicketUpdate> updateList=new ArrayList<HSTicketUpdate>();
  updateList.addAll(Arrays.asList(fetchedUpdates));
  updateList.add(update);
  HSTicketUpdate[] updateArray=new HSTicketUpdate[0];
  fetchedUpdates=updateList.toArray(updateArray);
  refreshList();
  selectedAttachment=null;
  replyEditTextView.setText("String_Node_Str");
  resetAttachmentImage();
  getHelpStackActivity().setProgressBarIndeterminateVisibility(false);
  scrollListToBottom();
}
Program: 8619
Project: 8619
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.doneItem) {
    if (getMessage().trim().length() == 0 || getSubject().trim().length() == 0) {
      HSUtils.showAlertDialog(getActivity(),"String_Node_Str","String_Node_Str");
      return false;
    }
    getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(true);
    HSSource source=new HSSource(getActivity());
    HSAttachment[] attachmentArray=null;
    if (selectedAttachment != null) {
      attachmentArray=new HSAttachment[1];
      attachmentArray[0]=selectedAttachment;
    }
    String formattedBody=getMessage() + HSSource.getDeviceInformation(getActivity());
    source.createNewTicket(userDetails,getSubject(),formattedBody,attachmentArray,new OnNewTicketFetchedSuccessListener(){
      @Override public void onSuccess(      HSUser udpatedUserDetail,      HSTicket ticket){
        getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(false);
        sendSuccessSignal(ticket);
      }
    }
,new ErrorListener(){
      @Override public void onErrorResponse(      VolleyError error){
        HSUtils.showAlertDialog(getActivity(),"String_Node_Str","String_Node_Str");
        getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(false);
      }
    }
);
    return true;
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == R.id.doneItem) {
    if (getMessage().trim().length() == 0 || getSubject().trim().length() == 0) {
      HSUtils.showAlertDialog(getActivity(),"String_Node_Str","String_Node_Str");
      return false;
    }
    getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(true);
    HSSource source=new HSSource(getActivity());
    HSAttachment[] attachmentArray=null;
    if (selectedAttachment != null) {
      attachmentArray=new HSAttachment[1];
      attachmentArray[0]=selectedAttachment;
    }
    String formattedBody=getMessage();
    source.createNewTicket(userDetails,getSubject(),formattedBody,attachmentArray,new OnNewTicketFetchedSuccessListener(){
      @Override public void onSuccess(      HSUser udpatedUserDetail,      HSTicket ticket){
        getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(false);
        sendSuccessSignal(ticket);
      }
    }
,new ErrorListener(){
      @Override public void onErrorResponse(      VolleyError error){
        HSUtils.showAlertDialog(getActivity(),"String_Node_Str","String_Node_Str");
        getHelpStackActivity().setSupportProgressBarIndeterminateVisibility(false);
      }
    }
);
    return true;
  }
  return super.onOptionsItemSelected(item);
}
Program: 8620
Project: 8620
Buggy source:
public void addSearchViewInMenuItem(Context context,MenuItem searchItem){
  MenuItemCompat.setShowAsAction(searchItem,MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
  SearchView searchView=new SearchView(context);
  MenuItemCompat.setActionView(searchItem,R.layout.custom_searchview);
  searchView.setQueryHint("String_Node_Str");
  searchView.setSubmitButtonEnabled(true);
  searchView.setOnSearchClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      searchStarted();
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String q){
      doSearchForQuery(q);
      return true;
    }
    @Override public boolean onQueryTextChange(    String newText){
      doSearchForQuery(newText);
      return true;
    }
  }
);
  MenuItemCompat.setOnActionExpandListener(searchItem,new OnActionExpandListener(){
    @Override public boolean onMenuItemActionExpand(    MenuItem item){
      setVisibility(true);
      return true;
    }
    @Override public boolean onMenuItemActionCollapse(    MenuItem item){
      setVisibility(false);
      return true;
    }
  }
);
}

Fixed version (ground truth):
public void addSearchViewInMenuItem(Context context,MenuItem searchItem){
  MenuItemCompat.setShowAsAction(searchItem,MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
  SearchView searchView=new SearchView(context);
  MenuItemCompat.setActionView(searchItem,searchView);
  searchView.setQueryHint(getString(R.string.search_hint));
  searchView.setSubmitButtonEnabled(true);
  searchView.setOnSearchClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      searchStarted();
    }
  }
);
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String q){
      doSearchForQuery(q);
      return true;
    }
    @Override public boolean onQueryTextChange(    String newText){
      doSearchForQuery(newText);
      return true;
    }
  }
);
  MenuItemCompat.setOnActionExpandListener(searchItem,new OnActionExpandListener(){
    @Override public boolean onMenuItemActionExpand(    MenuItem item){
      setVisibility(true);
      return true;
    }
    @Override public boolean onMenuItemActionCollapse(    MenuItem item){
      setVisibility(false);
      return true;
    }
  }
);
}
Program: 8621
Project: 8621
Buggy source:
public void searchStarted(){
  searchAdapter.refreshList(allKbArticles);
  searchAdapter.notifyDataSetChanged();
  searchAdapter.getFilter().filter("String_Node_Str");
}

Fixed version (ground truth):
public void searchStarted(){
  searchAdapter.refreshList(allKbArticles);
  searchAdapter.getFilter().filter("String_Node_Str");
  searchAdapter.notifyDataSetChanged();
}
Program: 8622
Project: 8622
Buggy source:
public void createNewTicket(HSUser user,String subject,String message,HSAttachment[] attachment,OnNewTicketFetchedSuccessListener successListener,ErrorListener errorListener){
  HSUploadAttachment[] upload_attachments=convertAttachmentArrayToUploadAttachment(attachment);
  gear.createNewTicket(user,subject,message,upload_attachments,mRequestQueue,new NewTicketSuccessWrapper(successListener){
    @Override public void onSuccess(    HSUser udpatedUserDetail,    HSTicket ticket){
      doSaveNewTicketPropertiesForGearInCache(ticket);
      doSaveNewUserPropertiesForGearInCache(udpatedUserDetail);
      super.onSuccess(udpatedUserDetail,ticket);
    }
  }
,new ErrorWrapper("String_Node_Str",errorListener));
}

Fixed version (ground truth):
public void createNewTicket(HSUser user,String subject,String message,HSAttachment[] attachment,OnNewTicketFetchedSuccessListener successListener,ErrorListener errorListener){
  HSUploadAttachment[] upload_attachments=convertAttachmentArrayToUploadAttachment(attachment);
  message=message + getDeviceInformation(mContext);
  if (gear.canUplaodMessageAsHtmlString()) {
    message=Html.toHtml(new SpannableString(message));
  }
  gear.createNewTicket(user,subject,message,upload_attachments,mRequestQueue,new NewTicketSuccessWrapper(successListener){
    @Override public void onSuccess(    HSUser udpatedUserDetail,    HSTicket ticket){
      doSaveNewTicketPropertiesForGearInCache(ticket);
      doSaveNewUserPropertiesForGearInCache(udpatedUserDetail);
      super.onSuccess(udpatedUserDetail,ticket);
    }
  }
,new ErrorWrapper("String_Node_Str",errorListener));
}
Program: 8623
Project: 8623
Buggy source:
public void addReplyOnATicket(String message,HSAttachment[] attachments,HSTicket ticket,OnFetchedSuccessListener success,ErrorListener errorListener){
  gear.addReplyOnATicket(message,convertAttachmentArrayToUploadAttachment(attachments),ticket,getUser(),mRequestQueue,success,new ErrorWrapper("String_Node_Str",errorListener));
}

Fixed version (ground truth):
public void addReplyOnATicket(String message,HSAttachment[] attachments,HSTicket ticket,OnFetchedSuccessListener success,ErrorListener errorListener){
  if (gear.canUplaodMessageAsHtmlString()) {
    message=Html.toHtml(new SpannableString(message));
  }
  gear.addReplyOnATicket(message,convertAttachmentArrayToUploadAttachment(attachments),ticket,getUser(),mRequestQueue,success,new ErrorWrapper("String_Node_Str",errorListener));
}
Program: 8624
Project: 8624
Buggy source:
public static String getDeviceInformation(Activity activity){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append(Build.VERSION.SDK_INT);
  builder.append("String_Node_Str");
  builder.append(Build.MODEL);
  builder.append("String_Node_Str");
  try {
    builder.append(activity.getPackageManager().getPackageInfo(activity.getPackageName(),0).packageName);
  }
 catch (  NameNotFoundException e) {
    builder.append("String_Node_Str");
  }
  builder.append("String_Node_Str");
  try {
    builder.append(activity.getPackageManager().getPackageInfo(activity.getPackageName(),0).versionCode);
  }
 catch (  NameNotFoundException e) {
    builder.append("String_Node_Str");
  }
  return builder.toString();
}

Fixed version (ground truth):
private static String getDeviceInformation(Context activity){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append("String_Node_Str");
  builder.append(Build.VERSION.SDK_INT);
  builder.append("String_Node_Str");
  builder.append(Build.MODEL);
  builder.append("String_Node_Str");
  try {
    builder.append(activity.getPackageManager().getPackageInfo(activity.getPackageName(),0).packageName);
  }
 catch (  NameNotFoundException e) {
    builder.append("String_Node_Str");
  }
  builder.append("String_Node_Str");
  try {
    builder.append(activity.getPackageManager().getPackageInfo(activity.getPackageName(),0).versionCode);
  }
 catch (  NameNotFoundException e) {
    builder.append("String_Node_Str");
  }
  return builder.toString();
}
Program: 8625
Project: 8625
Buggy source:
public MainItemVO(MainItemVO vo){
  uniqueId=vo.uniqueId;
  itemIdentifier=new String(vo.itemIdentifier);
  itemName=new String(vo.itemName);
  if (tags != null)   tags=Arrays.copyOf(vo.tags,vo.tags.length);
  customVars=new String(vo.customVars);
  x=vo.x;
  y=vo.y;
  rotation=vo.rotation;
  zIndex=vo.zIndex;
  layerName=new String(vo.layerName);
  if (vo.tint != null)   tint=Arrays.copyOf(vo.tint,vo.tint.length);
  scaleX=vo.scaleX;
  scaleY=vo.scaleY;
  originX=vo.originX;
  originY=vo.originY;
  if (vo.shape != null) {
    shape=vo.shape.clone();
  }
  if (vo.physics != null) {
    physics=new PhysicsBodyDataVO(vo.physics);
  }
}

Fixed version (ground truth):
public MainItemVO(MainItemVO vo){
  uniqueId=vo.uniqueId;
  itemIdentifier=new String(vo.itemIdentifier);
  itemName=new String(vo.itemName);
  if (vo.tags != null)   tags=Arrays.copyOf(vo.tags,vo.tags.length);
  customVars=new String(vo.customVars);
  x=vo.x;
  y=vo.y;
  rotation=vo.rotation;
  zIndex=vo.zIndex;
  layerName=new String(vo.layerName);
  if (vo.tint != null)   tint=Arrays.copyOf(vo.tint,vo.tint.length);
  scaleX=vo.scaleX;
  scaleY=vo.scaleY;
  originX=vo.originX;
  originY=vo.originY;
  if (vo.shape != null) {
    shape=vo.shape.clone();
  }
  if (vo.physics != null) {
    physics=new PhysicsBodyDataVO(vo.physics);
  }
}
Program: 8626
Project: 8626
Buggy source:
protected void processMain(Actor actor,MainItemVO vo){
  buildCoreData(actor,vo);
  actor.setPosition(vo.x * pixelsPerWU / resMultiplier,vo.y * pixelsPerWU / resMultiplier);
  actor.setOrigin(vo.originX * pixelsPerWU / resMultiplier,vo.originY * pixelsPerWU / resMultiplier);
  actor.setScale(vo.scaleX,vo.scaleY);
  actor.setRotation(vo.rotation);
  actor.setColor(new Color(vo.tint[0],vo.tint[1],vo.tint[2],vo.tint[3]));
  indexes.put(getLayerIndex(vo.layerName) + vo.zIndex,actor);
  if (layerMap.get(vo.layerName).isVisible) {
    actor.setVisible(true);
  }
 else {
    actor.setVisible(false);
  }
}

Fixed version (ground truth):
protected void processMain(Actor actor,MainItemVO vo){
  actor.setName(vo.itemIdentifier);
  buildCoreData(actor,vo);
  actor.setPosition(vo.x * pixelsPerWU / resMultiplier,vo.y * pixelsPerWU / resMultiplier);
  actor.setOrigin(vo.originX * pixelsPerWU / resMultiplier,vo.originY * pixelsPerWU / resMultiplier);
  actor.setScale(vo.scaleX,vo.scaleY);
  actor.setRotation(vo.rotation);
  actor.setColor(new Color(vo.tint[0],vo.tint[1],vo.tint[2],vo.tint[3]));
  indexes.put(getLayerIndex(vo.layerName) + vo.zIndex,actor);
  if (layerMap.get(vo.layerName).isVisible) {
    actor.setVisible(true);
  }
 else {
    actor.setVisible(false);
  }
}
Program: 8627
Project: 8627
Buggy source:
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  ProjectInfoVO projectInfoVO=rm.getProjectVO();
  component.boundBox=new Rectangle(-10f / projectInfoVO.pixelToWorld,-10f / projectInfoVO.pixelToWorld,20f / projectInfoVO.pixelToWorld,20f / projectInfoVO.pixelToWorld);
  entity.add(component);
  return component;
}

Fixed version (ground truth):
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  float boundBoxSize=10f;
  component.boundBox=new Rectangle(-boundBoxSize / 2f,-boundBoxSize / 2f,boundBoxSize,boundBoxSize);
  entity.add(component);
  return component;
}
Program: 8628
Project: 8628
Buggy source:
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  ProjectInfoVO projectInfoVO=rm.getProjectVO();
  float boundBoxSize=70f;
  component.boundBox=new Rectangle((-boundBoxSize / 2f) / projectInfoVO.pixelToWorld,(-boundBoxSize / 2f) / projectInfoVO.pixelToWorld,boundBoxSize / projectInfoVO.pixelToWorld,boundBoxSize / projectInfoVO.pixelToWorld);
  entity.add(component);
  return component;
}

Fixed version (ground truth):
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  float boundBoxSize=10f;
  component.boundBox=new Rectangle(-boundBoxSize / 2f,-boundBoxSize / 2f,boundBoxSize,boundBoxSize);
  entity.add(component);
  return component;
}
Program: 8629
Project: 8629
Buggy source:
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  float boundBoxSize=10f;
  component.boundBox=new Rectangle(-boundBoxSize / 2f,-boundBoxSize / 2f,boundBoxSize,boundBoxSize);
  entity.add(component);
  return component;
}

Fixed version (ground truth):
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  ProjectInfoVO projectInfoVO=rm.getProjectVO();
  component.boundBox=new Rectangle(-10f / projectInfoVO.pixelToWorld,-10f / projectInfoVO.pixelToWorld,20f / projectInfoVO.pixelToWorld,20f / projectInfoVO.pixelToWorld);
  entity.add(component);
  return component;
}
Program: 8630
Project: 8630
Buggy source:
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  float boundBoxSize=10f;
  component.boundBox=new Rectangle(-boundBoxSize / 2f,-boundBoxSize / 2f,boundBoxSize,boundBoxSize);
  entity.add(component);
  return component;
}

Fixed version (ground truth):
@Override protected DimensionsComponent createDimensionsComponent(Entity entity,MainItemVO vo){
  DimensionsComponent component=new DimensionsComponent();
  ProjectInfoVO projectInfoVO=rm.getProjectVO();
  float boundBoxSize=70f;
  component.boundBox=new Rectangle((-boundBoxSize / 2f) / projectInfoVO.pixelToWorld,(-boundBoxSize / 2f) / projectInfoVO.pixelToWorld,boundBoxSize / projectInfoVO.pixelToWorld,boundBoxSize / projectInfoVO.pixelToWorld);
  entity.add(component);
  return component;
}
Program: 8631
Project: 8631
Buggy source:
public static void removeActions(Entity entity){
  ActionComponent actionComponent=ComponentRetriever.get(entity,ActionComponent.class);
  if (actionComponent != null) {
    entity.remove(ActionComponent.class);
  }
}

Fixed version (ground truth):
public static void removeActions(Entity entity){
  ActionComponent actionComponent=ComponentRetriever.get(entity,ActionComponent.class);
  if (actionComponent != null) {
    actionComponent.dataArray.clear();
  }
}
Program: 8632
Project: 8632
Buggy source:
public void makeRectangle(float width,float height){
  Vector2[] points=new Vector2[4];
  points[0]=new Vector2(0,0);
  points[1]=new Vector2(0,height);
  points[2]=new Vector2(width,height);
  points[3]=new Vector2(width,0);
  vertices=new Vector2[1][4];
  vertices[0]=points;
}

Fixed version (ground truth):
public void makeRectangle(float x,float y,float width,float height){
  Vector2[] points=new Vector2[4];
  points[0]=new Vector2(x,y);
  points[1]=new Vector2(x,y + height);
  points[2]=new Vector2(x + width,y + height);
  points[3]=new Vector2(x + width,y);
  vertices=new Vector2[1][4];
  vertices[0]=points;
}
Program: 8634
Project: 8634
Buggy source:
@Override protected void processEntity(Entity entity,float deltaTime){
  ParticleComponent particleComponent=particleComponentMapper.get(entity);
  TransformComponent transformComponent=transformComponentMapper.get(entity);
  DimensionsComponent dimensionsComponent=ComponentRetriever.get(entity,DimensionsComponent.class);
  ParticleEffect particleEffect=particleComponent.particleEffect;
  particleEffect.setPosition(transformComponent.x,transformComponent.y);
  particleEffect.update(deltaTime);
}

Fixed version (ground truth):
@Override protected void processEntity(Entity entity,float deltaTime){
  ParticleComponent particleComponent=particleComponentMapper.get(entity);
  ParticleEffect particleEffect=particleComponent.particleEffect;
  particleEffect.update(deltaTime);
}
Program: 8635
Project: 8635
Buggy source:
public ParticleDrawableLogic(){
  particleMapper=ComponentMapper.getFor(ParticleComponent.class);
}

Fixed version (ground truth):
public ParticleDrawableLogic(){
}
Program: 8636
Project: 8636
Buggy source:
@Override public void draw(Batch batch,Entity entity,float parentAlpha){
  ParticleComponent particleComponent=particleMapper.get(entity);
  particleComponent.particleEffect.draw(batch);
}

Fixed version (ground truth):
@Override public void draw(Batch batch,Entity entity,float parentAlpha){
  ParticleComponent particleComponent=particleComponentMapper.get(entity);
  TransformComponent transformComponent=transformComponentMapper.get(entity);
  particleComponent.particleEffect.setPosition(transformComponent.x,transformComponent.y);
  particleComponent.particleEffect.draw(batch);
}
Program: 8638
Project: 8638
Buggy source:
protected void processBody(Entity entity){
  PhysicsBodyComponent physicsBodyComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
  PolygonComponent polygonComponent=ComponentRetriever.get(entity,PolygonComponent.class);
  TransformComponent transformComponent=ComponentRetriever.get(entity,TransformComponent.class);
  if (polygonComponent == null && physicsBodyComponent.body != null) {
    world.destroyBody(physicsBodyComponent.body);
    physicsBodyComponent.body=null;
  }
  if (physicsBodyComponent.body == null && polygonComponent != null) {
    if (polygonComponent.vertices == null)     return;
    DimensionsComponent dimensionsComponent=ComponentRetriever.get(entity,DimensionsComponent.class);
    physicsBodyComponent.centerX=dimensionsComponent.width / 2;
    physicsBodyComponent.centerY=dimensionsComponent.height / 2;
    PhysicsBodyComponent bodyPropertiesComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
    physicsBodyComponent.body=PhysicsBodyLoader.getInstance().createBody(world,bodyPropertiesComponent,polygonComponent.vertices,new Vector2(1,1),transformComponent.rotation * MathUtils.degreesToRadians);
    physicsBodyComponent.body.setTransform(new Vector2(transformComponent.x * PhysicsBodyLoader.getScale(),transformComponent.y * PhysicsBodyLoader.getScale()),physicsBodyComponent.body.getAngle());
    physicsBodyComponent.body.setUserData(entity);
  }
}

Fixed version (ground truth):
protected void processBody(Entity entity){
  PhysicsBodyComponent physicsBodyComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
  PolygonComponent polygonComponent=ComponentRetriever.get(entity,PolygonComponent.class);
  TransformComponent transformComponent=ComponentRetriever.get(entity,TransformComponent.class);
  if (polygonComponent == null && physicsBodyComponent.body != null) {
    world.destroyBody(physicsBodyComponent.body);
    physicsBodyComponent.body=null;
  }
  if (physicsBodyComponent.body == null && polygonComponent != null) {
    if (polygonComponent.vertices == null)     return;
    DimensionsComponent dimensionsComponent=ComponentRetriever.get(entity,DimensionsComponent.class);
    physicsBodyComponent.centerX=dimensionsComponent.width / 2;
    physicsBodyComponent.centerY=dimensionsComponent.height / 2;
    PhysicsBodyComponent bodyPropertiesComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
    physicsBodyComponent.body=PhysicsBodyLoader.getInstance().createBody(world,bodyPropertiesComponent,polygonComponent.vertices,new Vector2(transformComponent.scaleX,transformComponent.scaleY),transformComponent.rotation * MathUtils.degreesToRadians);
    physicsBodyComponent.body.setTransform(new Vector2(transformComponent.x * PhysicsBodyLoader.getScale(),transformComponent.y * PhysicsBodyLoader.getScale()),physicsBodyComponent.body.getAngle());
    physicsBodyComponent.body.setUserData(entity);
  }
}
Program: 8639
Project: 8639
Buggy source:
public Body createBody(World world,PhysicsBodyComponent physicsComponent,Vector2[][] minPolygonData,Vector2 mulVec){
  FixtureDef fixtureDef=new FixtureDef();
  if (physicsComponent != null) {
    fixtureDef.density=physicsComponent.density;
    fixtureDef.friction=physicsComponent.friction;
    fixtureDef.restitution=physicsComponent.restitution;
    fixtureDef.isSensor=physicsComponent.sensor;
  }
  BodyDef bodyDef=new BodyDef();
  bodyDef.position.set(0,0);
  bodyDef.awake=physicsComponent.awake;
  bodyDef.allowSleep=physicsComponent.allowSleep;
  bodyDef.bullet=physicsComponent.bullet;
  if (physicsComponent.bodyType == 0) {
    bodyDef.type=BodyDef.BodyType.StaticBody;
  }
 else   if (physicsComponent.bodyType == 1) {
    bodyDef.type=BodyDef.BodyType.KinematicBody;
  }
 else {
    bodyDef.type=BodyDef.BodyType.DynamicBody;
  }
  Body body=world.createBody(bodyDef);
  PolygonShape polygonShape=new PolygonShape();
  for (int i=0; i < minPolygonData.length; i++) {
    float[] verts=new float[minPolygonData[i].length * 2];
    for (int j=0; j < verts.length; j+=2) {
      verts[j]=minPolygonData[i][j / 2].x * mulVec.x * scale;
      verts[j + 1]=minPolygonData[i][j / 2].y * mulVec.y * scale;
    }
    polygonShape.set(verts);
    fixtureDef.shape=polygonShape;
    body.createFixture(fixtureDef);
  }
  return body;
}

Fixed version (ground truth):
public Body createBody(World world,PhysicsBodyComponent physicsComponent,Vector2[][] minPolygonData,Vector2 mulVec,float rotationRad){
  FixtureDef fixtureDef=new FixtureDef();
  if (physicsComponent != null) {
    fixtureDef.density=physicsComponent.density;
    fixtureDef.friction=physicsComponent.friction;
    fixtureDef.restitution=physicsComponent.restitution;
    fixtureDef.isSensor=physicsComponent.sensor;
  }
  BodyDef bodyDef=new BodyDef();
  bodyDef.position.set(0,0);
  bodyDef.awake=physicsComponent.awake;
  bodyDef.allowSleep=physicsComponent.allowSleep;
  bodyDef.bullet=physicsComponent.bullet;
  if (physicsComponent.bodyType == 0) {
    bodyDef.type=BodyDef.BodyType.StaticBody;
  }
 else   if (physicsComponent.bodyType == 1) {
    bodyDef.type=BodyDef.BodyType.KinematicBody;
  }
 else {
    bodyDef.type=BodyDef.BodyType.DynamicBody;
  }
  Body body=world.createBody(bodyDef);
  PolygonShape polygonShape=new PolygonShape();
  for (int i=0; i < minPolygonData.length; i++) {
    float[] verts=new float[minPolygonData[i].length * 2];
    for (int j=0; j < verts.length; j+=2) {
      minPolygonData[i][j / 2].x-=physicsComponent.centerX;
      minPolygonData[i][j / 2].y-=physicsComponent.centerY;
      verts[j]=(minPolygonData[i][j / 2].x * (float)Math.cos(rotationRad) - minPolygonData[i][j / 2].y * (float)Math.sin(rotationRad)) * mulVec.x * scale;
      verts[j + 1]=(minPolygonData[i][j / 2].x * (float)Math.sin(rotationRad) + minPolygonData[i][j / 2].y * (float)Math.cos(rotationRad)) * mulVec.y * scale;
      verts[j]+=physicsComponent.centerX;
      verts[j + 1]+=physicsComponent.centerY;
    }
    polygonShape.set(verts);
    fixtureDef.shape=polygonShape;
    body.createFixture(fixtureDef);
  }
  return body;
}
Program: 8640
Project: 8640
Buggy source:
@Override protected void processEntity(Entity entity,float deltaTime){
  TransformComponent transformComponent=transformComponentMapper.get(entity);
  processBody(entity);
  PhysicsBodyComponent physicsBodyComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
  Body body=physicsBodyComponent.body;
  transformComponent.x=body.getPosition().x / PhysicsBodyLoader.getScale();
  transformComponent.y=body.getPosition().y / PhysicsBodyLoader.getScale();
  transformComponent.rotation=body.getAngle() * MathUtils.radiansToDegrees;
}

Fixed version (ground truth):
@Override protected void processEntity(Entity entity,float deltaTime){
  TransformComponent transformComponent=transformComponentMapper.get(entity);
  processBody(entity);
  PhysicsBodyComponent physicsBodyComponent=ComponentRetriever.get(entity,PhysicsBodyComponent.class);
  Body body=physicsBodyComponent.body;
  transformComponent.x=body.getPosition().x / PhysicsBodyLoader.getScale();
  transformComponent.y=body.getPosition().y / PhysicsBodyLoader.getScale();
}