nus-yam/ex-repair huggingface dataset:
Program: 15651
Project: 15651
Buggy source:
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == Constants.REQUEST_CODE_ARTICLES && resultCode == Activity.RESULT_OK) {
    ListView articleList=aq.id(R.id.articleList).getListView();
    articleList.setSelection(data.getIntExtra("String_Node_Str",0));
    ((ArticlesAdapter)articleList.getAdapter()).notifyDataSetChanged();
  }
}

Fixed version (ground truth):
@Override public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == Constants.REQUEST_CODE_ARTICLES && resultCode == Activity.RESULT_OK) {
    ListView articleList=aq.id(R.id.articleList).getListView();
    articleList.setSelectionFromTop(data.getIntExtra("String_Node_Str",0),100);
  }
}
Program: 15652
Project: 15652
Buggy source:
/** 
 * Handle the incoming intent.
 * @param intent
 */
private void handleIntent(Intent intent){
  if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
    String query=intent.getStringExtra(SearchManager.QUERY);
    SearchRecentSuggestions suggestions=new SearchRecentSuggestions(this,RecentSuggestionsProvider.AUTHORITY,RecentSuggestionsProvider.MODE);
    suggestions.saveRecentQuery(query,null);
    Fragment fragment=new ArticlesFragment();
    Bundle args=new Bundle();
    args.putString("String_Node_Str",query);
    args.putString("String_Node_Str","String_Node_Str" + query);
    args.putBoolean("String_Node_Str",false);
    fragment.setArguments(args);
    FragmentManager fragmentManager=getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.content_frame,fragment,ARTICLES_FRAGMENT_TAG).commitAllowingStateLoss();
    drawerList.setItemChecked(drawerList.getCheckedItemPosition(),false);
    setTitle(query);
  }
}

Fixed version (ground truth):
/** 
 * Handle the incoming intent.
 * @param intent
 */
private void handleIntent(Intent intent){
  if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
    String query=intent.getStringExtra(SearchManager.QUERY);
    if (searchItem != null) {
      searchItem.collapseActionView();
    }
    SearchRecentSuggestions suggestions=new SearchRecentSuggestions(this,RecentSuggestionsProvider.AUTHORITY,RecentSuggestionsProvider.MODE);
    suggestions.saveRecentQuery(query,null);
    Fragment fragment=new ArticlesFragment();
    Bundle args=new Bundle();
    args.putString("String_Node_Str",query);
    args.putString("String_Node_Str","String_Node_Str" + query);
    args.putBoolean("String_Node_Str",false);
    fragment.setArguments(args);
    FragmentManager fragmentManager=getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.content_frame,fragment,ARTICLES_FRAGMENT_TAG).commitAllowingStateLoss();
    drawerList.setItemChecked(drawerList.getCheckedItemPosition(),false);
    setTitle(query);
  }
}
Program: 15653
Project: 15653
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.main,menu);
  SearchManager searchManager=(SearchManager)getSystemService(Context.SEARCH_SERVICE);
  final MenuItem searchItem=menu.findItem(R.id.action_search);
  SearchView searchView=(SearchView)searchItem.getActionView();
  searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
  searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener(){
    @Override public boolean onQueryTextSubmit(    String query){
      if (searchItem != null) {
        searchItem.collapseActionView();
      }
      return false;
    }
    @Override public boolean onQueryTextChange(    String newText){
      return false;
    }
  }
);
  return super.onCreateOptionsMenu(menu);
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.main,menu);
  SearchManager searchManager=(SearchManager)getSystemService(Context.SEARCH_SERVICE);
  searchItem=menu.findItem(R.id.action_search);
  SearchView searchView=(SearchView)searchItem.getActionView();
  searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
  return super.onCreateOptionsMenu(menu);
}
Program: 15654
Project: 15654
Buggy source:
@Override public void finish(){
  Intent data=new Intent();
  data.putExtra("String_Node_Str",viewPager.getCurrentItem());
  setResult(RESULT_OK,data);
  sharedAdapterHelper.removeAdapter(viewPager.getAdapter(),articlesHelperListener);
  super.finish();
}

Fixed version (ground truth):
@Override public void finish(){
  Intent data=new Intent();
  if (viewPager != null) {
    data.putExtra("String_Node_Str",viewPager.getCurrentItem());
    sharedAdapterHelper.removeAdapter(viewPager.getAdapter(),articlesHelperListener);
  }
  setResult(RESULT_OK,data);
  super.finish();
}
Program: 15655
Project: 15655
Buggy source:
/** 
 * Refresh subscriptions list from server.
 * @param position Position to select
 * @param refresh True to force articles refresh
 */
