nus-yam/ex-repair huggingface dataset:
Program: 44914
Project: 44914
Buggy source:
public static void main(String args[]){
  try {
    ReplicatedServer server=new ReplicatedServer();
    Thread console=new Thread(new ServerConsole(server));
    console.start();
    console.join();
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String args[]){
  if (args == null || args.length != 1) {
    System.exit(1);
  }
  int port=Integer.parseInt(args[0]);
  ReplicatedServer server=new ReplicatedServer(port);
  Thread console=new Thread(new ServerConsole(server));
  console.start();
}
Program: 44915
Project: 44915
Buggy source:
private void startRMIRegistry(){
}

Fixed version (ground truth):
private void startRMIRegistry(int port){
  try {
    this.registry=LocateRegistry.createRegistry(port);
    this.proxy=ProxyFactory.createServerProxy(this);
    IServer stub=(IServer)UnicastRemoteObject.exportObject(proxy,0);
    this.registry.rebind(Constants.REMOTE_SERVER_OBJECT_NAME,stub);
  }
 catch (  RemoteException e) {
    e.printStackTrace();
  }
}
Program: 44916
Project: 44916
Buggy source:
public ReplicatedServer(){
  try {
    IServer stub=(IServer)UnicastRemoteObject.exportObject(this,0);
    this.registry=LocateRegistry.createRegistry(1099);
    this.registry.rebind(Constants.REMOTE_SERVER_OBJECT_NAME,stub);
    System.out.println("String_Node_Str");
  }
 catch (  RemoteException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public ReplicatedServer(int port){
  this.startRMIRegistry(port);
  this.games=new ArrayList<Game>();
  this.clients=new HashSet<ClientMock>();
}
Program: 44917
Project: 44917
Buggy source:
@Override public boolean createGame(String game,String name,String pass) throws RemoteException {
  return false;
}

Fixed version (ground truth):
@Override public boolean createGame(String game,String name,String pass) throws RemoteException {
  Game g=new Game(game,name,pass);
  return this.games.add(g);
}
Program: 44918
Project: 44918
Buggy source:
protected void shutdown(){
}

Fixed version (ground truth):
protected void shutdown(){
  try {
    UnicastRemoteObject.unexportObject(this.proxy,true);
    UnicastRemoteObject.unexportObject(this.registry,true);
  }
 catch (  NoSuchObjectException e) {
    e.printStackTrace();
  }
}
Program: 44919
Project: 44919
Buggy source:
@Override public boolean register(String name,String pass) throws RemoteException {
  System.out.println("String_Node_Str" + name + "String_Node_Str"+ pass);
  return true;
}

Fixed version (ground truth):
@Override public boolean register(String name,String pass) throws RemoteException {
  ClientMock client=new ClientMock(name,pass);
  boolean add=this.clients.add(client);
  return add;
}
Program: 44920
Project: 44920
Buggy source:
private static void generatePrimes(int n,List<Integer> primes){
  if (n > 1) {
    generatePrimes(n - 1,primes);
    primes.add(cachedNextPrime(n,primes));
  }
 else {
    primes.add(2);
  }
}

Fixed version (ground truth):
private static void generatePrimes(int n,List<Integer> primes){
  if (n > 1) {
    generatePrimes(n - 1,primes);
    primes.add(nextPrime(n,primes));
  }
 else {
    primes.add(2);
  }
}
Program: 44921
Project: 44921
Buggy source:
public static boolean isPrime(Integer possiblePrime){
  List<Integer> primes=new ArrayList<Integer>(asList(2));
  for (int nextPrime=2; nextPrime <= possiblePrime; ) {
    nextPrime=cachedNextPrime(nextPrime,primes);
    primes.add(valueOf(nextPrime));
  }
  return primes.contains(possiblePrime);
}

Fixed version (ground truth):
public static boolean isPrime(Integer possiblePrime){
  List<Integer> primes=new ArrayList<Integer>(asList(2));
  for (int nextPrime=2; nextPrime <= possiblePrime; ) {
    nextPrime=nextPrime(nextPrime,primes);
    primes.add(valueOf(nextPrime));
  }
  return primes.contains(possiblePrime);
}
Program: 44922
Project: 44922
Buggy source:
@Override protected void initialiseSelection(){
  List<T> selectedItems=getSelectedItems();
  if (selectedItems != null && selectedItems.size() > 0) {
    selectedItems.retainAll(getItems());
    int[] indices=new int[selectedItems.size()];
    Iterator<T> iterator=selectedItems.iterator();
    int i=0;
    while (iterator.hasNext()) {
      indices[i]=getItems().indexOf(iterator.next());
      ++i;
    }
    getTableViewer().getTable().select(indices);
  }
}

Fixed version (ground truth):
@Override protected void initialiseSelection(){
  List<T> selectedItems=getSelectedItems();
  if (selectedItems != null && selectedItems.size() > 0) {
    selectedItems.retainAll(getItems());
    int[] indices=new int[selectedItems.size()];
    Iterator<T> iterator=selectedItems.iterator();
    int i=0;
    while (iterator.hasNext()) {
      indices[i]=indexOfItem(iterator.next());
      ++i;
    }
    getTableViewer().getTable().select(indices);
  }
}
Program: 44923
Project: 44923
Buggy source:
@Override protected void initialiseChecked(){
  List<T> checkedItems=getCheckedItems();
  if (checkedItems != null && checkedItems.size() > 0 && getTableViewer() instanceof ICheckable && ConfigurationUtils.isCheckSelectionInUse(getConfiguration())) {
    checkedItems.retainAll(getItems());
    Iterator<T> iterator=checkedItems.iterator();
    while (iterator.hasNext()) {
      ((ICheckable)getTableViewer()).setChecked(iterator.next(),true);
    }
  }
}

Fixed version (ground truth):
@Override protected void initialiseChecked(){
  List<T> checkedItems=getCheckedItems();
  if (checkedItems != null && checkedItems.size() > 0 && getTableViewer() instanceof ICheckable && ConfigurationUtils.isCheckSelectionInUse(getConfiguration())) {
    checkedItems.retainAll(getItems());
    Iterator<T> iterator=checkedItems.iterator();
    while (iterator.hasNext()) {
      ((ICheckable)getTableViewer()).setChecked(getItem(iterator.next()),true);
    }
  }
}
Program: 44924
Project: 44924
Buggy source:
@Override public final void setSelectedItems(List<T> checkedItems){
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItems(checkedItems);
  }
 else {
    super.setSelectedItems(checkedItems);
  }
}

Fixed version (ground truth):
@Override public final void setSelectedItems(List<T> selectedItems){
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItems(selectedItems);
  }
 else {
    super.setSelectedItems(selectedItems);
  }
}
Program: 44925
Project: 44925
Buggy source:
@Override protected void initialiseControl(Composite parent,ListViewerConfiguration listViewerConfiguration){
  super.initialiseControl(parent,listViewerConfiguration);
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItems(getAdvancedListViewer().getSelectedItems());
    getAdvancedListViewer().setSelectedItem(null);
  }
}

