nus-yam/ex-repair huggingface dataset:
Program: 81715
Project: 81715
Buggy source:
private static Map<String,ProductVariantReferenceBean> createVariantsMap(final ProductProjection product,final ProductDataConfig productDataConfig,final UserContext userContext,final ReverseRouter reverseRouter){
  final Map<String,ProductVariantReferenceBean> variantsMap=new HashMap<>();
  product.getAllVariants().forEach(variant -> {
    final String attrCombination=productDataConfig.getSelectableAttributes().stream().map(variant::getAttribute).filter(enabledAttr -> enabledAttr != null).map(enabledAttr -> {
      final String enabledAttrValue=attributeValue(enabledAttr,productDataConfig.getMetaProductType(),userContext);
      return attributeValueAsKey(enabledAttrValue);
    }
).collect(joining("String_Node_Str"));
    variantsMap.put(attrCombination,new ProductVariantReferenceBean(variant,product,userContext,reverseRouter));
  }
);
  return variantsMap;
}

Fixed version (ground truth):
private static Map<String,ProductVariantReferenceBean> createVariantsMap(final ProductProjection product,final ProductDataConfig productDataConfig,final UserContext userContext,final ReverseRouter reverseRouter){
  final Map<String,ProductVariantReferenceBean> variantsMap=new HashMap<>();
  product.getAllVariants().forEach(variant -> {
    final String attrCombination=productDataConfig.getSelectableAttributes().stream().map(selectableAttr -> {
      final Attribute attr=variant.getAttribute(selectableAttr);
      if (attr != null) {
        final String enabledAttrValue=attributeValue(attr,productDataConfig.getMetaProductType(),userContext);
        return attributeValueAsKey(enabledAttrValue);
      }
 else {
        return "String_Node_Str";
      }
    }
).collect(joining("String_Node_Str"));
    variantsMap.put(attrCombination,new ProductVariantReferenceBean(variant,product,userContext,reverseRouter));
  }
);
  return variantsMap;
}
Program: 81716
Project: 81716
Buggy source:
private static Map<String,List<String>> allowedAttributeCombinations(final Attribute fixedAttribute,final ProductProjection product,final ProductDataConfig productDataConfig,final UserContext userContext){
  final MetaProductType metaProductType=productDataConfig.getMetaProductType();
  final Map<String,List<String>> attrCombination=new HashMap<>();
  productDataConfig.getSelectableAttributes().stream().filter(enabledAttrKey -> !fixedAttribute.getName().equals(enabledAttrKey)).forEach(enabledAttrKey -> {
    final List<String> allowedAttrValues=attributeCombination(enabledAttrKey,fixedAttribute,product,metaProductType,userContext);
    attrCombination.put(enabledAttrKey,allowedAttrValues);
  }
);
  return attrCombination;
}

Fixed version (ground truth):
private static Map<String,List<String>> allowedAttributeCombinations(final Attribute fixedAttribute,final ProductProjection product,final ProductDataConfig productDataConfig,final UserContext userContext){
  final MetaProductType metaProductType=productDataConfig.getMetaProductType();
  final Map<String,List<String>> attrCombination=new HashMap<>();
  productDataConfig.getSelectableAttributes().stream().filter(enabledAttrKey -> !fixedAttribute.getName().equals(enabledAttrKey)).forEach(enabledAttrKey -> {
    final List<String> allowedAttrValues=attributeCombination(enabledAttrKey,fixedAttribute,product,metaProductType,userContext);
    if (!allowedAttrValues.isEmpty()) {
      attrCombination.put(enabledAttrKey,allowedAttrValues);
    }
  }
);
  return attrCombination;
}
Program: 81717
Project: 81717
Buggy source:
public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final LogInPageContent pageContent=new LogInPageContent();
  return completedFuture(ok(renderLogInPage(pageContent,userContext)));
}

Fixed version (ground truth):
@AddCSRFToken public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final LogInPageContent pageContent=new LogInPageContent();
  return completedFuture(ok(renderLogInPage(pageContent,userContext)));
}
Program: 81718
Project: 81718
Buggy source:
@AddCSRFToken @RequireCSRFCheck public CompletionStage<Result> processSignUp(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Form<SignUpFormData> form=signUpForm.bindFromRequest();
  final LogInPageContent pageContent=new LogInPageContent(form,userContext,i18nResolver(),configuration());
  if (form.hasErrors()) {
    return completedFuture(handleSignUpFormErrors(form,pageContent,userContext));
  }
 else {
    return signUp(form.get()).thenApplyAsync(signInResult -> handleSuccessfulSignIn(signInResult,userContext),HttpExecution.defaultContext()).exceptionally(throwable -> handleExistingCustomerError(throwable,pageContent,userContext));
  }
}

Fixed version (ground truth):
@RequireCSRFCheck public CompletionStage<Result> processSignUp(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Form<SignUpFormData> form=signUpForm.bindFromRequest();
  final LogInPageContent pageContent=new LogInPageContent(form,userContext,i18nResolver(),configuration());
  if (form.hasErrors()) {
    return completedFuture(handleSignUpFormErrors(form,pageContent,userContext));
  }
 else {
    return signUp(form.get()).thenApplyAsync(signInResult -> handleSuccessfulSignIn(signInResult,userContext),HttpExecution.defaultContext()).exceptionally(throwable -> handleExistingCustomerError(throwable,pageContent,userContext));
  }
}
Program: 81719
Project: 81719
Buggy source:
private Html renderLogInPage(final LogInPageContent pageContent,final UserContext userContext){
  if (pageContent.getSignUpForm() == null) {
    final SignUpFormBean signUpFormBean=new SignUpFormBean(null,userContext,i18nResolver(),configuration());
    pageContent.setSignUpForm(signUpFormBean);
  }
  final SunrisePageData pageData=pageData(userContext,pageContent,ctx());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}

