nus-yam/ex-repair huggingface dataset:
Program: 36634
Project: 36634
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event) throws Exception {
  settings.load(event);
  if (MinecraftServer.getServer().isDedicatedServer()) {
    settings.isServer=true;
  }
 else {
    settings.isServer=false;
    ClientCommandHandler.instance.registerCommand(new ConfigGUI());
  }
  snw=NetworkRegistry.INSTANCE.newSimpleChannel(Reference.ID);
  snw.registerMessage(ResponceHandler.class,Responce.class,0,Side.SERVER);
  snw.registerMessage(PerkInfoHandler.class,PerkInfo.class,1,Side.CLIENT);
  snw.registerMessage(RequestHandler.class,Request.class,2,Side.SERVER);
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event) throws Exception {
  settings.load(event);
  if (MinecraftServer.getServer() != null && MinecraftServer.getServer().isDedicatedServer()) {
    settings.isServer=true;
  }
 else {
    settings.isServer=false;
    ClientCommandHandler.instance.registerCommand(new ConfigGUI());
  }
  snw=NetworkRegistry.INSTANCE.newSimpleChannel(Reference.ID);
  snw.registerMessage(ResponceHandler.class,Responce.class,0,Side.SERVER);
  snw.registerMessage(PerkInfoHandler.class,PerkInfo.class,1,Side.CLIENT);
  snw.registerMessage(RequestHandler.class,Request.class,2,Side.SERVER);
}
Program: 36635
Project: 36635
Buggy source:
private static void updateReqList(){
  DefaultListModel model=new DefaultListModel();
  ArrayList<Requirement> temp=currentPerk.getRequirements();
  for (  Requirement req : temp) {
    model.addElement(req.name);
  }
  listRequirement.setModel(model);
  listRequirement.updateUI();
}

Fixed version (ground truth):
private static void updateReqList(){
  DefaultListModel model=new DefaultListModel();
  if (currentPerk != null && currentPerk.getRequirements() != null) {
    ArrayList<Requirement> temp=currentPerk.getRequirements();
    for (    Requirement req : temp) {
      model.addElement(req.name);
    }
  }
  listRequirement.setModel(model);
  listRequirement.updateUI();
}
Program: 36636
Project: 36636
Buggy source:
protected static void updateCurrentRequirmentInfo(){
  if (currentReq != null) {
    currentReq.action=Action.valueOf(spinnerPerkAction.toString());
    currentReq.extraData=textPerkExtraData.getText();
    currentReq.name=textPerkReqName.getText();
  }
}

Fixed version (ground truth):
protected static void updateCurrentRequirmentInfo(){
  if (currentReq != null) {
    currentReq.action=Action.valueOf(spinnerPerkAction.getValue().toString());
    currentReq.extraData=textPerkExtraData.getText();
    currentReq.name=textPerkReqName.getText();
    updateReqList();
  }
}
Program: 36637
Project: 36637
Buggy source:
protected static void deleteCurrentRequirement(){
  if (listRequirement.getSelectedIndex() > -1) {
    currentPerk.requirements.remove(listRequirement.getSelectedIndex());
    listRequirement.setSelectedIndex(-1);
    updateCurrentRequirment();
  }
}

Fixed version (ground truth):
protected static void deleteCurrentRequirement(){
  if (listRequirement.getSelectedIndex() > -1) {
    currentPerk.requirements.remove(listRequirement.getSelectedIndex());
    listRequirement.setSelectedIndex(-1);
    updateReqList();
  }
}
Program: 36638
Project: 36638
Buggy source:
protected static void newPerk(){
  BlockPerk perk=new BlockPerk();
  PerkStore.addPerk(perk);
  updatePerkList();
}

Fixed version (ground truth):
protected static void newPerk(){
  BlockPerk perk=new BlockPerk();
  perks.add(perk);
  updatePerkList();
}
Program: 36639
Project: 36639
Buggy source:
protected static void updateCurrentPerk(){
  if (listPerk.getSelectedIndex() > -1) {
    currentPerk=perks.get(listPerk.getSelectedIndex());
  }
 else {
    currentPerk=null;
  }
  textPerkName.setText(currentPerk.name);
  editorPerkDescription.setText(currentPerk.description);
  spinnerPointCost.setValue(currentPerk.pointCost);
  if (currentPerk instanceof BlockPerk) {
    BlockPerk temp=(BlockPerk)currentPerk;
    spinnerPerkType.setValue("String_Node_Str");
    textPerkObject.setText(temp.blockName);
    temp=null;
  }
 else   if (currentPerk instanceof ItemPerk) {
    spinnerPerkType.setValue("String_Node_Str");
    ItemPerk temp=(ItemPerk)currentPerk;
    textPerkObject.setText(temp.itemName);
    temp=null;
  }
 else   if (currentPerk instanceof EntityPerk) {
    spinnerPerkType.setValue("String_Node_Str");
    EntityPerk temp=(EntityPerk)currentPerk;
    textPerkObject.setText(temp.entityName);
    temp=null;
  }
 else   if (currentPerk == null) {
    spinnerPerkType.setValue("String_Node_Str");
    textPerkObject.setText("String_Node_Str");
  }
  updateReqList();
  updateCurrentRequirment();
}

Fixed version (ground truth):
protected static void updateCurrentPerk(){
  if (listPerk.getSelectedIndex() > -1) {
    currentPerk=perks.get(listPerk.getSelectedIndex());
    textPerkName.setText(currentPerk.name);
    editorPerkDescription.setText(currentPerk.description);
    spinnerPointCost.setValue(currentPerk.pointCost);
  }
 else {
    currentPerk=null;
    textPerkName.setText("String_Node_Str");
    editorPerkDescription.setText("String_Node_Str");
    spinnerPointCost.setValue(0);
  }
  if (currentPerk instanceof BlockPerk) {
    BlockPerk temp=(BlockPerk)currentPerk;
    spinnerPerkType.setValue("String_Node_Str");
    textPerkObject.setText(temp.blockName);
    temp=null;
  }
 else   if (currentPerk instanceof ItemPerk) {
    spinnerPerkType.setValue("String_Node_Str");
    ItemPerk temp=(ItemPerk)currentPerk;
    textPerkObject.setText(temp.itemName);
    temp=null;
  }
 else   if (currentPerk instanceof EntityPerk) {
    spinnerPerkType.setValue("String_Node_Str");
    EntityPerk temp=(EntityPerk)currentPerk;
    textPerkObject.setText(temp.entityName);
    temp=null;
  }
 else   if (currentPerk == null) {
    spinnerPerkType.setValue("String_Node_Str");
    textPerkObject.setText("String_Node_Str");
  }
  updateReqList();
  updateCurrentRequirment();
}
Program: 36640
Project: 36640
Buggy source:
protected static void deleteCurrentSkill(){
  skills.remove(currentSkill);
  currentSkill=null;
  listSkill.setSelectedIndex(-1);
  updateSkillList();
}