private void refreshSubscriptions(final int position,final boolean refresh){
  SubscriptionResource.list(this,false,new SismicsHttpResponseHandler(){
    @Override public void onSuccess(    JSONObject json){
      SubscriptionAdapter adapter=(SubscriptionAdapter)drawerList.getAdapter();
      if (adapter == null) {
        adapter=new SubscriptionAdapter(MainActivity.this,json);
        drawerList.setAdapter(adapter);
      }
 else {
        adapter.setItems(json);
        adapter.notifyDataSetChanged();
      }
      if (position != -1) {
        int pos=position;
        if (!adapter.isEnabled(pos)) {
          pos=1;
        }
        selectItem(pos,refresh);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Refresh subscriptions list from server.
 * @param position Position to select
 * @param refresh True to force articles refresh
 */
private void refreshSubscriptions(final int position,final boolean refresh){
  SubscriptionResource.list(this,false,new SismicsHttpResponseHandler(){
    @Override public void onSuccess(    JSONObject json){
      if (isFinishing()) {
        return;
      }
      SubscriptionAdapter adapter=(SubscriptionAdapter)drawerList.getAdapter();
      if (adapter == null) {
        adapter=new SubscriptionAdapter(MainActivity.this,json);
        drawerList.setAdapter(adapter);
      }
 else {
        adapter.setItems(json);
        adapter.notifyDataSetChanged();
      }
      if (position != -1) {
        int pos=position;
        if (!adapter.isEnabled(pos)) {
          pos=1;
        }
        selectItem(pos,refresh);
      }
    }
  }
);
}
Program: 15656
Project: 15656
Buggy source:
@Override public void onSuccess(JSONObject json){
  SubscriptionAdapter adapter=(SubscriptionAdapter)drawerList.getAdapter();
  if (adapter == null) {
    adapter=new SubscriptionAdapter(MainActivity.this,json);
    drawerList.setAdapter(adapter);
  }
 else {
    adapter.setItems(json);
    adapter.notifyDataSetChanged();
  }
  if (position != -1) {
    int pos=position;
    if (!adapter.isEnabled(pos)) {
      pos=1;
    }
    selectItem(pos,refresh);
  }
}

Fixed version (ground truth):
@Override public void onSuccess(JSONObject json){
  if (isFinishing()) {
    return;
  }
  SubscriptionAdapter adapter=(SubscriptionAdapter)drawerList.getAdapter();
  if (adapter == null) {
    adapter=new SubscriptionAdapter(MainActivity.this,json);
    drawerList.setAdapter(adapter);
  }
 else {
    adapter.setItems(json);
    adapter.notifyDataSetChanged();
  }
  if (position != -1) {
    int pos=position;
    if (!adapter.isEnabled(pos)) {
      pos=1;
    }
    selectItem(pos,refresh);
  }
}
Program: 15657
Project: 15657
Buggy source:
/** 
 * Find some logs.
 * @param criteria Search criteria
 * @param list Paginated list (modified by side effect)
 */
public void find(LogCriteria criteria,PaginatedList<LogEntry> list){
  LinkedList<LogEntry> logEntryList=new LinkedList<LogEntry>();
  final String level=criteria.getLevel();
  final String tag=criteria.getTag();
  final String message=criteria.getMessage();
  int resultCount=0;
  for (Iterator<LogEntry> it=logQueue.iterator(); it.hasNext(); ) {
    LogEntry logEntry=it.next();
    if ((level == null || logEntry.getLevel().toLowerCase().equals(level)) && (tag == null || logEntry.getTag().toLowerCase().equals(tag)) && (message == null || logEntry.getMessage().toLowerCase().contains(message))) {
      if (resultCount >= list.getOffset() && resultCount < list.getOffset() + list.getLimit()) {
        logEntryList.addFirst(logEntry);
      }
      resultCount++;
    }
  }
  list.setResultCount(resultCount);
  list.setResultList(logEntryList);
}

Fixed version (ground truth):
/** 
 * Find some logs.
 * @param criteria Search criteria
 * @param list Paginated list (modified by side effect)
 */
public void find(LogCriteria criteria,PaginatedList<LogEntry> list){
  List<LogEntry> logEntryList=new LinkedList<LogEntry>();
  final String level=criteria.getLevel();
  final String tag=criteria.getTag();
  final String message=criteria.getMessage();
  int resultCount=0;
  for (Iterator<LogEntry> it=logQueue.iterator(); it.hasNext(); ) {
    LogEntry logEntry=it.next();
    if ((level == null || logEntry.getLevel().toLowerCase().equals(level)) && (tag == null || logEntry.getTag().toLowerCase().equals(tag)) && (message == null || logEntry.getMessage().toLowerCase().contains(message))) {
      logEntryList.add(logEntry);
      resultCount++;
    }
  }
  List<LogEntry> logEntrySubList=Lists.reverse(logEntryList).subList(list.getOffset(),list.getOffset() + list.getLimit());
  list.setResultCount(resultCount);
  list.setResultList(logEntrySubList);
}
Program: 15658
Project: 15658
Buggy source:
/** 
 * Test the log resource.
 * @throws JSONException
 */
@Test public void testLogResource() throws JSONException {
  String adminAuthenticationToken=clientUtil.login("String_Node_Str","String_Node_Str",false);
  WebResource appResource=resource().path("String_Node_Str");
  ClientResponse response=appResource.get(ClientResponse.class);
  appResource.addFilter(new CookieAuthenticationFilter(adminAuthenticationToken));
  response=appResource.get(ClientResponse.class);
  Assert.assertEquals(Status.OK,Status.fromStatusCode(response.getStatus()));
  JSONObject json=response.getEntity(JSONObject.class);
  JSONArray logs=json.getJSONArray("String_Node_Str");
  Assert.assertTrue(logs.length() == 10);
}

Fixed version (ground truth):
/** 
 * Test the log resource.
 * @throws JSONException
 */
@Test public void testLogResource() throws JSONException {
  String adminAuthenticationToken=clientUtil.login("String_Node_Str","String_Node_Str",false);
  WebResource appResource=resource().path("String_Node_Str").queryParam("String_Node_Str","String_Node_Str");
  ClientResponse response=appResource.get(ClientResponse.class);
  appResource.addFilter(new CookieAuthenticationFilter(adminAuthenticationToken));
  response=appResource.get(ClientResponse.class);
  Assert.assertEquals(Status.OK,Status.fromStatusCode(response.getStatus()));
  JSONObject json=response.getEntity(JSONObject.class);
  JSONArray logs=json.getJSONArray("String_Node_Str");
  Assert.assertTrue(logs.length() == 10);
  Long date1=logs.optJSONObject(0).optLong("String_Node_Str");
  Long date2=logs.optJSONObject(9).optLong("String_Node_Str");
  Assert.assertTrue(date1 > date2);
  appResource=resource().path("String_Node_Str").queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str","String_Node_Str");
  response=appResource.get(ClientResponse.class);
  appResource.addFilter(new CookieAuthenticationFilter(adminAuthenticationToken));
  response=appResource.get(ClientResponse.class);
  Assert.assertEquals(Status.OK,Status.fromStatusCode(response.getStatus()));
  json=response.getEntity(JSONObject.class);
  logs=json.getJSONArray("String_Node_Str");
  Assert.assertTrue(logs.length() == 10);
  Long date3=logs.optJSONObject(0).optLong("String_Node_Str");
  Long date4=logs.optJSONObject(9).optLong("String_Node_Str");
  Assert.assertTrue(date3 > date4);
  Assert.assertTrue(date2 > date3);
}
Program: 15662
Project: 15662
Buggy source:
/** 
 * Create the first batch of user articles when subscribing to a feed, so that the user has at least a few unread articles.
 * @param userId User ID
 * @param feedSubscription Feed subscription
 */
public void createInitialUserArticle(String userId,FeedSubscription feedSubscription){
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUnread(false);
  userArticleCriteria.setUserId(userId);
  userArticleCriteria.setSubscribed(true);
  userArticleCriteria.setFeedId(feedSubscription.getFeedId());
  UserArticleDao userArticleDao=new UserArticleDao();
  PaginatedList<UserArticleDto> paginatedList=PaginatedLists.create();
  userArticleDao.findByCriteria(userArticleCriteria,paginatedList);
  for (  UserArticleDto userArticleDto : paginatedList.getResultList()) {
    if (userArticleDto.getId() == null) {
      UserArticle userArticle=new UserArticle();
      userArticle.setArticleId(userArticleDto.getArticleId());
      userArticle.setUserId(userId);
      userArticleDao.create(userArticle);
    }
  }
}

Fixed version (ground truth):
/** 
 * Create the first batch of user articles when subscribing to a feed, so that the user has at least a few unread articles.
 * @param userId User ID
 * @param feedSubscription Feed subscription
 */
public void createInitialUserArticle(String userId,FeedSubscription feedSubscription){
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUnread(false);
  userArticleCriteria.setUserId(userId);
  userArticleCriteria.setVisible(false);
  userArticleCriteria.setFeedId(feedSubscription.getFeedId());
  UserArticleDao userArticleDao=new UserArticleDao();
  PaginatedList<UserArticleDto> paginatedList=PaginatedLists.create();
  userArticleDao.findByCriteria(userArticleCriteria,paginatedList);
  for (  UserArticleDto userArticleDto : paginatedList.getResultList()) {
    if (userArticleDto.getId() == null) {
      UserArticle userArticle=new UserArticle();
      userArticle.setArticleId(userArticleDto.getArticleId());
      userArticle.setUserId(userId);
      userArticleDao.create(userArticle);
    }
  }
}
Program: 15664
Project: 15664
Buggy source:
/** 
 * Marks all articles as read.
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read() throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setSubscribed(true);
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}

Fixed version (ground truth):
/** 
 * Marks all articles as read.
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read() throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}
Program: 15665
Project: 15665
Buggy source:
/** 
 * Returns all articles.
 * @param unread Returns only unread articles
 * @param limit Page limit
 * @param offset Page offset
 * @return Response
 * @throws JSONException
 */
@GET @Produces(MediaType.APPLICATION_JSON) public Response get(@QueryParam("String_Node_Str") boolean unread,@QueryParam("String_Node_Str") Integer limit,@QueryParam("String_Node_Str") Integer offset) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUnread(unread);
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setSubscribed(true);
  UserArticleDao userArticleDao=new UserArticleDao();
  PaginatedList<UserArticleDto> paginatedList=PaginatedLists.create(limit,offset);
  userArticleDao.findByCriteria(userArticleCriteria,paginatedList);
  JSONObject response=new JSONObject();
  List<JSONObject> articles=new ArrayList<JSONObject>();
  for (  UserArticleDto userArticle : paginatedList.getResultList()) {
    articles.add(ArticleAssembler.asJson(userArticle));
  }
  response.put("String_Node_Str",paginatedList.getResultCount());
  response.put("String_Node_Str",articles);
  return Response.ok().entity(response).build();
}

Fixed version (ground truth):
/** 
 * Returns all articles.
 * @param unread Returns only unread articles
 * @param limit Page limit
 * @param offset Page offset
 * @return Response
 * @throws JSONException
 */
@GET @Produces(MediaType.APPLICATION_JSON) public Response get(@QueryParam("String_Node_Str") boolean unread,@QueryParam("String_Node_Str") Integer limit,@QueryParam("String_Node_Str") Integer offset) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUnread(unread);
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setVisible(true);
  UserArticleDao userArticleDao=new UserArticleDao();
  PaginatedList<UserArticleDto> paginatedList=PaginatedLists.create(limit,offset);
  userArticleDao.findByCriteria(userArticleCriteria,paginatedList);
  JSONObject response=new JSONObject();
  List<JSONObject> articles=new ArrayList<JSONObject>();
  for (  UserArticleDto userArticle : paginatedList.getResultList()) {
    articles.add(ArticleAssembler.asJson(userArticle));
  }
  response.put("String_Node_Str",paginatedList.getResultCount());
  response.put("String_Node_Str",articles);
  return Response.ok().entity(response).build();
}
Program: 15666
Project: 15666
Buggy source:
/** 
 * Marks all articles in this category as read.
 * @param id Category ID
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read(@PathParam("String_Node_Str") String id) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  CategoryDao categoryDao=new CategoryDao();
  try {
    categoryDao.getCategory(id,principal.getId());
  }
 catch (  NoResultException e) {
    throw new ClientException("String_Node_Str",MessageFormat.format("String_Node_Str",id));
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setSubscribed(true);
  userArticleCriteria.setCategoryId(id);
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}

Fixed version (ground truth):
/** 
 * Marks all articles in this category as read.
 * @param id Category ID
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read(@PathParam("String_Node_Str") String id) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  CategoryDao categoryDao=new CategoryDao();
  try {
    categoryDao.getCategory(id,principal.getId());
  }
 catch (  NoResultException e) {
    throw new ClientException("String_Node_Str",MessageFormat.format("String_Node_Str",id));
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setCategoryId(id);
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}
Program: 15668
Project: 15668
Buggy source:
/** 
 * Marks all articles in this subscription as read.
 * @param id Subscription ID
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read(@PathParam("String_Node_Str") String id) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  FeedSubscriptionDao feedSubscriptionDao=new FeedSubscriptionDao();
  FeedSubscription feedSubscription=feedSubscriptionDao.getFeedSubscription(id,principal.getId());
  if (feedSubscription == null) {
    throw new ClientException("String_Node_Str",MessageFormat.format("String_Node_Str",id));
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setSubscribed(true);
  userArticleCriteria.setFeedSubscriptionId(id);
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}

Fixed version (ground truth):
/** 
 * Marks all articles in this subscription as read.
 * @param id Subscription ID
 * @return Response
 * @throws JSONException
 */
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response read(@PathParam("String_Node_Str") String id) throws JSONException {
  if (!authenticate()) {
    throw new ForbiddenClientException();
  }
  FeedSubscriptionDao feedSubscriptionDao=new FeedSubscriptionDao();
  FeedSubscription feedSubscription=feedSubscriptionDao.getFeedSubscription(id,principal.getId());
  if (feedSubscription == null) {
    throw new ClientException("String_Node_Str",MessageFormat.format("String_Node_Str",id));
  }
  UserArticleCriteria userArticleCriteria=new UserArticleCriteria();
  userArticleCriteria.setUserId(principal.getId());
  userArticleCriteria.setFeedSubscriptionId(id);
  UserArticleDao userArticleDao=new UserArticleDao();
  userArticleDao.markAsRead(userArticleCriteria);
  JSONObject response=new JSONObject();
  response.put("String_Node_Str","String_Node_Str");
  return Response.ok().entity(response).build();
}
Program: 15671
Project: 15671
Buggy source:
/** 
 * Reads an RSS / Atom feed into feed and articles.
 * @param is Input stream
 * @throws Exception
 */
public void readRssFeed(InputStream is) throws Exception {
  SAXParserFactory factory=SAXParserFactory.newInstance();
  factory.setNamespaceAware(true);
  factory.setFeature("String_Node_Str",false);
  factory.setFeature("String_Node_Str",true);
  SAXParser parser=factory.newSAXParser();
  InputSource source=new InputSource();
  source.setCharacterStream(new InputStreamReader(is));
  try {
    parser.parse(source,this);
  }
 catch (  InternalError e) {
    throw new Exception(e);
  }
  if (atom) {
    String url=new AtomUrlGuesserStrategy().guess(atomLinkList);
    feed.setUrl(url);
  }
  validateFeed();
  fixGuid();
}

Fixed version (ground truth):
/** 
 * Reads an RSS / Atom feed into feed and articles.
 * @param is Input stream
 * @throws Exception
 */
public void readRssFeed(InputStream is) throws Exception {
  SAXParserFactory factory=SAXParserFactory.newInstance();
  factory.setNamespaceAware(true);
  factory.setFeature("String_Node_Str",false);
  factory.setFeature("String_Node_Str",true);
  SAXParser parser=factory.newSAXParser();
  String xml=CharStreams.toString(new InputStreamReader(is));
  xml=xml.replaceFirst("String_Node_Str","String_Node_Str");
  try {
    InputSource source=new InputSource(new StringReader(xml));
    parser.parse(source,this);
  }
 catch (  InternalError e) {
    throw new Exception(e);
  }
  if (atom) {
    String url=new AtomUrlGuesserStrategy().guess(atomLinkList);
    feed.setUrl(url);
  }
  validateFeed();
  fixGuid();
}
Program: 15673
Project: 15673
Buggy source:
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  Connection conn=getConnection("String_Node_Str");
  testUnwrap(conn);
  testUnsupportedOperations(conn);
  testChangeType(conn);
  testCallTablePrepared(conn);
  testValues(conn);
  testToString(conn);
  testExecuteUpdateCall(conn);
  testPrepareExecute(conn);
  testEnum(conn);
  testUUID(conn);
  testUUIDAsJavaObject(conn);
  testScopedGeneratedKey(conn);
  testLobTempFiles(conn);
  testExecuteErrorTwice(conn);
  testTempView(conn);
  testInsertFunction(conn);
  testPrepareRecompile(conn);
  testMaxRowsChange(conn);
  testUnknownDataType(conn);
  testCancelReuse(conn);
  testCoalesce(conn);
  testPreparedStatementMetaData(conn);
  testDate(conn);
  testDate8(conn);
  testTime8(conn);
  testDateTime8(conn);
  testOffsetDateTime8(conn);
  testArray(conn);
  testUUIDGeneratedKeys(conn);
  testSetObject(conn);
  testPreparedSubquery(conn);
  testLikeIndex(conn);
  testCasewhen(conn);
  testSubquery(conn);
  testObject(conn);
  testIdentity(conn);
  testBatchGeneratedKeys(conn);
  testDataTypes(conn);
  testGetMoreResults(conn);
  testBlob(conn);
  testClob(conn);
  testParameterMetaData(conn);
  testColumnMetaDataWithEquals(conn);
  testColumnMetaDataWithIn(conn);
  conn.close();
  testPreparedStatementWithLiteralsNone();
  deleteDb("String_Node_Str");
}

Fixed version (ground truth):
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  Connection conn=getConnection("String_Node_Str");
  testUnwrap(conn);
  testUnsupportedOperations(conn);
  testChangeType(conn);
  testCallTablePrepared(conn);
  testValues(conn);
  testToString(conn);
  testExecuteUpdateCall(conn);
  testPrepareExecute(conn);
  testEnum(conn);
  testUUID(conn);
  testUUIDAsJavaObject(conn);
  testScopedGeneratedKey(conn);
  testLobTempFiles(conn);
  testExecuteErrorTwice(conn);
  testTempView(conn);
  testInsertFunction(conn);
  testPrepareRecompile(conn);
  testMaxRowsChange(conn);
  testUnknownDataType(conn);
  testCancelReuse(conn);
  testCoalesce(conn);
  testPreparedStatementMetaData(conn);
  testDate(conn);
  testDate8(conn);
  testTime8(conn);
  testDateTime8(conn);
  testOffsetDateTime8(conn);
  testArray(conn);
  testUUIDGeneratedKeys(conn);
  testSetObject(conn);
  testPreparedSubquery(conn);
  testLikeIndex(conn);
  testCasewhen(conn);
  testSubquery(conn);
  testObject(conn);
  testIdentity(conn);
  testBatchGeneratedKeys(conn);
  testDataTypes(conn);
  testGetMoreResults(conn);
  testBlob(conn);
  testClob(conn);
  testParameterMetaData(conn);
  testColumnMetaDataWithEquals(conn);
  testColumnMetaDataWithIn(conn);
  conn.close();
  testPreparedStatementWithLiteralsNone();
  testPreparedStatementWithIndexedParameterAndLiteralsNone();
  deleteDb("String_Node_Str");
}
Program: 15676
Project: 15676
Buggy source:
@Override public int write(ByteBuffer src,long position) throws IOException {
  if (FilePathReorderWrites.getPartialWrites() && src.remaining() > 2) {
    ByteBuffer buf1=src.slice();
    ByteBuffer buf2=src.slice();
    int len1=src.remaining() / 2;
    int len2=src.remaining() - len1;
    buf1.limit(buf1.limit() - len2);
    buf2.position(buf2.position() + len1);
    int x=addOperation(new FileWriteOperation(id++,position,buf1));
    x+=addOperation(new FileWriteOperation(id++,position + len1,buf2));
    return x;
  }
  return addOperation(new FileWriteOperation(id++,position,src));
}

Fixed version (ground truth):
@Override public int write(ByteBuffer src,long position) throws IOException {
  if (FilePathReorderWrites.isPartialWrites() && src.remaining() > 2) {
    final int tmp=src.remaining();
    ByteBuffer buf1=src.slice();
    ByteBuffer buf2=src.slice();
    int len1=src.remaining() / 2;
    int len2=src.remaining() - len1;
    buf1.limit(buf1.limit() - len2);
    buf2.position(buf2.position() + len1);
    int x=addOperation(new FileWriteOperation(id++,position,buf1));
    x+=addOperation(new FileWriteOperation(id++,position + len1,buf2));
    src.position(src.position() + x);
    return x;
  }
  return addOperation(new FileWriteOperation(id++,position,src));
}
Program: 15677
Project: 15677
Buggy source:
/** 
 * Whether partial writes are possible (writing only part of the data).
 * @param partialWrites true to enable
 */
public static void setPartialWrites(boolean partialWrites){
  FilePathReorderWrites.partialWrites=partialWrites;
}

Fixed version (ground truth):
/** 
 * Whether partial writes are possible (writing only part of the data).
 * @param b true to enable
 */
public static void setPartialWrites(boolean b){
  partialWrites=b;
}
Program: 15678
Project: 15678
Buggy source:
@Override public FileChannel open(String mode) throws IOException {
  InputStream in=newInputStream();
  FilePath copy=FilePath.get(getBase().toString() + "String_Node_Str");
  OutputStream out=copy.newOutputStream(false);
  IOUtils.copy(in,out);
  FileChannel base=getBase().open(mode);
  FileChannel readBase=copy.open(mode);
  return new FileReorderWrites(this,base,readBase);
}

Fixed version (ground truth):
@Override public FileChannel open(String mode) throws IOException {
  InputStream in=newInputStream();
  FilePath copy=FilePath.get(getBase().toString() + "String_Node_Str");
  OutputStream out=copy.newOutputStream(false);
  IOUtils.copy(in,out);
  in.close();
  out.close();
  FileChannel base=getBase().open(mode);
  FileChannel readBase=copy.open(mode);
  return new FileReorderWrites(this,base,readBase);
}
Program: 15679
Project: 15679
Buggy source:
@Override public int update(){
  session.commit(true);
  Table synonym=getSchema().findTableOrView(session,synonymName);
  if (synonym == null) {
    if (!ifExists) {
      throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1,synonymName);
    }
  }
 else {
    if (!Table.SYNONYM.equals(synonym.getTableType())) {
      throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1,synonymName);
    }
    session.getUser().checkRight(synonym,Right.ALL);
    synonym.lock(session,true,true);
    session.getDatabase().removeSchemaObject(session,synonym);
  }
  return 0;
}