Fixed version (ground truth):
private Html renderLogInPage(final LogInPageContent pageContent,final UserContext userContext){
  if (pageContent.getSignUpForm() == null) {
    final SignUpFormBean signUpFormBean=new SignUpFormBean(null,userContext,i18nResolver(),configuration());
    pageContent.setSignUpForm(signUpFormBean);
  }
  final SunrisePageData pageData=pageData(userContext,pageContent,ctx(),session());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}
Program: 81720
Project: 81720
Buggy source:
@AddCSRFToken @RequireCSRFCheck public CompletionStage<Result> processLogIn(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Form<LogInFormData> form=logInForm.bindFromRequest();
  final LogInPageContent pageContent=new LogInPageContent(form);
  if (form.hasErrors()) {
    return completedFuture(handleLogInFormErrors(form,pageContent,userContext));
  }
 else {
    return logIn(form.get()).thenApplyAsync(signInResult -> handleSuccessfulSignIn(signInResult,userContext),HttpExecution.defaultContext()).exceptionally(throwable -> handleInvalidCredentialsError(throwable,pageContent,userContext));
  }
}

Fixed version (ground truth):
@RequireCSRFCheck public CompletionStage<Result> processLogIn(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Form<LogInFormData> form=logInForm.bindFromRequest();
  final LogInPageContent pageContent=new LogInPageContent(form);
  if (form.hasErrors()) {
    return completedFuture(handleLogInFormErrors(form,pageContent,userContext));
  }
 else {
    return logIn(form.get()).thenApplyAsync(signInResult -> handleSuccessfulSignIn(signInResult,userContext),HttpExecution.defaultContext()).exceptionally(throwable -> handleInvalidCredentialsError(throwable,pageContent,userContext));
  }
}
Program: 81721
Project: 81721
Buggy source:
private Html renderHome(final UserContext userContext,final List<ProductProjection> suggestions){
  final HomePageContent pageContent=createPageContent(userContext,suggestions);
  return templateService().renderToHtml("String_Node_Str",pageData(userContext,pageContent,ctx()),userContext.locales());
}

Fixed version (ground truth):
private Html renderHome(final UserContext userContext,final List<ProductProjection> suggestions){
  final HomePageContent pageContent=createPageContent(userContext,suggestions);
  return templateService().renderToHtml("String_Node_Str",pageData(userContext,pageContent,ctx(),session()),userContext.locales());
}
Program: 81722
Project: 81722
Buggy source:
private Html renderProductPage(final ProductProjection product,final UserContext userContext,final ProductVariant variant,final List<ProductProjection> suggestions){
  final ProductDetailPageContent pageContent=createPageContent(userContext,product,variant,suggestions);
  final SunrisePageData pageData=pageData(userContext,pageContent,ctx());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}

Fixed version (ground truth):
private Html renderProductPage(final ProductProjection product,final UserContext userContext,final ProductVariant variant,final List<ProductProjection> suggestions){
  final ProductDetailPageContent pageContent=createPageContent(userContext,product,variant,suggestions);
  final SunrisePageData pageData=pageData(userContext,pageContent,ctx(),session());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}
Program: 81723
Project: 81723
Buggy source:
private ProductOverviewPageContent createPageContent(final int page,final SearchCriteria searchCriteria,final PagedSearchResult<ProductProjection> searchResult,final UserContext userContext){
  final ProductOverviewPageContent content=new ProductOverviewPageContent();
  content.setFilterProductsUrl(request().path());
  content.setProducts(new ProductListData(searchResult.getResults(),productDataConfig(),userContext,reverseRouter(),categoryTreeInNew()));
  content.setPagination(new PaginationData(requestContext(),searchResult,page,searchCriteria.selectedDisplay(),paginationDisplayedPages));
  content.setSortSelector(searchCriteria.boundSortSelector());
  content.setDisplaySelector(searchCriteria.boundDisplaySelector());
  content.setFacets(new FacetListData(searchResult,searchCriteria.boundFacets()));
  return content;
}

Fixed version (ground truth):
private ProductOverviewPageContent createPageContent(final int page,final SearchCriteria searchCriteria,final PagedSearchResult<ProductProjection> searchResult,final UserContext userContext){
  final ProductOverviewPageContent content=new ProductOverviewPageContent();
  content.setFilterProductsUrl(request().path());
  content.setProducts(new ProductListData(searchResult.getResults(),productDataConfig(),userContext,reverseRouter(),categoryTreeInNew()));
  content.setPagination(new PaginationData(requestContext(request()),searchResult,page,searchCriteria.selectedDisplay(),paginationDisplayedPages));
  content.setSortSelector(searchCriteria.boundSortSelector());
  content.setDisplaySelector(searchCriteria.boundDisplaySelector());
  content.setFacets(new FacetListData(searchResult,searchCriteria.boundFacets()));
  return content;
}
Program: 81724
Project: 81724
Buggy source:
private Html renderPage(final UserContext userContext,final ProductOverviewPageContent content){
  final SunrisePageData pageData=pageData(userContext,content,ctx());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}

Fixed version (ground truth):
private Html renderPage(final UserContext userContext,final ProductOverviewPageContent content){
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}
Program: 81725
Project: 81725
Buggy source:
public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> ok(renderCartPage(cart,userContext)),HttpExecution.defaultContext());
}