Fixed version (ground truth):
@Override protected void initialiseControl(Composite parent,ListViewerConfiguration listViewerConfiguration){
  super.initialiseControl(parent,listViewerConfiguration);
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItems(getAdvancedListViewer().getSelectedItems());
  }
}
Program: 44926
Project: 44926
Buggy source:
protected final SelectableMutableListViewer<T> createListViewer(Composite parent,ListViewerConfiguration listViewerConfiguration,List<T> items,List<T> selectedItems,IRunnableContext runnableContext){
  return createAdvancedListViewer(parent,listViewerConfiguration,items,selectedItems,runnableContext);
}

Fixed version (ground truth):
protected final SelectableMutableListViewer<T> createListViewer(Composite parent,ListViewerConfiguration listViewerConfiguration,List<T> items,List<T> selectedItems,IRunnableContext runnableContext){
  if (isCheckSelectionInUse())   return createAdvancedListViewer(parent,listViewerConfiguration,items,null,runnableContext);
 else   return createAdvancedListViewer(parent,listViewerConfiguration,items,selectedItems,runnableContext);
}
Program: 44927
Project: 44927
Buggy source:
@Override public final void setSelectedItem(T checkedItem){
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItem(checkedItem);
    updatePageComplete();
  }
 else {
    super.setSelectedItem(checkedItem);
  }
}

Fixed version (ground truth):
@Override public final void setSelectedItem(T selectedItem){
  if (getAdvancedListViewer() != null && isCheckSelectionInUse()) {
    getAdvancedListViewer().setCheckedItem(selectedItem);
    updatePageComplete();
  }
 else {
    super.setSelectedItem(selectedItem);
  }
}
Program: 44928
Project: 44928
Buggy source:
/** 
 * Spawns a slime creature
 */
private final void spewSlimeFrom(Dispenser d){
  Block t=getFacingBlock(d,2);
  if (isMaterialOpen(t.getType())) {
    t.getWorld().spawnCreature(t.getLocation(),CreatureType.SLIME);
    safeConsumeInventory(d,slimeType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t.getType());
  }
}

Fixed version (ground truth):
/** 
 * Spawns a slime creature
 */
private final void spewSlimeFrom(Dispenser d){
  Block t=getFacingBlock(d,1);
  Location tl=getCenterLocation(t);
  if (isMaterialOpen(t.getType())) {
    tl.getWorld().spawnCreature(tl,CreatureType.SLIME);
    safeConsumeInventory(d,slimeType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t.getType());
  }
}
Program: 44929
Project: 44929
Buggy source:
/** 
 * Spawns a boat entity
 */
private final void spewBoatFrom(Dispenser d){
  Block t0=getFacingBlock(d,1);
  Block t1=getFacingBlock(d,2);
  if (isMaterialOpen(t0.getType()) && isMaterialOpen(t1.getType())) {
    t1.getWorld().spawn(t1.getLocation(),Boat.class);
    safeConsumeInventory(d,boatType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t1.getType());
  }
}

Fixed version (ground truth):
/** 
 * Spawns a boat entity
 */
private final void spewBoatFrom(Dispenser d){
  Block t0=getFacingBlock(d,1);
  Location tl=getCenterLocation(t0);
  if (isMaterialOpen(t0.getType())) {
    tl.getWorld().spawn(tl,Boat.class);
    safeConsumeInventory(d,boatType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t0.getType());
  }
}
Program: 44930
Project: 44930
Buggy source:
/** 
 * Spawns a minecart entity
 */
