nus-yam/ex-repair huggingface dataset:
Program: 152730
Project: 152730
Buggy source:
private int getBackgroundColor(){
  List<? extends ViewType> vt=null;
  if (viewtype instanceof SchoolClass) {
    vt=lesson.getSchoolSubjects();
  }
 else   if (viewtype instanceof SchoolTeacher) {
    vt=lesson.getSchoolSubjects();
  }
 else   if (viewtype instanceof SchoolRoom) {
    vt=lesson.getSchoolClasses();
  }
 else   if (viewtype instanceof SchoolSubject) {
    vt=lesson.getSchoolTeachers();
  }
  if (vt.size() != 0) {
    String bcolor=vt.get(0).getBackColor();
    if (!bcolor.equalsIgnoreCase("String_Node_Str")) {
      return Color.parseColor("String_Node_Str" + bcolor);
    }
  }
  return Color.WHITE;
}

Fixed version (ground truth):
private int getBackgroundColor(){
  List<? extends ViewType> vt=null;
  if (viewtype instanceof SchoolClass) {
    vt=lesson.getSchoolSubjects();
  }
 else   if (viewtype instanceof SchoolTeacher) {
    vt=lesson.getSchoolSubjects();
  }
 else   if (viewtype instanceof SchoolRoom) {
    vt=lesson.getSchoolClasses();
  }
 else   if (viewtype instanceof SchoolSubject) {
    vt=lesson.getSchoolTeachers();
  }
  if (vt.size() != 0) {
    String bcolor=vt.get(0).getBackColor();
    bcolor="String_Node_Str" + bcolor;
    if (!bcolor.equalsIgnoreCase("String_Node_Str")) {
      if (bcolor.length() == 6) {
        setBackgroundColor(Color.parseColor("String_Node_Str" + bcolor));
        return Color.parseColor("String_Node_Str" + bcolor);
      }
      if (bcolor.length() == 8) {
        bcolor=bcolor.substring(2);
        setBackgroundColor(Color.parseColor("String_Node_Str" + bcolor));
        return Color.parseColor("String_Node_Str" + bcolor);
      }
    }
  }
  return Color.WHITE;
}
Program: 152733
Project: 152733
Buggy source:
@Override public void statusChanged(String status){
  if (status.equals(LoginTaskStatus.LOGIN_SUCCESS)) {
    loginImage.setImageResource(R.drawable.btn_check_buttonless_on);
    classListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.CLASSLIST_SUCCESS)) {
    classListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    teacherListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.TEACHERLIST_SUCCESS)) {
    teacherListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    roomListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.ROOMLIST_SUCCESS)) {
    roomListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    subjectListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.SUBJECTLIST_SUCCESS)) {
    subjectListImage.setImageResource(R.drawable.btn_check_buttonless_on);
  }
 else   if (status.equals(LoginTaskStatus.MASTERDATA_SUCCESS)) {
    progressWheel.setVisibility(View.INVISIBLE);
    finishButton.setVisibility(View.VISIBLE);
    ((SchoolPlannerApp)getApplication()).getLoginSetManager().addLoginSet(activeSet);
  }
 else   if (status.equals(LoginTaskStatus.LOGIN_BAD_CREDENTIALS)) {
    loginImage.setImageResource(R.drawable.ic_delete);
  }
}

Fixed version (ground truth):
@Override public void statusChanged(String status){
  if (status.equals(LoginTaskStatus.LOGIN_SUCCESS)) {
    loginImage.setImageResource(R.drawable.btn_check_buttonless_on);
    classListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.CLASSLIST_SUCCESS)) {
    classListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    teacherListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.TEACHERLIST_SUCCESS)) {
    teacherListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    roomListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.ROOMLIST_SUCCESS)) {
    roomListImage.setImageResource(R.drawable.btn_check_buttonless_on);
    subjectListText.setTextColor(R.color.text);
  }
 else   if (status.equals(LoginTaskStatus.SUBJECTLIST_SUCCESS)) {
    subjectListImage.setImageResource(R.drawable.btn_check_buttonless_on);
  }
 else   if (status.equals(LoginTaskStatus.MASTERDATA_SUCCESS)) {
    progressWheel.setVisibility(View.INVISIBLE);
    finishButton.setVisibility(View.VISIBLE);
  }
 else   if (status.equals(LoginTaskStatus.LOGIN_BAD_CREDENTIALS)) {
    loginImage.setImageResource(R.drawable.ic_delete);
  }
}
Program: 152734
Project: 152734
Buggy source:
@Override public void onBackPressed(){
  AsyncTask<Void,AsyncTaskProgress,Boolean> loginTask=loginListener.getAsyncTask();
  if (loginTask != null && !loginTask.isCancelled() && !(loginTask.getStatus() == Status.FINISHED)) {
    loginTask.cancel(true);
  }
 else   super.onBackPressed();
}

