nus-yam/ex-repair huggingface dataset:
Program: 174811
Project: 174811
Buggy source:
private void registerUser(final String username,final String email,String password){
  if (!AppUtils.isNetworkConnected(this)) {
    showErrorDialog();
  }
 else {
    showProgressDialog();
    if (mNonceId == null) {
      getNonceId("String_Node_Str","String_Node_Str");
    }
    mAuthApi.registerUser(username,email,mNonceId,username,"String_Node_Str",password,new Callback<RegisterResponse>(){
      @Override public void success(      RegisterResponse registerResponse,      Response response){
        if (registerResponse.getStatus().equals("String_Node_Str")) {
          User user=new User(registerResponse.getUser_id(),username,email,username,true,registerResponse.getCookie());
          PreferenceUtil.writeUserToPreferences(getApplicationContext(),user);
          hideProgressDialog();
          startApp();
        }
 else {
          hideProgressDialog();
          showAuthError(R.id.error_text,registerResponse.getError());
        }
      }
      @Override public void failure(      RetrofitError error){
        showAuthError(R.id.error_text,"String_Node_Str");
      }
    }
);
  }
}

Fixed version (ground truth):
private void registerUser(final String username,final String email,final String password){
  if (!AppUtils.isNetworkConnected(this)) {
    showErrorDialog();
  }
 else {
    showProgressDialog();
    mAuthApi.getNonceId("String_Node_Str","String_Node_Str",new Callback<NonceIdResponse>(){
      @Override public void success(      NonceIdResponse nonceIdResponse,      Response response){
        Log.e("String_Node_Str",nonceIdResponse.getNonce());
        if (nonceIdResponse.getStatus().equals("String_Node_Str")) {
          mNonceId=nonceIdResponse.getNonce();
          signUp(username,email,password);
        }
 else {
          hideProgressDialog();
          showAuthError(R.id.error_text,"String_Node_Str");
        }
      }
      @Override public void failure(      RetrofitError error){
        Log.e("String_Node_Str",error.getLocalizedMessage());
        Toast.makeText(getApplicationContext(),error.getLocalizedMessage(),Toast.LENGTH_LONG).show();
      }
    }
);
  }
}
Program: 174812
Project: 174812
Buggy source:
private void attachFragment(){
  FragmentManager fm=getSupportFragmentManager();
  if (!mOtherActivity) {
    if (!mItem.isWebView()) {
      fm.beginTransaction().replace(R.id.container,FirebaseListFragment.newInstance(mItem.getUrl()),mItem.getName()).commit();
    }
 else {
      fm.beginTransaction().replace(R.id.container,WebFragment.newInstance(mItem.getUrl(),mItem.getName()),mItem.getName()).commit();
    }
  }
 else {
  }
}

Fixed version (ground truth):
private void attachFragment(){
  FragmentManager fm=getSupportFragmentManager();
  if (!mItem.isWebView()) {
    fm.beginTransaction().replace(R.id.container,FirebaseListFragment.newInstance(mItem.getUrl()),mItem.getName()).commit();
  }
 else {
    fm.beginTransaction().replace(R.id.container,WebFragment.newInstance(mItem.getUrl(),mItem.getName()),mItem.getName()).commit();
  }
}
Program: 174813
Project: 174813
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mItem=getIntent().getParcelableExtra(ITEM);
  setContentView(R.layout.activity_item);
  attachFragment();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mItem=getIntent().getParcelableExtra(ITEM);
  if (mItem == null) {
    mOtherActivity=false;
  }
 else {
    mOtherActivity=true;
  }
  setContentView(R.layout.activity_item);
  attachFragment();
}
Program: 174814
Project: 174814
Buggy source:
private void attachFragment(){
  FragmentManager fm=getSupportFragmentManager();
  if (!mItem.isWebView()) {
    fm.beginTransaction().replace(R.id.container,FirebaseListFragment.newInstance(mItem.getUrl()),mItem.getName()).commit();
  }
 else {
    fm.beginTransaction().replace(R.id.container,WebFragment.newInstance(mItem.getUrl(),mItem.getName()),mItem.getName()).commit();
  }
}

Fixed version (ground truth):
private void attachFragment(){
  FragmentManager fm=getSupportFragmentManager();
  if (!mOtherActivity) {
    if (!mItem.isWebView()) {
      fm.beginTransaction().replace(R.id.container,FirebaseListFragment.newInstance(mItem.getUrl()),mItem.getName()).commit();
    }
 else {
      fm.beginTransaction().replace(R.id.container,WebFragment.newInstance(mItem.getUrl(),mItem.getName()),mItem.getName()).commit();
    }
  }
 else {
  }
}
Program: 174815
Project: 174815
Buggy source:
public static Intent getStartIntent(Context context,HomeItem item){
  Intent starter=new Intent(context,ItemActivity.class);
  starter.putExtra(ITEM,item);
  return starter;
}

Fixed version (ground truth):
public static Intent getStartIntent(Context context){
  Intent starter=new Intent(context,ItemActivity.class);
  return starter;
}
Program: 174816
Project: 174816
Buggy source:
@Override public void onClick(View view){
switch (view.getId()) {
case R.id.send_email_mangoblogger:
    startEmailIntent();
  break;
case R.id.send_whatsapp_msg:
startWhatsappIntent();
break;
case R.id.find_location:
startLocationIntent();
break;
case R.id.facebook:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.twitter:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.youtube:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.linkedin:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.insta:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.share:
startShareIntent(getActivity(),"String_Node_Str");
}
}