private final void spewMinecartFrom(Dispenser d){
  Block t0=getFacingBlock(d,1);
  Block t1=getFacingBlock(d,2);
  if (isMaterialOpen(t0.getType()) && isMaterialOpen(t1.getType())) {
    t1.getWorld().spawn(t1.getLocation(),Minecart.class);
    safeConsumeInventory(d,cartType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t1.getType());
  }
}

Fixed version (ground truth):
/** 
 * Spawns a minecart entity
 */
private final void spewMinecartFrom(Dispenser d){
  Block t0=getFacingBlock(d,1);
  Location tl=getCenterLocation(t0);
  if (isMaterialOpen(t0.getType())) {
    tl.getWorld().spawn(tl,Minecart.class);
    safeConsumeInventory(d,cartType);
  }
 else {
    getServer().getLogger().info("String_Node_Str" + t0.getType());
  }
}
Program: 44931
Project: 44931
Buggy source:
/** 
 * Gets the game name.
 * @param display Format the game name for the display.
 * @return The username if the game name is null, either formated or not.
 */
public String getGamename(boolean display){
  return gamename == null ? (display ? TextUtilities.formatGamename(username) : username) : (display ? TextUtilities.formatGamename(gamename) : gamename);
}

Fixed version (ground truth):
/** 
 * Gets the game name formatted into a long.
 * @return The game name in long format.
 */
public long getGamename(){
  return TextUtilities.stringToLong(gamename);
}
Program: 44932
Project: 44932
Buggy source:
/** 
 * Sets the password.
 * @param password 
 */
public void setPassword(String password){
  this.password=password;
}

Fixed version (ground truth):
/** 
 * Sets the password.
 * @param password The password string.
 */
public void setPassword(String password){
  this.password=password;
}
Program: 44933
Project: 44933
Buggy source:
/** 
 * @return 
 */
public String getPassword(){
  return password;
}

Fixed version (ground truth):
/** 
 * Gets the password.
 * @return The password.
 */
public String getPassword(boolean hashed){
  return hashed ? TextUtilities.hash(username) : password;
}
Program: 44934
Project: 44934
Buggy source:
/** 
 * @param obj
 * @return 
 */
@Override public boolean equals(Object obj){
  if (!(obj instanceof Credentials))   return false;
  return ((Credentials)obj).getUsername().equals(getUsername());
}

Fixed version (ground truth):
/** 
 * See if this credentials equals another.
 * @param obj The comparison object.
 * @return If the two objects are equal.
 */
@Override public boolean equals(Object obj){
  if (!(obj instanceof Credentials))   return false;
  return ((Credentials)obj).getUsername().equals(getUsername());
}
Program: 44935
Project: 44935
Buggy source:
/** 
 * @param passport
 * @return 
 */
public static ResponseCodes reconnectPlayer(Passport passport){
  Drone player=dronestorage.find(passport.getPlayer().getCredentials());
  if (player == null) {
    ResponseCodes code=registerPlayer(passport.getPlayer());
    if (code.equals(ResponseCodes.SUCCESS))     return ResponseCodes.RECONNECT;
    return code;
  }
  if (!(player instanceof Player)) {
    return ResponseCodes.FAILED;
  }
  if (!player.getCredentials().getPassword().equals(passport.getPlayer().getCredentials().getPassword()))   return ResponseCodes.INVALID_USER_PASS;
  ((Player)player).setPassport(passport);
  passport.setPlayer((Player)player);
  return ResponseCodes.RECONNECT;
}

Fixed version (ground truth):
/** 
 * @param passport
 * @return 
 */
public static ResponseCodes reconnectPlayer(Passport passport){
  Drone player=dronestorage.find(passport.getPlayer().getCredentials());
  if (player == null) {
    ResponseCodes code=registerPlayer(passport.getPlayer());
    if (code.equals(ResponseCodes.SUCCESS))     return ResponseCodes.RECONNECT;
    return code;
  }
  if (!(player instanceof Player)) {
    return ResponseCodes.FAILED;
  }
  if (!player.getCredentials().getPassword(true).equals(passport.getPlayer().getCredentials().getPassword(true)))   return ResponseCodes.INVALID_USER_PASS;
  ((Player)player).setPassport(passport);
  passport.setPlayer((Player)player);
  return ResponseCodes.RECONNECT;
}
Program: 44936
Project: 44936
Buggy source:
@Override public void onItemSelected(AdapterView<?> adapterView,View view,int i,long l){
  getMessageProvider().read(i);
  updateTitle();
}