Fixed version (ground truth):
@AddCSRFToken public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> ok(renderCartPage(cart,userContext)),HttpExecution.defaultContext());
}
Program: 81726
Project: 81726
Buggy source:
private Html renderCartPage(final Cart cart,final UserContext userContext){
  final CartDetailPageContent content=new CartDetailPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}

Fixed version (ground truth):
private Html renderCartPage(final Cart cart,final UserContext userContext){
  final CartDetailPageContent content=new CartDetailPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return templateService().renderToHtml("String_Node_Str",pageData,userContext.locales());
}
Program: 81727
Project: 81727
Buggy source:
@AddCSRFToken @RequireCSRFCheck public CompletionStage<Result> process(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenComposeAsync(cart -> {
    final CheckoutAddressFormData checkoutAddressFormData=extractBean(request(),CheckoutAddressFormData.class);
    final Form<CheckoutAddressFormData> filledForm=obtainFilledForm(checkoutAddressFormData);
    final CheckoutAddressPageContent content=new CheckoutAddressPageContent(checkoutAddressFormData,cart,i18nResolver(),configuration(),userContext,projectContext(),productDataConfig,reverseRouter());
    if (filledForm.hasErrors()) {
      return CompletableFuture.completedFuture(badRequest(userContext,filledForm,content));
    }
 else {
      return updateCart(cart,content).thenApplyAsync(updatedCart -> redirect(reverseRouter().showCheckoutShippingForm(languageTag)),HttpExecution.defaultContext());
    }
  }
);
}

Fixed version (ground truth):
@RequireCSRFCheck public CompletionStage<Result> process(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Http.Request request=request();
  return getOrCreateCart(userContext,session()).thenComposeAsync(cart -> {
    final CheckoutAddressFormData checkoutAddressFormData=extractBean(request,CheckoutAddressFormData.class);
    final Form<CheckoutAddressFormData> filledForm=obtainFilledForm(checkoutAddressFormData,request);
    final CheckoutAddressPageContent content=new CheckoutAddressPageContent(checkoutAddressFormData,cart,i18nResolver(),configuration(),userContext,projectContext(),productDataConfig,reverseRouter());
    if (filledForm.hasErrors()) {
      return CompletableFuture.completedFuture(badRequest(userContext,filledForm,content));
    }
 else {
      return updateCart(cart,content).thenApplyAsync(updatedCart -> redirect(reverseRouter().showCheckoutShippingForm(languageTag)),HttpExecution.defaultContext());
    }
  }
,HttpExecution.defaultContext());
}
Program: 81728
Project: 81728
Buggy source:
private Result badRequest(final UserContext userContext,final Form<CheckoutAddressFormData> filledForm,final CheckoutAddressPageContent content){
  Logger.info("String_Node_Str");
  content.getAddressForm().setErrors(new ErrorsBean(filledForm));
  final SunrisePageData pageData=pageData(userContext,content,ctx());
  return badRequest(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}

Fixed version (ground truth):
private Result badRequest(final UserContext userContext,final Form<CheckoutAddressFormData> filledForm,final CheckoutAddressPageContent content){
  Logger.info("String_Node_Str");
  content.getAddressForm().setErrors(new ErrorsBean(filledForm));
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return badRequest(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}
Program: 81729
Project: 81729
Buggy source:
private Result renderCheckoutAddressPage(final UserContext userContext,final Cart cart){
  final CheckoutAddressPageContent content=new CheckoutAddressPageContent(cart,i18nResolver(),configuration(),userContext,projectContext(),productDataConfig,reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx());
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}

Fixed version (ground truth):
private Result renderCheckoutAddressPage(final UserContext userContext,final Cart cart){
  final CheckoutAddressPageContent content=new CheckoutAddressPageContent(cart,i18nResolver(),configuration(),userContext,projectContext(),productDataConfig,reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}
Program: 81730
Project: 81730
Buggy source:
public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutAddressPage(userContext,cart),HttpExecution.defaultContext());
}

Fixed version (ground truth):
@AddCSRFToken public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutAddressPage(userContext,cart),HttpExecution.defaultContext());
}
Program: 81731
Project: 81731
Buggy source:
private Form<CheckoutAddressFormData> obtainFilledForm(final CheckoutAddressFormData checkoutAddressFormData){
  final Form<CheckoutAddressFormData> filledForm=formFactory.form(CheckoutAddressFormData.class,CheckoutAddressFormData.Validation.class).bindFromRequest(request());
  additionalValidations(filledForm,checkoutAddressFormData);
  return filledForm;
}

Fixed version (ground truth):
private Form<CheckoutAddressFormData> obtainFilledForm(final CheckoutAddressFormData checkoutAddressFormData,final Http.Request request){
  final Form<CheckoutAddressFormData> filledForm=formFactory.form(CheckoutAddressFormData.class,CheckoutAddressFormData.Validation.class).bindFromRequest(request);
  additionalValidations(filledForm,checkoutAddressFormData);
  return filledForm;
}
Program: 81732
Project: 81732
Buggy source:
@RequireCSRFCheck public CompletionStage<Result> process(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final CompletionStage<Cart> cartStage=getOrCreateCart(userContext,session());
  final Form<CheckoutConfirmationFormData> filledForm=Form.form(CheckoutConfirmationFormData.class).bindFromRequest(request());
  final CheckoutConfirmationFormData data=filledForm.get();
  if (filledForm.hasErrors()) {
    return cartStage.thenComposeAsync(cart -> renderErrorResponse(cart,filledForm,ctx(),userContext),HttpExecution.defaultContext());
  }
 else {
    return cartStage.thenComposeAsync(cart -> createOrder(cart,languageTag),HttpExecution.defaultContext());
  }
}

