nus-yam/ex-repair huggingface dataset:
Program: 79957
Project: 79957
Buggy source:
public XPCollector(Category category,ItemStack item,String name,RecipeType recipeType,ItemStack[] recipe){
  super(category,item,name,recipeType,recipe);
  new BlockMenuPreset(name,"String_Node_Str"){
    @Override public void init(){
      constructMenu(this);
    }
    @Override public void newInstance(    BlockMenu menu,    Block b){
    }
    @Override public boolean canOpen(    Block b,    Player p){
      return p.hasPermission("String_Node_Str") || CSCoreLib.getLib().getProtectionManager().canAccessChest(p.getUniqueId(),b,true);
    }
    @Override public int[] getSlotsAccessedByItemTransport(    ItemTransportFlow flow){
      if (flow.equals(ItemTransportFlow.WITHDRAW))       return getOutputSlots();
      return new int[0];
    }
  }
;
  registerBlockHandler(name,new SlimefunBlockHandler(){
    @Override public void onPlace(    Player p,    Block b,    SlimefunItem item){
      BlockStorage.addBlockInfo(b,"String_Node_Str",p.getUniqueId().toString());
    }
    @Override public boolean onBreak(    Player p,    Block b,    SlimefunItem item,    UnregisterReason reason){
      me.mrCookieSlime.Slimefun.holograms.XPCollector.getArmorStand(b).remove();
      for (      int slot : getOutputSlots()) {
        if (BlockStorage.getInventory(b).getItemInSlot(slot) != null)         b.getWorld().dropItemNaturally(b.getLocation(),BlockStorage.getInventory(b).getItemInSlot(slot));
      }
      return true;
    }
  }
);
}

Fixed version (ground truth):
public XPCollector(Category category,ItemStack item,String name,RecipeType recipeType,ItemStack[] recipe){
  super(category,item,name,recipeType,recipe);
  new BlockMenuPreset(name,"String_Node_Str"){
    @Override public void init(){
      constructMenu(this);
    }
    @Override public void newInstance(    BlockMenu menu,    Block b){
    }
    @Override public boolean canOpen(    Block b,    Player p){
      return p.hasPermission("String_Node_Str") || CSCoreLib.getLib().getProtectionManager().canAccessChest(p.getUniqueId(),b,true);
    }
    @Override public int[] getSlotsAccessedByItemTransport(    ItemTransportFlow flow){
      if (flow.equals(ItemTransportFlow.WITHDRAW))       return getOutputSlots();
      return new int[0];
    }
  }
;
  registerBlockHandler(name,new SlimefunBlockHandler(){
    @Override public void onPlace(    Player p,    Block b,    SlimefunItem item){
      BlockStorage.addBlockInfo(b,"String_Node_Str",p.getUniqueId().toString());
    }
    @Override public boolean onBreak(    Player p,    Block b,    SlimefunItem item,    UnregisterReason reason){
      me.mrCookieSlime.Slimefun.holograms.XPCollector.getArmorStand(b).remove();
      for (      int slot : getOutputSlots()) {
        if (BlockStorage.getInventory(b).getItemInSlot(slot) != null) {
          b.getWorld().dropItemNaturally(b.getLocation(),BlockStorage.getInventory(b).getItemInSlot(slot));
          BlockStorage.getInventory(b).replaceExistingItem(slot,null);
        }
      }
      return true;
    }
  }
);
}
Program: 79958
Project: 79958
Buggy source:
@EventHandler public void onPickup(PlayerPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith("String_Node_Str")) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}

Fixed version (ground truth):
@EventHandler public void onPickup(PlayerPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ChatColor.translateAlternateColorCodes('&',"String_Node_Str"))) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}
Program: 79959
Project: 79959
Buggy source:
@EventHandler public void onMinecartPickup(InventoryPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith("String_Node_Str")) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}

Fixed version (ground truth):
@EventHandler public void onMinecartPickup(InventoryPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ChatColor.translateAlternateColorCodes('&',"String_Node_Str"))) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}
Program: 79960
Project: 79960
Buggy source:
@EventHandler public void onPickup(EntityPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith("String_Node_Str")) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}

Fixed version (ground truth):
@EventHandler public void onPickup(EntityPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ChatColor.translateAlternateColorCodes('&',"String_Node_Str"))) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}
Program: 79961
Project: 79961
Buggy source:
@EventHandler public void onMinecartPickup(InventoryPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith("String_Node_Str")) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}

Fixed version (ground truth):
@EventHandler public void onMinecartPickup(InventoryPickupItemEvent e){
  if (e.getItem().hasMetadata("String_Node_Str"))   e.setCancelled(true);
 else   if (!e.getItem().hasMetadata("String_Node_Str") && e.getItem().getItemStack().hasItemMeta() && e.getItem().getItemStack().getItemMeta().hasDisplayName()&& e.getItem().getItemStack().getItemMeta().getDisplayName().startsWith(ChatColor.translateAlternateColorCodes('&',"String_Node_Str"))) {
    e.setCancelled(true);
    e.getItem().remove();
  }
}
Program: 79962
Project: 79962
Buggy source:
public static String toString(SlimefunItem item){
  StringBuilder builder=new StringBuilder(LENGTH * 2);
  for (  char c : item.getHash().toCharArray()) {
    builder.append('§');
    builder.append(c);
  }
  return builder.toString();
}

Fixed version (ground truth):
public static String toString(SlimefunItem item){
  StringBuilder builder=new StringBuilder(LENGTH * 2);
  for (  char c : item.getHash().toCharArray()) {
    builder.append('�');
    builder.append(c);
  }
  return builder.toString();
}
Program: 79964
Project: 79964
Buggy source:
public static boolean chance(int max,int percentage){
  if (max < 1)   return 0;
  return CSCoreLib.randomizer().nextInt(max) <= percentage;
}