Fixed version (ground truth):
@Override public void onItemSelected(AdapterView<?> adapterView,View view,int i,long l){
  SmsPojo sms=getMessageProvider().getMessageByOrdinal(i);
  getMessageProvider().read(sms);
  updateTitle();
}
Program: 44937
Project: 44937
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.view_message);
  dataBind();
  mGallery.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> adapterView,    View view,    int i,    long l){
      getMessageProvider().read(i);
      updateTitle();
    }
    @Override public void onNothingSelected(    AdapterView<?> adapterView){
    }
  }
);
  ApplicationController app=(ApplicationController)this.getApplicationContext();
  app.attachNewSmsListener(new NewSmsEventListener(){
    @Override public void onNewSms(    NewSmsEvent newSmsEvent){
      Log.v(this.getClass().getSimpleName(),"String_Node_Str");
      MessageProviderHelper.invalidCache();
      dataBind();
    }
  }
);
  Bundle b=getIntent().getExtras();
  long id=b.getLong("String_Node_Str",-1);
  int position=b.getInt("String_Node_Str",-1);
  if (id >= 0) {
    getMessageProvider().read(id);
    mGallery.setSelection(position,false);
    updateTitle();
  }
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.view_message);
  dataBind();
  mGallery.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> adapterView,    View view,    int i,    long l){
      SmsPojo sms=getMessageProvider().getMessageByOrdinal(i);
      getMessageProvider().read(sms);
      updateTitle();
    }
    @Override public void onNothingSelected(    AdapterView<?> adapterView){
    }
  }
);
  ApplicationController app=(ApplicationController)this.getApplicationContext();
  app.attachNewSmsListener(new NewSmsEventListener(){
    @Override public void onNewSms(    NewSmsEvent newSmsEvent){
      Log.v(this.getClass().getSimpleName(),"String_Node_Str");
      MessageProviderHelper.invalidCache();
      dataBind();
    }
  }
);
  Bundle b=getIntent().getExtras();
  long id=b.getLong("String_Node_Str",-1);
  int position=b.getInt("String_Node_Str",-1);
  if (id >= 0) {
    getMessageProvider().read(id);
    mGallery.setSelection(position,false);
    updateTitle();
  }
}
Program: 44938
Project: 44938
Buggy source:
void read(long id);

Fixed version (ground truth):
void read(SmsPojo sms);
Program: 44939
Project: 44939
Buggy source:
public void read(long id){
  SmsPojo smsPojo=get(id);
  if (smsPojo != null && !smsPojo.isRead()) {
    smsPojo.setRead(true);
    session.setAction(smsPojo,SmsAction.Read);
    unreadCount--;
  }
}

Fixed version (ground truth):
@Override public void read(SmsPojo sms){
  if (sms != null && !sms.isRead()) {
    sms.setRead(true);
    session.setAction(sms,SmsAction.Read);
    unreadCount--;
  }
}
Program: 44940
Project: 44940
Buggy source:
public void read(long id){
  SmsPojo smsPojo=get(id);
  if (smsPojo != null && !smsPojo.isRead()) {
    smsPojo.setRead(true);
    mUnreadCount--;
  }
}

Fixed version (ground truth):
@Override public void read(SmsPojo sms){
  if (sms != null && !sms.isRead()) {
    sms.setRead(true);
    mUnreadCount--;
  }
}
Program: 44941
Project: 44941
Buggy source:
public void read(long id){
  SmsPojo smsPojo=get(id);
  if (smsPojo != null && !smsPojo.isRead()) {
    smsPojo.setRead(true);
    mUnreadCount--;
  }
}

Fixed version (ground truth):
public void read(SmsPojo sms){
  if (sms != null && !sms.isRead()) {
    sms.setRead(true);
    mUnreadCount--;
  }
}
Program: 44942
Project: 44942
Buggy source:
private void deleteFirstMessage(){
  final IMessageProvider provider=MessageProviderHelper.getMessageProvider(this.getActivity().getContentResolver());
  mActivity.runOnUiThread(new Runnable(){
    public void run(){
      provider.delete(0);
      mAdapter.notifyDataSetChanged();
    }
  }
);
  getInstrumentation().waitForIdleSync();
}

Fixed version (ground truth):
private void deleteFirstMessage(){
  final IMessageProvider provider=MessageProviderHelper.getMessageProvider(this.getActivity(),this.getActivity(),this.getActivity().getContentResolver());
  mActivity.runOnUiThread(new Runnable(){
    public void run(){
      provider.delete(0);
      mAdapter.notifyDataSetChanged();
    }
  }
);
  getInstrumentation().waitForIdleSync();
}
Program: 44943
Project: 44943
Buggy source:
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this.getContentResolver());
}

Fixed version (ground truth):
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this,this.getContentResolver());
}
Program: 44944
Project: 44944
Buggy source:
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this.getContentResolver());
}

Fixed version (ground truth):
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this,this.getContentResolver());
}
Program: 44945
Project: 44945
Buggy source:
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this.getContentResolver());
}

Fixed version (ground truth):
protected IMessageProvider getMessageProvider(){
  return MessageProviderHelper.getMessageProvider(this,this.getContentResolver());
}
Program: 44946
Project: 44946
Buggy source:
public static IMessageProvider getMessageProvider(ContentResolver contentResolver){
  if (mProvider == null) {
    mProvider=new SmsMessageProvider(contentResolver);
  }
  return mProvider;
}

Fixed version (ground truth):
public static IMessageProvider getMessageProvider(Context context,ContentResolver contentResolver){
  if (mProvider == null) {
    mProvider=new SmsMessageProvider(context,contentResolver);
  }
  return mProvider;
}
Program: 44947
Project: 44947
Buggy source:
public SmsMessageEntry insertMessage(SmsMessage message){
  String senderText=message.getOriginatingAddress();
  SmsMessageSenderEntry sender=this.insertOrSelectSender(senderText);
  SmsMessageEntry res=new SmsMessageEntry(sender,message);
  this.contentResolver.insert(SenderContentProvider.CONTENT_URI,res.toContentValues());
  return res;
}