Fixed version (ground truth):
protected static void deleteCurrentSkill(){
  skills.remove(currentSkill);
  currentSkill=null;
  listSkill.setSelectedIndex(-1);
  updateSkillList();
  updateCurrentSkill();
}
Program: 36641
Project: 36641
Buggy source:
protected static void deleteCurrentPerk(){
  perks.remove(currentPerk);
  currentPerk=null;
  updatePerkList();
}

Fixed version (ground truth):
protected static void deleteCurrentPerk(){
  perks.remove(currentPerk);
  currentPerk=null;
  updatePerkList();
  updateCurrentPerk();
}
Program: 36642
Project: 36642
Buggy source:
protected static void updateCurrentSkillExpInfo(){
  if (currentExp != null) {
    currentExp.setXp((int)spinnerExpXP.getValue());
    currentExp.setName(txtSkillObjectName.getText());
  }
}

Fixed version (ground truth):
protected static void updateCurrentSkillExpInfo(){
  if (currentExp != null) {
    currentExp.setXp((int)spinnerExpXP.getValue());
    currentExp.setName(txtSkillObjectName.getText());
    updateSkillExpList();
  }
}
Program: 36643
Project: 36643
Buggy source:
protected static void newSkill(){
  BlockSkill skill=new BlockSkill();
  SkillStore.addSkill(skill);
  updateSkillList();
}

Fixed version (ground truth):
protected static void newSkill(){
  BlockSkill skill=new BlockSkill();
  skills.add(skill);
  updateSkillList();
}
Program: 36644
Project: 36644
Buggy source:
protected static void updateCurrentSkillExp(){
  ArrayList<? extends XPGain> temp=currentSkill.getExp();
  int x=listRequirement.getSelectedIndex();
  if (x > -1) {
    currentExp=temp.get(x);
    txtSkillObjectName.setText(currentExp.getName());
    spinnerExpXP.setValue(currentExp.getXp());
  }
 else {
    if (temp.size() > 0) {
      currentExp=temp.get(0);
      txtSkillObjectName.setText(currentExp.getName());
      spinnerExpXP.setValue(currentExp.getXp());
    }
 else {
      txtSkillObjectName.setText(null);
      spinnerExpXP.setValue(0);
    }
  }
}

Fixed version (ground truth):
protected static void updateCurrentSkillExp(){
  if (currentSkill != null && listSkillExp.getSelectedIndex() > -1) {
    currentExp=(XPGain)currentSkill.getExp().get(listSkillExp.getSelectedIndex());
    if (currentExp != null) {
      txtSkillObjectName.setText(currentExp.getName());
      spinnerExpXP.setValue(currentExp.getXp());
    }
 else {
      txtSkillObjectName.setText("String_Node_Str");
      spinnerExpXP.setValue(0);
    }
  }
}
Program: 36646
Project: 36646
Buggy source:
public static boolean hasPerk(PlayerData player,ArrayList<? extends Perk> blocklist){
  for (int i=0; i < blocklist.size(); i++) {
    if (player.getPerkList().contains(blocklist.get(i))) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean hasPerk(PlayerData player,ArrayList<? extends Perk> blocklist){
  for (int i=0; i < blocklist.size(); i++) {
    if (player.getPerkList().contains(blocklist.get(i).perkSlug)) {
      return true;
    }
  }
  return false;
}
Program: 36647
Project: 36647
Buggy source:
public static int getXP(int blockIndex,int skillNumber){
  return (int)skillList.get(skillNumber).exp.get(skillNumber);
}

Fixed version (ground truth):
public static int getXP(int blockIndex,int skillNumber){
  return (int)skillList.get(skillNumber).exp.get(blockIndex);
}
Program: 36648
Project: 36648
Buggy source:
public static int getXP(int blockIndex,int skillNumber){
  return (int)skillList.get(skillNumber).exp.get(skillNumber);
}

Fixed version (ground truth):
public static int getXP(int blockIndex,int skillNumber){
  return (int)skillList.get(skillNumber).exp.get(blockIndex);
}
Program: 36649
Project: 36649
Buggy source:
private void showMedia(Bundle savedInstancState){
  viewStub.setLayoutResource(R.layout.facebook_detail_activity_type_video);
  FrameLayout temp=(FrameLayout)viewStub.inflate();
  final VideoThumbnail videoThumbnail=(VideoThumbnail)temp.getChildAt(0);
  videoThumbnail.setVisibility(View.GONE);
  final String imageUrl=UrlModifier.getFacebookLargePhotoUrl(post.getPicture());
  Picasso.with(this).load(imageUrl).error(R.drawable.facebook_icon_plain).centerCrop().fit().into(videoThumbnail.getVideoThumbnail(),new Callback(){
    @Override public void onSuccess(){
      videoThumbnail.setVisibility(View.VISIBLE);
      videoThumbnail.showPlayButton(TextUtils.equals("String_Node_Str",post.getType()));
    }
    @Override public void onError(){
    }
  }
);
  videoThumbnail.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (TextUtils.equals("String_Node_Str",post.getType())) {
        ViewAlbumActivity.createAndStartActivity(v.getContext(),post.getName(),Helper.createStringArrayList(imageUrl),0);
      }
      if (TextUtils.equals("String_Node_Str",post.getType())) {
        Intent i=new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(post.getLink()));
        v.getContext().startActivity(i);
      }
    }
  }
);
}

