nus-yam/ex-repair huggingface dataset:
Program: 36030
Project: 36030
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Invitation[] invitations=new Invitation[0];
  adapter=new MySimpleArrayAdapter(getActivity(),invitations);
  setListAdapter(adapter);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  adapter=new MySimpleArrayAdapter(getActivity(),new ArrayList<Invitation>());
  setListAdapter(adapter);
}
Program: 36031
Project: 36031
Buggy source:
public MySimpleArrayAdapter(Context context,Invitation[] values){
  super(context,R.layout.invitation_item_list,values);
  this.context=context;
  this.values=values;
}

Fixed version (ground truth):
public MySimpleArrayAdapter(Context context,ArrayList<Invitation> values){
  super(context,R.layout.invitation_item_list,values);
  this.context=context;
  this.values=values;
}
Program: 36032
Project: 36032
Buggy source:
public void update(Invitation[] values){
  Log.v(TAG,"String_Node_Str" + values.length + "String_Node_Str");
  this.values=values;
  this.notifyDataSetChanged();
}

Fixed version (ground truth):
public void update(List<Invitation> invitations){
  Log.v(TAG,"String_Node_Str" + invitations.size() + "String_Node_Str");
  this.values.clear();
  for (int i=0; i < invitations.size(); ++i) {
    this.values.add(invitations.get(i));
  }
  this.notifyDataSetChanged();
}
Program: 36033
Project: 36033
Buggy source:
@Subscribe public void OnInvitationListReceivedEvent(InvitationListReceivedEvent e){
  Log.v(TAG,"String_Node_Str");
  List<Invitation> l=e.get();
  if (l != null) {
    for (int i=0; i < l.size(); i++) {
      adapter.add(l.get(i));
    }
    adapter.notifyDataSetChanged();
  }
 else {
    Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
}

Fixed version (ground truth):
@Subscribe public void OnInvitationListReceivedEvent(InvitationListReceivedEvent e){
  Log.v(TAG,"String_Node_Str");
  List<Invitation> l=e.get();
  if (l != null) {
    adapter.update(l);
  }
 else {
    Toast.makeText(getActivity(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
}
Program: 36034
Project: 36034
Buggy source:
@Override public long getItemId(int position){
  return values[position].getInv_id();
}

Fixed version (ground truth):
@Override public long getItemId(int position){
  return values.get(position).getInv_id();
}
Program: 36035
Project: 36035
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View rowView=inflater.inflate(R.layout.invitation_item_list,parent,false);
  TextView nameTextView=(TextView)rowView.findViewById(R.id.EventName);
  TextView text1TextView=(TextView)rowView.findViewById(R.id.EventText1);
  TextView text2TextView=(TextView)rowView.findViewById(R.id.EventText2);
  ImageView imageView=(ImageView)rowView.findViewById(R.id.icon);
  text1TextView.setText(values[position].getOrder().getRestaurant().getName());
  return rowView;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  View rowView=inflater.inflate(R.layout.invitation_item_list,parent,false);
  TextView nameTextView=(TextView)rowView.findViewById(R.id.EventName);
  TextView text1TextView=(TextView)rowView.findViewById(R.id.EventText1);
  TextView text2TextView=(TextView)rowView.findViewById(R.id.EventText2);
  ImageView imageView=(ImageView)rowView.findViewById(R.id.icon);
  text1TextView.setText("String_Node_Str");
  return rowView;
}
Program: 36036
Project: 36036
Buggy source:
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  order.setRequest_period(list.get(position));
}

Fixed version (ground truth):
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  if (position == 0) {
    order.setRequest_period(1);
  }
 else   if (position == 1) {
    order.setRequest_period(5);
  }
 else   if (position == 2) {
    order.setRequest_period(7);
  }
}
Program: 36037
Project: 36037
Buggy source:
private void init(){
  order=new Order();
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  adapter=new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,list);
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  SharedPreferences preferences=this.getSharedPreferences(SHARED_PREF_DB_NAME,MODE_PRIVATE);
  cust_id=preferences.getInt(PREF_ACCOUNT_ID,1);
}

Fixed version (ground truth):
private void init(){
  order=new Order();
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  list.add("String_Node_Str");
  adapter=new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,list);
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  SharedPreferences preferences=this.getSharedPreferences(SHARED_PREF_DB_NAME,MODE_PRIVATE);
  cust_id=preferences.getInt(PREF_ACCOUNT_ID,1);
  order.setRequest_date("String_Node_Str");
  order.setRequest_period(1);
}
Program: 36039
Project: 36039
Buggy source:
@Override public void onDateChanged(DatePicker datePicker,int i,int i2,int i3){
  order.setRequest_date(i + "String_Node_Str" + i2+ "String_Node_Str"+ i3);
}

Fixed version (ground truth):
@Override public void onDateChanged(DatePicker datePicker,int i,int i2,int i3){
  order.setRequest_date(i + "String_Node_Str" + i2+ "String_Node_Str"+ i3);
  System.out.println("String_Node_Str" + i + "String_Node_Str"+ i2+ "String_Node_Str"+ i3);
}
Program: 36040
Project: 36040
Buggy source:
@Override public void onClick(View view){
  order.setCustomer_id(cust_id);
  order.setRestaurant_id(mRestaurantID);
  order.setRequest_date("String_Node_Str");
  order.setRequest_period("String_Node_Str");
  int[] l=new int[inFriends.size()];
  for (int i=0; i < inFriends.size(); i++) {
    l[i]=inFriends.get(i).getCust_id();
  }
  order.setCustomer_ids(l);
  List<Dishe> dl=new ArrayList<Dishe>();
  for (int i=0; i < dishes.size(); i++) {
    if (dishes.get(i).getQuantity() > 0) {
      dl.add(dishes.get(i));
    }
  }
  order.setDishes(dl);
  progressDialog=new ProgressDialog(ref);
  progressDialog.setTitle("String_Node_Str");
  progressDialog.setMessage("String_Node_Str");
  progressDialog.show();
  BusProvider.get().post(new SaveOrderEvent(order));
}