Fixed version (ground truth):
@Override public int update(){
  session.commit(true);
  Table synonym=getSchema().findTableOrView(session,synonymName);
  if (synonym == null) {
    if (!ifExists) {
      throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1,synonymName);
    }
  }
 else {
    if (!TableType.SYNONYM.equals(synonym.getTableType())) {
      throw DbException.get(ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1,synonymName);
    }
    session.getUser().checkRight(synonym,Right.ALL);
    synonym.lock(session,true,true);
    session.getDatabase().removeSchemaObject(session,synonym);
  }
  return 0;
}
Program: 15681
Project: 15681
Buggy source:
@Override public String getTableType(){
  return SYNONYM;
}

Fixed version (ground truth):
@Override public TableType getTableType(){
  return TableType.SYNONYM;
}
Program: 15683
Project: 15683
Buggy source:
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  conn=getConnection("String_Node_Str");
  testUnwrap();
  testUnsupportedOperations();
  testTraceError();
  testSavepoint();
  testConnectionRollback();
  testStatement();
  testPreparedStatement();
  testIdentityMerge();
  testIdentity();
  conn.close();
  deleteDb("String_Node_Str");
}

Fixed version (ground truth):
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  conn=getConnection("String_Node_Str");
  testPreparedStatement();
  conn.close();
  deleteDb("String_Node_Str");
}
Program: 15686
Project: 15686
Buggy source:
private Query parseWith(){
  List<TableView> viewsCreated=new ArrayList<TableView>();
  readIf("String_Node_Str");
  do {
    viewsCreated.add(parseSingleCommonTableExression());
  }
 while (readIf("String_Node_Str"));
  Query q=parseSelectUnion();
  q.setPrepareAlways(true);
  return q;
}