Fixed version (ground truth):
@RequireCSRFCheck public CompletionStage<Result> process(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final CompletionStage<Cart> cartStage=getOrCreateCart(userContext,session());
  final Form<CheckoutConfirmationFormData> filledForm=Form.form(CheckoutConfirmationFormData.class).bindFromRequest(request());
  final CheckoutConfirmationFormData data=filledForm.get();
  if (filledForm.hasErrors()) {
    return cartStage.thenComposeAsync(cart -> renderErrorResponse(cart,filledForm,userContext),HttpExecution.defaultContext());
  }
 else {
    return cartStage.thenComposeAsync(cart -> createOrder(cart,languageTag),HttpExecution.defaultContext());
  }
}
Program: 81733
Project: 81733
Buggy source:
private CompletionStage<Result> renderErrorResponse(final Cart cart,final Form<CheckoutConfirmationFormData> filledForm,final Http.Context ctx,final UserContext userContext){
  final CheckoutConfirmationPageContent content=new CheckoutConfirmationPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  content.getCheckoutForm().setErrors(new ErrorsBean(filledForm));
  final SunrisePageData pageData=pageData(userContext,content,ctx);
  return CompletableFuture.completedFuture(badRequest(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales())));
}

Fixed version (ground truth):
private CompletionStage<Result> renderErrorResponse(final Cart cart,final Form<CheckoutConfirmationFormData> filledForm,final UserContext userContext){
  final CheckoutConfirmationPageContent content=new CheckoutConfirmationPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  content.getCheckoutForm().setErrors(new ErrorsBean(filledForm));
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return CompletableFuture.completedFuture(badRequest(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales())));
}
Program: 81734
Project: 81734
Buggy source:
private Result renderCheckoutConfirmationPage(final UserContext userContext,final Http.Context ctx,final Cart cart){
  final CheckoutConfirmationPageContent content=new CheckoutConfirmationPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx);
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}

Fixed version (ground truth):
private Result renderCheckoutConfirmationPage(final Cart cart,final UserContext userContext){
  final CheckoutConfirmationPageContent content=new CheckoutConfirmationPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}
Program: 81735
Project: 81735
Buggy source:
public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  final Http.Context ctx=ctx();
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutConfirmationPage(userContext,ctx,cart),HttpExecution.defaultContext());
}

Fixed version (ground truth):
@AddCSRFToken public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutConfirmationPage(cart,userContext),HttpExecution.defaultContext());
}
Program: 81736
Project: 81736
Buggy source:
public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutPaymentPage(userContext,cart),HttpExecution.defaultContext());
}

Fixed version (ground truth):
@AddCSRFToken public CompletionStage<Result> show(final String languageTag){
  final UserContext userContext=userContext(languageTag);
  return getOrCreateCart(userContext,session()).thenApplyAsync(cart -> renderCheckoutPaymentPage(userContext,cart),HttpExecution.defaultContext());
}
Program: 81737
Project: 81737
Buggy source:
private Result renderCheckoutPaymentPage(final UserContext userContext,final Cart cart){
  final CheckoutPaymentPageContent content=new CheckoutPaymentPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx());
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}

Fixed version (ground truth):
private Result renderCheckoutPaymentPage(final UserContext userContext,final Cart cart){
  final CheckoutPaymentPageContent content=new CheckoutPaymentPageContent(cart,userContext,productDataConfig,i18nResolver(),reverseRouter());
  final SunrisePageData pageData=pageData(userContext,content,ctx(),session());
  return ok(templateService().renderToHtml("String_Node_Str",pageData,userContext.locales()));
}
Program: 81738
Project: 81738
Buggy source:
@Override protected MetaModelQueryDsl<ShippingMethod,?,?,?> query(){
  return ShippingMethodQuery.of();
}

Fixed version (ground truth):
@Override protected ShippingMethodQuery query(){
  return ShippingMethodQuery.of();
}
Program: 81739
Project: 81739
Buggy source:
@Override public Call product(final String languageTag,final String productSlug,final String sku){
  return productcatalog.controllers.routes.ProductDetailPageController.show(languageTag,productSlug,sku);
}

Fixed version (ground truth):
@Override public Call product(final String languageTag,final String productSlug,final String sku){
  return ProductDetailPageController.show(languageTag,productSlug,sku);
}
Program: 81740
Project: 81740
Buggy source:
@Override public Call showCheckoutPaymentForm(final String language){
  return routes.CheckoutPaymentController.show(language);
}

Fixed version (ground truth):
@Override public Call showCheckoutPaymentForm(final String language){
  return CheckoutPaymentController.show(language);
}
Program: 81741
Project: 81741
Buggy source:
@Override public Call showCheckoutConfirmationForm(final String language){
  return routes.CheckoutPaymentController.show(language);
}

Fixed version (ground truth):
@Override public Call showCheckoutConfirmationForm(final String language){
  return CheckoutPaymentController.show(language);
}
Program: 81742
Project: 81742
Buggy source:
@Override public Call processCheckoutShippingForm(final String language){
  return routes.CheckoutShippingController.process(language);
}

Fixed version (ground truth):
@Override public Call processCheckoutShippingForm(final String language){
  return CheckoutShippingController.process(language);
}
Program: 81743
Project: 81743
Buggy source:
@Override public Call showCheckoutShippingForm(final String language){
  return routes.CheckoutShippingController.show(language);
}

Fixed version (ground truth):
@Override public Call showCheckoutShippingForm(final String language){
  return CheckoutShippingController.show(language);
}
Program: 81744
Project: 81744
Buggy source:
@Override public Call processCheckoutPaymentForm(final String language){
  return routes.CheckoutPaymentController.process(language);
}