Fixed version (ground truth):
@Override public void onClick(View view){
  order.setCustomer_id(cust_id);
  order.setRestaurant_id(mRestaurantID);
  int[] l=new int[inFriends.size()];
  for (int i=0; i < inFriends.size(); i++) {
    l[i]=inFriends.get(i).getCust_id();
  }
  order.setCustomer_ids(l);
  List<Dishe> dl=new ArrayList<Dishe>();
  for (int i=0; i < dishes.size(); i++) {
    if (dishes.get(i).getQuantity() > 0) {
      dl.add(dishes.get(i));
    }
  }
  order.setDishes(dl);
  progressDialog=new ProgressDialog(ref);
  progressDialog.setTitle("String_Node_Str");
  progressDialog.setMessage("String_Node_Str");
  progressDialog.show();
  BusProvider.get().post(new SaveOrderEvent(order));
  System.out.println(new Gson().toJson(order));
}
Program: 36041
Project: 36041
Buggy source:
@Subscribe public void OnRestaurantDatasReceived(OnRestaurantDatasReceivedEvent e){
  progressDialog.dismiss();
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  restaurant=e.getRestaurant();
  order.setRestaurant(restaurant);
  friends=e.getFriends();
  dishes=restaurant.getDishes();
  for (int i=0; i < friends.size(); i++) {
    User t=friends.get(i);
    if (t.getCust_id() == cust_id) {
      inFriends.add(t);
      friends.remove(i);
      friendList.setText(t.getName() + "String_Node_Str");
      break;
    }
  }
  ArrayList<HashMap<String,Object>> listItem=new ArrayList<HashMap<String,Object>>();
  for (int i=0; i < dishes.size(); i++) {
    HashMap<String,Object> map=new HashMap<String,Object>();
    map.put("String_Node_Str",dishes.get(i).getD_name());
    map.put("String_Node_Str",dishes.get(i).getD_price());
    map.put("String_Node_Str",dishes.get(i).getQuantity());
    listItem.add(map);
  }
  SimpleAdapter listItemAdapter=new SimpleAdapter(this,listItem,R.layout.dishe_item_list,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new int[]{R.id.DisheName,R.id.textView2,R.id.DishePrice});
  mDishes.setAdapter(listItemAdapter);
}

Fixed version (ground truth):
@Subscribe public void OnRestaurantDatasReceived(OnRestaurantDatasReceivedEvent e){
  progressDialog.dismiss();
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
  restaurant=e.getRestaurant();
  order.setRestaurant(restaurant);
  friends=e.getFriends();
  dishes=restaurant.getDishes();
  if (inFriends.size() == 0) {
    for (int i=0; i < friends.size(); i++) {
      User t=friends.get(i);
      if (t.getCust_id() == cust_id) {
        inFriends.add(t);
        friends.remove(i);
        friendList.setText(t.getName() + "String_Node_Str");
        break;
      }
    }
  }
  ArrayList<HashMap<String,Object>> listItem=new ArrayList<HashMap<String,Object>>();
  for (int i=0; i < dishes.size(); i++) {
    HashMap<String,Object> map=new HashMap<String,Object>();
    map.put("String_Node_Str",dishes.get(i).getName());
    map.put("String_Node_Str",dishes.get(i).getPrice());
    map.put("String_Node_Str",dishes.get(i).getQuantity());
    listItem.add(map);
  }
  SimpleAdapter listItemAdapter=new SimpleAdapter(this,listItem,R.layout.dishe_item_list,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new int[]{R.id.DisheName,R.id.textView2,R.id.DishePrice});
  mDishes.setAdapter(listItemAdapter);
}
Program: 36042
Project: 36042
Buggy source:
public void setRequest_period(String request_period){
  this.request_period=request_period;
}

Fixed version (ground truth):
public void setRequest_period(int request_period){
  this.request_period=request_period;
}
Program: 36043
Project: 36043
Buggy source:
public String getRequest_period(){
  return request_period;
}

Fixed version (ground truth):
public int getRequest_period(){
  return request_period;
}
Program: 36046
Project: 36046
Buggy source:
@Override public void onClick(View view){
  order.setCustomer_id(cust_id);
  order.setRestaurant_id(mRestaurantID);
  int[] l=new int[inFriends.size()];
  for (int i=0; i < inFriends.size(); i++) {
    l[i]=inFriends.get(i).getCust_id();
  }
  order.setCustomer_ids(l);
  List<Dishe> dl=new ArrayList<Dishe>();
  for (int i=0; i < dishes.size(); i++) {
    if (dishes.get(i).getQuantity() > 0) {
      dl.add(dishes.get(i));
    }
  }
  order.setDishes(dl);
  progressDialog=new ProgressDialog(ref);
  progressDialog.setTitle("String_Node_Str");
  progressDialog.setMessage("String_Node_Str");
  progressDialog.show();
  BusProvider.get().post(new SaveOrderEvent(order));
  System.out.println(new Gson().toJson(order));
}

Fixed version (ground truth):
@Override public void onClick(View view){
  order.setCustomer_id(cust_id);
  order.setRestaurant_id(mRestaurantID);
  int[] l=new int[inFriends.size()];
  for (int i=0; i < inFriends.size(); i++) {
    l[i]=inFriends.get(i).getCust_id();
  }
  order.setCustomer_ids(l);
  List<Dishe> dl=new ArrayList<Dishe>();
  for (int i=0; i < dishes.size(); i++) {
    if (dishes.get(i).getQuantity() > 0) {
      dl.add(dishes.get(i));
    }
  }
  if (dl.size() == 0) {
    new AlertDialog.Builder(OrderEditActivity.this).setTitle("String_Node_Str").setMessage("String_Node_Str").setPositiveButton("String_Node_Str",null).show();
    return;
  }
  order.setDishes(dl);
  progressDialog=new ProgressDialog(ref);
  progressDialog.setTitle("String_Node_Str");
  progressDialog.setMessage("String_Node_Str");
  progressDialog.show();
  BusProvider.get().post(new SaveOrderEvent(order));
  System.out.println(new Gson().toJson(order));
}
Program: 36047
Project: 36047
Buggy source:
public static ForcedMovement createRelative(Player player,int xOffset1,int yOffset1,int xOffset2,int yOffset2){
  ForcedMovement fm=new ForcedMovement();
  Position p=player.getPosition();
  fm.x1=p.getLocalX() + xOffset1;
  fm.y1=p.getLocalY() + yOffset1;
  fm.x2=p.getLocalX() + xOffset2;
  fm.y2=p.getLocalY() + yOffset2;
  fm.destination=new Position(p.getX() + xOffset2,p.getY() + yOffset2);
  return fm;
}