Fixed version (ground truth):
public static boolean chance(int max,int percentage){
  if (max < 1)   return false;
  return CSCoreLib.randomizer().nextInt(max) <= percentage;
}
Program: 79965
Project: 79965
Buggy source:
protected void tick(Block b) throws Exception {
  Iterator<Entity> iterator=me.mrCookieSlime.Slimefun.holograms.XPCollector.getArmorStand(b).getNearbyEntities(4D,4D,4D).iterator();
  while (iterator.hasNext()) {
    Entity n=iterator.next();
    if (n instanceof ExperienceOrb) {
      if (ChargableBlock.getCharge(b) < getEnergyConsumption())       return;
      int xp=getEXP(b) + ((ExperienceOrb)n).getExperience();
      ChargableBlock.addCharge(b,-getEnergyConsumption());
      n.remove();
      int withdrawn=0;
      for (int level=0; level < getEXP(b); level=level + 10) {
        if (fits(b,new CustomItem(Material.EXP_BOTTLE,"String_Node_Str",0))) {
          withdrawn=withdrawn + 10;
          pushItems(b,new CustomItem(Material.EXP_BOTTLE,"String_Node_Str",0));
        }
      }
      BlockStorage.addBlockInfo(b,"String_Node_Str",String.valueOf(xp - withdrawn));
      return;
    }
  }
}

Fixed version (ground truth):
protected void tick(Block b) throws Exception {
  Iterator<Entity> iterator=me.mrCookieSlime.Slimefun.holograms.XPCollector.getArmorStand(b).getNearbyEntities(4D,4D,4D).iterator();
  while (iterator.hasNext()) {
    Entity n=iterator.next();
    if (n instanceof ExperienceOrb) {
      if (ChargableBlock.getCharge(b) < getEnergyConsumption())       return;
      if (!n.isValid())       return;
      int xp=getEXP(b) + ((ExperienceOrb)n).getExperience();
      ChargableBlock.addCharge(b,-getEnergyConsumption());
      n.remove();
      int withdrawn=0;
      for (int level=0; level < getEXP(b); level=level + 10) {
        if (fits(b,new CustomItem(Material.EXP_BOTTLE,"String_Node_Str",0))) {
          withdrawn=withdrawn + 10;
          pushItems(b,new CustomItem(Material.EXP_BOTTLE,"String_Node_Str",0));
        }
      }
      BlockStorage.addBlockInfo(b,"String_Node_Str",String.valueOf(xp - withdrawn));
      return;
    }
  }
}
Program: 79966
Project: 79966
Buggy source:
public void close(){
  for (  HumanEntity human : toInventory().getViewers()) {
    human.closeInventory();
  }
}

Fixed version (ground truth):
public void close(){
  Iterator<HumanEntity> iterator=toInventory().getViewers().iterator();
  while (iterator.hasNext()) {
    HumanEntity human=iterator.next();
    human.closeInventory();
  }
}
Program: 79972
Project: 79972
Buggy source:
@EventHandler public void onArrowHit(final ProjectileHitEvent e){
  Bukkit.getScheduler().scheduleSyncDelayedTask(SlimefunStartup.instance,new Runnable(){
    @Override public void run(){
      if (Variables.arrows.containsKey(e.getEntity().getUniqueId()))       Variables.arrows.remove(e.getEntity().getUniqueId());
      handleGrapplingHook((Arrow)e.getEntity());
    }
  }
,3L);
}

Fixed version (ground truth):
@EventHandler public void onArrowHit(final ProjectileHitEvent e){
  Bukkit.getScheduler().scheduleSyncDelayedTask(SlimefunStartup.instance,new Runnable(){
    @Override public void run(){
      if (Variables.arrows.containsKey(e.getEntity().getUniqueId()))       Variables.arrows.remove(e.getEntity().getUniqueId());
      if (e.getEntity() instanceof Arrow)       handleGrapplingHook((Arrow)e.getEntity());
    }
  }
,3L);
}
Program: 79973
Project: 79973
Buggy source:
@Override public ODomain defaultDomain(){
  ODomain domain=new ODomain();
  if (getOdooVersion().getVersion_number() <= 7) {
    domain.add("String_Node_Str");
    domain.add("String_Node_Str","String_Node_Str",getUser().getUser_id());
    domain.add("String_Node_Str","String_Node_Str",getUser().getPartner_id());
  }
 else {
    domain.add("String_Node_Str","String_Node_Str",getUser().getPartner_id());
  }
  return domain;
}