Fixed version (ground truth):
@Override public void onBackPressed(){
  AsyncTask<Void,AsyncTaskProgress,Boolean> loginTask=loginListener.getAsyncTask();
  if (loginTask != null && !loginTask.isCancelled() && !(loginTask.getStatus() == Status.FINISHED)) {
    loginTask.cancel(true);
  }
  super.onBackPressed();
}
Program: 152736
Project: 152736
Buggy source:
public GUIWeek analyse(){
  Set<String> keySet=weekdata.keySet();
  TreeSet<DateTime> dates=new TreeSet<DateTime>();
  for (  Object element : keySet) {
    String string=(String)element;
    dates.add(DateTimeUtils.iso8601StringToDateTime(string));
  }
  GUIWeek week=new GUIWeek();
  for (  Object element : dates) {
    DateTime dateTime=(DateTime)element;
    List<Lesson> lessons=weekdata.get(DateTimeUtils.toISO8601Date(dateTime));
    GUIDay d=analyseDay(dateTime,lessons);
    week.setGUIDay(dateTime,d);
  }
  week.setViewType(viewtype);
  week.setTimegrid(timegridForDateTimeDay);
  week.setHolidays(holidays);
  return week;
}

Fixed version (ground truth):
public GUIWeek analyse(){
  Set<String> keySet=weekdata.keySet();
  TreeSet<DateTime> dates=new TreeSet<DateTime>();
  for (  Object element : keySet) {
    String string=(String)element;
    dates.add(DateTimeUtils.iso8601StringToDateTime(string));
  }
  HashMap<DateTime,List<TimegridUnit>> timegrid=initTimeGrid(timegridRaw,dates);
  GUIWeek week=new GUIWeek();
  for (  Object element : dates) {
    DateTime dateTime=(DateTime)element;
    List<Lesson> lessons=weekdata.get(DateTimeUtils.toISO8601Date(dateTime));
    GUIDay d=analyseDay(dateTime,lessons,timegrid.get(dateTime));
    week.setGUIDay(dateTime,d);
  }
  week.setViewType(viewtype);
  week.setTimegrid(getMondayTimeGrid(timegrid));
  week.setHolidays(holidays);
  return week;
}
Program: 152737
Project: 152737
Buggy source:
public void setTimeGrid(Timegrid t){
  timegrid=t;
}