Fixed version (ground truth):
public static ForcedMovement createRelative(Player player,int xOffset1,int yOffset1,int midDuration,int xOffset2,int yOffset2,int totalDuration){
  ForcedMovement fm=new ForcedMovement();
  fm.firstPosition=player.getPosition().copy(xOffset1,yOffset1);
  fm.secondPosition=player.getPosition().copy(xOffset2,yOffset2);
  fm.midDuration=ClientFrameTickConversion.ticksToFrames(midDuration);
  fm.duration=ClientFrameTickConversion.ticksToFrames(totalDuration);
  fm.durationTicks=totalDuration;
  return fm;
}
Program: 36048
Project: 36048
Buggy source:
@Override public void encode(PlayerUpdateMessage message,GameFrameBuilder builder){
  builder.put(DataType.BYTE,DataTransformation.NEGATE,2);
  builder.put(DataType.BYTE,2);
  builder.put(DataType.BYTE,DataTransformation.ADD,2);
  builder.put(DataType.BYTE,2);
  builder.put(DataType.SHORT,DataOrder.LITTLE,2);
  builder.put(DataType.SHORT,DataOrder.LITTLE,2);
  builder.put(DataType.BYTE,DataTransformation.NEGATE,2);
}

Fixed version (ground truth):
@Override public void encode(PlayerUpdateMessage message,GameFrameBuilder builder){
  builder.put(DataType.BYTE,DataTransformation.NEGATE,movement.getFirstPosition().getLocalX(message.getLastKnownRegion().getRegionX()));
  builder.put(DataType.BYTE,movement.getFirstPosition().getLocalY(message.getLastKnownRegion().getRegionY()));
  builder.put(DataType.BYTE,DataTransformation.ADD,movement.getSecondPosition().getLocalX(message.getLastKnownRegion().getRegionX()));
  builder.put(DataType.BYTE,movement.getSecondPosition().getLocalY(message.getLastKnownRegion().getRegionY()));
  builder.put(DataType.SHORT,DataOrder.LITTLE,movement.getMidDuration());
  builder.put(DataType.SHORT,DataOrder.LITTLE,movement.getDuration());
  builder.put(DataType.BYTE,DataTransformation.NEGATE,movement.getDirection());
}
Program: 36049
Project: 36049
Buggy source:
public ForceMovementPlayerBlock(Player player){
  super(0x400);
}

Fixed version (ground truth):
public ForceMovementPlayerBlock(Player player){
  super(0x400);
  this.movement=player.getForcedMove();
}
Program: 36050
Project: 36050
Buggy source:
public PlayerDescriptor(Player player,int[] tickets,boolean force){
  if (player.isActive()) {
    int id=player.getId() - 1;
    int ticket=player.getAppearanceTicket();
    if (tickets[id] != ticket || force) {
      tickets[id]=ticket;
      addBlock(new AppearancePlayerBlock(player));
    }
  }
  if (player.isChatUpdated())   addBlock(new ChatPlayerBlock(player));
  if (player.isHitOneUpdated())   addBlock(new HitOnePlayerBlock(player));
  if (player.isHitTwoUpdated())   addBlock(new HitTwoPlayerBlock(player));
  if (player.isChatForced())   addBlock(new ForceChatPlayerBlock(player));
  if (player.isAnimationUpdated())   addBlock(new AnimationPlayerBlock(player));
  if (player.isSpotAnimationUpdated())   addBlock(new SpotAnimationPlayerBlock(player));
  if (player.isTurnToPositionUpdated())   addBlock(new TurnToPositionPlayerBlock(player));
  if (player.isTurnToTargetUpdated())   addBlock(new TurnToMobPlayerBlock(player));
}

Fixed version (ground truth):
public PlayerDescriptor(Player player,int[] tickets,boolean force){
  if (player.isActive()) {
    int id=player.getId() - 1;
    int ticket=player.getAppearanceTicket();
    if (tickets[id] != ticket || force) {
      tickets[id]=ticket;
      addBlock(new AppearancePlayerBlock(player));
    }
  }
  if (player.isChatUpdated())   addBlock(new ChatPlayerBlock(player));
  if (player.isHitOneUpdated())   addBlock(new HitOnePlayerBlock(player));
  if (player.isHitTwoUpdated())   addBlock(new HitTwoPlayerBlock(player));
  if (player.isChatForced())   addBlock(new ForceChatPlayerBlock(player));
  if (player.isAnimationUpdated())   addBlock(new AnimationPlayerBlock(player));
  if (player.isSpotAnimationUpdated())   addBlock(new SpotAnimationPlayerBlock(player));
  if (player.isTurnToPositionUpdated())   addBlock(new TurnToPositionPlayerBlock(player));
  if (player.isTurnToTargetUpdated())   addBlock(new TurnToMobPlayerBlock(player));
  if (player.isForceMovementUpdated())   addBlock(new ForceMovementPlayerBlock(player));
}
Program: 36051
Project: 36051
Buggy source:
private void preprocess(NPC npc){
  npc.tick();
  npc.getWalkingQueue().tick();
  npc.getCombatHandler().tick();
  npc.getHits().tick();
}

Fixed version (ground truth):
private void preprocess(NPC npc){
  npc.tick();
  if (npc.getDefinition().isAttackable()) {
    npc.getSkillSet().tick(npc.getHealthRegen(),2);
    npc.getCombatHandler().tick();
    npc.getHits().tick();
  }
  npc.getWalkingQueue().tick();
}
Program: 36052
Project: 36052
Buggy source:
public int getUnnoted(){
  return (unnoted || swapId == -1) ? id : swapId;
}