Fixed version (ground truth):
private void showMedia(Bundle savedInstancState){
  viewStub.setLayoutResource(R.layout.facebook_detail_activity_type_video);
  FrameLayout temp=(FrameLayout)viewStub.inflate();
  final VideoThumbnail videoThumbnail=(VideoThumbnail)temp.getChildAt(0);
  videoThumbnail.setVisibility(View.GONE);
  final String imageUrl=UrlModifier.getFacebookLargePhotoUrl(post.getPicture());
  Helper.debug(imageUrl);
  Picasso.with(this).load(imageUrl).error(R.drawable.facebook_icon_plain).into(videoThumbnail.getVideoThumbnail(),new Callback(){
    @Override public void onSuccess(){
      videoThumbnail.setVisibility(View.VISIBLE);
      videoThumbnail.showPlayButton(TextUtils.equals("String_Node_Str",post.getType()));
    }
    @Override public void onError(){
    }
  }
);
  videoThumbnail.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      if (TextUtils.equals("String_Node_Str",post.getType())) {
        ViewAlbumActivity.createAndStartActivity(v.getContext(),post.getName(),Helper.createStringArrayList(imageUrl),0);
      }
      if (TextUtils.equals("String_Node_Str",post.getType())) {
        Intent i=new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(post.getLink()));
        v.getContext().startActivity(i);
      }
    }
  }
);
}
Program: 36650
Project: 36650
Buggy source:
@Override public void updateRow(Object result){
  super.updateRow(result);
  Picasso.with(getContext()).load(post.getPicture()).error(R.drawable.drawable_image_loading).fit().centerCrop().into(imgvThumbnail.getVideoThumbnail());
  imgvThumbnail.showPlayButton(TextUtils.equals("String_Node_Str",post.getType()));
}

Fixed version (ground truth):
@Override public void updateRow(Object result){
  super.updateRow(result);
  Helper.debug(post.getPicture());
  Picasso.with(getContext()).load(post.getPicture()).error(R.drawable.drawable_image_loading).fit().centerCrop().into(imgvThumbnail.getVideoThumbnail());
  imgvThumbnail.showPlayButton(TextUtils.equals("String_Node_Str",post.getType()));
}
Program: 36651
Project: 36651
Buggy source:
public static String getFacebookLargePhotoUrl(String smallPhotoUrl){
  String newUrl=FB_INTERNAL_URL_PATTERN.matcher(smallPhotoUrl).replaceAll("String_Node_Str");
  if (TextUtils.equals(smallPhotoUrl,newUrl) && smallPhotoUrl.contains("String_Node_Str")) {
    ;
  }
{
    Uri uri=Uri.parse(smallPhotoUrl);
    String imageUrl=uri.getQueryParameter("String_Node_Str");
    if (!TextUtils.isEmpty(imageUrl)) {
      try {
        newUrl=URLDecoder.decode(imageUrl,"String_Node_Str");
        Helper.debug("String_Node_Str" + newUrl);
      }
 catch (      UnsupportedEncodingException e) {
        e.printStackTrace();
      }
    }
  }
  return newUrl;
}

Fixed version (ground truth):
public static String getFacebookLargePhotoUrl(String smallPhotoUrl){
  String newUrl=FB_INTERNAL_URL_PATTERN.matcher(smallPhotoUrl).replaceAll("String_Node_Str");
  if (TextUtils.equals(smallPhotoUrl,newUrl) && smallPhotoUrl.contains("String_Node_Str")) {
    Uri uri=Uri.parse(smallPhotoUrl);
    String imageUrl=uri.getQueryParameter("String_Node_Str");
    if (!TextUtils.isEmpty(imageUrl)) {
      try {
        newUrl=URLDecoder.decode(imageUrl,"String_Node_Str");
        Helper.debug("String_Node_Str" + newUrl);
      }
 catch (      UnsupportedEncodingException e) {
        e.printStackTrace();
      }
    }
  }
  return newUrl;
}
Program: 36653
Project: 36653
Buggy source:
public Response generateAsset(String path){
  File asset;
  if (ctx.getApp().getConfiguration().getBoolean("String_Node_Str",false)) {
    asset=new File(ctx.getApp().getConfiguration().get("String_Node_Str","String_Node_Str") + "String_Node_Str" + path);
  }
 else {
    asset=new File(DefaultController.class.getResource("String_Node_Str" + path).getFile());
  }
  if (!asset.isFile() || !asset.exists() || !asset.canRead()) {
    return notFound();
  }
  String mime=MimeTypeUtils.getMimeTypeByExt(asset.getName().substring(asset.getName().lastIndexOf('.') + 1));
  try {
    return ok(new FileInputStream(asset)).setContentLength(asset.length()).setContentType(mime != null ? mime : "String_Node_Str");
  }
 catch (  IOException ex) {
    return notFound();
  }
}

Fixed version (ground truth):
public Response generateAsset(String path){
  InputStream asset=ctx.getApp().getResourceManager().load("String_Node_Str" + path);
  if (asset == null) {
    return notFound();
  }
  String mime=MimeTypeUtils.getMimeTypeByExt(path.substring(path.lastIndexOf('.') + 1));
  return ok(asset).setContentType(mime != null ? mime : "String_Node_Str");
}
Program: 36654
Project: 36654
Buggy source:
private Extension extension() throws Exception {
  RequestMethod method=null;
  Pattern pattern=null;
  for (; ; ) {
    if (t.ttype == TK_METHOD) {
      method=RequestMethod.valueOf(t.sval);
      t.next();
    }
 else     if (t.ttype == TK_PATTERN) {
      pattern=Pattern.compile(t.sval);
      t.next();
    }
 else     if (t.ttype == '{') {
      t.next();
      return new Extension(method,pattern,extensionList());
    }
 else     if (t.ttype == TK_WORD) {
      return new Extension(method,pattern,route());
    }
  }
}

Fixed version (ground truth):
private Extension extension() throws RoutesMapLoadException {
  RequestMethod method=null;
  Pattern pattern=null;
  for (; ; ) {
    if (t.ttype == TK_METHOD) {
      method=RequestMethod.valueOf(t.sval);
      t.next();
    }
 else     if (t.ttype == TK_PATTERN) {
      pattern=Pattern.compile(t.sval);
      t.next();
    }
 else     if (t.ttype == '{') {
      t.next();
      return new Extension(method,pattern,extensionList());
    }
 else     if (t.ttype == TK_WORD) {
      return new Extension(method,pattern,route());
    }
  }
}
Program: 36656
Project: 36656
Buggy source:
public List<Extension> load(InputStream input) throws Exception {
  t=new Tokenizer(new InputStreamReader(input));
  t.next();
  return extensionList();
}