Fixed version (ground truth):
public SmsMessageEntry insertMessage(SmsMessage message){
  String senderText=message.getOriginatingAddress();
  SmsMessageSenderEntry sender=this.insertOrSelectSender(senderText);
  SmsMessageEntry res=new SmsMessageEntry(sender,message);
  this.contentResolver.insert(SmsContentProvider.CONTENT_URI,res.toContentValues());
  return res;
}
Program: 44948
Project: 44948
Buggy source:
protected SmsPojo[] ConvertMessages(Object[] pdusObj){
  SmsPojo[] messages=new SmsPojo[pdusObj.length];
  for (int i=0; i < pdusObj.length; i++) {
    SmsMessage msg=SmsMessage.createFromPdu((byte[])pdusObj[i]);
    SmsMessageEntry entry=daoMaster.insertMessage(msg);
    SmsPojo sms=new SmsPojo(daoMaster.getContentResolver(),entry);
    messages[i]=sms;
  }
  return messages;
}

Fixed version (ground truth):
protected SmsPojo[] ConvertMessages(Object[] pdusObj){
  SmsPojo[] messages=new SmsPojo[pdusObj.length];
  for (int i=0; i < pdusObj.length; i++) {
    SmsMessage msg=SmsMessage.createFromPdu((byte[])pdusObj[i]);
    SmsMessageEntry entry=daoMaster.insertMessage(msg);
    messages[i]=entry;
  }
  return messages;
}
Program: 44949
Project: 44949
Buggy source:
public void setSender(String sender) throws NotSupportedMethodException {
  throw new NotSupportedMethodException();
}

Fixed version (ground truth):
public void setSender(String sender){
}
Program: 44950
Project: 44950
Buggy source:
public List<SmsPojo> getSmsList(){
  List<SmsPojo> items=new ArrayList<SmsPojo>();
  Cursor cursor=contentResolver.query(SmsContentProvider.CONTENT_URI,null,null,null,null);
  try {
    int size=cursor.getCount();
    if (size == 0) {
      return items;
    }
    for (int i=0; i < size; i++) {
      cursor.move(i);
      SmsMessageEntry item=new SmsMessageEntry(cursor);
      items.add(item);
    }
  }
  finally {
    if (cursor != null && !cursor.isClosed()) {
      cursor.close();
    }
  }
  return items;
}

Fixed version (ground truth):
public List<SmsPojo> getSmsList(){
  List<SmsPojo> items=new ArrayList<SmsPojo>();
  Cursor cursor=contentResolver.query(SmsContentProvider.CONTENT_URI,null,null,null,null);
  try {
    int size=cursor.getCount();
    if (size == 0) {
      return items;
    }
    for (int i=0; i < size; i++) {
      cursor.moveToPosition(i);
      SmsMessageEntry item=new SmsMessageEntry(cursor);
      items.add(item);
    }
  }
  finally {
    if (cursor != null && !cursor.isClosed()) {
      cursor.close();
    }
  }
  return items;
}
Program: 44951
Project: 44951
Buggy source:
SmsMessageEntry(SmsMessageSenderEntry sender,SmsMessage message){
  this.senderId=sender.getId();
  this.message=message.getMessageBody();
  this.received=message.getTimestampMillis();
  this.read=false;
}

Fixed version (ground truth):
SmsMessageEntry(SmsMessageSenderEntry sender,SmsMessage message){
  this.senderId=sender.getId();
  this.sender=sender.getValue();
  this.message=message.getMessageBody();
  this.received=message.getTimestampMillis();
  this.read=false;
}
Program: 44952
Project: 44952
Buggy source:
public void read(int id){
  mList.get(id).setRead(true);
  mUnreadCount--;
}

Fixed version (ground truth):
public void read(int id){
  if (!mList.get(id).wasRead()) {
    mList.get(id).setRead(true);
    mUnreadCount--;
  }
}
Program: 44953
Project: 44953
Buggy source:
public void onReceive(Context context,Intent intent){
  if (intent.getAction().equals(ACTION)) {
    Bundle bundle=intent.getExtras();
    if (bundle != null) {
      Object[] pdusObj=(Object[])bundle.get("String_Node_Str");
      ContentResolver c=context.getContentResolver();
      SmsPojo[] messages=new SmsPojo[pdusObj.length];
      for (int i=0; i < pdusObj.length; i++) {
        SmsMessage msg=SmsMessage.createFromPdu((byte[])pdusObj[i]);
        SmsPojo sms=new SmsPojo(msg);
        messages[i]=sms;
      }
      try {
        int spamCount=new MessageProcessor().ProcessMessages(messages,c);
      }
 catch (      ApplicationException e) {
        e.printStackTrace();
      }
      NotificationManager notifier=(NotificationManager)context.getSystemService(Service.NOTIFICATION_SERVICE);
    }
  }
}