Fixed version (ground truth):
public int getUnnoted(){
  return (!isNoted() || swapId == -1) ? id : swapId;
}
Program: 36053
Project: 36053
Buggy source:
@Override public void perform(LoginService service){
  player.stopAction();
  service.serializer.savePlayer(player);
  player.unregister();
  player.getFriends().logout();
}

Fixed version (ground truth):
@Override public void perform(LoginService service){
  service.serializer.savePlayer(player);
  player.unregister();
  World.getWorld().getPlayers().remove(player);
}
Program: 36054
Project: 36054
Buggy source:
public void addLogoutRequest(Player player){
synchronized (oldPlayers) {
    oldPlayers.add(player);
  }
}

Fixed version (ground truth):
public void addLogoutRequest(Player player){
  player.setSession(null);
synchronized (oldPlayers) {
    oldPlayers.add(player);
  }
}
Program: 36055
Project: 36055
Buggy source:
public void buy(int index,int amount){
  if (activeShop == null) {
    return;
  }
  Item item=activeShop.getItemAtIndex(activeStock,index);
  if (item == null) {
    return;
  }
  int itemId=item.getId();
  ItemDefinition def=ItemDefinitions.forId(itemId);
  int cost=def.getValue() < 1 ? 1 : def.getValue();
  int assets=player.getInventory().getAmount(995);
  boolean coinsGone=false;
  if (cost * amount > assets) {
    coinsGone=assets % cost == 0;
    amount=assets / cost;
    if (amount < 1) {
      player.sendMessage("String_Node_Str");
      return;
    }
  }
  int freeSlots=player.getInventory().freeSlots() + (coinsGone ? 1 : 0);
  if (!def.isStackable()) {
    amount=amount > freeSlots ? freeSlots : amount;
  }
 else {
    if (player.getInventory().contains(itemId)) {
      amount-=BasicMath.integerOverflow(player.getInventory().getAmount(itemId),amount);
    }
 else {
      if (freeSlots < 1) {
        amount=0;
      }
    }
  }
  if (amount < 1) {
    player.sendMessage("String_Node_Str");
    return;
  }
  if (!activeShop.contains(activeStock,itemId)) {
    return;
  }
  amount=activeShop.remove(activeStock,itemId,amount);
  if (amount > 0) {
    updateShopGlobally();
  }
  player.getInventory().remove(new Item(995,cost * amount));
  player.getInventory().add(new Item(itemId,amount));
}

Fixed version (ground truth):
public void buy(int index,int amount){
  if (activeShop == null) {
    return;
  }
  Item item=activeShop.getItemAtIndex(activeStock,index);
  if (item == null) {
    return;
  }
  int itemId=item.getId();
  ItemDefinition def=ItemDefinitions.forId(itemId);
  int cost=def.getValue() < 1 ? 1 : def.getValue();
  int assets=player.getInventory().getAmount(995);
  boolean coinsGone=false;
  if (cost * amount > assets || cost * amount < 1) {
    coinsGone=assets % cost == 0;
    amount=assets / cost;
    if (amount < 1) {
      player.sendMessage("String_Node_Str");
      return;
    }
  }
  int freeSlots=player.getInventory().freeSlots() + (coinsGone ? 1 : 0);
  if (!def.isStackable()) {
    amount=amount > freeSlots ? freeSlots : amount;
  }
 else {
    if (player.getInventory().contains(itemId)) {
      amount-=BasicMath.integerOverflow(player.getInventory().getAmount(itemId),amount);
    }
 else {
      if (freeSlots < 1) {
        amount=0;
      }
    }
  }
  if (amount < 1) {
    player.sendMessage("String_Node_Str");
    return;
  }
  if (!activeShop.contains(activeStock,itemId)) {
    return;
  }
  amount=activeShop.remove(activeStock,itemId,amount);
  if (amount > 0 && activeStock != StockType.MAIN) {
    updateShopGlobally();
  }
  player.getInventory().remove(new Item(995,cost * amount));
  player.getInventory().add(new Item(itemId,amount));
}
Program: 36056
Project: 36056
Buggy source:
@Override public ObjectOptionMessage decode(GameFrame frame){
  GameFrameReader reader=new GameFrameReader(frame);
  int y=(int)reader.getSigned(DataType.SHORT,DataOrder.LITTLE,DataTransformation.ADD);
  int x=(int)reader.getSigned(DataType.SHORT,DataOrder.LITTLE);
  int id=(int)reader.getSigned(DataType.SHORT);
  return new ObjectOptionMessage(id,x,y,Option.TWO);
}