Fixed version (ground truth):
public List<Extension> load(InputStream input) throws RoutesMapLoadException {
  t=new Tokenizer(new InputStreamReader(input));
  t.next();
  return extensionList();
}
Program: 36657
Project: 36657
Buggy source:
private List<Extension> extensionList() throws Exception {
  List<Extension> list=new ArrayList<>();
  while (t.ttype != Tokenizer.TK_EOF) {
switch (t.ttype) {
case TK_USE:
{
        t.next();
        if (t.ttype != TK_WORD) {
          throw new Exception("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
        }
        uses.add(t.sval);
        t.next();
        break;
      }
case TK_METHOD:
case TK_PATTERN:
case TK_WORD:
case '{':
{
      list.add(extension());
      break;
    }
case '}':
{
    t.next();
    return list;
  }
}
}
return list;
}

Fixed version (ground truth):
private List<Extension> extensionList() throws RoutesMapLoadException {
  List<Extension> list=new ArrayList<>();
  while (t.ttype != Tokenizer.TK_EOF) {
switch (t.ttype) {
case TK_USE:
{
        t.next();
        if (t.ttype != TK_WORD) {
          throw new RoutesMapLoadException("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
        }
        uses.add(t.sval);
        t.next();
        break;
      }
case TK_METHOD:
case TK_PATTERN:
case TK_WORD:
case '{':
{
      list.add(extension());
      break;
    }
case '}':
{
    t.next();
    return list;
  }
}
}
return list;
}
Program: 36658
Project: 36658
Buggy source:
private RouteParameter parameter() throws Exception {
  String value;
  String type="String_Node_Str";
  if (t.ttype != TK_INTEGER && t.ttype != TK_STRCONST) {
    throw new Exception("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
  }
  boolean isConst=t.ttype == TK_STRCONST;
  value=t.sval;
  t.next();
  if (t.ttype == ':') {
    t.next();
    if (t.ttype != TK_WORD) {
      throw new Exception("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
    }
    type=t.sval;
    t.next();
  }
  if (isConst) {
    return new RouteParameter(value,type);
  }
 else {
    return new RouteParameter(Integer.parseInt(value),type);
  }
}

Fixed version (ground truth):
private RouteParameter parameter() throws RoutesMapLoadException {
  String value;
  String type="String_Node_Str";
  if (t.ttype != TK_INTEGER && t.ttype != TK_STRCONST) {
    throw new RoutesMapLoadException("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
  }
  boolean isConst=t.ttype == TK_STRCONST;
  value=t.sval;
  t.next();
  if (t.ttype == ':') {
    t.next();
    if (t.ttype != TK_WORD) {
      throw new RoutesMapLoadException("String_Node_Str" + (t.ttype >= 0 ? (char)t.ttype : ' '));
    }
    type=t.sval;
    t.next();
  }
  if (isConst) {
    return new RouteParameter(value,type);
  }
 else {
    return new RouteParameter(Integer.parseInt(value),type);
  }
}
Program: 36659
Project: 36659
Buggy source:
public void load(InputStream input) throws NullPointerException, Exception {
  if (input == null) {
    throw new NullPointerException();
  }
  BufferedReader br=new BufferedReader(new InputStreamReader(input));
  RouteMapLoader mapLoader=new RouteMapLoader();
  extensions=mapLoader.load(input);
}

Fixed version (ground truth):
public void load(InputStream input) throws NullPointerException, RoutesMapLoadException {
  if (input == null) {
    throw new NullPointerException();
  }
  BufferedReader br=new BufferedReader(new InputStreamReader(input));
  RouteMapLoader mapLoader=new RouteMapLoader();
  extensions=mapLoader.load(input);
}
Program: 36661
Project: 36661
Buggy source:
public void loadFromResources(String path){
  try {
    load(Router.class.getResourceAsStream("String_Node_Str" + path));
    log.info("String_Node_Str",path);
  }
 catch (  Exception ex) {
    log.catching(ex);
  }
}

Fixed version (ground truth):
public void loadFromResources(String path){
  try {
    load(Router.class.getResourceAsStream("String_Node_Str" + path));
    log.info("String_Node_Str",path);
  }
 catch (  NullPointerException|RoutesMapLoadException ex) {
    log.catching(ex);
  }
}
Program: 36662
Project: 36662
Buggy source:
/** 
 * Constructs an instance of <code>BrookieTemplateNotFoundException</code> with the specified detail message.
 * @param msg the detail message.
 */
public TemplateNotFoundException(String msg){
  super(msg);
}

Fixed version (ground truth):
public TemplateNotFoundException(String msg){
  super(msg);
}
Program: 36663
Project: 36663
Buggy source:
/** 
 * Constructs an instance of <code>TemplateRenderException</code> with the specified detail message.
 * @param msg the detail message.
 */
public TemplateRenderException(String msg){
  super(msg);
}

Fixed version (ground truth):
public TemplateRenderException(String msg){
  super(msg);
}
Program: 36664
Project: 36664
Buggy source:
Language getLanguage();

Fixed version (ground truth):
/** 
 * @return language to use for API requests
 */
Language getLanguage();
Program: 36665
Project: 36665
Buggy source:
String getClientId();

Fixed version (ground truth):
/** 
 * @return client id
 */
String getClientId();
Program: 36666
Project: 36666
Buggy source:
HostsProvider getHostsProvider();

Fixed version (ground truth):
/** 
 * @return current host's provider
 */
HostsProvider getHostsProvider();
Program: 36667
Project: 36667
Buggy source:
void setAccessToken(String accessToken);

Fixed version (ground truth):
/** 
 * Sets access token to use when executing API requests.
 * @param accessToken access token to use
 */
void setAccessToken(String accessToken);
Program: 36668
Project: 36668
Buggy source:
<T>T execute(ApiRequest<T> request) throws Exception ;

Fixed version (ground truth):
/** 
 * Executes   {@link ApiRequest}.
 * @param request request to execute
 * @param < T > response document type
 * @return response document
 * @throws Exception if something goes wrong
 */
<T>T execute(ApiRequest<T> request) throws Exception ;
Program: 36669
Project: 36669
Buggy source:
public final Builder setPlatform(String platform){
  this.platform=checkNotEmpty(platform,"String_Node_Str");
  return this;
}

Fixed version (ground truth):
/** 
 * Sets platform. Default value 'Java'.
 * @param platform platform
 * @return itself
 */
public final Builder setPlatform(String platform){
  this.platform=checkNotEmpty(platform,"String_Node_Str");
  return this;
}
Program: 36670
Project: 36670
Buggy source:
protected void configHttpClient(OkHttpClient.Builder builder){
}

Fixed version (ground truth):
/** 
 * If required, subclasses may override this method to configure HTTP client.
 * @param builder this builder will be used to create HTTP client
 */
protected void configHttpClient(OkHttpClient.Builder builder){
}
Program: 36671
Project: 36671
Buggy source:
public final Builder setHostsProvider(HostsProvider hostsProvider){
  this.hostsProvider=checkNotNull(hostsProvider,"String_Node_Str");
  return this;
}

Fixed version (ground truth):
/** 
 * Sets hosts provider. Default value is an instance of   {@link DefaultApiV1HostsProvider}.
 * @param hostsProvider hosts provider
 * @return itself
 */
public final Builder setHostsProvider(HostsProvider hostsProvider){
  this.hostsProvider=checkNotNull(hostsProvider,"String_Node_Str");
  return this;
}
Program: 36672
Project: 36672
Buggy source:
protected DefaultApiClient(Builder builder){
  clientId=checkNotNull(builder.clientId,"String_Node_Str");
  hostsProvider=builder.hostsProvider;
  userAgent=new DefaultUserAgent(checkNotNull(builder,"String_Node_Str").platform);
  language=Language.getDefault();
  debugMode=builder.debugMode;
  OkHttpClient.Builder httpClientBuilder=createHttpClientBuilder();
  if (debugMode) {
    SSLSocketFactory sslSocketFactory=createSslSocketFactory();
    httpClientBuilder.sslSocketFactory(new WireLoggingSocketFactory(sslSocketFactory));
  }
  configHttpClient(httpClientBuilder);
  httpClient=httpClientBuilder.build();
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param builder provides required data to create an object
 */
protected DefaultApiClient(Builder builder){
  clientId=checkNotNull(builder.clientId,"String_Node_Str");
  hostsProvider=builder.hostsProvider;
  userAgent=new DefaultUserAgent(checkNotNull(builder,"String_Node_Str").platform);
  language=Language.getDefault();
  debugMode=builder.debugMode;
  OkHttpClient.Builder httpClientBuilder=createHttpClientBuilder();
  if (debugMode) {
    SSLSocketFactory sslSocketFactory=createSslSocketFactory();
    httpClientBuilder.sslSocketFactory(new WireLoggingSocketFactory(sslSocketFactory));
  }
  configHttpClient(httpClientBuilder);
  httpClient=httpClientBuilder.build();
}
Program: 36673
Project: 36673
Buggy source:
public final Builder setDebugMode(boolean debugMode){
  this.debugMode=debugMode;
  return this;
}

Fixed version (ground truth):
/** 
 * Sets debug mode. Enables logging. Default value is   {@code false}.
 * @param debugMode {@code true}, if debug mode is enabled
 * @return itself
 */
public final Builder setDebugMode(boolean debugMode){
  this.debugMode=debugMode;
  return this;
}
Program: 36674
Project: 36674
Buggy source:
public DefaultApiClient create(){
  return new DefaultApiClient(this);
}

Fixed version (ground truth):
/** 
 * Creates instance of   {@link DefaultApiClient}.
 * @return instance of {@link DefaultApiClient}
 */
public DefaultApiClient create(){
  return new DefaultApiClient(this);
}
Program: 36675
Project: 36675
Buggy source:
public final Builder setClientId(String clientId){
  this.clientId=clientId;
  return this;
}

Fixed version (ground truth):
/** 
 * Sets client id of   {@link DefaultApiClient}.
 * @param clientId client id
 * @return itself
 */
public final Builder setClientId(String clientId){
  this.clientId=clientId;
  return this;
}
Program: 36676
Project: 36676
Buggy source:
private static void logWire(String prefix,byte[] data,int off,int len) throws IOException {
  StringBuilder buffer=new StringBuilder(prefix).append("String_Node_Str").append(data.length).append("String_Node_Str").append(off).append("String_Node_Str").append(len).append('\n');
  for (int i=0; i < len; i++) {
    byte b=data[off + i];
    if (b == 13) {
      buffer.append("String_Node_Str");
    }
 else     if (b == 10) {
      buffer.append("String_Node_Str");
    }
 else     if (b < 32 || b > 127) {
      buffer.append("String_Node_Str").append(Numbers.byteToHex(b));
    }
 else {
      buffer.append((char)b);
    }
  }
  LOG.info(buffer.toString());
}

Fixed version (ground truth):
private static void logWire(String prefix,byte[] data,int off,int len){
  StringBuilder buffer=new StringBuilder(prefix).append("String_Node_Str").append(data.length).append("String_Node_Str").append(off).append("String_Node_Str").append(len).append('\n');
  for (int i=0; i < len; i++) {
    byte b=data[off + i];
    if (b == 13) {
      buffer.append("String_Node_Str");
    }
 else     if (b == 10) {
      buffer.append("String_Node_Str");
    }
 else     if (b < 32) {
      buffer.append("String_Node_Str").append(Numbers.byteToHex(b));
    }
 else {
      buffer.append((char)b);
    }
  }
  LOG.info(buffer.toString());
}
Program: 36677
Project: 36677
Buggy source:
/** 
 * @see {@link BasePaymentProcess#setAccessToken(String)}
 */
public void setAccessToken(String accessToken){
  client.setAccessToken(accessToken);
  invalidatePaymentContext();
}

Fixed version (ground truth):
/** 
 * @see BasePaymentProcess#setAccessToken(String)
 */
public void setAccessToken(String accessToken){
  client.setAccessToken(accessToken);
  invalidatePaymentContext();
}
Program: 36678
Project: 36678
Buggy source:
/** 
 * @see {@link ExternalPaymentProcess#setInstanceId(String)}
 */
public void setInstanceId(String instanceId){
  externalPaymentProcess.setInstanceId(instanceId);
}

Fixed version (ground truth):
/** 
 * @see ExternalPaymentProcess#setInstanceId(String)
 */
public void setInstanceId(String instanceId){
  externalPaymentProcess.setInstanceId(instanceId);
}
Program: 36679
Project: 36679
Buggy source:
/** 
 * Tests that complex showcase successfully proceeds two steps asynchronously.
 * @throws Exception
 */
@Test public void testProceedSuccess() throws Exception {
  final ShowcaseProcess showcaseProcess=initShowcaseProcess();
  final ShowcaseContext showcaseContext=showcaseProcess.showcaseContext;
  Showcase showcase=showcaseContext.getCurrentStep().showcase;
  final Text inn=(Text)showcase.form.items.get(0);
  inn.setValue(SAMPLE_INN);
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),1);
  showcase=showcaseContext.getCurrentStep().showcase;
  ((Text)showcase.form.items.get(0)).setValue("String_Node_Str");
  ((Select)showcase.form.items.get(1)).setValue("String_Node_Str");
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),2);
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),3);
}