Fixed version (ground truth):
private Query parseWith(){
  List<TableView> viewsCreated=new ArrayList<TableView>();
  readIf("String_Node_Str");
  do {
    viewsCreated.add(parseSingleCommonTableExpression());
  }
 while (readIf("String_Node_Str"));
  Query q=parseSelectUnion();
  q.setPrepareAlways(true);
  return q;
}
Program: 15687
Project: 15687
Buggy source:
private Cursor findRecursive(SearchRow first,SearchRow last){
  assert recursive;
  ResultInterface recResult=view.getRecursiveResult();
  if (recResult != null) {
    recResult.reset();
    return new ViewCursor(this,recResult,first,last);
  }
  if (query == null) {
    Parser parser=new Parser(createSession);
    parser.setRightsChecked(true);
    parser.setSuppliedParameterList(originalParameters);
    query=(Query)parser.prepare(querySQL);
    query.setNeverLazy(true);
  }
  if (!query.isUnion()) {
    throw DbNotRecursiveException.get(ErrorCode.SYNTAX_ERROR_2,"String_Node_Str");
  }
  SelectUnion union=(SelectUnion)query;
  if (union.getUnionType() != SelectUnion.UNION_ALL) {
    throw DbNotRecursiveException.get(ErrorCode.SYNTAX_ERROR_2,"String_Node_Str");
  }
  Query left=union.getLeft();
  left.disableCache();
  ResultInterface r=left.query(0);
  LocalResult result=union.getEmptyResult();
  result.setMaxMemoryRows(Integer.MAX_VALUE);
  while (r.next()) {
    result.addRow(r.currentRow());
  }
  Query right=union.getRight();
  r.reset();
  view.setRecursiveResult(r);
  right.disableCache();
  while (true) {
    r=right.query(0);
    if (!r.hasNext()) {
      break;
    }
    while (r.next()) {
      result.addRow(r.currentRow());
    }
    r.reset();
    view.setRecursiveResult(r);
  }
  view.setRecursiveResult(null);
  result.done();
  return new ViewCursor(this,result,first,last);
}