Fixed version (ground truth):
public void onReceive(Context context,Intent intent){
  if (intent.getAction().equals(ACTION)) {
    Bundle bundle=intent.getExtras();
    if (bundle != null) {
      Object[] pdusObj=(Object[])bundle.get("String_Node_Str");
      ContentResolver c=context.getContentResolver();
      SmsPojo[] messages=new SmsPojo[pdusObj.length];
      for (int i=0; i < pdusObj.length; i++) {
        SmsMessage msg=SmsMessage.createFromPdu((byte[])pdusObj[i]);
        SmsPojo sms=new SmsPojo(msg);
        messages[i]=sms;
      }
      int spamCount=new MessageProcessor().ProcessMessages(messages,c);
      NotificationManager notifier=(NotificationManager)context.getSystemService(Service.NOTIFICATION_SERVICE);
    }
  }
}
Program: 44954
Project: 44954
Buggy source:
public abstract Hashtable<Uri,ContentProvider> getTestContentProviders();

Fixed version (ground truth):
/** 
 * Prepares list of content providers and corresponding Uri's for context setup.
 * @return content providers and corresponding Uri's
 */
public abstract Hashtable<Uri,ContentProvider> getTestContentProviders();
Program: 44955
Project: 44955
Buggy source:
@Override public void setUp() throws Exception {
  super.setUp();
  Hashtable<Uri,ContentProvider> settings=getTestContentProviders();
  resolver=new MockContentResolver();
  final String filenamePrefix="String_Node_Str";
  RenamingDelegatingContext targetContextWrapper=new RenamingDelegatingContext(new ResourcefulMockContext(),getProperContext(),filenamePrefix);
  context=new IsolatedContext(resolver,targetContextWrapper);
  for (  Uri uri : settings.keySet()) {
    ContentProvider provider=settings.get(uri);
    provider.attachInfo(context,null);
    resolver.addProvider(uri.getAuthority(),provider);
  }
}

Fixed version (ground truth):
@Override public void setUp() throws Exception {
  super.setUp();
  Hashtable<Uri,ContentProvider> settings=getTestContentProviders();
  resolver=new MockContentResolver();
  final String filenamePrefix="String_Node_Str";
  RenamingDelegatingContext targetContextWrapper=new RenamingDelegatingContext(new ResourcefulMockContext(),getProperContext(),filenamePrefix);
  context=new IsolatedContext(resolver,targetContextWrapper);
  if (settings == null) {
    return;
  }
  for (  Uri uri : settings.keySet()) {
    ContentProvider provider=settings.get(uri);
    provider.attachInfo(context,null);
    resolver.addProvider(uri.getAuthority(),provider);
  }
}
Program: 44956
Project: 44956
Buggy source:
public static void addNewAccount(final String username,final String password){
  AccountStore.Account account=new AccountStore.Account(username);
  account.setPassword(password);
  accountStore.add(account);
  try {
    accountStore.save();
  }
 catch (  IOException ignored) {
  }
}

Fixed version (ground truth):
public static void addNewAccount(final String username,final String password){
  AccountStore.Account account=new AccountStore.Account(username);
  account.setPassword(password);
  accountStore.add(account);
  new Thread(){
    public void run(){
      try {
        accountStore.save();
      }
 catch (      IOException ignored) {
      }
    }
  }
.start();
}
Program: 44957
Project: 44957
Buggy source:
private void load(){
  scripts.clear();
  if (connected) {
    final List<ScriptDefinition> net=SRC_NETWORK.list();
    if (net != null) {
      scripts.addAll(net);
    }
  }
  scripts.addAll(SRC_PRECOMPILED.list());
  scripts.addAll(SRC_SOURCES.list());
  Collections.sort(scripts);
  final ArrayList<String> keywords=new ArrayList<String>(Category.values().length);
  for (  Category c : Category.values()) {
    String id=c.description().trim();
    if (id.length() > 0 && !keywords.contains(id)) {
      keywords.add(id);
    }
  }
  categories.populate(keywords,false);
  filter();
  table.revalidate();
}

Fixed version (ground truth):
private void load(){
  scripts.clear();
  if (connected) {
    final List<ScriptDefinition> net=SRC_NETWORK.list();
    if (net != null) {
      scripts.addAll(net);
    }
  }
  scripts.addAll(SRC_PRECOMPILED.list());
  scripts.addAll(SRC_SOURCES.list());
  Collections.sort(scripts);
  if (firstRun) {
    ArrayList<String> keywords=new ArrayList<String>(Category.values().length);
    for (    Category c : Category.values()) {
      String id=c.description().trim();
      if (id.length() > 0 && !keywords.contains(id)) {
        keywords.add(id);
      }
    }
    categories.populate(keywords,false);
    firstRun=false;
  }
  filter();
  table.revalidate();
}
Program: 44958
Project: 44958
Buggy source:
@Override public int compareTo(final ScriptDefinition def){
  final int c=getName().compareToIgnoreCase(def.getName());
  return c == 0 ? Double.compare(version,def.version) : c;
}