Fixed version (ground truth):
/** 
 * Tests that complex showcase successfully proceeds two steps asynchronously.
 * @throws Exception if something goes wrong
 */
@Test public void testProceedSuccess() throws Exception {
  final ShowcaseProcess showcaseProcess=initShowcaseProcess();
  final ShowcaseContext showcaseContext=showcaseProcess.showcaseContext;
  Showcase showcase=showcaseContext.getCurrentStep().showcase;
  final Text inn=(Text)showcase.form.items.get(0);
  inn.setValue(SAMPLE_INN);
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),1);
  showcase=showcaseContext.getCurrentStep().showcase;
  ((Text)showcase.form.items.get(0)).setValue("String_Node_Str");
  ((Select)showcase.form.items.get(1)).setValue("String_Node_Str");
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),2);
  showcaseProcess.proceed();
  assertEquals(showcaseContext.getHistorySize(),3);
}
Program: 36680
Project: 36680
Buggy source:
static <T extends AccountInfo>void serialize(JsonObject object,T src){
  object.addProperty(MEMBER_ACCOUNT,src.account);
  object.addProperty(MEMBER_BALANCE,src.balance);
  object.addProperty(MEMBER_CURRENCY,src.currency.numericCode);
  object.addProperty(MEMBER_STATUS,src.accountStatus.code);
  object.addProperty(MEMBER_TYPE,src.accountType.code);
  object.add(MEMBER_BALANCE_DETAILS,BalanceDetailsTypeAdapter.getInstance().toJsonTree(src.balanceDetails));
}