Fixed version (ground truth):
@Override public ObjectOptionMessage decode(GameFrame frame){
  GameFrameReader reader=new GameFrameReader(frame);
  int y=(int)reader.getSigned(DataType.SHORT,DataOrder.LITTLE,DataTransformation.ADD);
  int x=(int)reader.getSigned(DataType.SHORT,DataOrder.LITTLE);
  int id=(int)reader.getUnsigned(DataType.SHORT);
  return new ObjectOptionMessage(id,x,y,Option.TWO);
}
Program: 36057
Project: 36057
Buggy source:
public void openShop(String shopName){
  if (!shops.containsKey(shopName)) {
    throw new IllegalArgumentException("String_Node_Str" + shopName + "String_Node_Str");
  }
  player.getInterfaceSet().getWindow().setListener(this);
  Shop shop=shops.get(shopName);
  activeShop=shop;
  player.send(new InterfaceItemsMessage(93,player.getInventory().toArray()));
  if (shop.hasStock(StockType.PLAYER)) {
    player.send(new InterfaceItemsMessage(31,activeShop.getStock(StockType.PLAYER)));
  }
  player.setInterfaceText(620,22,shopName);
  player.send(new InterfaceVisibleMessage(620,34,shop.hasStock(StockType.PLAYER)));
  player.getInterfaceSet().openWindow(620);
  player.getInterfaceSet().openInventory(621);
  player.send(new ScriptMessage(150,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",-1,0,7,4,93,621 << 16}));
  player.send(new ScriptMessage(150,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",-1,0,4,10,31,(620 << 16) + 24}));
  player.send(new InterfaceAccessMessage(621,0,0,27,1278));
  player.send(new InterfaceAccessMessage(621,34,0,27,2360446));
  player.send(new ScriptMessage(25,"String_Node_Str",new Object[]{shop.getShopId(),93}));
  openMainStock();
}

Fixed version (ground truth):
public void openShop(String shopName){
  if (!shops.containsKey(shopName)) {
    throw new IllegalArgumentException("String_Node_Str" + shopName + "String_Node_Str");
  }
  Shop shop=shops.get(shopName);
  activeShop=shop;
  player.send(new InterfaceItemsMessage(93,player.getInventory().toArray()));
  if (shop.hasStock(StockType.PLAYER)) {
    player.send(new InterfaceItemsMessage(31,activeShop.getStock(StockType.PLAYER)));
  }
  player.setInterfaceText(620,22,shopName);
  player.send(new InterfaceVisibleMessage(620,34,shop.hasStock(StockType.PLAYER)));
  player.getInterfaceSet().openWindow(620);
  player.getInterfaceSet().openInventory(621);
  player.getInterfaceSet().getWindow().setListener(this);
  player.send(new ScriptMessage(150,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",-1,0,7,4,93,621 << 16}));
  player.send(new ScriptMessage(150,"String_Node_Str",new Object[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",-1,0,4,10,31,(620 << 16) + 24}));
  player.send(new InterfaceAccessMessage(621,0,0,27,1278));
  player.send(new InterfaceAccessMessage(621,34,0,27,2360446));
  player.send(new ScriptMessage(25,"String_Node_Str",new Object[]{shop.getShopId(),93}));
  openMainStock();
}
Program: 36059
Project: 36059
Buggy source:
@Override public void decode(ChannelHandlerContext ctx,String str,MessageBuf<Object> out) throws Exception {
  if (!str.startsWith("String_Node_Str"))   throw new IOException();
  out.add(new JaggrabRequest(str.substring(8)));
}

Fixed version (ground truth):
@Override public void decode(ChannelHandlerContext ctx,String str,MessageBuf<Object> out) throws Exception {
  if (!str.startsWith("String_Node_Str")) {
    return;
  }
  out.add(new JaggrabRequest(str.substring(8)));
}
Program: 36060
Project: 36060
Buggy source:
private void secondWindow(){
  player.setInterfaceText(VERIFY_WINDOW,37,itemsToString());
  player.setInterfaceText(VERIFY_WINDOW,41,otherPlayer.getTradeSession().itemsToString());
  player.setInterfaceText(VERIFY_WINDOW,45,"String_Node_Str" + otherPlayer.getDisplayName());
  player.send(new InterfaceVisibleMessage(VERIFY_WINDOW,37,true));
  player.send(new InterfaceVisibleMessage(VERIFY_WINDOW,41,true));
  player.getInterfaceSet().openWindow(VERIFY_WINDOW,this);
  status=TradeStatus.VERIFYING;
}

Fixed version (ground truth):
private void secondWindow(){
  player.setInterfaceText(VERIFY_WINDOW,37,itemsToString());
  player.setInterfaceText(VERIFY_WINDOW,41,otherPlayer.getTradeSession().itemsToString());
  player.setInterfaceText(VERIFY_WINDOW,45,"String_Node_Str" + otherPlayer.getDisplayName());
  player.send(new InterfaceVisibleMessage(VERIFY_WINDOW,37,true));
  player.send(new InterfaceVisibleMessage(VERIFY_WINDOW,41,true));
  player.getInterfaceSet().getWindow().removeListener();
  player.getInterfaceSet().openWindow(VERIFY_WINDOW,this);
  status=TradeStatus.VERIFYING;
}
Program: 36061
Project: 36061
Buggy source:
/** 
 * A Rune requirement that takes into account infinite supply staves. If you only want to check the inventory, just use inventory.getAmount
 * @param rune rune
 * @param amount number of runes required
 */
public RuneRequirement(Rune rune,int amount){
  this.rune=rune;
  this.amount=amount;
  error="String_Node_Str" + rune + "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * A Rune requirement that takes into account infinite supply staves.
 * @param rune rune
 * @param amount number of runes required
 */
public RuneRequirement(Rune rune,int amount){
  this.rune=rune;
  this.amount=amount;
  error="String_Node_Str" + rune + "String_Node_Str";
}
Program: 36062
Project: 36062
Buggy source:
@Override public void fulfill(Player player){
  int staff=player.getEquipment().get(Equipment.WEAPON).getId();
  for (  int validStaff : rune.getValidStaves()) {
    if (staff == validStaff) {
      return;
    }
  }
  player.getInventory().remove(new Item(rune.getItemId(),amount));
}

Fixed version (ground truth):
@Override public void fulfill(Player player){
  Item weapon=player.getEquipment().get(Equipment.WEAPON);
  if (weapon != null) {
    int staff=weapon.getId();
    for (    int validStaff : rune.getValidStaves()) {
      if (staff == validStaff) {
        return;
      }
    }
  }
  player.getInventory().remove(new Item(rune.getItemId(),amount));
}
Program: 36063
Project: 36063
Buggy source:
@Override public void itemsChanged(Inventory inventory){
  if (inventory.isEmpty()) {
    player.send(new InterfaceResetItemsMessage(id,child));
  }
 else {
    Item[] items=inventory.toArray();
    player.send(new InterfaceItemsMessage(id,child,type,items));
  }
}

Fixed version (ground truth):
@Override public void itemsChanged(Inventory inventory){
  if (inventory.isEmpty() && id >= 0 && child >= 0) {
    player.send(new InterfaceResetItemsMessage(id,child));
  }
 else {
    Item[] items=inventory.toArray();
    player.send(new InterfaceItemsMessage(id,child,type,items));
  }
}
Program: 36065
Project: 36065
Buggy source:
/** 
 * @desc Check if the tree is a clause in a prepositional phrase.
 * @returns The string preposition that heads the PP
 */
public static String isPrepClause(Tree root,Tree tree){
  if (tree != null) {
    Tree p=tree.parent(root).parent(root);
    String pos=p.label().value();
    if (!pos.equals("String_Node_Str")) {
      while (p.label().toString().equals(pos))       p=p.parent(root);
    }
    if (p.label().value().equals("String_Node_Str")) {
      p=p.parent(root);
      if (!p.label().value().equals("String_Node_Str"))       return null;
    }
    if (p.label().value().equals("String_Node_Str")) {
      List<Tree> list=p.getChildrenAsList();
      for (      Tree node : list) {
        if (node.label().value().equals("String_Node_Str"))         return node.firstChild().toString();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @desc Check if the tree is a clause in a prepositional phrase.
 * @returns The string preposition that heads the PP
 */
public static String isPrepClause(Tree root,Tree tree){
  if (tree != null) {
    Tree p=tree.parent(root).parent(root);
    String pos=p.label().value();
    if (!pos.equals("String_Node_Str")) {
      while (p != null && p.label().toString().equals(pos))       p=p.parent(root);
    }
    if (p != null && p.label().value().equals("String_Node_Str")) {
      p=p.parent(root);
      if (p == null || !p.label().value().equals("String_Node_Str"))       return null;
    }
    if (p.label().value().equals("String_Node_Str")) {
      List<Tree> list=p.getChildrenAsList();
      for (      Tree node : list) {
        if (node.label().value().equals("String_Node_Str"))         return node.firstChild().toString();
      }
    }
  }
  return null;
}
Program: 36066
Project: 36066
Buggy source:
/** 
 * @desc Check if the tree is a clause in a prepositional phrase.
 * @returns The string preposition that heads the PP
 */
public static String isPrepClause(Tree root,Tree tree){
  if (tree != null) {
    Tree p=tree.parent(root).parent(root);
    String pos=p.label().value();
    if (!pos.equals("String_Node_Str")) {
      while (p != null && p.label().toString().equals(pos))       p=p.parent(root);
    }
    if (p != null && p.label().value().equals("String_Node_Str")) {
      p=p.parent(root);
      if (p == null || !p.label().value().equals("String_Node_Str"))       return null;
    }
    if (p.label().value().equals("String_Node_Str")) {
      List<Tree> list=p.getChildrenAsList();
      for (      Tree node : list) {
        if (node.label().value().equals("String_Node_Str"))         return node.firstChild().toString();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @desc Check if the tree is a clause in a prepositional phrase.
 * @returns The string preposition that heads the PP
 */
public static String isPrepClause(Tree root,Tree tree){
  if (tree != null) {
    Tree p=tree.parent(root).parent(root);
    String pos=p.label().value();
    if (!pos.equals("String_Node_Str")) {
      while (p != null && p.label().toString().equals(pos))       p=p.parent(root);
    }
    if (p != null && p.label().value().equals("String_Node_Str")) {
      p=p.parent(root);
      if (p == null || !p.label().value().equals("String_Node_Str"))       return null;
    }
    if (p != null && p.label().value().equals("String_Node_Str")) {
      List<Tree> list=p.getChildrenAsList();
      for (      Tree node : list) {
        if (node.label().value().equals("String_Node_Str"))         return node.firstChild().toString();
      }
    }
  }
  return null;
}
Program: 36067
Project: 36067
Buggy source:
public List<TLink> computeClosure(List<TLink> relations,boolean debug){
  List<TLink> cloned=new ArrayList<TLink>(relations);
  List<TLink> newRelations=new ArrayList<TLink>();
  computeClosure(cloned,newRelations,debug);
  return newRelations;
}

Fixed version (ground truth):
/** 
 * Computes closure over the given relations, keeps the given List unchanged, and returns a new list of closed relations.
 * @param relations The list of relations from which we compute closure.
 * @param debug
 * @return A list of new relations computed from transitivity rules.
 */
public List<TLink> computeClosure(List<TLink> relations,boolean debug){
  List<TLink> cloned=new ArrayList<TLink>(relations);
  List<TLink> newRelations=new ArrayList<TLink>();
  computeClosure(cloned,newRelations,debug);
  return newRelations;
}
Program: 36070
Project: 36070
Buggy source:
/** 
 * @return A List of all Event objects in one document (file parameter)
 */
public List<TextEvent> getEvents(){
  List<TextEvent> events=new ArrayList<TextEvent>();
  for (  SieveSentence sent : sentences)   events.addAll(sent.events());
  return events;
}

Fixed version (ground truth):
/** 
 * @return A List of all Event objects in one document (file parameter)
 */
public List<TextEvent> getEvents(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<TextEvent> events=new ArrayList<TextEvent>();
  for (  SieveSentence sent : sentences)   events.addAll(sent.events());
  return events;
}
Program: 36071
Project: 36071
Buggy source:
/** 
 * @return A List of Strings that are parse trees
 */
public List<Tree> getAllParseTrees(){
  List<Tree> trees=new ArrayList<Tree>();
  for (  SieveSentence sent : sentences)   trees.add(sent.getParseTree());
  return trees;
}

Fixed version (ground truth):
/** 
 * @return A List of Strings that are parse trees
 */
public List<Tree> getAllParseTrees(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<Tree> trees=new ArrayList<Tree>();
  for (  SieveSentence sent : sentences)   trees.add(sent.getParseTree());
  return trees;
}
Program: 36072
Project: 36072
Buggy source:
/** 
 * @return A List of Strings, one string per sentence, representing dependencies.
 */
public List<List<TypedDependency>> getAllDependencies(){
  List<List<TypedDependency>> alldeps=new ArrayList<List<TypedDependency>>();
  for (  SieveSentence sent : sentences)   alldeps.add(sent.getDeps());
  return alldeps;
}

Fixed version (ground truth):
/** 
 * @return A List of Strings, one string per sentence, representing dependencies.
 */
public List<List<TypedDependency>> getAllDependencies(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<List<TypedDependency>> alldeps=new ArrayList<List<TypedDependency>>();
  for (  SieveSentence sent : sentences)   alldeps.add(sent.getDeps());
  return alldeps;
}
Program: 36073
Project: 36073
Buggy source:
/** 
 * @return A Vector of Sentence objects
 */
public List<SieveSentence> getSentences(){
  return sentences;
}

Fixed version (ground truth):
/** 
 * @return A Vector of Sentence objects
 */
public List<SieveSentence> getSentences(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  return sentences;
}
Program: 36074
Project: 36074
Buggy source:
/** 
 * Create a list of strings, each string is one makeinstance: <MAKEINSTANCE eventID="3" ... />
 * @param docname The document from which you want to extract all makeinstances.
 * @return A list of makeinstance strings.
 */
public List<String> createMakeInstanceStrings(){
  List<String> strings=new ArrayList<String>();
  for (  SieveSentence sent : sentences) {
    for (    TextEvent event : sent.events()) {
      for (      String eiid : event.getAllEiids()) {
        strings.add("String_Node_Str" + event.getId() + "String_Node_Str"+ eiid+ "String_Node_Str"+ event.getTense()+ "String_Node_Str"+ event.getAspect()+ (event.getPolarity() != null ? ("String_Node_Str" + event.getPolarity()) : "String_Node_Str")+ "String_Node_Str");
      }
    }
  }
  return strings;
}

Fixed version (ground truth):
/** 
 * Create a list of strings, each string is one makeinstance: <MAKEINSTANCE eventID="3" ... />
 * @param docname The document from which you want to extract all makeinstances.
 * @return A list of makeinstance strings.
 */
public List<String> createMakeInstanceStrings(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<String> strings=new ArrayList<String>();
  for (  SieveSentence sent : sentences) {
    for (    TextEvent event : sent.events()) {
      for (      String eiid : event.getAllEiids()) {
        strings.add("String_Node_Str" + event.getId() + "String_Node_Str"+ eiid+ "String_Node_Str"+ event.getTense()+ "String_Node_Str"+ event.getAspect()+ (event.getPolarity() != null ? ("String_Node_Str" + event.getPolarity()) : "String_Node_Str")+ "String_Node_Str");
      }
    }
  }
  return strings;
}
Program: 36075
Project: 36075
Buggy source:
/** 
 * Add events to a particular sentence.
 */
public void addEvents(int sid,List<TextEvent> events){
  sentences.get(sid).addEvents(events);
  addEventsToEiidMap(events);
}

Fixed version (ground truth):
/** 
 * Add events to a particular sentence.
 */
public void addEvents(int sid,List<TextEvent> events){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  sentences.get(sid).addEvents(events);
  addEventsToEiidMap(events);
}
Program: 36076
Project: 36076
Buggy source:
/** 
 * @return A List of Lists of all Timex objects. This does not return the document creation time!
 */
public List<List<Timex>> getTimexesBySentence(){
  List<List<Timex>> timexes=new ArrayList<List<Timex>>();
  for (  SieveSentence sent : sentences)   timexes.add(sent.timexes());
  return timexes;
}

Fixed version (ground truth):
/** 
 * @return A List of Lists of all Timex objects. This does not return the document creation time!
 */
public List<List<Timex>> getTimexesBySentence(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<List<Timex>> timexes=new ArrayList<List<Timex>>();
  for (  SieveSentence sent : sentences)   timexes.add(sent.timexes());
  return timexes;
}
Program: 36077
Project: 36077
Buggy source:
/** 
 * Add timexes to a particular sentence.
 */
public void addTimexes(int sid,List<Timex> timexes){
  sentences.get(sid).addTimexes(timexes);
  addTimexesToTidMap(timexes);
}

Fixed version (ground truth):
/** 
 * Add timexes to a particular sentence.
 */
public void addTimexes(int sid,List<Timex> timexes){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  sentences.get(sid).addTimexes(timexes);
  addTimexesToTidMap(timexes);
}
Program: 36078
Project: 36078
Buggy source:
/** 
 * @return A list of lists. This is a list of sentences, each sentence is a list of CoreLabels with character information.
 */
public List<List<CoreLabel>> getTokensAllSentences(String file){
  List<List<CoreLabel>> tokens=new ArrayList<List<CoreLabel>>();
  for (  SieveSentence sent : sentences)   tokens.add(sent.tokens());
  return tokens;
}

Fixed version (ground truth):
/** 
 * @return A list of lists. This is a list of sentences, each sentence is a list of CoreLabels with character information.
 */
public List<List<CoreLabel>> getTokensAllSentences(String file){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<List<CoreLabel>> tokens=new ArrayList<List<CoreLabel>>();
  for (  SieveSentence sent : sentences)   tokens.add(sent.tokens());
  return tokens;
}
Program: 36079
Project: 36079
Buggy source:
/** 
 * @return A List of all Timex objects, including the document creation time.
 */
public List<Timex> getTimexes(){
  List<Timex> timexes=new ArrayList<Timex>();
  for (  SieveSentence sent : sentences)   timexes.addAll(sent.timexes());
  if (dcts != null)   timexes.addAll(dcts);
  return timexes;
}

Fixed version (ground truth):
/** 
 * @return A List of all Timex objects, including the document creation time.
 */
public List<Timex> getTimexes(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<Timex> timexes=new ArrayList<Timex>();
  for (  SieveSentence sent : sentences)   timexes.addAll(sent.timexes());
  if (dcts != null)   timexes.addAll(dcts);
  return timexes;
}
Program: 36080
Project: 36080
Buggy source:
/** 
 * @return A List of all Event objects in one document (file parameter)
 */
public List<List<TextEvent>> getEventsBySentence(){
  List<List<TextEvent>> allEvents=new ArrayList<List<TextEvent>>();
  for (  SieveSentence sent : sentences)   allEvents.add(sent.events());
  return allEvents;
}

Fixed version (ground truth):
/** 
 * @return A List of all Event objects in one document (file parameter)
 */
public List<List<TextEvent>> getEventsBySentence(){
  if (sentences == null)   sentences=new ArrayList<SieveSentence>();
  List<List<TextEvent>> allEvents=new ArrayList<List<TextEvent>>();
  for (  SieveSentence sent : sentences)   allEvents.add(sent.events());
  return allEvents;
}
Program: 36081
Project: 36081
Buggy source:
/** 
 * all pairs of events that are siblings (i.e. their WordNet synsets overlap)  are labeled VAGUE. D&G use SIMULTANEOUS.
 */
private TLink getEELink(TextEvent e1,TextEvent e2,List<Tree> trees){
  boolean e1IsReporting=e1.getTheClass() == TextEvent.Class.REPORTING;
  boolean e2IsReporting=e2.getTheClass() == TextEvent.Class.REPORTING;
  if (ignoreReporting && (e1IsReporting || e2IsReporting) || ignoreIAction && e1.getTheClass() == TextEvent.Class.I_ACTION || ignoreSameSentence && e1.getSid() == e2.getSid()) {
    return null;
  }
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getIndex());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getIndex());
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getString(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getString(),postagStr2);
  if (checkSiblings && pos1 != null && pos2 != null && pos1 == pos2 && Main.wordnet.areSiblings(e1.getString(),e2.getString(),pos1)) {
    return new EventEventLink(e1.getEiid(),e2.getEiid(),TLink.Type.VAGUE);
  }
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new EventEventLink(e1.getEiid(),e2.getEiid(),TLink.Type.VAGUE);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * all pairs of events that are siblings (i.e. their WordNet synsets overlap)  are labeled VAGUE. D&G use SIMULTANEOUS.
 */
private TLink getEELink(TextEvent e1,TextEvent e2,List<Tree> trees){
  boolean e1IsReporting=e1.getTheClass() == TextEvent.Class.REPORTING;
  boolean e2IsReporting=e2.getTheClass() == TextEvent.Class.REPORTING;
  if (ignoreReporting && (e1IsReporting || e2IsReporting) || ignoreIAction && e1.getTheClass() == TextEvent.Class.I_ACTION || ignoreSameSentence && e1.getSid() == e2.getSid()) {
    return null;
  }
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getIndex());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getIndex());
  if (postagStr1.length() < 2 || postagStr2.length() < 2) {
    return null;
  }
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getString(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getString(),postagStr2);
  if (checkSiblings && pos1 != null && pos2 != null && pos1 == pos2 && Main.wordnet.areSiblings(e1.getString(),e2.getString(),pos1)) {
    return new EventEventLink(e1.getEiid(),e2.getEiid(),TLink.Type.VAGUE);
  }
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new EventEventLink(e1.getEiid(),e2.getEiid(),TLink.Type.VAGUE);
  }
 else {
    return null;
  }
}
Program: 36082
Project: 36082
Buggy source:
private TLink getTTLink(Timex e1,Timex e2,List<Tree> trees){
  if (ignoreSameSentence && e1.getSid() == e2.getSid())   return null;
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getTokenOffset());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getTokenOffset());
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getText(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getText(),postagStr2);
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new TimeTimeLink(e1.getTid(),e2.getTid(),TLink.Type.SIMULTANEOUS);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private TLink getTTLink(Timex e1,Timex e2,List<Tree> trees){
  if (ignoreSameSentence && e1.getSid() == e2.getSid())   return null;
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getTokenOffset());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getTokenOffset());
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  if (postagStr1.length() < 2 || postagStr2.length() < 2) {
    return null;
  }
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getText(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getText(),postagStr2);
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new TimeTimeLink(e1.getTid(),e2.getTid(),TLink.Type.SIMULTANEOUS);
  }
 else {
    return null;
  }
}
Program: 36083
Project: 36083
Buggy source:
private TLink getTTLink(Timex e1,Timex e2,List<Tree> trees){
  if (ignoreSameSentence && e1.getSid() == e2.getSid())   return null;
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getTokenOffset());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getTokenOffset());
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  if (postagStr1.length() < 2 || postagStr2.length() < 2) {
    return null;
  }
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getText(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getText(),postagStr2);
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new TimeTimeLink(e1.getTid(),e2.getTid(),TLink.Type.SIMULTANEOUS);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private TLink getTTLink(Timex e1,Timex e2,List<Tree> trees){
  if (ignoreSameSentence && e1.getSid() == e2.getSid())   return null;
  Tree sentParseTree1=trees.get(e1.getSid());
  Tree sentParseTree2=trees.get(e2.getSid());
  String postagStr1=posTagFromTree(sentParseTree1,e1.getTokenOffset());
  String postagStr2=posTagFromTree(sentParseTree2,e2.getTokenOffset());
  if (postagStr1.length() < 2 || postagStr2.length() < 2) {
    return null;
  }
  String postagSimple1=postagStr1.substring(0,2);
  String postagSimple2=postagStr2.substring(0,2);
  POS pos1=postagSimpleToPOS.get(postagSimple1);
  POS pos2=postagSimpleToPOS.get(postagSimple2);
  String lemma1=Main.wordnet.lemmatizeTaggedWord(e1.getText(),postagStr1);
  String lemma2=Main.wordnet.lemmatizeTaggedWord(e2.getText(),postagStr2);
  if (checkLemmas && lemma1.equals(lemma2)) {
    return new TimeTimeLink(e1.getTid(),e2.getTid(),TLink.Type.SIMULTANEOUS);
  }
 else {
    return null;
  }
}
Program: 36085
Project: 36085
Buggy source:
public List<String> getAllEiids(){
  List<String> eiids=new ArrayList<String>();
  if (this.eiid != null)   eiids.add(this.eiid);
  if (this.eiids != null)   for (  String eiid : eiids)   eiids.add(eiid);
  return eiids;
}

Fixed version (ground truth):
public List<String> getAllEiids(){
  List<String> eiids=new ArrayList<String>();
  if (this.eiid != null)   eiids.add(this.eiid);
  if (this.eiids != null)   for (  String eiid : this.eiids)   eiids.add(eiid);
  return eiids;
}