Fixed version (ground truth):
public int compareTo(final ScriptDefinition def){
  final int c=getName().compareToIgnoreCase(def.getName());
  return c == 0 ? Double.compare(version,def.version) : c;
}
Program: 44959
Project: 44959
Buggy source:
@Override public int loop(){
synchronized (lock) {
    if (!Web.loaded) {
      try {
        final BufferedReader br=new BufferedReader(new FileReader(Configuration.Paths.getWebDatabase()));
        String line;
        final List<GameTile> flagsArray=new ArrayList<GameTile>();
        while ((line=br.readLine()) != null) {
          final String[] d=line.split("String_Node_Str");
          if (d.length == 2) {
            final String[] tD=d[0].split("String_Node_Str");
            if (tD.length == 3) {
              try {
                final RSTile tile=new RSTile(Integer.parseInt(tD[0]),Integer.parseInt(tD[1]),Integer.parseInt(tD[2]));
                final GameTile gameTile=new GameTile(tile,Integer.parseInt(d[1]));
                if (flagsArray.contains(tile)) {
                  WebQueue.Remove(line);
                }
 else {
                  flagsArray.add(gameTile);
                }
              }
 catch (              final Exception e) {
              }
            }
 else {
              WebQueue.Remove(line);
            }
          }
 else {
            WebQueue.Remove(line);
          }
        }
        Web.map.addAll(flagsArray);
        Web.loaded=true;
      }
 catch (      final Exception e) {
        log("String_Node_Str");
      }
    }
    if (Web.loaded) {
      deactivate(getID());
    }
  }
  return -1;
}

Fixed version (ground truth):
@Override public int loop(){
synchronized (lock) {
    if (Web.loaded) {
      deactivate(getID());
    }
    if (!Web.loaded) {
      try {
        if (!new File(Configuration.Paths.getWebDatabase()).exists()) {
          Web.loaded=true;
          deactivate(getID());
          return -1;
        }
        final BufferedReader br=new BufferedReader(new FileReader(Configuration.Paths.getWebDatabase()));
        String line;
        final List<GameTile> flagsArray=new ArrayList<GameTile>();
        while ((line=br.readLine()) != null) {
          final String[] d=line.split("String_Node_Str");
          if (d.length == 2) {
            final String[] tD=d[0].split("String_Node_Str");
            if (tD.length == 3) {
              try {
                final RSTile tile=new RSTile(Integer.parseInt(tD[0]),Integer.parseInt(tD[1]),Integer.parseInt(tD[2]));
                final GameTile gameTile=new GameTile(tile,Integer.parseInt(d[1]));
                if (flagsArray.contains(tile)) {
                  WebQueue.Remove(line);
                }
 else {
                  flagsArray.add(gameTile);
                }
              }
 catch (              final Exception e) {
              }
            }
 else {
              WebQueue.Remove(line);
            }
          }
 else {
            WebQueue.Remove(line);
          }
        }
        Web.map.addAll(flagsArray);
        Web.loaded=true;
      }
 catch (      final Exception e) {
        log("String_Node_Str");
      }
    }
    if (Web.loaded) {
      deactivate(getID());
    }
  }
  return -1;
}
Program: 44960
Project: 44960
Buggy source:
public boolean cleanExit(final boolean silent){
  if (silent) {
    disableConfirmations=true;
  }
  if (!disableConfirmations) {
    disableConfirmations=true;
    for (    final Bot bot : bots) {
      if (bot.getAccountName() != null) {
        disableConfirmations=true;
        break;
      }
    }
  }
  boolean doExit=true;
  if (!disableConfirmations) {
    final String message="String_Node_Str";
    final int result=JOptionPane.showConfirmDialog(this,message,Messages.EXIT,JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
    if (result != JOptionPane.OK_OPTION) {
      doExit=false;
    }
  }
  WebQueue.Destroy();
  setVisible(false);
  Monitoring.pushState(Type.ENVIRONMENT,"String_Node_Str","String_Node_Str",Boolean.toString(showAds));
  if (doExit) {
    menuBar.savePrefs();
    Monitoring.stop();
    System.exit(0);
  }
 else {
    setVisible(true);
  }
  return doExit;
}

Fixed version (ground truth):
public boolean cleanExit(final boolean silent){
  if (silent) {
    disableConfirmations=true;
  }
  if (!disableConfirmations) {
    disableConfirmations=true;
    for (    final Bot bot : bots) {
      if (bot.getAccountName() != null) {
        disableConfirmations=true;
        break;
      }
    }
  }
  boolean doExit=true;
  if (!disableConfirmations) {
    final String message="String_Node_Str";
    final int result=JOptionPane.showConfirmDialog(this,message,Messages.EXIT,JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
    if (result != JOptionPane.OK_OPTION) {
      doExit=false;
    }
  }
  try {
    WebQueue.Destroy();
  }
 catch (  NoClassDefFoundError ncdfe) {
  }
  setVisible(false);
  try {
    Monitoring.pushState(Type.ENVIRONMENT,"String_Node_Str","String_Node_Str",Boolean.toString(showAds));
  }
 catch (  NoClassDefFoundError ncdfe) {
  }
  if (doExit) {
    menuBar.savePrefs();
    try {
      Monitoring.stop();
    }
 catch (    NoClassDefFoundError ncdfe) {
    }
    System.exit(0);
  }
 else {
    setVisible(true);
  }
  return doExit;
}
Program: 44961
Project: 44961
Buggy source:
public RSTile getNearestBank(final RSTile tile){
  double dist=-1.0D;
  RSTile finalTile=null;
  final RSTile[] BANKS={new RSTile(3093,3243,0),new RSTile(3209,3219,2),new RSTile(3270,3167,0),new RSTile(3253,3421,0),new RSTile(3188,3437,0),new RSTile(3094,3491,0),new RSTile(3097,3496,0),new RSTile(2946,3369,0),new RSTile(3012,3356,0)};
  for (  RSTile bank : BANKS) {
    double cdist=methods.calc.distanceBetween(tile,bank);
    if ((dist < cdist || dist == -1.0D) && (tile.getZ() == bank.getZ())) {
      dist=cdist;
      finalTile=bank;
    }
  }
  return finalTile;
}

Fixed version (ground truth):
public RSTile getNearestBank(final RSTile tile){
  double dist=-1.0D;
  RSTile finalTile=null;
  final RSTile[] BANKS={new RSTile(3093,3243,0),new RSTile(3209,3219,2),new RSTile(3270,3167,0),new RSTile(3253,3421,0),new RSTile(3188,3437,0),new RSTile(3094,3491,0),new RSTile(3097,3496,0),new RSTile(2946,3369,0),new RSTile(3012,3356,0)};
  for (  RSTile bank : BANKS) {
    double cdist=methods.calc.distanceBetween(tile,bank);
    if ((dist > cdist || dist == -1.0D) && (tile.getZ() == bank.getZ())) {
      dist=cdist;
      finalTile=bank;
    }
  }
  return finalTile;
}
Program: 44962
Project: 44962
Buggy source:
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}

Fixed version (ground truth):
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}
Program: 44963
Project: 44963
Buggy source:
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}