Fixed version (ground truth):
@Override public void onClick(View view){
switch (view.getId()) {
case R.id.send_email_mangoblogger:
    startEmailIntent();
  break;
case R.id.send_whatsapp_msg:
startWhatsappIntent();
break;
case R.id.find_location:
startLocationIntent();
break;
case R.id.facebook:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.twitter:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.youtube:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.linkedin:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.insta:
try {
startBrowserIntent("String_Node_Str");
}
 catch (ActivityNotFoundException e) {
Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_LONG).show();
e.printStackTrace();
}
break;
case R.id.share:
startShareIntent(getActivity(),getString(R.string.play_store_link) + "String_Node_Str");
}
}
Program: 174817
Project: 174817
Buggy source:
@Override public void onClick(View view){
  if (title.getText() != null) {
switch (view.getId()) {
case R.id.btnBookmark:
      break;
case R.id.btnShare:
    String shareBody=title.getText() + "String_Node_Str" + description.getText();
  AppUtils.startShareIntent(context,shareBody);
}
}
}

Fixed version (ground truth):
@Override public void onClick(View view){
  if (title.getText() != null) {
switch (view.getId()) {
case R.id.btnBookmark:
      break;
case R.id.btnShare:
    String shareBody=title.getText() + "String_Node_Str" + description.getText()+ context.getString(R.string.card_share_body_extra);
  AppUtils.startShareIntent(context,shareBody);
}
}
}
Program: 174818
Project: 174818
Buggy source:
private void initPagerAdapter(){
  mPagerAdapter=new PagerAdapter(getSupportFragmentManager());
  mPagerAdapter.addFragment(WebFragment.newInstance(mAnalyticsUrl),"String_Node_Str");
  mPagerAdapter.addFragment(WebFragment.newInstance(mUxtermsUrl),"String_Node_Str");
  mPagerAdapter.addFragment(AboutFragment.newInstance(mAbout,mCountryCode,mContactNumber,mAddress,mGeoLatitude,mGeoLongitude),"String_Node_Str");
  mViewPager.setAdapter(mPagerAdapter);
  mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
    }
    @Override public void onPageSelected(    int position){
      if (mPrevMenuItem != null) {
        mPrevMenuItem.setChecked(false);
      }
 else {
        mNavigation.getMenu().getItem(0).setChecked(false);
      }
      mNavigation.getMenu().getItem(position).setChecked(true);
      mPrevMenuItem=mNavigation.getMenu().getItem(position);
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
);
}

Fixed version (ground truth):
private void initPagerAdapter(){
  mPagerAdapter=new PagerAdapter(getSupportFragmentManager());
  mPagerAdapter.addFragment(WebFragment.newInstance(mAnalyticsUrl,"String_Node_Str"),"String_Node_Str");
  mPagerAdapter.addFragment(WebFragment.newInstance(mUxtermsUrl,"String_Node_Str"),"String_Node_Str");
  mPagerAdapter.addFragment(AboutFragment.newInstance(mAbout,mCountryCode,mContactNumber,mAddress,mGeoLatitude,mGeoLongitude),"String_Node_Str");
  mViewPager.setAdapter(mPagerAdapter);
  mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener(){
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
    }
    @Override public void onPageSelected(    int position){
      if (mPrevMenuItem != null) {
        mPrevMenuItem.setChecked(false);
      }
 else {
        mNavigation.getMenu().getItem(0).setChecked(false);
      }
      mNavigation.getMenu().getItem(position).setChecked(true);
      mPrevMenuItem=mNavigation.getMenu().getItem(position);
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
);
}
Program: 174819
Project: 174819
Buggy source:
public void onProgressChanged(WebView view,int progress){
  getActivity().setProgress(progress * 1000);
  super.onProgressChanged(view,progress);
  mProgressBar.setProgress(progress);
  mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
}

Fixed version (ground truth):
public void onProgressChanged(WebView view,int progress){
  super.onProgressChanged(view,progress);
  if (mProgressBar != null) {
    mProgressBar.setProgress(progress);
    mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
  }
}
Program: 174820
Project: 174820
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_analytics_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  mProgressBar=(ProgressBar)rootView.findViewById(R.id.progress);
  myWebView.setWebChromeClient(new WebChromeClient(){
    public void onProgressChanged(    WebView view,    int progress){
      getActivity().setProgress(progress * 1000);
      super.onProgressChanged(view,progress);
      mProgressBar.setProgress(progress);
      mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
    }
  }
);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_analytics_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  mProgressBar=(ProgressBar)rootView.findViewById(R.id.progress);
  myWebView.setWebChromeClient(new WebChromeClient(){
    public void onProgressChanged(    WebView view,    int progress){
      super.onProgressChanged(view,progress);
      if (mProgressBar != null) {
        mProgressBar.setProgress(progress);
        mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
      }
    }
  }
);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}
Program: 174821
Project: 174821
Buggy source:
public void onProgressChanged(WebView view,int progress){
  getActivity().setProgress(progress * 1000);
  super.onProgressChanged(view,progress);
  mProgressBar.setProgress(progress);
  mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
}