Fixed version (ground truth):
@Override public ODomain defaultDomain(){
  ODomain domain=new ODomain();
  if (getOdooVersion().getVersion_number() <= 7) {
    domain.add("String_Node_Str");
    domain.add("String_Node_Str","String_Node_Str",getUser().getUser_id());
    domain.add("String_Node_Str","String_Node_Str",new JSONArray().put(getUser().getPartner_id()));
  }
 else {
    domain.add("String_Node_Str","String_Node_Str",new JSONArray().put(getUser().getPartner_id()));
  }
  domain.add("String_Node_Str","String_Node_Str",false);
  return domain;
}
Program: 79974
Project: 79974
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.sale_detail);
  OActionBarUtils.setActionBar(this,true);
  actionBar=getSupportActionBar();
  sale=new SaleOrder(this,null);
  extra=getIntent().getExtras();
  mType=Type.valueOf(extra.getString("String_Node_Str"));
  currencyObj=sale.currency();
  init();
  initAdapter();
  partner=new ResPartner(this,null);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.sale_detail);
  OActionBarUtils.setActionBar(this,true);
  actionBar=getSupportActionBar();
  sale=new SaleOrder(this,null);
  extra=getIntent().getExtras();
  mType=Type.valueOf(extra.getString("String_Node_Str"));
  currencyObj=sale.currency();
  partner=new ResPartner(this,null);
  products=new ProductProduct(this,null);
  init();
  initAdapter();
}
Program: 79975
Project: 79975
Buggy source:
private void initAdapter(){
  mList=(ExpandableListControl)findViewById(R.id.expListOrderLine);
  mList.setVisibility(View.VISIBLE);
  if (extra != null && record != null) {
    List<ODataRow> lines=record.getO2MRecord("String_Node_Str").browseEach();
    for (    ODataRow line : lines) {
      int product_id=line.getInt("String_Node_Str");
      if (product_id != 0) {
        lineValues.put(product_id + "String_Node_Str",line.getFloat("String_Node_Str"));
        lineIds.put(product_id + "String_Node_Str",line.getInt("String_Node_Str"));
      }
    }
    objects.addAll(lines);
  }
  mAdapter=mList.getAdapter(R.layout.sale_order_line_item,objects,new ExpandableListControl.ExpandableListAdapterGetViewListener(){
    @Override public View getView(    int position,    View mView,    ViewGroup parent){
      ODataRow row=(ODataRow)mAdapter.getItem(position);
      OControls.setText(mView,R.id.edtName,row.getString("String_Node_Str"));
      OControls.setText(mView,R.id.edtProductQty,row.getString("String_Node_Str"));
      OControls.setText(mView,R.id.edtProductPrice,String.format("String_Node_Str",row.getFloat("String_Node_Str")));
      OControls.setText(mView,R.id.edtSubTotal,String.format("String_Node_Str",row.getFloat("String_Node_Str")));
      return mView;
    }
  }
);
  mAdapter.notifyDataSetChanged(objects);
}