Fixed version (ground truth):
@Override public Call processCheckoutPaymentForm(final String language){
  return CheckoutPaymentController.process(language);
}
Program: 81745
Project: 81745
Buggy source:
private void fill(final Messages messages,final Configuration configuration,@Nullable final String title){
  final List<SelectableData> selectableDataList=configuration.getObjectList(ALLOWED_TITLES_CONFIG_KEY).stream().map(map -> {
    final SelectableData selectableData=new SelectableData();
    final String shownTitle=messages.at(map.get(MESSAGE_CONFIG_KEY).toString());
    selectableData.setLabel(shownTitle);
    selectableData.setValue(shownTitle);
    selectableData.setSelected(selectableData.getValue().equals(title));
    return selectableData;
  }
).collect(toList());
  setList(selectableDataList);
}

Fixed version (ground truth):
private void fill(final Messages messages,final Configuration configuration,@Nullable final String title){
  final List<SelectableData> selectableDataList=configuration.getObjectList(ALLOWED_TITLES_CONFIG_KEY).stream().map(map -> {
    final String shownTitle=messages.at(map.get(MESSAGE_CONFIG_KEY).toString());
    final SelectableData selectableData=new SelectableData(shownTitle,shownTitle);
    selectableData.setSelected(selectableData.getValue().equals(title));
    return selectableData;
  }
).collect(toList());
  setList(selectableDataList);
}
Program: 81746
Project: 81746
Buggy source:
private void fill(final ShippingMethods shippingMethods,final String nullableSelectedShippingMethodId){
  final List<SelectableShippingMethodBean> shippingMethodBeanList=shippingMethods.shippingMethods.stream().map(shippingMethod -> {
    final SelectableShippingMethodBean bean=new SelectableShippingMethodBean();
    bean.setLabel(shippingMethod.getName());
    bean.setName(shippingMethod.getName());
    bean.setValue(shippingMethod.getId());
    final Boolean selected=shippingMethod.getId().equals(nullableSelectedShippingMethodId);
    bean.setSelected(selected);
    return bean;
  }
).collect(toList());
  setList(shippingMethodBeanList);
}

Fixed version (ground truth):
private void fill(final ShippingMethods shippingMethods,final String nullableSelectedShippingMethodId){
  final List<SelectableShippingMethodBean> shippingMethodBeanList=shippingMethods.shippingMethods.stream().map(shippingMethod -> {
    final SelectableShippingMethodBean bean=new SelectableShippingMethodBean();
    bean.setLabel(shippingMethod.getName());
    bean.setValue(shippingMethod.getId());
    final Boolean selected=shippingMethod.getId().equals(nullableSelectedShippingMethodId);
    bean.setSelected(selected);
    return bean;
  }
).collect(toList());
  setList(shippingMethodBeanList);
}
Program: 81747
Project: 81747
Buggy source:
private boolean containsPlural(final Options options){
  return options.hash.entrySet().stream().anyMatch(entry -> entry.getValue() instanceof Integer && !((entry.getValue().equals(1))));
}

Fixed version (ground truth):
private boolean containsPlural(final Options options){
  return options.hash.entrySet().stream().anyMatch(entry -> entry.getValue() instanceof Integer || entry.getValue() instanceof Long && ((((Number)entry.getValue()).longValue() != 1L)));
}
Program: 81748
Project: 81748
Buggy source:
public HandlebarsTranslationHelper(final List<String> languages,final List<String> bundles){
  this.languages=requireNonNull(languages);
  this.bundles=requireNonNull(bundles);
  for (  final String language : languages) {
    final List<String> foundBundles=new LinkedList<>();
    final List<String> notFoundBundles=new LinkedList<>();
    for (    final String bundle : bundles) {
      try {
        final Map<String,Object> yamlContent=loadYamlForTranslationAndBundle(language,bundle);
        languageBundleToYamlMap.put(language + "String_Node_Str" + bundle,yamlContent);
        foundBundles.add(bundle);
      }
 catch (      final IOException e) {
        notFoundBundles.add(bundle);
      }
    }
    Logger.info("String_Node_Str",language,foundBundles,notFoundBundles);
  }
}

Fixed version (ground truth):
public HandlebarsTranslationHelper(final List<String> languages,final List<String> bundles){
  requireNonNull(languages);
  requireNonNull(bundles);
  for (  final String language : languages) {
    final List<String> foundBundles=new LinkedList<>();
    final List<String> notFoundBundles=new LinkedList<>();
    for (    final String bundle : bundles) {
      try {
        final Map<String,Object> yamlContent=loadYamlForTranslationAndBundle(language,bundle);
        languageBundleToYamlMap.put(language + "String_Node_Str" + bundle,yamlContent);
        foundBundles.add(bundle);
      }
 catch (      final IOException e) {
        notFoundBundles.add(bundle);
      }
    }
    Logger.info("String_Node_Str",language,foundBundles,notFoundBundles);
  }
}
Program: 81749
Project: 81749
Buggy source:
@Override public void onStart(final Application app){
  this.app=app;
  client=new PlayJavaClientImpl(app.configuration());
  final PagedQueryResult<Category> queryResult=client.execute(Categories.query()).get(2000,TimeUnit.MILLISECONDS);
  categoryTree=CategoryTreeFactory.create(queryResult.getResults());
  super.onStart(app);
}

Fixed version (ground truth):
@Override public void onStart(final Application app){
  this.app=app;
  client=createPlayJavaClient(app);
  final PagedQueryResult<Category> queryResult=client.execute(Categories.query()).get(2000,TimeUnit.MILLISECONDS);
  categoryTree=CategoryTreeFactory.create(queryResult.getResults());
  super.onStart(app);
}
Program: 81750
Project: 81750
Buggy source:
@Override protected FakeApplication provideFakeApplication(){
  return fakeApplication(new Global(){
  }
);
}