Fixed version (ground truth):
public void onProgressChanged(WebView view,int progress){
  super.onProgressChanged(view,progress);
  if (mProgressBar != null) {
    mProgressBar.setProgress(progress);
    mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
  }
}
Program: 174822
Project: 174822
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_ux_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  mProgressBar=(ProgressBar)rootView.findViewById(R.id.progress);
  myWebView.setWebChromeClient(new WebChromeClient(){
    public void onProgressChanged(    WebView view,    int progress){
      getActivity().setProgress(progress * 1000);
      super.onProgressChanged(view,progress);
      mProgressBar.setProgress(progress);
      mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
    }
  }
);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_ux_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  mProgressBar=(ProgressBar)rootView.findViewById(R.id.progress);
  myWebView.setWebChromeClient(new WebChromeClient(){
    public void onProgressChanged(    WebView view,    int progress){
      super.onProgressChanged(view,progress);
      if (mProgressBar != null) {
        mProgressBar.setProgress(progress);
        mProgressBar.setVisibility(progress == 100 ? GONE : VISIBLE);
      }
    }
  }
);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}
Program: 174823
Project: 174823
Buggy source:
@Override public boolean onNavigationItemSelected(@NonNull MenuItem item){
switch (item.getItemId()) {
case R.id.navigation_home:
    mViewPager.setCurrentItem(0);
  setAnalyticsScreenName(mPagerAdapter.getPageTitle(0).toString(),WebFragment.class.getName());
initSnackBar();
return true;
case R.id.navigation_dashboard:
mViewPager.setCurrentItem(1);
setAnalyticsScreenName(mPagerAdapter.getPageTitle(1).toString(),WebFragment.class.getName());
initSnackBar();
return true;
case R.id.navigation_notifications:
mViewPager.setCurrentItem(2);
setAnalyticsScreenName(mPagerAdapter.getPageTitle(2).toString(),AboutFragment.class.getName());
return true;
}
return false;
}

Fixed version (ground truth):
@Override public boolean onNavigationItemSelected(@NonNull MenuItem item){
switch (item.getItemId()) {
case R.id.navigation_home:
    mViewPager.setCurrentItem(0);
  setAnalyticsScreenName("String_Node_Str",WebFragment.class.getName());
initSnackBar();
return true;
case R.id.navigation_dashboard:
mViewPager.setCurrentItem(1);
setAnalyticsScreenName("String_Node_Str",WebFragment.class.getName());
initSnackBar();
return true;
case R.id.navigation_notifications:
mViewPager.setCurrentItem(2);
setAnalyticsScreenName("String_Node_Str",AboutFragment.class.getName());
return true;
}
return false;
}
Program: 174824
Project: 174824
Buggy source:
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_analytics_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  return rootView;
}

Fixed version (ground truth):
@Nullable @Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_analytics_terms,container,false);
  myWebView=(WebView)rootView.findViewById(R.id.webview);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}
Program: 174825
Project: 174825
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_ux_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  return rootView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  View rootView=inflater.inflate(R.layout.fragment_ux_terms,container,false);
  WebView myWebView=(WebView)rootView.findViewById(R.id.webview);
  myWebView.setWebViewClient(new MyWebViewClient(getActivity()));
  myWebView.getSettings().setJavaScriptEnabled(true);
  myWebView.loadUrl("String_Node_Str");
  myWebView.setOnKeyListener(new View.OnKeyListener(){
    @Override public boolean onKey(    View v,    int keyCode,    KeyEvent event){
      if (event.getAction() == KeyEvent.ACTION_DOWN) {
        WebView webView=(WebView)v;
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
          if (webView.canGoBack()) {
            webView.goBack();
            return true;
          }
        break;
    }
  }
  return false;
}
}
);
return rootView;
}
Program: 174826
Project: 174826
Buggy source:
public static DexBackedDexFile readRawDexFile(byte[] buf,int offset,Opcodes opcodes) throws IOException {
  DexUtil.verifyDexHeader(buf,offset);
  if (opcodes == null) {
    int dexVersion=HeaderItem.getVersion(buf,offset);
    opcodes=OpcodeUtils.getOpcodesFromDexVersion(dexVersion);
  }
  ;
  return new DexBackedDexFile(opcodes,buf,0);
}

Fixed version (ground truth):
public static DexBackedDexFile readRawDexFile(byte[] buf,int offset,Opcodes opcodes) throws IOException {
  DexUtil.verifyDexHeader(buf,offset);
  if (opcodes == null) {
    int dexVersion=HeaderItem.getVersion(buf,offset);
    opcodes=OpcodeUtils.getOpcodesFromDexVersion(dexVersion);
  }
  ;
  return new DexBackedDexFile(opcodes,buf,offset);
}
Program: 174827
Project: 174827
Buggy source:
Observable emitReaction(final Reaction reaction){
  return Observable.just(reaction).create(new ObservableOnSubscribe(){
    @Override public void subscribe(    @NonNull ObservableEmitter e) throws Exception {
      for (      Class<?> parentClass : ACTIONS_CACHE.keySet()) {
        for (        Method method : ACTIONS_CACHE.get(parentClass)) {
          if (reaction.getType().equals(method.getAnnotation(React.class).reactionType())) {
            HashMap<String,Object> map=new HashMap<String,Object>();
            map.put("String_Node_Str",method);
            map.put("String_Node_Str",parentClass);
            map.put("String_Node_Str",reaction);
            e.onNext(map);
          }
        }
      }
      e.onComplete();
    }
  }
);
}