Fixed version (ground truth):
private void initAdapter(){
  mList=(ExpandableListControl)findViewById(R.id.expListOrderLine);
  mList.setVisibility(View.VISIBLE);
  if (extra != null && record != null) {
    List<ODataRow> lines=record.getO2MRecord("String_Node_Str").browseEach();
    for (    ODataRow line : lines) {
      int product_id=products.selectServerId(line.getInt("String_Node_Str"));
      if (product_id != 0) {
        lineValues.put(product_id + "String_Node_Str",line.getFloat("String_Node_Str"));
        lineIds.put(product_id + "String_Node_Str",line.getInt("String_Node_Str"));
      }
    }
    objects.addAll(lines);
  }
  mAdapter=mList.getAdapter(R.layout.sale_order_line_item,objects,new ExpandableListControl.ExpandableListAdapterGetViewListener(){
    @Override public View getView(    int position,    View mView,    ViewGroup parent){
      ODataRow row=(ODataRow)mAdapter.getItem(position);
      OControls.setText(mView,R.id.edtName,row.getString("String_Node_Str"));
      OControls.setText(mView,R.id.edtProductQty,row.getString("String_Node_Str"));
      OControls.setText(mView,R.id.edtProductPrice,String.format("String_Node_Str",row.getFloat("String_Node_Str")));
      OControls.setText(mView,R.id.edtSubTotal,String.format("String_Node_Str",row.getFloat("String_Node_Str")));
      return mView;
    }
  }
);
  mAdapter.notifyDataSetChanged(objects);
}
Program: 79977
Project: 79977
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.base_about);
  OActionBarUtils.setActionBar(this,true);
  setTitle("String_Node_Str");
  findViewById(R.id.abtus_header).setOnClickListener(this);
  TextView versionName, aboutLine2, aboutLine3, aboutLine4;
  versionName=(TextView)findViewById(R.id.txvVersionName);
  handler=getWindow().getDecorView().getHandler();
  try {
    PackageManager packageManager=getPackageManager();
    String version=packageManager.getPackageInfo(getPackageName(),0).versionName;
    String versionCode=packageManager.getPackageInfo(getPackageName(),0).versionCode + "String_Node_Str";
    versionName.setText(getResources().getString(R.string.label_version) + "String_Node_Str" + version+ "String_Node_Str"+ versionCode+ "String_Node_Str");
    aboutLine2=(TextView)findViewById(R.id.line2);
    if (aboutLine2 != null) {
      aboutLine2.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine3=(TextView)findViewById(R.id.line3);
    if (aboutLine3 != null) {
      aboutLine3.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine4=(TextView)findViewById(R.id.line4);
    if (aboutLine4 != null) {
      aboutLine4.setMovementMethod(LinkMovementMethod.getInstance());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.base_about);
  OActionBarUtils.setActionBar(this,true);
  setTitle("String_Node_Str");
  findViewById(R.id.abtus_header).setOnClickListener(this);
  TextView versionName, aboutLine2, aboutLine3, aboutLine4;
  versionName=(TextView)findViewById(R.id.txvVersionName);
  handler=new Handler();
  try {
    PackageManager packageManager=getPackageManager();
    String version=packageManager.getPackageInfo(getPackageName(),0).versionName;
    String versionCode=packageManager.getPackageInfo(getPackageName(),0).versionCode + "String_Node_Str";
    versionName.setText(getResources().getString(R.string.label_version) + "String_Node_Str" + version+ "String_Node_Str"+ versionCode+ "String_Node_Str");
    aboutLine2=(TextView)findViewById(R.id.line2);
    if (aboutLine2 != null) {
      aboutLine2.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine3=(TextView)findViewById(R.id.line3);
    if (aboutLine3 != null) {
      aboutLine3.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine4=(TextView)findViewById(R.id.line4);
    if (aboutLine4 != null) {
      aboutLine4.setMovementMethod(LinkMovementMethod.getInstance());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 79978
Project: 79978
Buggy source:
public void setLastSyncDateTimeToNow(OModel model){
  Log.i(TAG,"String_Node_Str" + model.getModelName());
  OValues values=new OValues();
  values.put("String_Node_Str",model.getModelName());
  values.put("String_Node_Str",ODateUtils.getUTCDate());
  insertOrUpdate("String_Node_Str",new String[]{model.getModelName()},values);
}

Fixed version (ground truth):
public void setLastSyncDateTimeToNow(OModel model){
  Log.i(TAG,"String_Node_Str" + model.getModelName());
  OValues values=new OValues();
  values.put("String_Node_Str",model.getModelName());
  Date last_sync=ODateUtils.createDateObject(ODateUtils.getUTCDate(),ODateUtils.DEFAULT_FORMAT,true);
  Calendar cal=Calendar.getInstance();
  cal.setTime(last_sync);
  cal.set(Calendar.SECOND,cal.get(Calendar.SECOND) + 2);
  last_sync=cal.getTime();
  values.put("String_Node_Str",ODateUtils.getDate(last_sync,ODateUtils.DEFAULT_FORMAT));
  insertOrUpdate("String_Node_Str",new String[]{model.getModelName()},values);
}
Program: 79979
Project: 79979
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.base_about);
  OActionBarUtils.setActionBar(this,true);
  setTitle("String_Node_Str");
  findViewById(R.id.abtus_header).setOnClickListener(this);
  TextView versionName, aboutLine2, aboutLine3, aboutLine4;
  versionName=(TextView)findViewById(R.id.txvVersionName);
  handler=getWindow().getDecorView().getHandler();
  try {
    PackageManager packageManager=getPackageManager();
    String version=packageManager.getPackageInfo(getPackageName(),0).versionName;
    String versionCode=packageManager.getPackageInfo(getPackageName(),0).versionCode + "String_Node_Str";
    versionName.setText(getResources().getString(R.string.label_version) + "String_Node_Str" + version+ "String_Node_Str"+ versionCode+ "String_Node_Str");
    aboutLine2=(TextView)findViewById(R.id.line2);
    if (aboutLine2 != null) {
      aboutLine2.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine3=(TextView)findViewById(R.id.line3);
    if (aboutLine3 != null) {
      aboutLine3.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine4=(TextView)findViewById(R.id.line4);
    if (aboutLine4 != null) {
      aboutLine4.setMovementMethod(LinkMovementMethod.getInstance());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.base_about);
  OActionBarUtils.setActionBar(this,true);
  setTitle("String_Node_Str");
  findViewById(R.id.abtus_header).setOnClickListener(this);
  TextView versionName, aboutLine2, aboutLine3, aboutLine4;
  versionName=(TextView)findViewById(R.id.txvVersionName);
  handler=new Handler();
  try {
    PackageManager packageManager=getPackageManager();
    String version=packageManager.getPackageInfo(getPackageName(),0).versionName;
    String versionCode=packageManager.getPackageInfo(getPackageName(),0).versionCode + "String_Node_Str";
    versionName.setText(getResources().getString(R.string.label_version) + "String_Node_Str" + version+ "String_Node_Str"+ versionCode+ "String_Node_Str");
    aboutLine2=(TextView)findViewById(R.id.line2);
    if (aboutLine2 != null) {
      aboutLine2.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine3=(TextView)findViewById(R.id.line3);
    if (aboutLine3 != null) {
      aboutLine3.setMovementMethod(LinkMovementMethod.getInstance());
    }
    aboutLine4=(TextView)findViewById(R.id.line4);
    if (aboutLine4 != null) {
      aboutLine4.setMovementMethod(LinkMovementMethod.getInstance());
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 79980
Project: 79980
Buggy source:
public void exportDB(){
  FileChannel source=null;
  FileChannel destination=null;
  String currentDBPath=getDatabaseLocalPath();
  String backupDBPath=OStorageUtils.getDirectoryPath("String_Node_Str") + "String_Node_Str" + getDatabaseName();
  File currentDB=new File(currentDBPath);
  File backupDB=new File(backupDBPath);
  try {
    source=new FileInputStream(currentDB).getChannel();
    destination=new FileOutputStream(backupDB).getChannel();
    destination.transferFrom(source,0,source.size());
    source.close();
    destination.close();
    String subject="String_Node_Str" + getDatabaseName();
    Uri uri=Uri.fromFile(backupDB);
    Intent intent=new Intent(Intent.ACTION_SEND);
    intent.putExtra(Intent.EXTRA_STREAM,uri);
    intent.putExtra(Intent.EXTRA_SUBJECT,subject);
    intent.setType("String_Node_Str");
    mContext.startActivity(intent);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void exportDB(){
  FileChannel source;
  FileChannel destination;
  String currentDBPath=getDatabaseLocalPath();
  String backupDBPath=OStorageUtils.getDirectoryPath("String_Node_Str") + "String_Node_Str" + getDatabaseName();
  File currentDB=new File(currentDBPath);
  File backupDB=new File(backupDBPath);
  try {
    source=new FileInputStream(currentDB).getChannel();
    destination=new FileOutputStream(backupDB).getChannel();
    destination.transferFrom(source,0,source.size());
    source.close();
    destination.close();
    String subject="String_Node_Str" + getDatabaseName();
    Uri uri=Uri.fromFile(backupDB);
    Intent intent=new Intent(Intent.ACTION_SEND);
    intent.putExtra(Intent.EXTRA_STREAM,uri);
    intent.putExtra(Intent.EXTRA_SUBJECT,subject);
    intent.setType("String_Node_Str");
    mContext.startActivity(intent);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 79981
Project: 79981
Buggy source:
public String getLastSyncDateTime(){
  IrModel model=new IrModel(mContext,mUser);
  List<ODataRow> records=model.select(null,"String_Node_Str",new String[]{getModelName()});
  if (records.size() > 0) {
    return records.get(0).getString("String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
public String getLastSyncDateTime(){
  IrModel model=new IrModel(mContext,mUser);
  List<ODataRow> records=model.select(null,"String_Node_Str",new String[]{getModelName()});
  if (records.size() > 0) {
    String date=records.get(0).getString("String_Node_Str");
    Date write_date=ODateUtils.createDateObject(date,ODateUtils.DEFAULT_FORMAT,true);
    Calendar cal=Calendar.getInstance();
    cal.setTime(write_date);
    cal.set(Calendar.SECOND,cal.get(Calendar.SECOND) + 2);
    write_date=cal.getTime();
    return ODateUtils.getDate(write_date,ODateUtils.DEFAULT_FORMAT);
  }
  return null;
}
Program: 79983
Project: 79983
Buggy source:
/** 
 * Creates locally created record on server (id with zero)
 * @param model model object
 */
private void createRecordsOnServer(OModel model){
  List<ODataRow> records=model.select(null,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  int counter=0;
  for (  ODataRow record : records) {
    int id=createOnServer(model,JSONUtils.createJSONValues(model,record));
    if (id != OModel.INVALID_ROW_ID) {
      OValues values=new OValues();
      values.put("String_Node_Str",id);
      values.put("String_Node_Str","String_Node_Str");
      values.put("String_Node_Str",ODateUtils.getUTCDate());
      model.update(record.getInt(OColumn.ROW_ID),values);
      counter++;
    }
 else {
      Log.e(TAG,"String_Node_Str");
    }
  }
  if (counter == records.size()) {
    Log.i(TAG,counter + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Creates locally created record on server (id with zero)
 * @param model model object
 */
private void createRecordsOnServer(OModel model){
  List<ODataRow> records=model.select(null,"String_Node_Str",new String[]{"String_Node_Str","String_Node_Str"});
  int counter=0;
  for (  ODataRow record : records) {
    if (validateRelationRecords(model,record)) {
      if (model.selectServerId(record.getInt(OColumn.ROW_ID)) == 0) {
        int id=createOnServer(model,JSONUtils.createJSONValues(model,record));
        if (id != OModel.INVALID_ROW_ID) {
          OValues values=new OValues();
          values.put("String_Node_Str",id);
          values.put("String_Node_Str","String_Node_Str");
          values.put("String_Node_Str",ODateUtils.getUTCDate());
          model.update(record.getInt(OColumn.ROW_ID),values);
          counter++;
        }
 else {
          Log.e(TAG,"String_Node_Str");
        }
      }
    }
  }
  if (counter == records.size()) {
    Log.i(TAG,counter + "String_Node_Str");
  }
}
Program: 79984
Project: 79984
Buggy source:
private void showSignInErrorNotification(OUser user){
  ONotificationBuilder builder=new ONotificationBuilder(mContext,REQUEST_SIGN_IN_ERROR);
  builder.setTitle("String_Node_Str");
  builder.setBigText("String_Node_Str" + "String_Node_Str");
  builder.setIcon(R.drawable.ic_action_alert_warning);
  builder.setText(user.getAndroidName());
  builder.allowVibrate(true);
  builder.withRingTone(false);
  builder.setOngoing(true);
  builder.withLargeIcon(false);
  builder.setColor(R.color.android_orange_dark);
  Bundle extra=user.getAsBundle();
  ONotificationBuilder.NotificationAction actionReset=new ONotificationBuilder.NotificationAction(R.drawable.ic_action_refresh,"String_Node_Str",110,"String_Node_Str",OdooAccountQuickManage.class,extra);
  ONotificationBuilder.NotificationAction deleteAccount=new ONotificationBuilder.NotificationAction(R.drawable.ic_action_navigation_close,"String_Node_Str",111,"String_Node_Str",OdooAccountQuickManage.class,extra);
  builder.addAction(actionReset);
  builder.addAction(deleteAccount);
  builder.build().show();
}

Fixed version (ground truth):
private void showSignInErrorNotification(OUser user){
  ONotificationBuilder builder=new ONotificationBuilder(mContext,REQUEST_SIGN_IN_ERROR);
  builder.setTitle("String_Node_Str");
  builder.setBigText("String_Node_Str" + "String_Node_Str");
  builder.setIcon(R.drawable.ic_action_alert_warning);
  builder.setText(user.getAndroidName());
  builder.allowVibrate(true);
  builder.withRingTone(false);
  builder.setOngoing(true);
  builder.withLargeIcon(false);
  builder.setColor(OResource.color(mContext,R.color.android_orange_dark));
  Bundle extra=user.getAsBundle();
  ONotificationBuilder.NotificationAction actionReset=new ONotificationBuilder.NotificationAction(R.drawable.ic_action_refresh,"String_Node_Str",110,"String_Node_Str",OdooAccountQuickManage.class,extra);
  ONotificationBuilder.NotificationAction deleteAccount=new ONotificationBuilder.NotificationAction(R.drawable.ic_action_navigation_close,"String_Node_Str",111,"String_Node_Str",OdooAccountQuickManage.class,extra);
  builder.addAction(actionReset);
  builder.addAction(deleteAccount);
  builder.build().show();
}
Program: 79985
Project: 79985
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mSavedInstanceState=savedInstanceState;
  Log.i(TAG,"String_Node_Str");
  OPreferenceManager preferenceManager=new OPreferenceManager(this);
  if (!preferenceManager.getBoolean(KEY_FRESH_LOGIN,false)) {
    preferenceManager.setBoolean(KEY_FRESH_LOGIN,true);
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        startActivity(new Intent(OdooActivity.this,AppIntro.class));
      }
    }
,1000);
  }
  setContentView(R.layout.odoo_activity);
  OActionBarUtils.setActionBar(this,true);
  setupDrawer();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Log.i(TAG,"String_Node_Str");
  mSavedInstanceState=savedInstanceState;
  OPreferenceManager preferenceManager=new OPreferenceManager(this);
  if (!preferenceManager.getBoolean(KEY_FRESH_LOGIN,false)) {
    preferenceManager.setBoolean(KEY_FRESH_LOGIN,true);
    new Handler().postDelayed(new Runnable(){
      @Override public void run(){
        startActivity(new Intent(OdooActivity.this,AppIntro.class));
      }
    }
,1000);
  }
  setContentView(R.layout.odoo_activity);
  OActionBarUtils.setActionBar(this,true);
  setupDrawer();
}
Program: 79986
Project: 79986
Buggy source:
private void settingUpdated(){
  OPreferenceManager mPref=new OPreferenceManager(this);
  int sync_interval=mPref.getInt("String_Node_Str",1440);
  List<String> default_authorities=new ArrayList<>();
  default_authorities.add("String_Node_Str");
  default_authorities.add("String_Node_Str");
  SyncAdapterType[] list=ContentResolver.getSyncAdapterTypes();
  Account mAccount=OUser.current(this).getAccount();
  for (  SyncAdapterType lst : list) {
    if (lst.authority.contains("String_Node_Str") && lst.authority.contains("String_Node_Str")) {
      default_authorities.add(lst.authority);
    }
  }
  for (  String authority : default_authorities) {
    boolean isSyncActive=ContentResolver.getSyncAutomatically(mAccount,authority);
    if (isSyncActive) {
      SyncUtils.get(this).setSyncPeriodic(authority,sync_interval,60,1);
    }
  }
  Toast.makeText(this,OResource.string(this,R.string.toast_setting_saved),Toast.LENGTH_LONG).show();
}

Fixed version (ground truth):
private void settingUpdated(){
  OUser user=OUser.current(this);
  if (user == null) {
    Intent loginActivity=new Intent(this,OdooLogin.class);
    loginActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    startActivity(loginActivity);
    finish();
  }
 else {
    Account mAccount=user.getAccount();
    OPreferenceManager mPref=new OPreferenceManager(this);
    int sync_interval=mPref.getInt("String_Node_Str",1440);
    List<String> default_authorities=new ArrayList<>();
    default_authorities.add("String_Node_Str");
    default_authorities.add("String_Node_Str");
    SyncAdapterType[] list=ContentResolver.getSyncAdapterTypes();
    for (    SyncAdapterType lst : list) {
      if (lst.authority.contains("String_Node_Str") && lst.authority.contains("String_Node_Str")) {
        default_authorities.add(lst.authority);
      }
    }
    for (    String authority : default_authorities) {
      boolean isSyncActive=ContentResolver.getSyncAutomatically(mAccount,authority);
      if (isSyncActive) {
        SyncUtils.get(this).setSyncPeriodic(authority,sync_interval,60,1);
      }
    }
    Toast.makeText(this,OResource.string(this,R.string.toast_setting_saved),Toast.LENGTH_LONG).show();
  }
}
Program: 79987
Project: 79987
Buggy source:
@Override protected void onPostExecute(OUser oUser){
  super.onPostExecute(oUser);
  if (oUser != null) {
    OdooAccountManager.updateUserData(OdooAccountQuickManage.this,user);
    finish();
    Intent intent=new Intent(OdooAccountQuickManage.this,OdooActivity.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    getApplicationContext().startActivity(intent);
  }
 else {
    edtPassword.setText("String_Node_Str");
    edtPassword.setError("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override protected void onPostExecute(OUser oUser){
  super.onPostExecute(oUser);
  progressDialog.dismiss();
  if (oUser != null) {
    OdooAccountManager.updateUserData(OdooAccountQuickManage.this,user);
    finish();
    Intent intent=new Intent(OdooAccountQuickManage.this,OdooActivity.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    getApplicationContext().startActivity(intent);
  }
 else {
    edtPassword.setText("String_Node_Str");
    edtPassword.setError("String_Node_Str");
  }
}
Program: 79988
Project: 79988
Buggy source:
private void removeAccount(){
  AlertDialog.Builder builder=new AlertDialog.Builder(this);
  builder.setTitle(R.string.title_confirm);
  builder.setMessage(R.string.toast_are_you_sure_delete_account);
  builder.setPositiveButton(R.string.label_delete,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      OdooAccountManager.removeAccount(OdooAccountQuickManage.this,user.getAndroidName());
      IntentUtils.startActivity(OdooAccountQuickManage.this,OdooLogin.class,null);
      finish();
    }
  }
);
  builder.setNegativeButton(R.string.label_cancel,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
      finish();
    }
  }
);
  builder.show();
}

Fixed version (ground truth):
private void removeAccount(){
  AlertDialog.Builder builder=new AlertDialog.Builder(this);
  builder.setTitle(R.string.title_confirm);
  builder.setMessage(R.string.toast_are_you_sure_delete_account);
  builder.setPositiveButton(R.string.label_delete,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      if (OdooAccountManager.removeAccount(OdooAccountQuickManage.this,user.getAndroidName())) {
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            Intent loginActivity=new Intent(OdooAccountQuickManage.this,OdooLogin.class);
            loginActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
            startActivity(loginActivity);
            finish();
          }
        }
,500);
      }
    }
  }
);
  builder.setOnCancelListener(new DialogInterface.OnCancelListener(){
    @Override public void onCancel(    DialogInterface dialog){
      dialog.dismiss();
      finish();
    }
  }
);
  builder.setNegativeButton(R.string.label_cancel,new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialog,    int which){
      dialog.dismiss();
      finish();
    }
  }
);
  builder.show();
}
Program: 79989
Project: 79989
Buggy source:
@Override public void onPause(){
  super.onPause();
  if (mSyncObserverHandle != null) {
    ContentResolver.removeStatusChangeListener(mSyncObserverHandle);
    mSyncObserverHandle=null;
  }
  parent().unregisterReceiver(syncFinishReceiver);
}

Fixed version (ground truth):
@Override public void onPause(){
  super.onPause();
  if (mSyncObserverHandle != null) {
    ContentResolver.removeStatusChangeListener(mSyncObserverHandle);
    mSyncObserverHandle=null;
  }
  try {
    parent().unregisterReceiver(syncFinishReceiver);
  }
 catch (  Exception e) {
  }
}
Program: 79990
Project: 79990
Buggy source:
/** 
 * Actionbar Spinner handler
 */
public void setHasActionBarSpinner(Boolean hasActionBarSpinner){
  ActionBar actionBar=getSupportActionBar();
  if (hasActionBarSpinner) {
    findViewById(R.id.spinner_nav).setVisibility(View.VISIBLE);
    actionBar.setDisplayShowTitleEnabled(false);
  }
 else {
    findViewById(R.id.spinner_nav).setVisibility(View.GONE);
    actionBar.setDisplayShowTitleEnabled(true);
  }
  mHasActionBarSpinner=hasActionBarSpinner;
}

Fixed version (ground truth):
/** 
 * Actionbar Spinner handler
 */
public void setHasActionBarSpinner(Boolean hasActionBarSpinner){
  ActionBar actionBar=getSupportActionBar();
  Spinner spinner=(Spinner)findViewById(R.id.spinner_nav);
  if (hasActionBarSpinner) {
    if (spinner != null)     spinner.setVisibility(View.VISIBLE);
    actionBar.setDisplayShowTitleEnabled(false);
  }
 else {
    if (spinner != null)     spinner.setVisibility(View.GONE);
    actionBar.setDisplayShowTitleEnabled(true);
  }
  mHasActionBarSpinner=hasActionBarSpinner;
}
Program: 79991
Project: 79991
Buggy source:
public Spinner getActionBarSpinner(){
  if (mHasActionBarSpinner) {
    return (Spinner)findViewById(R.id.spinner_nav);
  }
  return null;
}

Fixed version (ground truth):
public Spinner getActionBarSpinner(){
  Spinner spinner=null;
  if (mHasActionBarSpinner) {
    spinner=(Spinner)findViewById(R.id.spinner_nav);
    spinner.setAdapter(null);
  }
  return spinner;
}
Program: 79992
Project: 79992
Buggy source:
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  ODataRow row=(ODataRow)navSpinnerAdapter.getItem(position);
  mFilterType=FilterType.valueOf(row.getString("String_Node_Str"));
  if (mFilterDate != null)   getLoaderManager().restartLoader(0,null,this);
}

Fixed version (ground truth):
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  ODataRow row=(ODataRow)navSpinnerAdapter.getItem(position);
  mFilterType=FilterType.valueOf(row.getString("String_Node_Str"));
  if (mFilterDate != null && getActivity() != null)   getLoaderManager().restartLoader(0,null,this);
}
Program: 79993
Project: 79993
Buggy source:
@Override public OSyncAdapter performNextSync(OUser user,SyncResult syncResult){
  CalendarEvent event=new CalendarEvent(getApplicationContext(),null);
  List<ODataRow> rows=event.select();
  int count=0;
  for (  ODataRow row : rows) {
    if (row.getBoolean("String_Node_Str")) {
      String defaultTime=BaseSettings.getDayStartTime(getApplicationContext());
      row.put("String_Node_Str",row.getString("String_Node_Str") + "String_Node_Str" + defaultTime);
    }
    Date start_date=ODateUtils.createDateObject(row.getString("String_Node_Str"),ODateUtils.DEFAULT_FORMAT,false);
    Date now=new Date();
    if (now.compareTo(start_date) < 0) {
      Bundle extra=row.getPrimaryBundleData();
      extra.putString(ReminderUtils.KEY_REMINDER_TYPE,"String_Node_Str");
      if (ReminderUtils.get(getApplicationContext()).resetReminder(start_date,extra)) {
        OValues values=new OValues();
        values.put("String_Node_Str","String_Node_Str");
        values.put("String_Node_Str","String_Node_Str");
        event.update(row.getInt(OColumn.ROW_ID),values);
        count++;
      }
    }
  }
  Log.i(TAG,count + "String_Node_Str");
  SyncUtils.get(getApplicationContext(),user).requestSync(CRMPhoneCalls.AUTHORITY);
  Bundle syncData=new Bundle();
  syncData.putBoolean(CRM.KEY_IS_LEAD,false);
  SyncUtils.get(getApplicationContext(),user).requestSync(CRMLead.AUTHORITY,syncData);
  return null;
}

Fixed version (ground truth):
@Override public OSyncAdapter performNextSync(OUser user,SyncResult syncResult){
  CalendarEvent event=new CalendarEvent(getApplicationContext(),null);
  List<ODataRow> rows=event.select();
  int count=0;
  for (  ODataRow row : rows) {
    if (row.getBoolean("String_Node_Str")) {
      String defaultTime=BaseSettings.getDayStartTime(getApplicationContext());
      row.put("String_Node_Str",row.getString("String_Node_Str") + "String_Node_Str" + defaultTime);
    }
    Date start_date=ODateUtils.createDateObject(row.getString("String_Node_Str"),ODateUtils.DEFAULT_FORMAT,false);
    Date now=new Date();
    if (now.compareTo(start_date) < 0) {
      Bundle extra=row.getPrimaryBundleData();
      extra.putString(ReminderUtils.KEY_REMINDER_TYPE,"String_Node_Str");
      if (ReminderUtils.get(getApplicationContext()).resetReminder(start_date,extra)) {
        OValues values=new OValues();
        values.put("String_Node_Str","String_Node_Str");
        values.put("String_Node_Str","String_Node_Str");
        event.update(row.getInt(OColumn.ROW_ID),values);
        count++;
      }
    }
  }
  Log.i(TAG,count + "String_Node_Str");
  SyncUtils.get(getApplicationContext(),user).requestSync(CRMPhoneCalls.AUTHORITY);
  Bundle syncData=new Bundle();
  syncData.putBoolean(CRMLeads.KEY_IS_LEAD,false);
  SyncUtils.get(getApplicationContext(),user).requestSync(CRMLead.AUTHORITY,syncData);
  return null;
}
Program: 79994
Project: 79994
Buggy source:
private void init(){
  mForm=(OForm)findViewById(R.id.crmLeadForm);
  if (!extra.containsKey(OColumn.ROW_ID)) {
    if (extra.getString("String_Node_Str").equals(CRM.Type.Opportunities.toString())) {
      type="String_Node_Str";
      findViewById(R.id.opportunity_controls).setVisibility(View.VISIBLE);
    }
    mForm.initForm(null);
    actionBar.setTitle(R.string.label_tag_new);
    actionBar.setHomeAsUpIndicator(R.drawable.ic_action_navigation_close);
  }
 else {
    initFormValues();
  }
  mForm.setEditable(true);
  TextView currency_symbol=(TextView)findViewById(R.id.currency_symbol);
  ODataRow currency=ResCompany.getCurrency(this);
  if (currency != null) {
    currency_symbol.setText(currency.getString("String_Node_Str"));
  }
}

Fixed version (ground truth):
private void init(){
  mForm=(OForm)findViewById(R.id.crmLeadForm);
  if (!extra.containsKey(OColumn.ROW_ID)) {
    if (extra.getString("String_Node_Str").equals(Customers.Type.Opportunities.toString())) {
      type="String_Node_Str";
      findViewById(R.id.opportunity_controls).setVisibility(View.VISIBLE);
    }
    mForm.initForm(null);
    actionBar.setTitle(R.string.label_tag_new);
    actionBar.setHomeAsUpIndicator(R.drawable.ic_action_navigation_close);
  }
 else {
    initFormValues();
  }
  mForm.setEditable(true);
  TextView currency_symbol=(TextView)findViewById(R.id.currency_symbol);
  ODataRow currency=ResCompany.getCurrency(this);
  if (currency != null) {
    currency_symbol.setText(currency.getString("String_Node_Str"));
  }
}
Program: 79996
Project: 79996
Buggy source:
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.event_color:
    CalendarUtils.colorDialog(this,mEventColor,this).show();
  break;
case R.id.reminderForEvent:
ReminderDialog dialog=new ReminderDialog(this,(mAllDay) ? ReminderDialog.ReminderType.FullDayEvent : ReminderDialog.ReminderType.TimeBasedEvent);
dialog.setOnReminderValueSelectListener(this);
dialog.show();
break;
}
}

Fixed version (ground truth):
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.event_color:
    CalendarUtils.colorDialog(this,mEventColor,this).show();
  break;
case R.id.reminderForEvent:
ReminderDialog dialog=new ReminderDialog(this,(mAllDay) ? ReminderDialog.ReminderType.FullDayEvent : ReminderDialog.ReminderType.TimeBasedEvent);
dialog.setOnReminderValueSelectListener(this);
dialog.show();
break;
case R.id.meetingDeleteLayout:
OAlert.showConfirm(this,"String_Node_Str",new OAlert.OnAlertConfirmListener(){
@Override public void onConfirmChoiceSelect(OAlert.ConfirmType type){
switch (type) {
case POSITIVE:
calendarEvent.delete(row_id);
Toast.makeText(EventDetail.this,"String_Node_Str",Toast.LENGTH_LONG).show();
finish();
break;
case NEGATIVE:
}
}
}
);
break;
}
}
Program: 79997
Project: 79997
Buggy source:
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str")) {
    adapter.onSyncFinish(this);
  }
}

Fixed version (ground truth):
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str")) {
    adapter.onSyncFinish(this).syncDataLimit(50);
  }
}
Program: 79998
Project: 79998
Buggy source:
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str"))   adapter.onSyncFinish(this);
}

Fixed version (ground truth):
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str"))   adapter.onSyncFinish(this).syncDataLimit(50);
}
Program: 79999
Project: 79999
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  OValues values=fileManager.handleResult(requestCode,resultCode,data);
  if (values != null && !values.contains("String_Node_Str")) {
    newImage=values.getString("String_Node_Str");
    userImage.setScaleType(ImageView.ScaleType.CENTER_CROP);
    userImage.setColorFilter(null);
    userImage.setImageBitmap(BitmapUtils.getBitmapImage(this,newImage));
  }
 else {
    Toast.makeText(this,R.string.toast_image_size_too_large,Toast.LENGTH_LONG).show();
  }
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  OValues values=fileManager.handleResult(requestCode,resultCode,data);
  if (values != null && !values.contains("String_Node_Str")) {
    newImage=values.getString("String_Node_Str");
    userImage.setScaleType(ImageView.ScaleType.CENTER_CROP);
    userImage.setColorFilter(null);
    userImage.setImageBitmap(BitmapUtils.getBitmapImage(this,newImage));
  }
 else   if (values != null) {
    Toast.makeText(this,R.string.toast_image_size_too_large,Toast.LENGTH_LONG).show();
  }
}
Program: 80000
Project: 80000
Buggy source:
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str")) {
    ODomain domain=new ODomain();
    domain.add("String_Node_Str","String_Node_Str",user.getUser_id());
    adapter.setDomain(domain).syncDataLimit(10);
    adapter.onSyncFinish(this);
  }
}

Fixed version (ground truth):
@Override public void performDataSync(OSyncAdapter adapter,Bundle extras,OUser user){
  if (adapter.getModel().getModelName().equals("String_Node_Str")) {
    ODomain domain=new ODomain();
    domain.add("String_Node_Str","String_Node_Str",user.getUser_id());
    adapter.setDomain(domain).syncDataLimit(10);
    adapter.onSyncFinish(this).syncDataLimit(50);
  }
}