Fixed version (ground truth):
@Override protected FakeApplication provideFakeApplication(){
  return fakeApplication(new Global(){
    @Override protected PlayJavaClientImpl createPlayJavaClient(    Application app){
      return new PlayJavaClientImpl(getConfiguration(app),getSphereRequestExecutor());
    }
  }
);
}
Program: 81752
Project: 81752
Buggy source:
/** 
 * Get the works triples selected in the UI.
 * @return String
 * @see
 * @since 1.0
 */
public String getWor(){
  execute();
  setWorks(true);
  calls=numWorks / limit;
  rest=numWorks % limit;
  if (rest != 0) {
    calls++;
  }
  RetrievedWork[] wor=null;
  w=new ArrayList<RetrievedWork>();
  RetrievedWork resource;
  for (int i=1; i <= calls; i++) {
    offset=(i * limit) - limit;
    wor=rdfstoreDAO.getWorks(sparqlEndpointURI,graphName,user,password,offset,limit);
    for (int a=0; a < wor.length; a++) {
      resource=new RetrievedWork();
      resource.setWorkURI(wor[i].getWorkURI());
      resource.setExprURI(wor[i].getExprURI());
      resource.setManifURI(wor[i].getManifURI());
      resource.setTitle(wor[i].getTitle());
      resource.setDimensions(wor[i].getDimensions());
      resource.setExtension(wor[i].getExtension());
      resource.setAuthor(wor[i].getAuthor());
      resource.setPublicPlace(wor[i].getPublicPlace());
      resource.setPublicDate(wor[i].getPublicDate());
      resource.setEdition(wor[i].getEdition());
      w.add(resource);
    }
  }
  return SUCCESS;
}

Fixed version (ground truth):
/** 
 * Get the works triples selected in the UI.
 * @return String
 * @see
 * @since 1.0
 */
public String getWor(){
  execute();
  setWorks(true);
  calls=numWorks / limit;
  rest=numWorks % limit;
  if (rest != 0) {
    calls++;
  }
  RetrievedWork[] wor=null;
  w=new ArrayList<RetrievedWork>();
  RetrievedWork resource;
  for (int i=1; i <= calls; i++) {
    offset=(i * limit) - limit;
    wor=rdfstoreDAO.getWorks(sparqlEndpointURI,graphName,user,password,offset,limit);
    for (int a=0; a < wor.length; a++) {
      resource=new RetrievedWork();
      resource.setWorkURI(wor[a].getWorkURI());
      resource.setExprURI(wor[a].getExprURI());
      resource.setManifURI(wor[a].getManifURI());
      resource.setTitle(wor[a].getTitle());
      resource.setDimensions(wor[a].getDimensions());
      resource.setExtension(wor[a].getExtension());
      resource.setAuthor(wor[a].getAuthor());
      resource.setPublicPlace(wor[a].getPublicPlace());
      resource.setPublicDate(wor[a].getPublicDate());
      resource.setEdition(wor[a].getEdition());
      w.add(resource);
    }
  }
  return SUCCESS;
}
Program: 81759
Project: 81759
Buggy source:
/** 
 * Returns a detailed summary of the job associated with the given identifier.
 * @param id the job identifier.
 * @return a detailed summary of the job associated with the given identifier.
 */