Fixed version (ground truth):
Observable emitReaction(final Reaction reaction){
  return Observable.just(reaction).create(new ObservableOnSubscribe(){
    @Override public void subscribe(    @NonNull ObservableEmitter e) throws Exception {
      for (      Object parentClass : REACT_CACHE.keySet()) {
        for (        Method method : REACT_CACHE.get(parentClass)) {
          if (reaction.getType().equals(method.getAnnotation(React.class).reactionType())) {
            HashMap<String,Object> map=new HashMap<String,Object>();
            map.put("String_Node_Str",method);
            map.put("String_Node_Str",parentClass);
            map.put("String_Node_Str",reaction);
            e.onNext(map);
          }
        }
      }
      e.onComplete();
    }
  }
);
}
Program: 174828
Project: 174828
Buggy source:
@Override public void subscribe(@NonNull ObservableEmitter e) throws Exception {
  for (  Class<?> parentClass : ACTIONS_CACHE.keySet()) {
    for (    Method method : ACTIONS_CACHE.get(parentClass)) {
      if (reaction.getType().equals(method.getAnnotation(React.class).reactionType())) {
        HashMap<String,Object> map=new HashMap<String,Object>();
        map.put("String_Node_Str",method);
        map.put("String_Node_Str",parentClass);
        map.put("String_Node_Str",reaction);
        e.onNext(map);
      }
    }
  }
  e.onComplete();
}

Fixed version (ground truth):
@Override public void subscribe(@NonNull ObservableEmitter e) throws Exception {
  for (  Object parentClass : REACT_CACHE.keySet()) {
    for (    Method method : REACT_CACHE.get(parentClass)) {
      if (reaction.getType().equals(method.getAnnotation(React.class).reactionType())) {
        HashMap<String,Object> map=new HashMap<String,Object>();
        map.put("String_Node_Str",method);
        map.put("String_Node_Str",parentClass);
        map.put("String_Node_Str",reaction);
        e.onNext(map);
      }
    }
  }
  e.onComplete();
}
Program: 174829
Project: 174829
Buggy source:
public MethodsWithReactAnnotationHelperRunnable(Class<?> parentClass){
  this.parentClass=parentClass;
}

Fixed version (ground truth):
public MethodsWithReactAnnotationHelperRunnable(Object parentClass){
  this.parentClass=parentClass;
}
Program: 174830
Project: 174830
Buggy source:
public void run(){
  if (!ACTIONS_CACHE.containsKey(parentClass)) {
    Set<Method> classMethods=new HashSet<>();
    for (    Method method : parentClass.getDeclaredMethods()) {
      Class[] paramTypes=method.getParameterTypes();
      if (method.isAnnotationPresent(Action.class) && paramTypes.length == 1 && paramTypes[0].equals(FluxAction.class)) {
        classMethods.add(method);
      }
    }
    ACTIONS_CACHE.put(parentClass,classMethods);
  }
}

Fixed version (ground truth):
public void run(){
  if (!ACTIONS_CACHE.containsKey(parentClass)) {
    Set<Method> classMethods=new HashSet<>();
    for (    Method method : parentClass.getClass().getDeclaredMethods()) {
      Class[] paramTypes=method.getParameterTypes();
      if (method.isAnnotationPresent(Action.class) && paramTypes.length == 1 && paramTypes[0].equals(FluxAction.class)) {
        classMethods.add(method);
      }
    }
    ACTIONS_CACHE.put(parentClass,classMethods);
  }
}
Program: 174831
Project: 174831
Buggy source:
void registerActionSubscriber(Class<?> storeClass){
  ExecutorService storeExecutor=Executors.newFixedThreadPool(1);
  if (storeClass.isAnnotationPresent(Store.class)) {
    storeExecutor.execute(new MethodsWithActionAnnotationHelperRunnable(storeClass));
  }
}

Fixed version (ground truth):
void registerActionSubscriber(Object storeClass){
  ExecutorService storeExecutor=Executors.newFixedThreadPool(1);
  if (storeClass.getClass().isAnnotationPresent(Store.class)) {
    storeExecutor.execute(new MethodsWithActionAnnotationHelperRunnable(storeClass));
  }
}
Program: 174832
Project: 174832
Buggy source:
Observable emitAction(final FluxAction action){
  return Observable.just(action).create(new ObservableOnSubscribe(){
    @Override public void subscribe(    @NonNull ObservableEmitter e) throws Exception {
      for (      Class<?> parentClass : ACTIONS_CACHE.keySet()) {
        for (        Method method : ACTIONS_CACHE.get(parentClass)) {
          if (action.getType().equals(method.getAnnotation(Action.class).actionType())) {
            HashMap<String,Object> map=new HashMap<String,Object>();
            map.put("String_Node_Str",method);
            map.put("String_Node_Str",parentClass);
            map.put("String_Node_Str",action);
            e.onNext(map);
          }
        }
      }
      e.onComplete();
    }
  }
);
}

Fixed version (ground truth):
Observable emitAction(final FluxAction action){
  return Observable.just(action).create(new ObservableOnSubscribe(){
    @Override public void subscribe(    @NonNull ObservableEmitter e) throws Exception {
      for (      Object parentClass : ACTIONS_CACHE.keySet()) {
        for (        Method method : ACTIONS_CACHE.get(parentClass)) {
          if (action.getType().equals(method.getAnnotation(Action.class).actionType())) {
            HashMap<String,Object> map=new HashMap<String,Object>();
            map.put("String_Node_Str",method);
            map.put("String_Node_Str",parentClass);
            map.put("String_Node_Str",action);
            e.onNext(map);
          }
        }
      }
      e.onComplete();
    }
  }
);
}
Program: 174833
Project: 174833
Buggy source:
public void registerReactionSubscriber(Class<?> viewClass){
  ExecutorService reactionExecuter=Executors.newFixedThreadPool(1);
  reactionExecuter.execute(new MethodsWithReactAnnotationHelperRunnable(viewClass));
}