Fixed version (ground truth):
static <T extends AccountInfo>void serialize(JsonObject object,T src){
  object.addProperty(MEMBER_ACCOUNT,src.account);
  object.addProperty(MEMBER_BALANCE,src.balance);
  object.addProperty(MEMBER_CURRENCY,src.currency.numericCode.toString());
  object.addProperty(MEMBER_STATUS,src.accountStatus.code);
  object.addProperty(MEMBER_TYPE,src.accountType.code);
  object.add(MEMBER_BALANCE_DETAILS,BalanceDetailsTypeAdapter.getInstance().toJsonTree(src.balanceDetails));
}
Program: 36681
Project: 36681
Buggy source:
@Test public void testProcessExternalPayment() throws IOException, InsufficientScopeException, InvalidTokenException, InvalidRequestException {
  reqRequestExternalPayment=createRequestExternalPayment();
  respRequestExternalPayment=session.execute(reqRequestExternalPayment);
  String successUri="String_Node_Str";
  String failUri="String_Node_Str";
  reqProcessExternalPayment=new ProcessExternalPayment.Request(respInstanceId.instanceId,respRequestExternalPayment.requestId,successUri,failUri,false);
  testProcessPayment(reqProcessExternalPayment);
}

Fixed version (ground truth):
@Test public void testProcessExternalPayment() throws IOException, InsufficientScopeException, InvalidTokenException, InvalidRequestException {
  reqRequestExternalPayment=createRequestExternalPayment();
  respRequestExternalPayment=session.execute(reqRequestExternalPayment);
  if (respRequestExternalPayment.status == BaseRequestPayment.Status.SUCCESS) {
    String successUri="String_Node_Str";
    String failUri="String_Node_Str";
    reqProcessExternalPayment=new ProcessExternalPayment.Request(respInstanceId.instanceId,respRequestExternalPayment.requestId,successUri,failUri,false);
    testProcessPayment(reqProcessExternalPayment);
  }
}
Program: 36682
Project: 36682
Buggy source:
/** 
 * Gets nullable array from a JSON object. Uses   {@link ArrayList} implementation of{@link List}.
 * @param object json object
 * @param memberName member's name
 * @param converter converter
 * @param < T > type of a value in the array
 * @return list of values
 */
public static <T>List<T> getArray(JsonObject object,String memberName,TypeAdapter<T> converter){
  checkParameters(object,memberName);
  JsonArray array=object.getAsJsonArray(memberName);
  if (array == null) {
    return new ArrayList<>();
  }
  if (converter == null) {
    throw new NullPointerException("String_Node_Str");
  }
  List<T> result=new ArrayList<>(array.size());
  for (  JsonElement element : array) {
    result.add(converter.fromJson(element));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Gets nullable array from a JSON object. Uses   {@link ArrayList} implementation of{@link List}.
 * @param object json object
 * @param memberName member's name
 * @param converter converter
 * @param < T > type of a value in the array
 * @return list of values
 */
public static <T>List<T> getArray(JsonObject object,String memberName,TypeAdapter<T> converter){
  checkParameters(object,memberName);
  JsonArray array=object.getAsJsonArray(memberName);
  if (array == null) {
    return null;
  }
  if (converter == null) {
    throw new NullPointerException("String_Node_Str");
  }
  List<T> result=new ArrayList<>(array.size());
  for (  JsonElement element : array) {
    result.add(converter.fromJson(element));
  }
  return result;
}
Program: 36683
Project: 36683
Buggy source:
private void fillPaymentParameters(Map<String,String> parameters,Group group){
  for (  Component component : group.items) {
    if (component instanceof Group) {
      fillPaymentParameters(parameters,(Group)component);
    }
 else     if (component instanceof Parameter) {
      Parameter parameter=(Parameter)component;
      parameters.put(parameter.getName(),parameter.getValue());
      if (component instanceof Select) {
        Group selectedGroup=((Select)component).getSelectedOption().group;
        if (selectedGroup != null) {
          fillPaymentParameters(parameters,selectedGroup);
        }
      }
    }
  }
}

Fixed version (ground truth):
private static void fillPaymentParameters(Map<String,String> parameters,Group group){
  for (  Component component : group.items) {
    if (component instanceof Group) {
      fillPaymentParameters(parameters,(Group)component);
    }
 else     if (component instanceof Parameter) {
      Parameter parameter=(Parameter)component;
      parameters.put(parameter.getName(),parameter.getValue());
      if (component instanceof Select) {
        Group selectedGroup=((Select)component).getSelectedOption().group;
        if (selectedGroup != null) {
          fillPaymentParameters(parameters,selectedGroup);
        }
      }
    }
  }
}
Program: 36684
Project: 36684
Buggy source:
public BaseTypeAdapter(){
  final Class<T> type=getType();
  if (registerAsHierarchy()) {
    registerTypeHierarchyAdapter(type,this);
  }
 else {
    registerTypeAdapter(type,this);
  }
}

Fixed version (ground truth):
public BaseTypeAdapter(){
  registerTypeHierarchyAdapter(getType(),this);
}
Program: 36685
Project: 36685
Buggy source:
@Override public JsonElement serialize(Error src,Type typeOfSrc,JsonSerializationContext context){
  JsonObject jsonObject=new JsonObject();
  jsonObject.addProperty("String_Node_Str",src.name);
  jsonObject.addProperty("String_Node_Str",src.alert);
  return jsonObject;
}

Fixed version (ground truth):
@Override public JsonElement serialize(Error src,Type typeOfSrc,JsonSerializationContext context){
  JsonObject jsonObject=new JsonObject();
  jsonObject.addProperty(MEMBER_NAME,src.name);
  jsonObject.addProperty(MEMBER_ALERT,src.alert);
  return jsonObject;
}
Program: 36686
Project: 36686
Buggy source:
private ShowcaseTypeAdapter(){
}

Fixed version (ground truth):
private ShowcaseTypeAdapter(){
  GroupTypeAdapter.getInstance();
}
Program: 36687
Project: 36687
Buggy source:
@Override public Error deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  JsonObject jsonObject=json.getAsJsonObject();
  return new Error(JsonUtils.getMandatoryString(jsonObject,MEMBER_NAME),JsonUtils.getMandatoryString(jsonObject,MEMBER_ALERT));
}

Fixed version (ground truth):
@Override public Error deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  JsonObject jsonObject=json.getAsJsonObject();
  return new Error(getString(jsonObject,MEMBER_NAME),getMandatoryString(jsonObject,MEMBER_ALERT));
}
Program: 36688
Project: 36688
Buggy source:
private GroupTypeAdapter(){
}