@GET @Path("String_Node_Str") @Produces({MediaType.TEXT_XML,MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getJob(@PathParam("String_Node_Str") final Integer id){
  final JobInstance configuration=cache.getJobInstance(id);
  if (configuration == null) {
    LOGGER.error(MessageCatalog._00032_JOB_CONFIGURATION_NOT_FOUND,id);
    return Response.status(Status.NOT_FOUND).build();
  }
  final ObjectName objectName=ManagementRegistrar.createJobObjectName(configuration.getFormat(),id);
  if (ManagementRegistrar.isAlreadyRegistered(objectName)) {
    final JobResource resource=jobRegistry.getJobResource(id);
    return Response.ok().entity(resource).build();
  }
 else {
    final JobResource resource=new JobResource(configuration);
    return Response.ok().entity(resource).build();
  }
}

Fixed version (ground truth):
/** 
 * Returns a detailed summary of the job associated with the given identifier.
 * @param id the job identifier.
 * @return a detailed summary of the job associated with the given identifier.
 */
@GET @Path("String_Node_Str") @Produces({MediaType.TEXT_XML,MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getJob(@PathParam("String_Node_Str") final Integer id){
  final JobInstance instance=cache.getJobInstance(id);
  if (instance == null) {
    LOGGER.error(MessageCatalog._00032_JOB_INSTANCE_NOT_FOUND,id);
    return Response.status(Status.NOT_FOUND).build();
  }
  final ObjectName objectName=ManagementRegistrar.createJobObjectName(instance.getFormat(),id);
  if (ManagementRegistrar.isAlreadyRegistered(objectName)) {
    final JobResource resource=jobRegistry.getJobResource(id);
    return Response.ok().entity(resource).build();
  }
 else {
    final JobStats stats=jobStatsRepository.findOne(id);
    if (stats == null) {
      return Response.status(Status.NOT_FOUND).build();
    }
    stats.setInstance(instance);
    return Response.ok().entity(stats).build();
  }
}
Program: 81761
Project: 81761
Buggy source:
/** 
 * Marks a given job as completed.
 * @param job the job.
 */
void markJobAsCompleted(final JobResource job){
  final JobInstance instance=cache.getJobInstance(job.getID());
  instance.setEndDate(new Timestamp(System.currentTimeMillis()));
  jobInstanceRepository.save(instance);
}

Fixed version (ground truth):
/** 
 * Marks a given job as completed.
 * @param job the job.
 */
void markJobAsCompleted(final JobResource job){
  final JobInstance instance=cache.getJobInstance(job.getID());
  instance.setEndDate(new Timestamp(System.currentTimeMillis()));
  jobInstanceRepository.save(instance);
  log.info(MessageCatalog._00048_JOB_COMPLETED,job.getID());
}
Program: 81762
Project: 81762
Buggy source:
@XmlElement(name="String_Node_Str") @Override public double getRecordsThroughput(){
  return totalProcessedRecordsCount.doubleValue() / (elapsed.get() / 1000);
}

Fixed version (ground truth):
@XmlElement(name="String_Node_Str") @Override public double getRecordsThroughput(){
  return elapsed.get() != 0 ? totalProcessedRecordsCount.doubleValue() / ((elapsed.get() / 1000)) : 0;
}
Program: 81763
Project: 81763
Buggy source:
@XmlElement(name="String_Node_Str") @Override public double getStatementsThroughput(){
  return totalOutputStatementsCount.doubleValue() / (elapsed.get() / 1000);
}

Fixed version (ground truth):
@XmlElement(name="String_Node_Str") @Override public double getStatementsThroughput(){
  return elapsed.get() != 0 ? totalOutputStatementsCount.doubleValue() / ((elapsed.get() / 1000)) : 0;
}
Program: 81764
Project: 81764
Buggy source:
@XmlElement(name="String_Node_Str") @Override public boolean isCompleted(){
  return totalRecordsCount != totalProcessedRecordsCount.get();
}

Fixed version (ground truth):
@XmlElement(name="String_Node_Str") @Override public boolean isCompleted(){
  return totalRecordsCount == totalProcessedRecordsCount.get();
}
Program: 81765
Project: 81765
Buggy source:
/** 
 * Returns the total records count of the owning job.
 * @return the total records count of the owning job.
 */
public int getTotalRecordsCount(){
  return totalRecordsCount;
}

Fixed version (ground truth):
/** 
 * Returns the total records count of the owning job.
 * @return the total records count of the owning job.
 */
@XmlElement(name="String_Node_Str") public int getTotalRecordsCount(){
  return totalRecordsCount;
}
Program: 81766
Project: 81766
Buggy source:
/** 
 * Returns the identifier of this job configuration.
 * @return the identifier of this job configuration.
 */
public Integer getId(){
  return id;
}

Fixed version (ground truth):
/** 
 * Returns the identifier of this job configuration.
 * @return the identifier of this job configuration.
 */
@XmlElement(name="String_Node_Str") public Integer getId(){
  return id;
}
Program: 81767
Project: 81767
Buggy source:
/** 
 * Returns the average triples production throughput in terms of triples / sec.
 * @return the average triples production throughput in terms of triples / sec.
 */
public BigDecimal getTriplesThroughput(){
  return triplesThroughput;
}

Fixed version (ground truth):
/** 
 * Returns the average triples production throughput in terms of triples / sec.
 * @return the average triples production throughput in terms of triples / sec.
 */
@XmlElement(name="String_Node_Str") public BigDecimal getTriplesThroughput(){
  return triplesThroughput;
}
Program: 81768
Project: 81768
Buggy source:
/** 
 * Returns the record processing throughput in terms of rec / sec.
 * @return the record processing throughput in terms of rec / sec.
 */
public BigDecimal getRecordsThroughput(){
  return recordsThroughput;
}

Fixed version (ground truth):
/** 
 * Returns the record processing throughput in terms of rec / sec.
 * @return the record processing throughput in terms of rec / sec.
 */
@XmlElement(name="String_Node_Str") public BigDecimal getRecordsThroughput(){
  return recordsThroughput;
}
Program: 81769
Project: 81769
Buggy source:
@XmlElement(name="String_Node_Str") public boolean isRunning(){
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if the job is running.
 * @see JobResource#isRunning()
 * @return true if the job is running.
 */
@XmlElement(name="String_Node_Str") public boolean isRunning(){
  return true;
}
Program: 81770
Project: 81770
Buggy source:
@XmlElement(name="String_Node_Str") public String getFormat(){
  return instance != null ? instance.getFormat() : "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Returns the format that has been associated with this job.
 * @see JobResource#getFormat()
 * @return the format that has been associated with this job.
 */
@XmlElement(name="String_Node_Str") public String getFormat(){
  return instance != null ? instance.getFormat() : "String_Node_Str";
}
Program: 81771
Project: 81771
Buggy source:
/** 
 * Returns the total number of triples produced by the owning job.
 * @return the total number of triples produced by the owning job.
 */
public int getTotalTriplesProduced(){
  return totalTriplesProduced;
}

Fixed version (ground truth):
/** 
 * Returns the total number of triples produced by the owning job.
 * @return the total number of triples produced by the owning job.
 */
@XmlElement(name="String_Node_Str") public int getTotalTriplesProduced(){
  return totalTriplesProduced;
}
Program: 81772
Project: 81772
Buggy source:
@XmlElement(name="String_Node_Str") public boolean isCompleted(){
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if the job has been completed.
 * @see JobResource#isCompleted()
 * @return true if the job has been completed.
 */
@XmlElement(name="String_Node_Str") public boolean isCompleted(){
  return true;
}
Program: 81773
Project: 81773
Buggy source:
@SubscribeEvent public void tickClient(ClientTickEvent event){
  if (event.phase == Phase.START) {
    try {
      ClientProxy.clientTickHandler.onTickInGame();
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void tickClient(ClientTickEvent event){
  if (event.phase == Phase.START) {
    try {
      ClientProxy.clientTickHandler.onTickInGame();
      if (extraGrassLast != ConfigFoliage.extraGrass) {
        extraGrassLast=ConfigFoliage.extraGrass;
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 81774
Project: 81774
Buggy source:
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
  proxy.postInit();
}

Fixed version (ground truth):
@Mod.EventHandler public void postInit(FMLPostInitializationEvent event){
  proxy.postInit();
  EventHandlerFML.extraGrassLast=ConfigFoliage.extraGrass;
}
Program: 81777
Project: 81777
Buggy source:
@Override public void hookUpdatedValues(){
  if (extraGrassLast != extraGrass) {
    extraGrassLast=extraGrass;
    EventHandler.flagFoliageUpdate=true;
  }
}

Fixed version (ground truth):
@Override public void hookUpdatedValues(){
}
Program: 81779
Project: 81779
Buggy source:
public EntityMovingBlock(World var1,int var2,int var3,int var4,Block var5,StormObject parOwner){
  super(var1);
  this.mode=1;
  this.age=0;
  this.type=0;
  this.noCollision=false;
  this.gravityDelay=60;
  this.noCollision=true;
  this.tile=var5;
  this.setSize(0.9F,0.9F);
  this.setPosition((double)var2 + 0.5D,(double)var3 + 0.5D,(double)var4 + 0.5D);
  this.motionX=0.0D;
  this.motionY=0.0D;
  this.motionZ=0.0D;
  this.prevPosX=(double)((float)var2 + 0.5F);
  this.prevPosY=(double)((float)var3 + 0.5F);
  this.prevPosZ=(double)((float)var4 + 0.5F);
  this.material=tile.getMaterial(tile.getDefaultState());
  this.tileentity=var1.getTileEntity(new BlockPos(var2,var3,var4));
  IBlockState state=var1.getBlockState(new BlockPos(var2,var3,var4));
  this.metadata=state.getBlock().getMetaFromState(state);
  owner=parOwner;
  if (this.tileentity != null) {
  }
}

Fixed version (ground truth):
public EntityMovingBlock(World var1,int var2,int var3,int var4,IBlockState state,StormObject parOwner){
  super(var1);
  this.mode=1;
  this.age=0;
  this.type=0;
  this.noCollision=false;
  this.gravityDelay=60;
  this.noCollision=true;
  this.setSize(0.9F,0.9F);
  this.setPosition(var2 + 0.5D,var3 + 0.5D,var4 + 0.5D);
  this.motionX=0.0D;
  this.motionY=0.0D;
  this.motionZ=0.0D;
  this.prevPosX=(var2 + 0.5F);
  this.prevPosY=(var3 + 0.5F);
  this.prevPosZ=(double)(var4 + 0.5F);
  this.tile=state.getBlock();
  this.metadata=state.getBlock().getMetaFromState(state);
  this.material=tile.getMaterial(tile.getDefaultState());
  owner=parOwner;
  if (this.tileentity != null) {
  }
}
Program: 81780
Project: 81780
Buggy source:
@Override public boolean isInRangeToRenderDist(double var1){
  return var1 < 128D * 128D;
}

Fixed version (ground truth):
@Override public boolean isInRangeToRenderDist(double var1){
  return var1 < 256D * 256D;
}
Program: 81781
Project: 81781
Buggy source:
private void blockify(int var1,int var2,int var3,EnumFacing var4){
  if (this.world.isRemote)   return;
  this.setDead();
  Block var5=this.world.getBlockState(new BlockPos(var1,var2,var3)).getBlock();
  if (this.tileentity != null || this.type != 0 || ConfigTornado.Storm_Tornado_rarityOfBreakOnFall > 0 && this.rand.nextInt(ConfigTornado.Storm_Tornado_rarityOfBreakOnFall + 1) != 0) {
    if (!WeatherUtil.shouldRemoveBlock(var5) && !WeatherUtil.isOceanBlock(var5) && var2 < 255) {
      this.world.setBlockState(new BlockPos(var1,var2 + 1,var3),this.tile.getStateFromMeta(this.metadata),3);
    }
    boolean var6=false;
    if (!WeatherUtil.isOceanBlock(var5)) {
      if (this.world.setBlockState(new BlockPos(var1,var2,var3),this.tile.getStateFromMeta(this.metadata),3)) {
        var6=true;
      }
    }
    if (var6) {
      if (this.tileentity != null) {
        this.world.setTileEntity(new BlockPos(var1,var2,var3),this.tileentity);
      }
    }
  }
}

Fixed version (ground truth):
private void blockify(int var1,int var2,int var3,EnumFacing var4){
  if (this.world.isRemote)   return;
  this.setDead();
  Block var5=this.world.getBlockState(new BlockPos(var1,var2,var3)).getBlock();
  if (this.tileentity != null || this.type != 0 || ConfigTornado.Storm_Tornado_rarityOfBreakOnFall > 0 && this.rand.nextInt(ConfigTornado.Storm_Tornado_rarityOfBreakOnFall + 1) != 0) {
    if (!WeatherUtil.shouldRemoveBlock(var5) && !WeatherUtil.isOceanBlock(var5) && var2 < 255) {
      this.world.setBlockState(new BlockPos(var1,var2 + 1,var3),this.tile.getStateFromMeta(this.metadata),3);
    }
    boolean var6=false;
    if (!WeatherUtil.isOceanBlock(var5)) {
      if (this.world.setBlockState(new BlockPos(var1,var2,var3),this.tile.getStateFromMeta(this.metadata),3)) {
        var6=true;
      }
    }
    if (var6) {
    }
  }
}