Fixed version (ground truth):
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}
Program: 44966
Project: 44966
Buggy source:
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}

Fixed version (ground truth):
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}
Program: 44969
Project: 44969
Buggy source:
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}

Fixed version (ground truth):
public ArrayList<String> getAllowedHosts(){
  final ArrayList<String> whitelist=new ArrayList<String>(32);
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  whitelist.add("String_Node_Str");
  return whitelist;
}
Program: 44971
Project: 44971
Buggy source:
private void constructItemIcons(){
  final HashMap<String,String> map=new HashMap<String,String>(16);
  map.put(Messages.NEWBOT,GlobalConfiguration.Paths.Resources.ICON_APPADD);
  map.put(Messages.CLOSEBOT,GlobalConfiguration.Paths.Resources.ICON_APPDELETE);
  map.put(Messages.SERVICEKEY,GlobalConfiguration.Paths.Resources.ICON_KEY);
  map.put(Messages.ADDSCRIPT,GlobalConfiguration.Paths.Resources.ICON_SCRIPT_ADD);
  map.put(Messages.RUNSCRIPT,GlobalConfiguration.Paths.Resources.ICON_PLAY);
  map.put(Messages.STOPSCRIPT,GlobalConfiguration.Paths.Resources.ICON_DELETE);
  map.put(Messages.PAUSESCRIPT,GlobalConfiguration.Paths.Resources.ICON_PAUSE);
  map.put(Messages.SAVESCREENSHOT,GlobalConfiguration.Paths.Resources.ICON_PHOTO);
  map.put(Messages.EXIT,GlobalConfiguration.Paths.Resources.ICON_CLOSE);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_REPORTKEY);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_WEBLINK);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_USEREDIT);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_INFO);
  for (  final Entry<String,String> item : map.entrySet()) {
    final JMenuItem menu=commandMenuItem.get(item.getKey());
    menu.setIcon(new ImageIcon(GlobalConfiguration.getImage(item.getValue())));
  }
}

Fixed version (ground truth):
private void constructItemIcons(){
  final HashMap<String,String> map=new HashMap<String,String>(16);
  map.put(Messages.NEWBOT,GlobalConfiguration.Paths.Resources.ICON_APPADD);
  map.put(Messages.CLOSEBOT,GlobalConfiguration.Paths.Resources.ICON_APPDELETE);
  map.put(Messages.SERVICEKEY,GlobalConfiguration.Paths.Resources.ICON_KEY);
  map.put(Messages.ADDSCRIPT,GlobalConfiguration.Paths.Resources.ICON_SCRIPT_ADD);
  map.put(Messages.RUNSCRIPT,GlobalConfiguration.Paths.Resources.ICON_PLAY);
  map.put(Messages.STOPSCRIPT,GlobalConfiguration.Paths.Resources.ICON_DELETE);
  map.put(Messages.PAUSESCRIPT,GlobalConfiguration.Paths.Resources.ICON_PAUSE);
  map.put(Messages.SAVESCREENSHOT,GlobalConfiguration.Paths.Resources.ICON_PHOTO);
  map.put(Messages.HIDEBOT,GlobalConfiguration.Paths.Resources.ICON_TRAY_DOWN);
  map.put(Messages.EXIT,GlobalConfiguration.Paths.Resources.ICON_CLOSE);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_REPORTKEY);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_WEBLINK);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_USEREDIT);
  map.put("String_Node_Str",GlobalConfiguration.Paths.Resources.ICON_INFO);
  for (  final Entry<String,String> item : map.entrySet()) {
    final JMenuItem menu=commandMenuItem.get(item.getKey());
    menu.setIcon(new ImageIcon(GlobalConfiguration.getImage(item.getValue())));
  }
}