Fixed version (ground truth):
private Cursor findRecursive(SearchRow first,SearchRow last){
  assert recursive;
  ResultInterface recResult=view.getRecursiveResult();
  if (recResult != null) {
    recResult.reset();
    return new ViewCursor(this,recResult,first,last);
  }
  if (query == null) {
    Parser parser=new Parser(createSession);
    parser.setRightsChecked(true);
    parser.setSuppliedParameterList(originalParameters);
    query=(Query)parser.prepare(querySQL);
    query.setNeverLazy(true);
  }
  if (!query.isUnion()) {
    throw DbException.get(ErrorCode.SYNTAX_ERROR_2,"String_Node_Str");
  }
  SelectUnion union=(SelectUnion)query;
  if (union.getUnionType() != SelectUnion.UNION_ALL) {
    throw DbException.get(ErrorCode.SYNTAX_ERROR_2,"String_Node_Str");
  }
  Query left=union.getLeft();
  left.disableCache();
  ResultInterface r=left.query(0);
  LocalResult result=union.getEmptyResult();
  result.setMaxMemoryRows(Integer.MAX_VALUE);
  while (r.next()) {
    result.addRow(r.currentRow());
  }
  Query right=union.getRight();
  r.reset();
  view.setRecursiveResult(r);
  right.disableCache();
  while (true) {
    r=right.query(0);
    if (!r.hasNext()) {
      break;
    }
    while (r.next()) {
      result.addRow(r.currentRow());
    }
    r.reset();
    view.setRecursiveResult(r);
  }
  view.setRecursiveResult(null);
  result.done();
  return new ViewCursor(this,result,first,last);
}
Program: 15688
Project: 15688
Buggy source:
protected static String translate(String key,String... params){
  String message=null;
  if (MESSAGES != null) {
    message=MESSAGES.getProperty(key);
  }
  if (message == null) {
    message="String_Node_Str" + key + "String_Node_Str";
  }
  if (params != null) {
    for (int i=0; i < params.length; i++) {
      String s=params[i];
      if (s != null && s.length() > 0) {
        params[i]=StringUtils.quoteIdentifier(s);
      }
    }
    message=MessageFormat.format(message,(Object[])params);
  }
  return message;
}