Fixed version (ground truth):
private GroupTypeAdapter(){
  NumberTypeAdapter.getInstance();
  AmountTypeAdapter.getInstance();
  CheckboxTypeAdapter.getInstance();
  DateTypeAdapter.getInstance();
  EmailTypeAdapter.getInstance();
  MonthTypeAdapter.getInstance();
  SelectTypeAdapter.getInstance();
  SubmitTypeAdapter.getInstance();
  TextAreaTypeAdapter.getInstance();
  TextTypeAdapter.getInstance();
  TelTypeAdapter.getInstance();
  ParagraphTypeAdapter.getInstance();
}
Program: 36689
Project: 36689
Buggy source:
public static Type getClassFromType(String code){
  return TYPE_MAPPING.get(Component.Type.parse(code));
}

Fixed version (ground truth):
private static Type getClassFromType(String code){
  return TYPE_MAPPING.get(Component.Type.parse(code));
}
Program: 36690
Project: 36690
Buggy source:
@Override protected Component deserializeItem(JsonElement json,JsonDeserializationContext context){
  return context.deserialize(json,ComponentTypeAdapterFactory.getClassFromType(json.getAsJsonObject().get("String_Node_Str").getAsString()));
}

Fixed version (ground truth):
@Override protected Component deserializeItem(JsonElement json,JsonDeserializationContext context){
  return context.deserialize(json,ComponentTypeAdapterFactory.getJsonComponentType(json));
}
Program: 36691
Project: 36691
Buggy source:
private static Group deserializeOptionGroup(JsonArray items,JsonDeserializationContext context){
  Group.Builder groupBuilder=new Group.Builder();
  groupBuilder.setLayout(Group.Layout.VERTICAL);
  for (  JsonElement item : items) {
    Component component=(Component)context.deserialize(item,ComponentTypeAdapterFactory.getClassFromType(item.getAsJsonObject().get("String_Node_Str").getAsString()));
    groupBuilder.addItem(component);
  }
  return groupBuilder.create();
}

Fixed version (ground truth):
private static Group deserializeOptionGroup(JsonArray items,JsonDeserializationContext context){
  Group.Builder groupBuilder=new Group.Builder();
  groupBuilder.setLayout(Group.Layout.VERTICAL);
  for (  JsonElement item : items) {
    Component component=context.deserialize(item,ComponentTypeAdapterFactory.getJsonComponentType(item));
    groupBuilder.addItem(component);
  }
  return groupBuilder.create();
}
Program: 36692
Project: 36692
Buggy source:
/** 
 * Gets nullable DateTime from a JSON object.
 * @param object json object
 * @param memberName member's name
 * @return {@link org.joda.time.DateTime} value
 */
public static DateTime getDateTime(JsonObject object,String memberName){
  JsonPrimitive primitive=getPrimitiveChecked(object,memberName);
  return primitive == null ? null : DateTime.parse(primitive.getAsString(),ISO_FORMATTER);
}

Fixed version (ground truth):
/** 
 * Gets nullable DateTime from a JSON object using formatter.
 * @param object     json object
 * @param memberName member's name
 * @param formatter  {@link org.joda.time.DateTime}'s formatter.
 * @return {@link org.joda.time.DateTime} value
 */
public static DateTime getDateTime(JsonObject object,String memberName,DateTimeFormatter formatter){
  JsonPrimitive primitive=getPrimitiveChecked(object,memberName);
  return primitive == null ? null : DateTime.parse(primitive.getAsString(),formatter);
}
Program: 36693
Project: 36693
Buggy source:
@Override protected JsonElement serializeItem(Component item,JsonSerializationContext context){
  return context.serialize(item,mapping.get(item.type));
}

Fixed version (ground truth):
@Override protected JsonElement serializeItem(Component item,JsonSerializationContext context){
  return context.serialize(item,item.getClass());
}
Program: 36694
Project: 36694
Buggy source:
@Override protected Component deserializeItem(JsonElement json,JsonDeserializationContext context){
  Component.Type type=Component.Type.parse(json.getAsJsonObject().get("String_Node_Str").getAsString());
  return context.deserialize(json,mapping.get(type));
}

Fixed version (ground truth):
@Override protected Component deserializeItem(JsonElement json,JsonDeserializationContext context){
  return context.deserialize(json,ComponentTypeAdapterFactory.getClassFromType(json.getAsJsonObject().get("String_Node_Str").getAsString()));
}
Program: 36695
Project: 36695
Buggy source:
@Override protected void serialize(Amount from,JsonObject to,JsonSerializationContext context){
  super.serialize(from,to,context);
}

Fixed version (ground truth):
@Override protected void serialize(Amount from,JsonObject to,JsonSerializationContext context){
  to.addProperty(KEY_CURRENCY,from.currency.alphaCode);
  to.add(KEY_FEE,context.serialize(from.fee,Fee.class));
  super.serialize(from,to,context);
}
Program: 36696
Project: 36696
Buggy source:
@Override protected void serialize(T from,JsonObject to,JsonSerializationContext context){
  to.addProperty(KEY_ALERT,from.alert);
  to.addProperty(KEY_HINT,from.hint);
  to.addProperty(KEY_LABEL,from.label);
  to.addProperty(KEY_READONLY,from.readonly);
  to.addProperty(KEY_REQUIRED,from.required);
}