Fixed version (ground truth):
public void setTimeGrid(Timegrid t){
  timegridRaw=t;
}
Program: 152738
Project: 152738
Buggy source:
private boolean searchForSearchResults(Spinner spinner,String query){
  ArrayAdapter<String> spinneradapter=(ArrayAdapter<String>)spinner.getAdapter();
  ViewTypeSpinnerOnItemSelectedListener onItemClickListener=(ViewTypeSpinnerOnItemSelectedListener)spinner.getOnItemSelectedListener();
  for (int i=0; i < spinneradapter.getCount(); i++) {
    String sname=onItemClickListener.getViewType(i).getName();
    String lname=onItemClickListener.getViewType(i).getLongName();
    if (sname.equalsIgnoreCase(query)) {
      onItemClickListener.fireEvent(i);
      return true;
    }
    if (lname.length() > 4 && lname.toLowerCase().contains(query.toLowerCase())) {
      onItemClickListener.fireEvent(i);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean searchForSearchResults(Spinner spinner,String query){
  ArrayAdapter<String> spinneradapter=(ArrayAdapter<String>)spinner.getAdapter();
  ViewTypeSpinnerOnItemSelectedListener onItemClickListener=(ViewTypeSpinnerOnItemSelectedListener)spinner.getOnItemSelectedListener();
  for (int i=0; i < spinneradapter.getCount(); i++) {
    String sname=onItemClickListener.getViewType(i).getName();
    String lname=onItemClickListener.getViewType(i).getLongName();
    if (sname.equalsIgnoreCase(query)) {
      Log.d("String_Node_Str","String_Node_Str" + sname);
      onItemClickListener.fireEvent(i);
      return true;
    }
    if (query.length() > 4 && lname.toLowerCase().contains(query.toLowerCase())) {
      Log.d("String_Node_Str","String_Node_Str" + lname);
      onItemClickListener.fireEvent(i);
      return true;
    }
  }
  return false;
}
Program: 152745
Project: 152745
Buggy source:
@Override public String getResponse(String request) throws IOException {
  String response=null;
  try {
    response=executeRequest(request);
  }
 catch (  SocketTimeoutException e) {
    Log.w("String_Node_Str","String_Node_Str",e);
    Log.i("String_Node_Str","String_Node_Str");
    httpsUrl=url;
    response=executeRequest(request);
  }
catch (  IllegalArgumentException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
catch (  SSLException e) {
    if (e.getMessage().equals("String_Node_Str")) {
      Log.i("String_Node_Str","String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().unregister("String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().register(new Scheme("String_Node_Str",caCertSSLSocketFactory(),httpsUrl != null && httpsUrl.getPort() != -1 ? httpsUrl.getPort() : 443));
      try {
        response=executeRequest(request);
      }
 catch (      SSLException e2) {
        Log.i("String_Node_Str","String_Node_Str");
        httpsUrl=url;
        response=executeRequest(request);
      }
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      httpsUrl=url;
      response=executeRequest(request);
    }
  }
catch (  UnknownHostException e) {
    Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ url.getHost());
    throw new UnknownHostException("String_Node_Str" + url.getHost());
  }
  if (response == null) {
    throw new IOException("String_Node_Str");
  }
  return response;
}

Fixed version (ground truth):
@Override public String getResponse(String request) throws IOException {
  String response=null;
  try {
    response=executeRequest(request);
  }
 catch (  SocketTimeoutException e) {
    Log.w("String_Node_Str","String_Node_Str",e);
    Log.i("String_Node_Str","String_Node_Str");
    httpsUrl=url;
    response=executeRequest(request);
  }
catch (  IllegalArgumentException e) {
    new IOException(e.getMessage());
  }
catch (  SSLException e) {
    if (e.getMessage().equals("String_Node_Str")) {
      Log.i("String_Node_Str","String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().unregister("String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().register(new Scheme("String_Node_Str",caCertSSLSocketFactory(),httpsUrl != null && httpsUrl.getPort() != -1 ? httpsUrl.getPort() : 443));
      try {
        response=executeRequest(request);
      }
 catch (      SSLException e2) {
        Log.i("String_Node_Str","String_Node_Str");
        httpsUrl=url;
        response=executeRequest(request);
      }
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      httpsUrl=url;
      response=executeRequest(request);
    }
  }
catch (  UnknownHostException e) {
    Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ url.getHost());
    throw new UnknownHostException("String_Node_Str" + url.getHost());
  }
  if (response == null) {
    throw new IOException("String_Node_Str");
  }
  return response;
}
Program: 152746
Project: 152746
Buggy source:
private String executeRequest(String request) throws ClientProtocolException, UnknownHostException, IOException {
  HttpPost httpRequest=new HttpPost(httpsUrl);
  if (jsessionid != null) {
    httpRequest.addHeader("String_Node_Str","String_Node_Str" + jsessionid);
    Log.d("String_Node_Str","String_Node_Str" + httpRequest.getHeaders("String_Node_Str")[0].toString());
  }
  StringEntity entity=new StringEntity(request,"String_Node_Str");
  httpRequest.setEntity(entity);
  HttpResponse httpResponse=null;
  String response;
  httpResponse=client.execute(httpRequest);
  Log.d("String_Node_Str","String_Node_Str" + request);
  ByteArrayOutputStream body=new ByteArrayOutputStream();
  httpResponse.getEntity().writeTo(body);
  response=body.toString();
  Log.d("String_Node_Str","String_Node_Str" + httpResponse.getStatusLine());
  Log.d("String_Node_Str","String_Node_Str" + response);
  return response;
}

Fixed version (ground truth):
private String executeRequest(String request) throws ClientProtocolException, UnknownHostException, IOException {
  HttpPost httpRequest=new HttpPost(httpsUrl);
  if (jsessionid != null) {
    httpRequest.addHeader("String_Node_Str","String_Node_Str" + jsessionid);
    Log.d("String_Node_Str","String_Node_Str" + httpRequest.getHeaders("String_Node_Str")[0].toString());
  }
  StringEntity entity=new StringEntity(request,"String_Node_Str");
  httpRequest.setEntity(entity);
  HttpResponse httpResponse=client.execute(httpRequest);
  Log.d("String_Node_Str","String_Node_Str" + request);
  ByteArrayOutputStream body=new ByteArrayOutputStream();
  httpResponse.getEntity().writeTo(body);
  String response=body.toString();
  Log.d("String_Node_Str","String_Node_Str" + httpResponse.getStatusLine());
  Log.d("String_Node_Str","String_Node_Str" + response);
  return response;
}
Program: 152747
Project: 152747
Buggy source:
@Override public String getResponse(String request) throws IOException {
  String response=null;
  try {
    response=executeRequest(request);
  }
 catch (  SocketTimeoutException e) {
    Log.w("String_Node_Str","String_Node_Str",e);
    throw new SocketTimeoutException("String_Node_Str");
  }
catch (  IllegalArgumentException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
catch (  SSLException e) {
    if (e.getMessage().equals("String_Node_Str")) {
      Log.i("String_Node_Str","String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().unregister("String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().register(new Scheme("String_Node_Str",newSslSocketFactory(),httpsUrl != null && httpsUrl.getPort() != -1 ? httpsUrl.getPort() : 443));
      try {
        response=executeRequest(request);
      }
 catch (      SSLException e2) {
        Log.i("String_Node_Str","String_Node_Str");
        httpsUrl=url;
        response=executeRequest(request);
      }
    }
  }
catch (  UnknownHostException e) {
    Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ url.getHost());
    throw new UnknownHostException("String_Node_Str" + url.getHost());
  }
  if (response == null) {
    throw new IOException("String_Node_Str");
  }
  return response;
}

Fixed version (ground truth):
@Override public String getResponse(String request) throws IOException {
  String response=null;
  try {
    response=executeRequest(request);
  }
 catch (  SocketTimeoutException e) {
    Log.w("String_Node_Str","String_Node_Str",e);
    Log.i("String_Node_Str","String_Node_Str");
    httpsUrl=url;
    try {
      response=executeRequest(request);
    }
 catch (    SocketTimeoutException e2) {
      throw new SocketTimeoutException("String_Node_Str");
    }
  }
catch (  IllegalArgumentException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
catch (  SSLException e) {
    if (e.getMessage().equals("String_Node_Str")) {
      Log.i("String_Node_Str","String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().unregister("String_Node_Str");
      client.getConnectionManager().getSchemeRegistry().register(new Scheme("String_Node_Str",newSslSocketFactory(),httpsUrl != null && httpsUrl.getPort() != -1 ? httpsUrl.getPort() : 443));
      try {
        response=executeRequest(request);
      }
 catch (      SSLException e2) {
        Log.i("String_Node_Str","String_Node_Str");
        httpsUrl=url;
        response=executeRequest(request);
      }
    }
 else {
      Log.i("String_Node_Str","String_Node_Str");
      httpsUrl=url;
      response=executeRequest(request);
    }
  }
catch (  UnknownHostException e) {
    Log.d("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ url.getHost());
    throw new UnknownHostException("String_Node_Str" + url.getHost());
  }
  if (response == null) {
    throw new IOException("String_Node_Str");
  }
  return response;
}
Program: 152748
Project: 152748
Buggy source:
public static void close(Statement statement){
  try {
    Connection connection=statement.getConnection();
    statement.close();
    connection.close();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void close(Statement statement){
  if (statement == null) {
    return;
  }
  try {
    Connection connection=statement.getConnection();
    statement.close();
    connection.close();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 152749
Project: 152749
Buggy source:
/** 
 * @throws SQLException 
 */
private void insertServers() throws SQLException {
  String serversToCrawlStr=configuration.getProperty("String_Node_Str");
  String[] serversToCrawl=serversToCrawlStr.split("String_Node_Str");
  for (  String server : serversToCrawl) {
    PreparedStatement statement=dataSource.prepareStatement("String_Node_Str",server);
    try {
      statement.execute();
    }
 catch (    SQLException e) {
      LOGGER.warn("String_Node_Str" + server);
    }
 finally {
      ChannelDirectoryDataSource.close(statement);
    }
  }
}

Fixed version (ground truth):
/** 
 * @throws SQLException 
 */
private void insertServers() throws SQLException {
  String serversToCrawlStr=configuration.getProperty("String_Node_Str");
  String[] serversToCrawl=serversToCrawlStr.split("String_Node_Str");
  for (  String server : serversToCrawl) {
    CrawlerHelper.insertServer(server,dataSource);
  }
}
Program: 152750
Project: 152750
Buggy source:
private void crawl(List<NodeCrawler> nodeCrawlers,String server,PubSubManager manager,Item item){
  Node node=null;
  try {
    node=manager.getNode(item.getNode());
  }
 catch (  Exception e) {
    LOGGER.warn("String_Node_Str" + item.getNode() + "String_Node_Str"+ "String_Node_Str"+ server+ "String_Node_Str",e);
    return;
  }
  try {
    insertNode(node,server);
  }
 catch (  Exception e) {
    LOGGER.warn("String_Node_Str" + item.getNode() + "String_Node_Str"+ "String_Node_Str"+ server+ "String_Node_Str",e);
  }
  for (  NodeCrawler nodeCrawler : nodeCrawlers) {
    try {
      if (nodeCrawler.accept(node)) {
        nodeCrawler.crawl(node,server);
      }
    }
 catch (    Exception e) {
      LOGGER.warn("String_Node_Str" + item.getNode() + "String_Node_Str"+ "String_Node_Str"+ server+ "String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void crawl(List<NodeCrawler> nodeCrawlers,String server,PubSubManager manager,Item item){
  Node node=null;
  try {
    node=manager.getNode(item.getNode());
  }
 catch (  Exception e) {
    LOGGER.warn("String_Node_Str" + item.getNode() + "String_Node_Str"+ "String_Node_Str"+ server+ "String_Node_Str",e);
    return;
  }
  CrawlerHelper.insertNode(node,server,dataSource);
  for (  NodeCrawler nodeCrawler : nodeCrawlers) {
    try {
      if (nodeCrawler.accept(node)) {
        nodeCrawler.crawl(node,server);
      }
    }
 catch (    Exception e) {
      LOGGER.warn("String_Node_Str" + item.getNode() + "String_Node_Str"+ "String_Node_Str"+ server+ "String_Node_Str",e);
    }
  }
}
Program: 152751
Project: 152751
Buggy source:
/** 
 * @param user
 * @throws SQLException 
 */
public static void enqueueNewServer(String user,ChannelDirectoryDataSource dataSource){
  String server=user.substring(user.indexOf('@') + 1);
  PreparedStatement statement=null;
  try {
    statement=dataSource.prepareStatement("String_Node_Str",server);
    statement.execute();
  }
 catch (  SQLException e) {
    LOGGER.warn("String_Node_Str" + server);
  }
 finally {
    if (statement != null) {
      ChannelDirectoryDataSource.close(statement);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param user
 * @throws SQLException 
 */
public static void enqueueNewServer(String user,ChannelDirectoryDataSource dataSource){
  String server=user.substring(user.indexOf('@') + 1);
  insertServer(server,dataSource);
}
Program: 152752
Project: 152752
Buggy source:
@Override public long toChannelId(String channelJid){
  try {
    Connection connection=dataSource.getConnection();
    PreparedStatement selectItemSt=connection.prepareStatement("String_Node_Str");
    selectItemSt.setString(1,channelJid);
    ResultSet resultSet=selectItemSt.executeQuery();
    resultSet.next();
    long itemId=resultSet.getLong("String_Node_Str");
    selectItemSt.close();
    connection.close();
    return itemId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public long toChannelId(String channelJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,channelJid);
    ResultSet resultSet=statement.executeQuery();
    resultSet.next();
    long itemId=resultSet.getLong("String_Node_Str");
    return itemId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}
Program: 152753
Project: 152753
Buggy source:
@Override public ChannelData toChannelData(long itemID){
  try {
    Connection connection=dataSource.getConnection();
    PreparedStatement selectItemSt=connection.prepareStatement("String_Node_Str");
    selectItemSt.setLong(1,itemID);
    ResultSet resultSet=selectItemSt.executeQuery();
    resultSet.next();
    String jid=resultSet.getString("String_Node_Str");
    String title=resultSet.getString("String_Node_Str");
    String desc=resultSet.getString("String_Node_Str");
    selectItemSt.close();
    ChannelData channelData=new ChannelData();
    channelData.setId(jid);
    channelData.setTitle(title);
    channelData.setDescription(desc);
    connection.close();
    return channelData;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public ChannelData toChannelData(long itemID){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setLong(1,itemID);
    ResultSet resultSet=statement.executeQuery();
    resultSet.next();
    String jid=resultSet.getString("String_Node_Str");
    String title=resultSet.getString("String_Node_Str");
    String desc=resultSet.getString("String_Node_Str");
    ChannelData channelData=new ChannelData();
    channelData.setId(jid);
    channelData.setTitle(title);
    channelData.setDescription(desc);
    return channelData;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}
Program: 152754
Project: 152754
Buggy source:
@Override public long toUserId(String userJid){
  try {
    Connection connection=dataSource.getConnection();
    PreparedStatement selectUserSt=connection.prepareStatement("String_Node_Str");
    selectUserSt.setString(1,userJid);
    ResultSet resultSet=selectUserSt.executeQuery();
    resultSet.next();
    long userId=resultSet.getLong("String_Node_Str");
    selectUserSt.close();
    connection.close();
    return userId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public long toUserId(String userJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,userJid);
    ResultSet resultSet=statement.executeQuery();
    resultSet.next();
    long userId=resultSet.getLong("String_Node_Str");
    return userId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}
Program: 152755
Project: 152755
Buggy source:
/** 
 * Recommends a list of jids of channels that are related to the user taste.
 * @param userJid The user jid
 * @param howMany The number of recommendations
 * @return A list of recommended channels' jids 
 * @throws TasteException
 * @throws SQLException 
 */
public RecommendationResponse recommend(String userJid,int howMany) throws TasteException, SQLException {
  long userId=recommenderDataModel.toUserId(userJid);
  List<RecommendedItem> recommended=userRecommender.recommend(userId,howMany);
  List<ChannelData> recommendedChannels=new LinkedList<ChannelData>();
  for (  RecommendedItem recommendedItem : recommended) {
    recommendedChannels.add(recommenderDataModel.toChannelData(recommendedItem.getItemID()));
  }
  return new RecommendationResponse(recommendedChannels,getPreferenceCount(userId));
}

Fixed version (ground truth):
/** 
 * Recommends a list of jids of channels that are related to the user taste.
 * @param userJid The user jid
 * @param howMany The number of recommendations
 * @return A list of recommended channels' jids 
 * @throws TasteException
 * @throws SQLException 
 */
public RecommendationResponse recommend(String userJid,int howMany) throws TasteException, SQLException {
  Long userId=recommenderDataModel.toUserId(userJid);
  if (userId == null) {
    return new RecommendationResponse(new LinkedList<ChannelData>(),0);
  }
  List<RecommendedItem> recommended=userRecommender.recommend(userId,howMany);
  List<ChannelData> recommendedChannels=new LinkedList<ChannelData>();
  for (  RecommendedItem recommendedItem : recommended) {
    recommendedChannels.add(recommenderDataModel.toChannelData(recommendedItem.getItemID()));
  }
  return new RecommendationResponse(recommendedChannels,getPreferenceCount(userId));
}
Program: 152756
Project: 152756
Buggy source:
/** 
 * Recommends a list of jids of channels that are similar to a given channel.
 * @param channelJid The channel jid
 * @param howMany The number of recommendations
 * @return A list of similar channels' jids 
 * @throws TasteException
 * @throws SQLException 
 */
public RecommendationResponse getSimilarChannels(String channelJid,int howMany) throws TasteException, SQLException {
  long itemId=recommenderDataModel.toChannelId(channelJid);
  TopItems.Estimator<Long> estimator=new MostSimilarEstimator(itemId,itemSimilarity,null);
  MostSimilarItemsCandidateItemsStrategy candidateStrategy=new PreferredItemsNeighborhoodCandidateItemsStrategy();
  FastIDSet possibleItemIDs=candidateStrategy.getCandidateItems(new long[]{itemId},recommenderDataModel.getDataModel());
  List<RecommendedItem> recommended=TopItems.getTopItems(howMany,possibleItemIDs.iterator(),null,estimator);
  List<ChannelData> recommendedChannels=new LinkedList<ChannelData>();
  for (  RecommendedItem recommendedItem : recommended) {
    recommendedChannels.add(recommenderDataModel.toChannelData(recommendedItem.getItemID()));
  }
  return new RecommendationResponse(recommendedChannels,possibleItemIDs.size());
}

Fixed version (ground truth):
/** 
 * Recommends a list of jids of channels that are similar to a given channel.
 * @param channelJid The channel jid
 * @param howMany The number of recommendations
 * @return A list of similar channels' jids 
 * @throws TasteException
 * @throws SQLException 
 */
public RecommendationResponse getSimilarChannels(String channelJid,int howMany) throws TasteException, SQLException {
  Long itemId=recommenderDataModel.toChannelId(channelJid);
  if (itemId == null) {
    return new RecommendationResponse(new LinkedList<ChannelData>(),0);
  }
  TopItems.Estimator<Long> estimator=new MostSimilarEstimator(itemId,itemSimilarity,null);
  MostSimilarItemsCandidateItemsStrategy candidateStrategy=new PreferredItemsNeighborhoodCandidateItemsStrategy();
  FastIDSet possibleItemIDs=candidateStrategy.getCandidateItems(new long[]{itemId},recommenderDataModel.getDataModel());
  List<RecommendedItem> recommended=TopItems.getTopItems(howMany,possibleItemIDs.iterator(),null,estimator);
  List<ChannelData> recommendedChannels=new LinkedList<ChannelData>();
  for (  RecommendedItem recommendedItem : recommended) {
    recommendedChannels.add(recommenderDataModel.toChannelData(recommendedItem.getItemID()));
  }
  return new RecommendationResponse(recommendedChannels,possibleItemIDs.size());
}
Program: 152757
Project: 152757
Buggy source:
/** 
 * Converts a channel jid into a long id,  which is required by Mahout.
 * @param channelJid
 * @return
 */
public long toChannelId(String channelJid);

Fixed version (ground truth):
/** 
 * Converts a channel jid into a long id,  which is required by Mahout.
 * @param channelJid
 * @return
 */
public Long toChannelId(String channelJid);
Program: 152758
Project: 152758
Buggy source:
/** 
 * Converts a user jid into a long id,  which is required by Mahout.
 * @param userJid
 * @return
 */
public long toUserId(String userJid);

Fixed version (ground truth):
/** 
 * Converts a user jid into a long id,  which is required by Mahout.
 * @param userJid
 * @return
 */
public Long toUserId(String userJid);
Program: 152759
Project: 152759
Buggy source:
@Override public long toChannelId(String channelJid){
  return itemToId.get(channelJid);
}

Fixed version (ground truth):
@Override public Long toChannelId(String channelJid){
  return itemToId.get(channelJid);
}
Program: 152760
Project: 152760
Buggy source:
@Override public long toUserId(String userJid){
  return userToId.get(userJid);
}

Fixed version (ground truth):
@Override public Long toUserId(String userJid){
  return userToId.get(userJid);
}
Program: 152761
Project: 152761
Buggy source:
@Override public long toChannelId(String channelJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,channelJid);
    ResultSet resultSet=statement.executeQuery();
    resultSet.next();
    long itemId=resultSet.getLong("String_Node_Str");
    return itemId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}

Fixed version (ground truth):
@Override public Long toChannelId(String channelJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,channelJid);
    ResultSet resultSet=statement.executeQuery();
    if (resultSet.next()) {
      return resultSet.getLong("String_Node_Str");
    }
    return null;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}
Program: 152762
Project: 152762
Buggy source:
@Override public long toUserId(String userJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,userJid);
    ResultSet resultSet=statement.executeQuery();
    resultSet.next();
    long userId=resultSet.getLong("String_Node_Str");
    return userId;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}

Fixed version (ground truth):
@Override public Long toUserId(String userJid){
  PreparedStatement statement=null;
  try {
    Connection connection=dataSource.getConnection();
    statement=connection.prepareStatement("String_Node_Str");
    statement.setString(1,userJid);
    ResultSet resultSet=statement.executeQuery();
    if (resultSet.next()) {
      return resultSet.getLong("String_Node_Str");
    }
    return null;
  }
 catch (  SQLException e) {
    throw new RuntimeException(e);
  }
 finally {
    close(statement);
  }
}
Program: 152763
Project: 152763
Buggy source:
private void addPropertyToArquillianConfig(Node xml,String container,String key,String value){
  Node config=xml.getSingle("String_Node_Str" + container);
  if (config == null) {
    config=xml.createChild("String_Node_Str");
  }
  config.createChild("String_Node_Str").createChild("String_Node_Str").text(jbossHome);
}

Fixed version (ground truth):
private void addPropertyToArquillianConfig(Node xml,String container,String key,String value){
  Node config=xml.getSingle("String_Node_Str" + container);
  if (config == null) {
    config=xml.createChild("String_Node_Str");
  }
}
Program: 152764
Project: 152764
Buggy source:
@SetupCommand public void installContainer(@Option(name="String_Node_Str",required=true,completer=ContainerCommandCompleter.class) String containerId,@Option(name="String_Node_Str",required=false,defaultValue="String_Node_Str") String testframework){
  dependencyFacet=project.getFacet(DependencyFacet.class);
  DependencyBuilder bomDependency=DependencyBuilder.create().setGroupId("String_Node_Str").setArtifactId("String_Node_Str");
  List<Dependency> bomVersions=dependencyFacet.resolveAvailableVersions(bomDependency);
  Dependency bom=shell.promptChoiceTyped("String_Node_Str",bomVersions,bomVersions.get(bomVersions.size() - 1));
  dependencyFacet.addManagedDependency(bom);
  if (testframework.equals("String_Node_Str")) {
    installJunitDependencies();
  }
 else {
    installTestNgDependencies();
  }
  List<Container> containers=containerDirectoryParser.getContainers();
  boolean foundContainer=false;
  for (  Container container : containers) {
    if (container.getId().equals(containerId)) {
      shell.println(container.getName());
      containerInstaller.installContainer(container);
      installEvent.fire(new ContainerInstallEvent(container));
      foundContainer=true;
      break;
    }
  }
  if (!foundContainer) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
@SetupCommand public void installContainer(@Option(name="String_Node_Str",required=true,completer=ContainerCommandCompleter.class) String containerId,@Option(name="String_Node_Str",required=false,defaultValue="String_Node_Str") String testframework){
  dependencyFacet=project.getFacet(DependencyFacet.class);
  if (testframework.equals("String_Node_Str")) {
    installJunitDependencies();
  }
 else {
    installTestNgDependencies();
  }
  installArquillianBom();
  List<Container> containers=containerDirectoryParser.getContainers();
  boolean foundContainer=false;
  for (  Container container : containers) {
    if (container.getId().equals(containerId)) {
      containerInstaller.installContainer(container);
      installEvent.fire(new ContainerInstallEvent(container));
      foundContainer=true;
      break;
    }
  }
  if (!foundContainer) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 152765
Project: 152765
Buggy source:
private void addDeployementMethod(boolean enableJPA,JavaSource<?> javaSource,JavaClass testclass){
  testclass.addMethod().setStatic().setName("String_Node_Str").setPublic().setReturnType("String_Node_Str").setBody(createDeploymentFor(javaSource,enableJPA)).addAnnotation("String_Node_Str");
}

Fixed version (ground truth):
private void addDeployementMethod(boolean enableJPA,JavaSource<?> javaSource,JavaClass testclass){
  testclass.addMethod().setStatic(true).setName("String_Node_Str").setPublic().setReturnType("String_Node_Str").setBody(createDeploymentFor(javaSource,enableJPA)).addAnnotation("String_Node_Str");
}
Program: 152766
Project: 152766
Buggy source:
private void generateExporterClass(JavaSourceFacet java) throws FileNotFoundException {
  JavaClass deployementExporterClass=JavaParser.create(JavaClass.class).setPackage("String_Node_Str").setName("String_Node_Str").setPublic();
  deployementExporterClass.addMethod().setName("String_Node_Str").setStatic().setPublic().setReturnTypeVoid().setParameters("String_Node_Str").setBody("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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  java.saveTestJavaSource(deployementExporterClass);
}

Fixed version (ground truth):
private void generateExporterClass(JavaSourceFacet java) throws FileNotFoundException {
  JavaClass deployementExporterClass=JavaParser.create(JavaClass.class).setPackage("String_Node_Str").setName("String_Node_Str").setPublic();
  deployementExporterClass.addMethod().setName("String_Node_Str").setStatic(true).setPublic().setReturnTypeVoid().setParameters("String_Node_Str").setBody("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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  deployementExporterClass.addImport("String_Node_Str");
  java.saveTestJavaSource(deployementExporterClass);
}
Program: 152767
Project: 152767
Buggy source:
@Override public void installDependencies(String arquillianVersion){
  DependencyFacet dependencyFacet=project.getFacet(DependencyFacet.class);
  DependencyBuilder dep1=DependencyBuilder.create().setGroupId("String_Node_Str").setArtifactId("String_Node_Str").setScopeType(ScopeType.TEST);
  List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(dep1);
  Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
  builder.addProfile("String_Node_Str",dependency);
  String jbossHome=shell.promptCommon("String_Node_Str",PromptType.FILE_PATH);
  Node xml=XMLParser.parse("String_Node_Str" + "String_Node_Str");
  Node container=xml.create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").attribute("String_Node_Str","String_Node_Str");
  container.create("String_Node_Str").create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").text(jbossHome);
  container.create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").text("String_Node_Str");
  ResourceFacet resources=project.getFacet(ResourceFacet.class);
  FileResource<?> resource=(FileResource<?>)resources.getResourceFolder().getChild("String_Node_Str");
  resource.setContents(XMLParser.toXMLString(xml));
}

Fixed version (ground truth):
@Override public void installDependencies(String arquillianVersion){
  DependencyFacet dependencyFacet=project.getFacet(DependencyFacet.class);
  DependencyBuilder dep1=DependencyBuilder.create().setGroupId("String_Node_Str").setArtifactId("String_Node_Str").setScopeType(ScopeType.TEST);
  List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(dep1);
  if (dependencies.isEmpty()) {
    throw new RuntimeException("String_Node_Str" + dep1.toCoordinates() + "String_Node_Str");
  }
  Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
  builder.addProfile("String_Node_Str",dependency);
  String jbossHome=shell.promptCommon("String_Node_Str",PromptType.FILE_PATH);
  Node xml=XMLParser.parse("String_Node_Str" + "String_Node_Str");
  Node container=xml.create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").attribute("String_Node_Str","String_Node_Str");
  container.create("String_Node_Str").create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").text(jbossHome);
  container.create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").create("String_Node_Str").attribute("String_Node_Str","String_Node_Str").text("String_Node_Str");
  ResourceFacet resources=project.getFacet(ResourceFacet.class);
  FileResource<?> resource=(FileResource<?>)resources.getResourceFolder().getChild("String_Node_Str");
  resource.setContents(XMLParser.toXMLString(xml));
}
Program: 152768
Project: 152768
Buggy source:
private void installTestNgDependencies(){
  DependencyBuilder testngDependency=createTestNgDependency();
  if (!dependencyFacet.hasDependency(testngDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(testngDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies);
    dependencyFacet.addDependency(dependency);
  }
  DependencyBuilder testNgArquillianDependency=createTestNgArquillianDependency();
  if (!dependencyFacet.hasDependency(testNgArquillianDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(testNgArquillianDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
    dependencyFacet.addDependency(dependency);
  }
}

Fixed version (ground truth):
private void installTestNgDependencies(){
  DependencyBuilder testngDependency=createTestNgDependency();
  if (!dependencyFacet.hasDependency(testngDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(testngDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies);
    dependencyFacet.addDependency(dependency);
  }
  DependencyBuilder testNgArquillianDependency=createTestNgArquillianDependency();
  if (!dependencyFacet.hasDependency(testNgArquillianDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(testNgArquillianDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
    arquillianVersion=dependency.getVersion();
    dependencyFacet.addDependency(dependency);
  }
 else {
    arquillianVersion=dependencyFacet.getDependency(testNgArquillianDependency).getVersion();
  }
}
Program: 152769
Project: 152769
Buggy source:
private void installJunitDependencies(){
  DependencyBuilder junitDependency=createJunitDependency();
  if (!dependencyFacet.hasDependency(junitDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(junitDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies);
    dependencyFacet.addDependency(dependency);
  }
  DependencyBuilder junitArquillianDependency=createJunitArquillianDependency();
  if (!dependencyFacet.hasDependency(junitArquillianDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(junitArquillianDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
    dependencyFacet.addDependency(dependency);
  }
}

Fixed version (ground truth):
private void installJunitDependencies(){
  DependencyBuilder junitDependency=createJunitDependency();
  if (!dependencyFacet.hasDependency(junitDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(junitDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies);
    dependencyFacet.addDependency(dependency);
  }
  DependencyBuilder junitArquillianDependency=createJunitArquillianDependency();
  if (!dependencyFacet.hasDependency(junitArquillianDependency)) {
    List<Dependency> dependencies=dependencyFacet.resolveAvailableVersions(junitArquillianDependency);
    Dependency dependency=shell.promptChoiceTyped("String_Node_Str",dependencies,dependencies.get(dependencies.size() - 1));
    arquillianVersion=dependency.getVersion();
    dependencyFacet.addDependency(dependency);
  }
 else {
    arquillianVersion=dependencyFacet.getDependency(junitArquillianDependency).getVersion();
  }
}
Program: 152770
Project: 152770
Buggy source:
public boolean contains(Object o){
  SkipListNode node=find((E)o);
  return node != null && node.getValue() != null && ((Comparable)node.getValue()).compareTo(o) == 0;
}

Fixed version (ground truth):
public boolean contains(Object o){
  E e=(E)o;
  SkipListNode node=find(e);
  return node != null && node.getValue() != null && equalTo(node.getValue(),e);
}
Program: 152771
Project: 152771
Buggy source:
private SkipListNode find(E e,SkipListNode start,int beginLevel){
  SkipListNode current=start;
  SkipListNode next=null;
  int level=beginLevel;
  do {
    current=findNext(e,current,level);
  }
 while (level-- > 0);
  return current;
}

Fixed version (ground truth):
private SkipListNode find(E e,SkipListNode current,int level){
  do {
    current=findNext(e,current,level);
  }
 while (level-- > 0);
  return current;
}
Program: 152772
Project: 152772
Buggy source:
public static void main(String[] args){
  SkipList testList=new SkipList<Integer>();
  System.out.println(testList.find(2));
  System.out.println(testList.contains(2));
  System.out.println(testList.add(2));
  System.out.println(testList.find(2));
  System.out.println(testList.contains(2));
}

Fixed version (ground truth):
public static void main(String[] args){
  SkipList testList=new SkipList<Integer>();
  testList.add(1);
  testList.add(4);
  System.out.println(testList.find(2));
  testList.add(2);
  System.out.println(testList.find(2));
}
Program: 152773
Project: 152773
Buggy source:
private SkipListNode findNext(E e,SkipListNode current,int level){
  SkipListNode next=current.nextNodes.get(level);
  while (next != null) {
    E value=next.getValue();
    if (((Comparable)e).compareTo(value) > 0)     break;
    current=next;
    next=current.nextNodes.get(level);
  }
  return current;
}

Fixed version (ground truth):
private SkipListNode findNext(E e,SkipListNode current,int level){
  SkipListNode next=current.nextNodes.get(level);
  while (next != null) {
    E value=next.getValue();
    if (lessThan(e,value))     break;
    current=next;
    next=current.nextNodes.get(level);
  }
  return current;
}
Program: 152774
Project: 152774
Buggy source:
/** 
 * Contributes the   {@link BreadCrumbDispatcher} to the master dispatcher configuration.
 * @param configuration The dispatcher configuration to add the {@link BreadCrumbDispatcher} to.
 * @param breadCrumbDispatcher The {@link BreadCrumbDispatcher} to add.
 */
public static void contributeMasterDispatcher(final OrderedConfiguration<Dispatcher> configuration,@InjectService("String_Node_Str") final Dispatcher breadCrumbDispatcher){
  configuration.add("String_Node_Str",breadCrumbDispatcher,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Contributes the   {@link BreadCrumbDispatcher} to the master dispatcher configuration.
 * @param configuration The dispatcher configuration to add the {@link BreadCrumbDispatcher} to.
 * @param breadCrumbDispatcher The {@link BreadCrumbDispatcher} to add.
 */
public static void contributeMasterDispatcher(final OrderedConfiguration<Dispatcher> configuration,@InjectService("String_Node_Str") final Dispatcher breadCrumbDispatcher){
  configuration.add("String_Node_Str",breadCrumbDispatcher,"String_Node_Str","String_Node_Str");
}
Program: 152775
Project: 152775
Buggy source:
/** 
 * Mark the last read message as consumed
 * @return
 */
public boolean consume(){
  if (lastRead == null) {
    return false;
  }
  return db.deleteEntry(lastRead);
}

Fixed version (ground truth):
/** 
 * Mark the last read message as consumed
 * @return
 */
public boolean consume(){
  if (lastRead == null) {
    return false;
  }
  if (db.deleteEntry(lastRead)) {
    lastRead=null;
    return true;
  }
  return false;
}