Fixed version (ground truth):
private static String translate(String key,String... params){
  String message=null;
  if (MESSAGES != null) {
    message=MESSAGES.getProperty(key);
  }
  if (message == null) {
    message="String_Node_Str" + key + "String_Node_Str";
  }
  if (params != null) {
    for (int i=0; i < params.length; i++) {
      String s=params[i];
      if (s != null && s.length() > 0) {
        params[i]=StringUtils.quoteIdentifier(s);
      }
    }
    message=MessageFormat.format(message,(Object[])params);
  }
  return message;
}
Program: 15689
Project: 15689
Buggy source:
protected DbException(SQLException e){
  super(e.getMessage(),e);
}

Fixed version (ground truth):
private DbException(SQLException e){
  super(e.getMessage(),e);
}
Program: 15690
Project: 15690
Buggy source:
/** 
 * Add all objects that this table depends on to the hash set, including this object.
 * @param dependencies the current set of dependencies
 */
public void addDependencies(HashSet<DbObject> dependencies){
  addStrictSubDependencies(dependencies,false);
  dependencies.add(this);
}

Fixed version (ground truth):
/** 
 * Add all objects that this table depends on to the hash set.
 * @param dependencies the current set of dependencies
 */
public void addDependencies(HashSet<DbObject> dependencies){
  if (dependencies.contains(this)) {
    return;
  }
  if (sequences != null) {
    for (    Sequence s : sequences) {
      dependencies.add(s);
    }
  }
  ExpressionVisitor visitor=ExpressionVisitor.getDependenciesVisitor(dependencies);
  for (  Column col : columns) {
    col.isEverything(visitor);
  }
  if (constraints != null) {
    for (    Constraint c : constraints) {
      c.isEverything(visitor);
    }
  }
  dependencies.add(this);
}
Program: 15691
Project: 15691
Buggy source:
public boolean isRecursiveQueryDetected(){
  return isRecursiveQueryDetected;
}