Fixed version (ground truth):
public void registerReactionSubscriber(Object viewClass){
  ExecutorService reactionExecuter=Executors.newFixedThreadPool(1);
  reactionExecuter.execute(new MethodsWithReactAnnotationHelperRunnable(viewClass));
}
Program: 174834
Project: 174834
Buggy source:
public MethodsWithActionAnnotationHelperRunnable(Class<?> parentClass){
  this.parentClass=parentClass;
}

Fixed version (ground truth):
public MethodsWithActionAnnotationHelperRunnable(Object parentClass){
  this.parentClass=parentClass;
}
Program: 174835
Project: 174835
Buggy source:
Observer getActionObserver(){
  return new Observer(){
    @Override public void onSubscribe(    @NonNull Disposable d){
    }
    @Override public void onNext(    @NonNull Object o){
      HashMap<String,Object> map=(HashMap<String,Object>)o;
      Method method=(Method)map.get("String_Node_Str");
      Class<?> parentClass=(Class<?>)map.get("String_Node_Str");
      FluxAction action=(FluxAction)map.get("String_Node_Str");
      try {
        method.invoke(parentClass,action);
      }
 catch (      Exception e) {
      }
    }
    @Override public void onError(    @NonNull Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}

Fixed version (ground truth):
Observer getActionObserver(){
  return new Observer(){
    @Override public void onSubscribe(    @NonNull Disposable d){
    }
    @Override public void onNext(    @NonNull Object o){
      HashMap<String,Object> map=(HashMap<String,Object>)o;
      Method method=(Method)map.get("String_Node_Str");
      FluxAction action=(FluxAction)map.get("String_Node_Str");
      try {
        method.invoke(map.get("String_Node_Str"),action);
      }
 catch (      Exception e) {
      }
    }
    @Override public void onError(    @NonNull Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}
Program: 174836
Project: 174836
Buggy source:
@Override public void onNext(@NonNull Object o){
  HashMap<String,Object> map=(HashMap<String,Object>)o;
  Method method=(Method)map.get("String_Node_Str");
  Class<?> parentClass=(Class<?>)map.get("String_Node_Str");
  FluxAction action=(FluxAction)map.get("String_Node_Str");
  try {
    method.invoke(parentClass,action);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void onNext(@NonNull Object o){
  HashMap<String,Object> map=(HashMap<String,Object>)o;
  Method method=(Method)map.get("String_Node_Str");
  FluxAction action=(FluxAction)map.get("String_Node_Str");
  try {
    method.invoke(map.get("String_Node_Str"),action);
  }
 catch (  Exception e) {
  }
}
Program: 174837
Project: 174837
Buggy source:
Observer getReactionObserver(){
  return new Observer(){
    @Override public void onSubscribe(    @NonNull Disposable d){
    }
    @Override public void onNext(    @NonNull Object o){
      HashMap<String,Object> map=(HashMap<String,Object>)o;
      Method method=(Method)map.get("String_Node_Str");
      Class<?> parentClass=(Class<?>)map.get("String_Node_Str");
      Reaction reaction=(Reaction)map.get("String_Node_Str");
      try {
        method.invoke(parentClass,reaction);
      }
 catch (      Exception e) {
      }
    }
    @Override public void onError(    @NonNull Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}

Fixed version (ground truth):
Observer getReactionObserver(){
  return new Observer(){
    @Override public void onSubscribe(    @NonNull Disposable d){
    }
    @Override public void onNext(    @NonNull Object o){
      HashMap<String,Object> map=(HashMap<String,Object>)o;
      Method method=(Method)map.get("String_Node_Str");
      Reaction reaction=(Reaction)map.get("String_Node_Str");
      try {
        method.invoke(map.get("String_Node_Str"),reaction);
      }
 catch (      Exception e) {
      }
    }
    @Override public void onError(    @NonNull Throwable e){
    }
    @Override public void onComplete(){
    }
  }
;
}
Program: 174838
Project: 174838
Buggy source:
@Override public void onNext(@NonNull Object o){
  HashMap<String,Object> map=(HashMap<String,Object>)o;
  Method method=(Method)map.get("String_Node_Str");
  Class<?> parentClass=(Class<?>)map.get("String_Node_Str");
  Reaction reaction=(Reaction)map.get("String_Node_Str");
  try {
    method.invoke(parentClass,reaction);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
@Override public void onNext(@NonNull Object o){
  HashMap<String,Object> map=(HashMap<String,Object>)o;
  Method method=(Method)map.get("String_Node_Str");
  Reaction reaction=(Reaction)map.get("String_Node_Str");
  try {
    method.invoke(map.get("String_Node_Str"),reaction);
  }
 catch (  Exception e) {
  }
}
Program: 174839
Project: 174839
Buggy source:
public void addFetchCommand(InjectionType type,Command command){
  runLocked(logAdminCommandsLock.readLock(),() -> {
    addCommand(type,command);
    logMinecartCommands=true;
  }
);
}

Fixed version (ground truth):
public void addFetchCommand(InjectionType type,Command command){
  runLocked(logAdminCommandsLock.readLock(),() -> {
    addCommand(type,command);
    type.setLogCommands(this,true);
  }
);
}
Program: 174840
Project: 174840
Buggy source:
public void addFetchCommands(InjectionType type,Collection<? extends Command> commands){
  runLocked(logAdminCommandsLock.readLock(),() -> {
    addCommands(type,commands);
    logMinecartCommands=true;
  }
);
}

Fixed version (ground truth):
public void addFetchCommands(InjectionType type,Collection<? extends Command> commands){
  runLocked(logAdminCommandsLock.readLock(),() -> {
    addCommands(type,commands);
    type.setLogCommands(this,true);
  }
);
}
Program: 174843
Project: 174843
Buggy source:
public void updateEditPos(int index,InjectionConnection connection,LevelReader reader){
  for (double d=0; d <= 5; d+=0.25) {
    Vec3D forward=transform.forward(d);
    Vec3I pos=forward.plus(EYE_LEVEL,Y).floor();
    BlockType blockType=reader.getBlockAtPos(pos).type;
    List<BlockType> ignore=Arrays.asList(BlockType.AIR,BlockType.WATER,BlockType.FLOWING_WATER,BlockType.LAVA,BlockType.FLOWING_LAVA);
    if (!ignore.contains(blockType)) {
      connection.inject(IMPULSE,"String_Node_Str" + pos + "String_Node_Str");
      connection.inject(IMPULSE,"String_Node_Str" + username + "String_Node_Str"+ index+ "String_Node_Str"+ pos+ "String_Node_Str");
      if (index == 1)       pos1=pos;
 else       if (index == 2)       pos2=pos;
      return;
    }
  }
}

Fixed version (ground truth):
public void updateEditPos(int index,InjectionConnection connection,LevelReader reader){
  for (double d=0; d <= 5; d+=0.25) {
    Vec3D forward=transform.forward(d);
    Vec3I pos=forward.plus(EYE_LEVEL,Y).floor();
    BlockType blockType=reader.getBlockAtPos(pos).type;
    List<BlockType> ignore=Arrays.asList(BlockType.AIR,BlockType.WATER,BlockType.FLOWING_WATER,BlockType.LAVA,BlockType.FLOWING_LAVA);
    if (!ignore.contains(blockType)) {
      connection.inject(IMPULSE,"String_Node_Str" + pos.toAbsoluteString() + "String_Node_Str");
      connection.inject(IMPULSE,"String_Node_Str" + username + "String_Node_Str"+ index+ "String_Node_Str"+ pos.toAbsoluteString()+ "String_Node_Str");
      if (index == 1)       pos1=pos;
 else       if (index == 2)       pos2=pos;
      return;
    }
  }
}
Program: 174844
Project: 174844
Buggy source:
private static void recSplitFill(InjectionConnection connection,Vec3I pos,Vec3I size,String postCoordinateArgs){
  if (size.x > 32) {
    recSplitFill(connection,pos.plus(32,0,0),size.plus(-32,0,0),postCoordinateArgs);
    size=size.withX(32);
  }
  if (size.y > 32) {
    recSplitFill(connection,pos.plus(0,32,0),size.plus(0,-32,0),postCoordinateArgs);
    size=size.withY(32);
  }
  if (size.z > 32) {
    recSplitFill(connection,pos.plus(0,0,32),size.plus(0,0,-32),postCoordinateArgs);
    size=size.withZ(32);
  }
  if (size.x == 0 || size.y == 0 || size.z == 0)   return;
  connection.inject(IMPULSE,"String_Node_Str" + pos + "String_Node_Str"+ pos.plus(size.x - 1,size.y - 1,size.z - 1)+ "String_Node_Str"+ postCoordinateArgs);
}

Fixed version (ground truth):
private static void recSplitFill(InjectionConnection connection,Vec3I pos,Vec3I size,String postCoordinateArgs){
  if (size.x > 32) {
    recSplitFill(connection,pos.plus(32,0,0),size.plus(-32,0,0),postCoordinateArgs);
    size=size.withX(32);
  }
  if (size.y > 32) {
    recSplitFill(connection,pos.plus(0,32,0),size.plus(0,-32,0),postCoordinateArgs);
    size=size.withY(32);
  }
  if (size.z > 32) {
    recSplitFill(connection,pos.plus(0,0,32),size.plus(0,0,-32),postCoordinateArgs);
    size=size.withZ(32);
  }
  if (size.x == 0 || size.y == 0 || size.z == 0)   return;
  connection.inject(IMPULSE,"String_Node_Str" + pos.toAbsoluteString() + "String_Node_Str"+ pos.plus(size.x - 1,size.y - 1,size.z - 1).toAbsoluteString()+ "String_Node_Str"+ postCoordinateArgs);
}
Program: 174845
Project: 174845
Buggy source:
/** 
 * Read all new lines that have been added to a file since the last call to  {@link #readAddedLines(Charset,Consumer)} or alternatively the construction of the{@link LogFileReader}.
 * @param charset
 * @param lineConsumer the {@link Consumer} to be called for each line (without line seperator)
 */
public void readAddedLines(Charset charset,Consumer<String> lineConsumer){
  try (InputStream is=Files.newInputStream(logFile,StandardOpenOption.READ);BufferedReader reader=new BufferedReader(new InputStreamReader(is,charset))){
    long logFileSize=Files.size(logFile);
    if (bytesRead <= logFileSize) {
      is.skip(bytesRead);
    }
 else {
      LOGGER.info("String_Node_Str");
    }
    bytesRead=logFileSize;
    String line;
    while ((line=reader.readLine()) != null) {
      lineConsumer.accept(line);
    }
  }
 catch (  IOException ex) {
    LOGGER.info("String_Node_Str",ex);
    bytesRead=0;
  }
}

Fixed version (ground truth):
/** 
 * Read all new lines that have been added to a file since the last call to  {@link #readAddedLines(Charset,Consumer)} or alternatively the construction of the{@link LogFileReader}.
 * @param charset
 * @param lineConsumer the {@link Consumer} to be called for each line (without line seperator)
 */
public void readAddedLines(Charset charset,Consumer<String> lineConsumer){
  try (CountingInputStream is=new CountingInputStream(Files.newInputStream(logFile,StandardOpenOption.READ));BufferedReader reader=new BufferedReader(new InputStreamReader(is,charset))){
    if (bytesRead <= Files.size(logFile)) {
      is.skip(bytesRead);
    }
 else {
      LOGGER.info("String_Node_Str",logFile);
    }
    try {
      String line;
      while ((line=reader.readLine()) != null) {
        lineConsumer.accept(line);
      }
    }
 catch (    Exception ex) {
      LOGGER.warn("String_Node_Str",ex);
      throw ex;
    }
 finally {
      bytesRead=is.getCount();
    }
  }
 catch (  IOException ex) {
    LOGGER.info("String_Node_Str",ex);
    bytesRead=0;
  }
}
Program: 174847
Project: 174847
Buggy source:
private KProgressHUD showProgressHUD(Integer maskTypeInteger,KProgressHUDStyle style,String status){
  Context context=this.reactContext.getCurrentActivity();
  if (context != null) {
    KProgressHUDMaskType maskType=getMaskTypeForInteger(maskTypeInteger);
    this.progressHUD=KProgressHUD.create(context).setCancellable(getIsCancellableForMaskType(maskType)).setDimAmount(getDimAmountForMaskType(maskType));
    setProgressHUDStyle(context,this.progressHUD,style);
    this.currentStyle=style;
    if (status != null) {
      this.progressHUD.setLabel(status);
    }
  }
  if (style == KProgressHUDStyle.Progress) {
    this.progressHUD.setMaxProgress(100);
    this.progressHUD.setProgress(0);
  }
  return this.progressHUD.show();
}

Fixed version (ground truth):
private KProgressHUD showProgressHUD(Integer maskTypeInteger,KProgressHUDStyle style,String status){
  Context context=this.reactContext.getCurrentActivity();
  if (context != null && this.progressHUD == null) {
    KProgressHUDMaskType maskType=getMaskTypeForInteger(maskTypeInteger);
    this.progressHUD=KProgressHUD.create(context).setCancellable(getIsCancellableForMaskType(maskType)).setDimAmount(getDimAmountForMaskType(maskType));
    setProgressHUDStyle(context,this.progressHUD,style);
    this.currentStyle=style;
    if (status != null) {
      this.progressHUD.setLabel(status);
    }
  }
  if (style == KProgressHUDStyle.Progress) {
    this.progressHUD.setMaxProgress(100);
    this.progressHUD.setProgress(0);
  }
  return this.progressHUD.show();
}
Program: 174848
Project: 174848
Buggy source:
private KProgressHUD showProgressHUD(Integer maskTypeInteger,KProgressHUDStyle style,String status){
  Context context=this.reactContext.getCurrentActivity();
  if (context != null && this.progressHUD == null) {
    KProgressHUDMaskType maskType=getMaskTypeForInteger(maskTypeInteger);
    this.progressHUD=KProgressHUD.create(context).setCancellable(getIsCancellableForMaskType(maskType)).setDimAmount(getDimAmountForMaskType(maskType));
    setProgressHUDStyle(context,this.progressHUD,style);
    this.currentStyle=style;
    if (status != null) {
      this.progressHUD.setLabel(status);
    }
  }
  if (style == KProgressHUDStyle.Progress) {
    this.progressHUD.setMaxProgress(100);
    this.progressHUD.setProgress(0);
  }
  return this.progressHUD.show();
}

Fixed version (ground truth):
private KProgressHUD showProgressHUD(Integer maskTypeInteger,KProgressHUDStyle style,String status){
  Context context=this.reactContext.getCurrentActivity();
  if (this.progressHUD == null) {
    this.progressHUD=KProgressHUD.create(context);
    if (this.progressHUD.isShowing()) {
      this.progressHUD.dismiss();
    }
    this.progressHUD=null;
  }
  if (context != null) {
    KProgressHUDMaskType maskType=getMaskTypeForInteger(maskTypeInteger);
    this.progressHUD=KProgressHUD.create(context).setCancellable(getIsCancellableForMaskType(maskType)).setDimAmount(getDimAmountForMaskType(maskType));
    setProgressHUDStyle(context,this.progressHUD,style);
    this.currentStyle=style;
    if (status != null) {
      this.progressHUD.setLabel(status);
    }
  }
  if (style == KProgressHUDStyle.Progress) {
    this.progressHUD.setMaxProgress(100);
    this.progressHUD.setProgress(0);
  }
  return this.progressHUD.show();
}
Program: 174849
Project: 174849
Buggy source:
/** 
 * Execute the opcode.
 */
public void execute(){
  WasmStack<DataTypeNumber> stack=instance.stack();
  if ((instance.stack().peek() instanceof Int32) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str");
  }
  Int32 value1=(Int32)stack.pop();
  if ((stack.peek() instanceof Int32) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str");
  }
  Int32 value2=(Int32)stack.pop();
  Int32 result=new Int32(value1.integerValue() + value2.integerValue());
  stack.push(result);
}

Fixed version (ground truth):
/** 
 * Execute the opcode.
 */
public void execute(){
  WasmStack<DataTypeNumber> stack=instance.stack();
  if ((stack.peek() instanceof Int32) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str");
  }
  Int32 value1=(Int32)stack.pop();
  if ((stack.peek() instanceof Int32) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str");
  }
  Int32 value2=(Int32)stack.pop();
  Int32 result=new Int32(value1.integerValue() + value2.integerValue());
  stack.push(result);
}
Program: 174850
Project: 174850
Buggy source:
/** 
 * Execute the opcode
 * @param index index in to the vector that contains the local variable.
 */
public void execute(UInt32 index){
  if ((index.integerValue() <= instance.localAll().size()) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str" + index.integerValue() + "String_Node_Str");
  }
  WasmStack<DataTypeNumber> stack=instance.stack();
  DataTypeNumber value=instance.localAll().get(index.integerValue());
  stack.push(value);
}

Fixed version (ground truth):
/** 
 * Execute the opcode
 * @param index index in to the vector that contains the local variable.
 */
public void execute(UInt32 index){
  if ((index.integerValue() < instance.localAll().size()) == false) {
    throw new WasmRuntimeException(UUID.fromString("String_Node_Str"),"String_Node_Str" + index.integerValue() + "String_Node_Str");
  }
  WasmStack<DataTypeNumber> stack=instance.stack();
  DataTypeNumber value=instance.localAll().get(index.integerValue());
  stack.push(value);
}
Program: 174851
Project: 174851
Buggy source:
/** 
 * This an end to end test
 */
@Test public void wasmTest(){
  assertTrue(wasm.validate());
  assertEquals(new Integer(1),wasm.getFunctionSignatures().getSize());
  assertEquals(2,wasm.exports().size());
  assertEquals(new ExternalKind(ExternalKind.memory),wasm.exports().get(0).getExternalKind());
  assertEquals("String_Node_Str",wasm.exports().get(0).getFieldName().getValue());
  assertEquals(new ExternalKind(ExternalKind.function),wasm.exports().get(1).getExternalKind());
  assertEquals("String_Node_Str",wasm.exports().get(1).getFieldName().getValue());
  WasmInstance instance=new WasmInstance(module);
  WasmFunction functionAdd32=instance.exportFunction("String_Node_Str");
  WasmVector<DataTypeNumber> returnAll=new WasmVector<>(1);
  WasmVector<DataTypeNumber> paramAll=new WasmVector<>(2);
  paramAll.add(new Int32(3));
  paramAll.add(new Int32(4));
  instance.call(functionAdd32,returnAll,paramAll);
  assertNotNull(returnAll);
  assertEquals(1,returnAll.size());
  assertEquals(new Int32(7),returnAll.get(0));
}

Fixed version (ground truth):
/** 
 * This an end to end test
 */
@Test public void wasmTest(){
  assertTrue(wasm.validate());
  assertEquals(new Integer(1),wasm.getFunctionSignatures().getSize());
  assertEquals(2,wasm.exports().size());
  assertEquals(new ExternalKind(ExternalKind.memory),wasm.exports().get(0).getExternalKind());
  assertEquals("String_Node_Str",wasm.exports().get(0).getFieldName().getValue());
  assertEquals(new ExternalKind(ExternalKind.function),wasm.exports().get(1).getExternalKind());
  assertEquals("String_Node_Str",wasm.exports().get(1).getFieldName().getValue());
  WasmInstance instance=new WasmInstance(module);
  assertNotNull(instance.stack());
  WasmFunction functionAdd32=instance.exportFunction("String_Node_Str");
  WasmVector<DataTypeNumber> returnAll=new WasmVector<>(1);
  WasmVector<DataTypeNumber> paramAll=new WasmVector<>(2);
  paramAll.add(new Int32(3));
  paramAll.add(new Int32(4));
  instance.call(functionAdd32,returnAll,paramAll);
  assertNotNull(returnAll);
  assertEquals(1,returnAll.size());
  assertEquals(new Int32(7),returnAll.get(0));
}
Program: 174852
Project: 174852
Buggy source:
/** 
 * @param form
 * @param paramCount
 * @param paramTypeAll
 * @param returnCount only zero or one.
 * @param returnTypeAll
 */
public FunctionType(ValueType form,UInt32 paramCount,WasmVector<ValueType> paramTypeAll,UInt32 returnCount,WasmVector<ValueType> returnTypeAll){
  super();
  this.form=form;
  this.paramCount=paramCount;
  this.paramTypeAll=paramTypeAll;
  this.returnCount=returnCount;
  this.returnTypeAll=returnTypeAll;
}

Fixed version (ground truth):
public FunctionType(ValueType form,UInt32 paramCount,WasmVector<ValueType> paramTypeAll,UInt32 returnCount,WasmVector<ValueType> returnTypeAll){
  super();
  this.form=form;
  this.paramCount=paramCount;
  this.paramTypeAll=paramTypeAll;
  this.returnCount=returnCount;
  this.returnTypeAll=returnTypeAll;
}
Program: 174853
Project: 174853
Buggy source:
/** 
 * @param payload
 */
public LocalEntry(BytesFile payload){
  count=new VarUInt32(payload);
  valueType=new ValueType(payload);
}

Fixed version (ground truth):
/** 
 * @param payload the input BytesFile.
 */
public LocalEntry(BytesFile payload){
  count=new VarUInt32(payload);
  valueType=new ValueType(payload);
}