Fixed version (ground truth):
@Override protected void serialize(T from,JsonObject to,JsonSerializationContext context){
  to.addProperty(KEY_ALERT,from.alert);
  to.addProperty(KEY_HINT,from.hint);
  to.addProperty(KEY_LABEL,from.label);
  if (from.readonly) {
    to.addProperty(KEY_READONLY,true);
  }
  if (!from.required) {
    to.addProperty(KEY_REQUIRED,false);
  }
}
Program: 36697
Project: 36697
Buggy source:
@Override protected void deserialize(JsonObject from,U builder,JsonDeserializationContext context){
  builder.setAlert(JsonUtils.getString(from,KEY_ALERT));
  builder.setHint(JsonUtils.getString(from,KEY_HINT));
  builder.setLabel(JsonUtils.getString(from,KEY_LABEL));
  builder.setReadonly(JsonUtils.getBoolean(from,KEY_READONLY));
  builder.setRequired(JsonUtils.getBoolean(from,KEY_REQUIRED));
}

Fixed version (ground truth):
@Override protected void deserialize(JsonObject from,U builder,JsonDeserializationContext context){
  builder.setAlert(JsonUtils.getString(from,KEY_ALERT));
  builder.setHint(JsonUtils.getString(from,KEY_HINT));
  builder.setLabel(JsonUtils.getString(from,KEY_LABEL));
  if (from.has(KEY_READONLY)) {
    builder.setReadonly(from.get(KEY_READONLY).getAsBoolean());
  }
  if (from.has(KEY_REQUIRED)) {
    builder.setRequired(from.get(KEY_REQUIRED).getAsBoolean());
  }
}
Program: 36698
Project: 36698
Buggy source:
@Override protected void serialize(Date from,JsonObject to,JsonSerializationContext context){
  super.serialize(from,to,context);
}

Fixed version (ground truth):
@Override protected void serialize(T from,JsonObject to,JsonSerializationContext context){
  to.addProperty(KEY_MIN,from.min.toString(getFormatter()));
  to.addProperty(KEY_MAX,from.max.toString(getFormatter()));
  super.serialize(from,to,context);
}
Program: 36699
Project: 36699
Buggy source:
@Override protected void deserialize(JsonObject from,Date.Builder builder,JsonDeserializationContext context){
  builder.setMin(JsonUtils.getDateTime(from,KEY_MIN));
  builder.setMax(JsonUtils.getDateTime(from,KEY_MAX));
  super.deserialize(from,builder,context);
}

Fixed version (ground truth):
@Override protected void deserialize(JsonObject from,U builder,JsonDeserializationContext context){
  builder.setMin(JsonUtils.getDateTime(from,KEY_MIN,getFormatter()));
  builder.setMax(JsonUtils.getDateTime(from,KEY_MAX,getFormatter()));
  super.deserialize(from,builder,context);
}
Program: 36700
Project: 36700
Buggy source:
@Override protected void deserialize(JsonObject from,Select.Builder builder,JsonDeserializationContext context){
  for (  JsonElement item : from.getAsJsonArray(KEY_OPTIONS)) {
    JsonObject itemObject=item.getAsJsonObject();
    Select.Option option=new Select.Option(itemObject.get(KEY_LABEL).getAsString(),itemObject.get(KEY_VALUE).getAsString());
    if (itemObject.has(KEY_GROUP)) {
      option.group=context.deserialize(item,Group.class);
    }
    builder.addOption(option);
  }
  builder.setStyle(Select.Style.parse(JsonUtils.getString(from,KEY_STYLE)));
  super.deserialize(from,builder,context);
}

Fixed version (ground truth):
@Override protected void deserialize(JsonObject from,Select.Builder builder,JsonDeserializationContext context){
  for (  JsonElement item : from.getAsJsonArray(KEY_OPTIONS)) {
    JsonObject itemObject=item.getAsJsonObject();
    Select.Option option=new Select.Option(itemObject.get(KEY_LABEL).getAsString(),itemObject.get(KEY_VALUE).getAsString());
    if (itemObject.has(KEY_GROUP)) {
      option.group=context.deserialize(itemObject.get(KEY_GROUP),Group.class);
    }
    builder.addOption(option);
  }
  builder.setStyle(Select.Style.parse(JsonUtils.getString(from,KEY_STYLE)));
  super.deserialize(from,builder,context);
}
Program: 36701
Project: 36701
Buggy source:
public Map<String,String> makeParams(){
  Map<String,String> result=new HashMap<String,String>();
  result.put(PARAM_TO,to);
switch (toType) {
case ACCOUNT:
    result.put(PARAM_TO_TYPE,"String_Node_Str");
case PHONE:
  result.put(PARAM_TO_TYPE,"String_Node_Str");
}
result.put(PARAM_AMOUNT_DUE,amountDue.toString());
if (!Utils.isEmpty(message)) {
result.put(PARAM_MESSAGE,message);
}
return result;
}

Fixed version (ground truth):
public Map<String,String> makeParams(){
  Map<String,String> result=new HashMap<String,String>();
  result.put(PARAM_TO,to);
switch (toType) {
case ACCOUNT:
    result.put(PARAM_TO_TYPE,"String_Node_Str");
  break;
case PHONE:
result.put(PARAM_TO_TYPE,"String_Node_Str");
break;
}
result.put(PARAM_AMOUNT_DUE,amountDue.toString());
if (!Utils.isEmpty(message)) {
result.put(PARAM_MESSAGE,message);
}
return result;
}
Program: 36703
Project: 36703
Buggy source:
@Override public Future<T> consume(Consumer<T> consumer){
  FutureWithTrigger<T> nextFuture=new FutureWithTrigger<>();
  FutureWithTrigger.this.callbackLink.setCallbackTo(new Callback<T>(){
    @Override public void completed(    T result){
      try {
        consumer.accept(result);
      }
 catch (      Exception e) {
        this.failed(e);
      }
      nextFuture.getTrigger().completed(result);
    }
    @Override public void failed(    Exception throwable){
      nextFuture.getTrigger().failed(throwable);
    }
  }
);
  return nextFuture.getFuture();
}

Fixed version (ground truth):
@Override public Future<T> consume(Consumer<T> consumer){
  FutureWithTrigger<T> nextFuture=new FutureWithTrigger<>();
  FutureWithTrigger.this.callbackLink.setCallbackTo(new Callback<T>(){
    @Override public void completed(    T result){
      try {
        consumer.accept(result);
      }
 catch (      Exception e) {
        this.failed(e);
        return;
      }
      nextFuture.getTrigger().completed(result);
    }
    @Override public void failed(    Exception throwable){
      nextFuture.getTrigger().failed(throwable);
    }
  }
);
  return nextFuture.getFuture();
}