Fixed version (ground truth):
/** 
 * If query recursion is detected (for recursion detection)
 * @return is Recursive Query Flag Set
 */
public boolean isRecursiveQueryDetected(){
  return isRecursiveQueryDetected;
}
Program: 15692
Project: 15692
Buggy source:
private boolean isRecursiveQueryExceptionDetected(DbException exception){
  if (exception == null) {
    return false;
  }
  if (exception.getErrorCode() != ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1) {
    return false;
  }
  if (!exception.getMessage().contains("String_Node_Str" + this.getName() + "String_Node_Str")) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * If query an exception indicates query recursion
 * @return is Recursive Query Exception Detected
 */
private boolean isRecursiveQueryExceptionDetected(DbException exception){
  if (exception == null) {
    return false;
  }
  if (exception.getErrorCode() != ErrorCode.TABLE_OR_VIEW_NOT_FOUND_1) {
    return false;
  }
  if (!exception.getMessage().contains("String_Node_Str" + this.getName() + "String_Node_Str")) {
    return false;
  }
  return true;
}
Program: 15693
Project: 15693
Buggy source:
/** 
 * Run just this test.
 * @param a ignored
 */
public static void main(String... a) throws Exception {
  System.out.println("String_Node_Str");
  TestBase.createCaller().init().test();
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Run just this test.
 * @param a ignored
 */
public static void main(String... a) throws Exception {
  TestBase.createCaller().init().test();
}
Program: 15695
Project: 15695
Buggy source:
@Override public void test() throws Exception {
  if (config.memory || config.big || config.networked) {
    return;
  }
  deleteDb("String_Node_Str");
  reconnect();
  String inFile="String_Node_Str";
  InputStream is=getClass().getClassLoader().getResourceAsStream(inFile);
  LineNumberReader lineReader=new LineNumberReader(new InputStreamReader(is,"String_Node_Str"));
  try (ScriptReader reader=new ScriptReader(lineReader)){
    while (true) {
      String sql=reader.readStatement();
      if (sql == null) {
        break;
      }
      sql=sql.trim();
      try {
        if ("String_Node_Str".equals(sql.toLowerCase())) {
          reconnect();
        }
 else         if (sql.length() == 0) {
        }
 else         if (sql.toLowerCase().startsWith("String_Node_Str")) {
          ResultSet rs=conn.createStatement().executeQuery(sql);
          while (rs.next()) {
            String expected=reader.readStatement().trim();
            String got="String_Node_Str" + rs.getString(1);
            assertEquals(sql,expected,got);
          }
        }
 else {
          conn.createStatement().execute(sql);
        }
      }
 catch (      SQLException e) {
        System.out.println(sql);
        throw e;
      }
    }
  }
   conn.close();
  deleteDb("String_Node_Str");
}

Fixed version (ground truth):
@Override public void test() throws Exception {
  if (config.memory || config.big || config.networked) {
    return;
  }
  deleteDb("String_Node_Str");
  reconnect();
  String inFile="String_Node_Str";
  InputStream is=getClass().getClassLoader().getResourceAsStream(inFile);
  LineNumberReader lineReader=new LineNumberReader(new InputStreamReader(is,"String_Node_Str"));
  List<Throwable> exceptions=new ArrayList<>();
  try (ScriptReader reader=new ScriptReader(lineReader)){
    while (true) {
      String sql=reader.readStatement();
      if (sql == null) {
        break;
      }
      sql=sql.trim();
      try {
        if ("String_Node_Str".equals(sql.toLowerCase())) {
          reconnect();
        }
 else         if (sql.length() == 0) {
        }
 else         if (sql.toLowerCase().startsWith("String_Node_Str")) {
          ResultSet rs=conn.createStatement().executeQuery(sql);
          while (rs.next()) {
            String expected=reader.readStatement().trim();
            String got="String_Node_Str" + rs.getString(1);
            assertEquals(sql,expected,got);
          }
        }
 else {
          conn.createStatement().execute(sql);
        }
      }
 catch (      Throwable e) {
        System.out.println(sql);
        System.out.println("String_Node_Str" + lineReader.getLineNumber() + "String_Node_Str"+ inFile);
        e.printStackTrace();
        exceptions.add(e);
      }
    }
  }
   conn.close();
  deleteDb("String_Node_Str");
  if (exceptions.size() != 0) {
    String message="String_Node_Str" + exceptions.size();
    System.out.println(message);
    throw new AssertionError(message);
  }
}
Program: 15697
Project: 15697
Buggy source:
@Override public void test() throws Exception {
  if (config.memory || config.big || config.networked) {
    return;
  }
  deleteDb("String_Node_Str");
  reconnect();
  String inFile="String_Node_Str";
  InputStream is=getClass().getClassLoader().getResourceAsStream(inFile);
  LineNumberReader lineReader=new LineNumberReader(new InputStreamReader(is,"String_Node_Str"));
  try (ScriptReader reader=new ScriptReader(lineReader)){
    while (true) {
      String sql=reader.readStatement();
      if (sql == null) {
        break;
      }
      sql=sql.trim();
      try {
        if ("String_Node_Str".equals(sql.toLowerCase())) {
          reconnect();
        }
 else         if (sql.length() == 0) {
        }
 else         if (sql.toLowerCase().startsWith("String_Node_Str")) {
          ResultSet rs=conn.createStatement().executeQuery(sql);
          while (rs.next()) {
            String expected=reader.readStatement().trim();
            String got="String_Node_Str" + rs.getString(1);
            assertEquals(sql,expected,got);
          }
        }
 else {
          conn.createStatement().execute(sql);
        }
      }
 catch (      SQLException e) {
        System.out.println(sql);
        throw e;
      }
    }
  }
   conn.close();
  deleteDb("String_Node_Str");
}

Fixed version (ground truth):
@Override public void test() throws Exception {
  if (config.memory || config.big || config.networked) {
    return;
  }
  deleteDb("String_Node_Str");
  reconnect();
  String inFile="String_Node_Str";
  InputStream is=getClass().getClassLoader().getResourceAsStream(inFile);
  LineNumberReader lineReader=new LineNumberReader(new InputStreamReader(is,"String_Node_Str"));
  List<Throwable> exceptions=new ArrayList<>();
  try (ScriptReader reader=new ScriptReader(lineReader)){
    while (true) {
      String sql=reader.readStatement();
      if (sql == null) {
        break;
      }
      sql=sql.trim();
      try {
        if ("String_Node_Str".equals(sql.toLowerCase())) {
          reconnect();
        }
 else         if (sql.length() == 0) {
        }
 else         if (sql.toLowerCase().startsWith("String_Node_Str")) {
          ResultSet rs=conn.createStatement().executeQuery(sql);
          while (rs.next()) {
            String expected=reader.readStatement().trim();
            String got="String_Node_Str" + rs.getString(1);
            assertEquals(sql,expected,got);
          }
        }
 else {
          conn.createStatement().execute(sql);
        }
      }
 catch (      Throwable e) {
        System.out.println(sql);
        System.out.println("String_Node_Str" + lineReader.getLineNumber() + "String_Node_Str"+ inFile);
        e.printStackTrace();
        exceptions.add(e);
      }
    }
  }
   conn.close();
  deleteDb("String_Node_Str");
  if (exceptions.size() != 0) {
    String message="String_Node_Str" + exceptions.size();
    System.out.println(message);
    throw new AssertionError(message);
  }
}
Program: 15700
Project: 15700
Buggy source:
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  createDb();
  testQuotedIdentifier();
  testWithSingleIndexName();
  testWithEmptyIndexHintsList();
  testWithInvalidIndexName();
  testWithMultipleIndexNames();
  testPlanSqlHasIndexesInCorrectOrder();
  testWithTableAlias();
  testWithTableAliasCalledUse();
  deleteDb("String_Node_Str");
}

Fixed version (ground truth):
@Override public void test() throws Exception {
  deleteDb("String_Node_Str");
  Connection conn=createDb();
  testQuotedIdentifier();
  testWithSingleIndexName();
  testWithEmptyIndexHintsList();
  testWithInvalidIndexName();
  testWithMultipleIndexNames();
  testPlanSqlHasIndexesInCorrectOrder();
  testWithTableAlias();
  testWithTableAliasCalledUse();
  conn.close();
  deleteDb("String_Node_Str");
}
Program: 15701
Project: 15701
Buggy source:
private void createDb() throws SQLException {
  Connection conn=getConnection("String_Node_Str");
  Statement stat=conn.createStatement();
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
}

Fixed version (ground truth):
private Connection createDb() throws SQLException {
  Connection conn=getConnection("String_Node_Str");
  Statement stat=conn.createStatement();
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
  stat.execute("String_Node_Str");
  return conn;
}
Program: 15703
Project: 15703
Buggy source:
@SuppressWarnings("String_Node_Str") private void changeLength(long len){
  length=len;
  len=MathUtils.roundUpLong(len,BLOCK_SIZE);
  int blocks=(int)(len >>> BLOCK_SIZE_SHIFT);
  if (blocks != buffers.length) {
    final AtomicReference<ByteBuffer>[] newBuffers=new AtomicReference[blocks];
    System.arraycopy(buffers,0,newBuffers,0,Math.min(buffers.length,buffers.length));
    for (int i=buffers.length; i < blocks; i++) {
      newBuffers[i]=new AtomicReference<ByteBuffer>(COMPRESSED_EMPTY_BLOCK);
    }
    buffers=newBuffers;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void changeLength(long len){
  length=len;
  len=MathUtils.roundUpLong(len,BLOCK_SIZE);
  int blocks=(int)(len >>> BLOCK_SIZE_SHIFT);
  if (blocks != buffers.length) {
    final AtomicReference<ByteBuffer>[] newBuffers=new AtomicReference[blocks];
    System.arraycopy(buffers,0,newBuffers,0,Math.min(buffers.length,newBuffers.length));
    for (int i=buffers.length; i < blocks; i++) {
      newBuffers[i]=new AtomicReference<ByteBuffer>(COMPRESSED_EMPTY_BLOCK);
    }
    buffers=newBuffers;
  }
}