nus-yam/ex-repair huggingface dataset:
Program: 43135
Project: 43135
Buggy source:
/** 
 * Show users who (new-style) retweeted the given tweet. Can use count (up to 100) and page. This does not include old-style retweeters!
 * @param tweet You can use a "fake" Status created via {@link Status#Status(User,String,long,Date)} if you knowthe id number.
 */
public List<User> getRetweeters(Status tweet){
  String url=TWITTER_URL + "String_Node_Str" + tweet.id+ "String_Node_Str";
  Map<String,String> vars=addStandardishParameters(new HashMap<String,String>());
  String json=http.getPage(url,vars,http.canAuthenticate());
  List<User> users=User.getUsers(json);
  return users;
}

Fixed version (ground truth):
/** 
 * Show users who (new-style) retweeted the given tweet. Can use count (up to 100) and page. This does not include old-style retweeters!
 * @param tweet You can use a "fake" Status created via {@link Status#Status(User,String,long,Date)} if you knowthe id number.
 */
public List<User> getRetweeters(Status tweet){
  String url=TWITTER_URL + "String_Node_Str" + tweet.id+ "String_Node_Str";
  Map<String,String> vars=addStandardishParameters(new HashMap<String,String>());
  String json=http.getPage(url,vars,http.canAuthenticate());
  List<Status> ss=Status.getStatuses(json);
  List<User> users=new ArrayList(ss.size());
  for (  Status status : ss) {
    users.add(status.getUser());
  }
  return users;
}
Program: 43136
Project: 43136
Buggy source:
/** 
 * Add in since_id, page and count, if set. This is called by methods that return lists of statuses or messages.
 * @param vars
 * @return vars
 */
Map<String,String> addStandardishParameters(Map<String,String> vars){
  if (sinceId != null) {
    vars.put("String_Node_Str",sinceId.toString());
  }
  if (untilId != null) {
    vars.put("String_Node_Str",untilId.toString());
  }
  if (count != null) {
    vars.put("String_Node_Str",count.toString());
  }
  if (tweetEntities) {
    vars.put("String_Node_Str","String_Node_Str");
  }
 else {
    vars.put("String_Node_Str","String_Node_Str");
  }
  if (includeRTs) {
  }
 else {
    vars.put("String_Node_Str","String_Node_Str");
  }
  return vars;
}

Fixed version (ground truth):
/** 
 * Add in since_id, page and count, if set. This is called by methods that return lists of statuses or messages.
 * @param vars
 * @return vars
 */
Map<String,String> addStandardishParameters(Map<String,String> vars){
  if (sinceId != null) {
    vars.put("String_Node_Str",sinceId.toString());
  }
  if (untilId != null) {
    vars.put("String_Node_Str",untilId.toString());
  }
  if (count != null) {
    vars.put("String_Node_Str",count.toString());
  }
  if (tweetEntities) {
    vars.put("String_Node_Str","String_Node_Str");
  }
 else {
    vars.put("String_Node_Str","String_Node_Str");
  }
  if (!includeRTs) {
    vars.put("String_Node_Str","String_Node_Str");
  }
  return vars;
}
Program: 43137
Project: 43137
Buggy source:
/** 
 * Returns the 20 most recent replies/mentions (status updates with to the authenticating user. Replies are only available to theauthenticating user; you can not request a list of replies to another user whether public or protected. <p> This is exactly the same as   {@link #getMentions()}! Twitter changed their API & terminology - we are (currently) keeping both methods. <p> When paging, this method can only go back up to 800 statuses. <p> Does not include new-style retweets.
 * @deprecated Use #getMentions() for preference
 */
public List<Status> getReplies() throws TwitterException {
  return getMentions();
}

Fixed version (ground truth):
/** 
 * Returns the 20 most recent replies/mentions (status updates with to the authenticating user. Replies are only available to theauthenticating user; you can not request a list of replies to another user whether public or protected. <p> This is exactly the same as   {@link #getMentions()}! Twitter changed their API & terminology - we are (currently) keeping both methods. <p> When paging, this method can only go back up to 800 statuses. <p> Does not include new-style retweets.
 * @deprecated Use #getMentions() for preference. This method will be removed June 2013.
 */
public List<Status> getReplies() throws TwitterException {
  return getMentions();
}
Program: 43138
Project: 43138
Buggy source:
/** 
 * Returns the 20 most recent replies/mentions (status updates with to the authenticating user. Replies are only available to theauthenticating user; you can not request a list of replies to another user whether public or protected. <p> This is exactly the same as   {@link #getReplies()}<p> When paging, this method can only go back up to 800 statuses. <p> Does not include new-style retweets.
 */
public List<Status> getMentions(){
  return getStatuses(TWITTER_URL + "String_Node_Str",standardishParameters(),true);
}

Fixed version (ground truth):
/** 
 * Returns the 20 most recent replies/mentions (status updates with \@username) to the authenticating user. Replies are only available to the authenticating user; you cannot request a list of replies to another user whether public or protected. <p> This is exactly the same as   {@link #getReplies()}<p> When paging, this method can only go back up to 800 statuses. <p> Does not include new-style retweets.
 */
public List<Status> getMentions(){
  return getStatuses(TWITTER_URL + "String_Node_Str",standardishParameters(),true);
}
Program: 43140
Project: 43140
Buggy source:
public void testGetDupeLinks(){
  BigInteger bi=new BigInteger("String_Node_Str");
  Twitter twitter=newTestTwitter();
  Status badStatus=twitter.getStatus(bi);
  List<TweetEntity> urlInfo=badStatus.getTweetEntities(KEntityType.urls);
  int lastEntityEnd=0;
  for (  TweetEntity entity : urlInfo) {
    if (lastEntityEnd > entity.start) {
      System.out.println("String_Node_Str" + lastEntityEnd + "String_Node_Str"+ entity.start);
      fail();
    }
 else {
    }
    lastEntityEnd=entity.end;
  }
}

Fixed version (ground truth):
public void testGetDupeLinks(){
{
    String json="String_Node_Str";
    JSONObject jobj=new JSONObject(json);
    Status s=new Status(jobj,null);
    System.out.println(s.getText());
    System.out.println(s.getDisplayText());
    List<TweetEntity> urlInfo=s.getTweetEntities(KEntityType.urls);
    int lastEntityEnd=0;
    for (    TweetEntity entity : urlInfo) {
      if (lastEntityEnd > entity.start) {
        System.out.println("String_Node_Str" + lastEntityEnd + "String_Node_Str"+ entity.start);
        fail();
      }
 else {
      }
      lastEntityEnd=entity.end;
    }
  }
{
    BigInteger bi=new BigInteger("String_Node_Str");
    Twitter twitter=newTestTwitter();
    Status badStatus=twitter.getStatus(bi);
    List<TweetEntity> urlInfo=badStatus.getTweetEntities(KEntityType.urls);
    int lastEntityEnd=0;
    for (    TweetEntity entity : urlInfo) {
      if (lastEntityEnd > entity.start) {
        System.out.println("String_Node_Str" + lastEntityEnd + "String_Node_Str"+ entity.start);
        fail();
      }
 else {
      }
      lastEntityEnd=entity.end;
    }
  }
}
Program: 43141
Project: 43141
Buggy source:
/** 
 * False by default. Setting this to true switches on a robustness workaround: when presented with a 50X server error, the system will wait 1/2 a second and make a second attempt.
 */
public void setRetryOnError(boolean retryOnError){
  this.retryOnError=retryOnError;
}

Fixed version (ground truth):
/** 
 * False by default. Setting this to true switches on a robustness workaround: when presented with a 50X server error, the system will wait 1/2 a second and make a second attempt.
 */
@Override public void setRetryOnError(boolean retryOnError){
  this.retryOnError=retryOnError;
}
Program: 43142
Project: 43142
Buggy source:
@Override HttpURLConnection connect2() throws Exception {
  connect3_rateLimit();
  String url="String_Node_Str" + method + "String_Node_Str";
  Map<String,String> vars=new HashMap();
  if (follow != null) {
    vars.put("String_Node_Str",InternalUtils.join(follow,0,Integer.MAX_VALUE));
  }
  if (track != null) {
    vars.put("String_Node_Str",InternalUtils.join(track,0,Integer.MAX_VALUE));
  }
  HttpURLConnection con=client.post2_connect(url,vars);
  return con;
}

Fixed version (ground truth):
@Override HttpURLConnection connect2() throws Exception {
  connect3_rateLimit();
  String url="String_Node_Str" + method + "String_Node_Str";
  Map<String,String> vars=new HashMap();
  if (follow != null && (!follow.isEmpty())) {
    vars.put("String_Node_Str",InternalUtils.join(follow,0,Integer.MAX_VALUE));
  }
  if (track != null) {
    vars.put("String_Node_Str",InternalUtils.join(track,0,Integer.MAX_VALUE));
  }
  HttpURLConnection con=client.post2_connect(url,vars);
  return con;
}
Program: 43143
Project: 43143
Buggy source:
HttpURLConnection connect2() throws Exception {
  if (jtwit.getScreenName() != null) {
    AStream s=user2stream.get(jtwit.getScreenName());
    if (s.isConnected()) {
      throw new TwitterException.TooManyLogins("String_Node_Str" + s + "String_Node_Str");
    }
    if (user2stream.size() > 1000) {
      user2stream.clear();
    }
    user2stream.put(jtwit.getScreenName(),this);
  }
  String url="String_Node_Str" + method + "String_Node_Str";
  Map<String,String> vars=new HashMap();
  if (follow != null) {
    vars.put("String_Node_Str",InternalUtils.join(follow,0,Integer.MAX_VALUE));
  }
  if (track != null) {
    vars.put("String_Node_Str",InternalUtils.join(track,0,Integer.MAX_VALUE));
  }
  HttpURLConnection con=client.post2_connect(url,vars);
  return con;
}

Fixed version (ground truth):
@Override HttpURLConnection connect2() throws Exception {
  if (jtwit.getScreenName() != null) {
    AStream s=user2stream.get(jtwit.getScreenName());
    if (s != null && s.isConnected()) {
      throw new TwitterException.TooManyLogins("String_Node_Str" + s + "String_Node_Str");
    }
    if (user2stream.size() > 1000) {
      user2stream.clear();
    }
    user2stream.put(jtwit.getScreenName(),this);
  }
  String url="String_Node_Str" + method + "String_Node_Str";
  Map<String,String> vars=new HashMap();
  if (follow != null) {
    vars.put("String_Node_Str",InternalUtils.join(follow,0,Integer.MAX_VALUE));
  }
  if (track != null) {
    vars.put("String_Node_Str",InternalUtils.join(track,0,Integer.MAX_VALUE));
  }
  HttpURLConnection con=client.post2_connect(url,vars);
  return con;
}
Program: 43144
Project: 43144
Buggy source:
/** 
 * @param client This will have it's timeout set to 90 seconds.So you probably don't want to reuse the object with the REST api. 
 */
public TwitterStream(Twitter jtwit){
  super(jtwit);
}

Fixed version (ground truth):
/** 
 * @param client This will have it's timeout set to 90 seconds.So you probably don't want to reuse the object with the REST api.
 */
public TwitterStream(Twitter jtwit){
  super(jtwit);
}
Program: 43145
Project: 43145
Buggy source:
/** 
 * 25 0.1-360 degree location boxes. Only tweets that are both created using the Geotagging API and are placed from within a tracked bounding box will be included in the stream – the user’s location field is not used to filter tweets
 * @param boundingBoxes Each element consists of longitude/latitude south-west, north-east.	 
 */
public void setLocation(List<double[]> boundingBoxes){
  method=KMethod.filter;
  this.locns=boundingBoxes;
  throw new TodoException();
}

Fixed version (ground truth):
/** 
 * 25 0.1-360 degree location boxes. Only tweets that are both created using the Geotagging API and are placed from within a tracked bounding box will be included in the stream – the user’s location field is not used to filter tweets
 * @param boundingBoxes Each element consists of longitude/latitude south-west, north-east.
 */
public void setLocation(List<double[]> boundingBoxes){
  method=KMethod.filter;
  this.locns=boundingBoxes;
  throw new TodoException();
}
Program: 43146
Project: 43146
Buggy source:
/** 
 * , 5,000 follow userids and 
 * @param userIds
 */
public void setFollowUsers(List<Long> userIds){
  method=KMethod.filter;
  follow=userIds;
}

Fixed version (ground truth):
/** 
 * , 5,000 follow userids and
 * @param userIds
 */
public void setFollowUsers(List<Long> userIds){
  method=KMethod.filter;
  follow=userIds;
}
Program: 43147
Project: 43147
Buggy source:
/** 
 * @return
 * @see org.jenkinsci.plugins.GithubRequireOrganizationMembershipACL#getAdminUserNameList()
 */
public String getAdminUserNames(){
  return StringUtils.join(rootACL.getAdminUserNameList(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return
 * @see org.jenkinsci.plugins.GithubRequireOrganizationMembershipACL#getAdminUserNameList()
 */
public String getAdminUserNames(){
  return StringUtils.join(rootACL.getAdminUserNameList().iterator(),"String_Node_Str");
}
Program: 43148
Project: 43148
Buggy source:
/** 
 * @return
 * @see org.jenkinsci.plugins.GithubRequireOrganizationMembershipACL#getOrganizationNameList()
 */
public String getOrganizationNames(){
  return StringUtils.join(rootACL.getOrganizationNameList(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return
 * @see org.jenkinsci.plugins.GithubRequireOrganizationMembershipACL#getOrganizationNameList()
 */
public String getOrganizationNames(){
  return StringUtils.join(rootACL.getOrganizationNameList().iterator(),"String_Node_Str");
}
Program: 43149
Project: 43149
Buggy source:
/** 
 * @return the uri to Github (varies for Github Enterprise Edition)
 */
public String getGithubUri(){
  return githubUri;
}

Fixed version (ground truth):
/** 
 * @return the uri to Github (varies for Github Enterprise Edition)
 */
public String getGithubUri(){
  if (githubUri == null)   return DEFAULT_URI;
 else   return githubUri;
}
Program: 43150
Project: 43150
Buggy source:
@Override public boolean hasPermission(Authentication a,Permission permission){
  if (a != null && a instanceof GithubAuthenticationToken) {
    GithubAuthenticationToken authenticationToken=(GithubAuthenticationToken)a;
    String candidateName=a.getName();
    if (adminUserNameList.contains(candidateName))     return true;
    for (    String organizationName : this.organizationNameList) {
      if (authenticationToken.hasOrganizationPermission(candidateName,organizationName)) {
        String[] parts=permission.getId().split("String_Node_Str");
        String test=parts[parts.length - 1].toLowerCase();
        if (test.equals("String_Node_Str") || test.equals("String_Node_Str"))         return true;
      }
    }
    return false;
  }
 else {
    String p=a.getName();
    if (p.equals(SYSTEM.getPrincipal())) {
      return true;
    }
    if (adminUserNameList.contains(p)) {
      return true;
    }
 else {
      if (a.getName().equals("String_Node_Str") || authenticatedUserReadPermission) {
        String[] parts=permission.getId().split("String_Node_Str");
        if (parts[parts.length - 1].toLowerCase().equals("String_Node_Str"))         return true;
      }
    }
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean hasPermission(Authentication a,Permission permission){
  if (a != null && a instanceof GithubAuthenticationToken) {
    GithubAuthenticationToken authenticationToken=(GithubAuthenticationToken)a;
    String candidateName=a.getName();
    if (adminUserNameList.contains(candidateName))     return true;
    if (authenticatedUserReadPermission) {
      String[] parts=permission.getId().split("String_Node_Str");
      if (parts[parts.length - 1].toLowerCase().equals("String_Node_Str"))       return true;
    }
    for (    String organizationName : this.organizationNameList) {
      if (authenticationToken.hasOrganizationPermission(candidateName,organizationName)) {
        String[] parts=permission.getId().split("String_Node_Str");
        String test=parts[parts.length - 1].toLowerCase();
        if (test.equals("String_Node_Str") || test.equals("String_Node_Str"))         return true;
      }
    }
    return false;
  }
 else {
    String p=a.getName();
    if (p.equals(SYSTEM.getPrincipal())) {
      return true;
    }
    if (a.getName().equals("String_Node_Str")) {
      return false;
    }
    if (adminUserNameList.contains(p)) {
      return true;
    }
    return false;
  }
}
Program: 43151
Project: 43151
Buggy source:
public Set<String> getKindsPerNamespace(String namespace){
  return getSet(Entities.KIND_METADATA_KIND);
}

Fixed version (ground truth):
public Set<String> getKindsPerNamespace(String namespace){
  String oldNS=NamespaceManager.get();
  NamespaceManager.set(namespace);
  try {
    return getSet(Entities.KIND_METADATA_KIND);
  }
  finally {
    NamespaceManager.set(oldNS);
  }
}
Program: 43152
Project: 43152
Buggy source:
public String apply(Entity input){
  return input.getKey().getName();
}

Fixed version (ground truth):
public String apply(Entity entity){
  if (entity.getKey().getId() == Entities.NAMESPACE_METADATA_EMPTY_ID) {
    return "String_Node_Str";
  }
 else {
    return entity.getKey().getName();
  }
}
Program: 43153
Project: 43153
Buggy source:
public Set<String> getNamespaces(){
  return getSet(Entities.NAMESPACE_METADATA_KIND);
}

Fixed version (ground truth):
public Set<String> getNamespaces(){
  String oldNS=NamespaceManager.get();
  NamespaceManager.set("String_Node_Str");
  try {
    return getSet(Entities.NAMESPACE_METADATA_KIND);
  }
  finally {
    NamespaceManager.set(oldNS);
  }
}
Program: 43154
Project: 43154
Buggy source:
@Test public void testInternalAPI() throws Exception {
  DatastoreService ds=DatastoreServiceFactory.getDatastoreService();
  if (isJBossImpl(ds))   return;
  Set<Key> keys=new HashSet<Key>();
  try {
    ds.put(new Entity("String_Node_Str"));
    NamespaceManager.set("String_Node_Str");
    Entity entity=new Entity("String_Node_Str");
    Key k1=ds.put(entity);
    NamespaceManager.set("String_Node_Str");
    ds.put(new Entity("String_Node_Str"));
    sync(1000);
    org.jboss.capedwarf.datastore.NamespaceServiceInternal ns=org.jboss.capedwarf.datastore.NamespaceServiceFactory.getNamespaceService();
    Set<String> namespaces=ns.getNamespaces();
    Assert.assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")),namespaces);
    Set<String> kinds=ns.getKindsPerNamespace("String_Node_Str");
    Assert.assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),kinds);
    kinds=ns.getKindsPerNamespace("String_Node_Str");
    Assert.assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),kinds);
    kinds=ns.getKindsPerNamespace("String_Node_Str");
    Assert.assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str")),kinds);
    keys.remove(k1);
    ds.delete(k1);
    sync(1000);
    namespaces=ns.getNamespaces();
    Assert.assertEquals(new HashSet<String>(Arrays.asList("String_Node_Str","String_Node_Str")),namespaces);
    kinds=ns.getKindsPerNamespace("String_Node_Str");
    Assert.assertEquals(new HashSet<String>(),kinds);
  }
  finally {
    ds.delete(keys);
  }
}

Fixed version (ground truth):
@Test public void testInternalAPI() throws Exception {
  DatastoreService ds=DatastoreServiceFactory.getDatastoreService();
  if (!isJBossImpl(ds))   return;
  Set<Key> keys=new HashSet<Key>();
  try {
    ds.put(new Entity("String_Node_Str"));
    NamespaceManager.set("String_Node_Str");
    Entity entity=new Entity("String_Node_Str");
    Key k1=ds.put(entity);
    NamespaceManager.set("String_Node_Str");
    ds.put(new Entity("String_Node_Str"));
    sync(1000);
    NamespaceServiceInternal ns=NamespaceServiceFactory.getNamespaceService();
    Set<String> namespaces=ns.getNamespaces();
    assertEquals(asSet("String_Node_Str","String_Node_Str","String_Node_Str"),namespaces);
    Set<String> kinds=ns.getKindsPerNamespace("String_Node_Str");
    assertEquals(asSet("String_Node_Str"),kinds);
    kinds=ns.getKindsPerNamespace("String_Node_Str");
    assertEquals(asSet("String_Node_Str"),kinds);
    kinds=ns.getKindsPerNamespace("String_Node_Str");
    assertEquals(asSet("String_Node_Str"),kinds);
  }
  finally {
    ds.delete(keys);
  }
}
Program: 43155
Project: 43155
Buggy source:
private FetchOptions createAppLogFetchOptions(LogQuery logQuery){
  FetchOptions fetchOptions=FetchOptions.Builder.withDefaults();
  if (logQuery.getBatchSize() != null) {
    fetchOptions=fetchOptions.limit(logQuery.getBatchSize());
  }
  return fetchOptions;
}

Fixed version (ground truth):
private FetchOptions createAppLogFetchOptions(LogQuery logQuery){
  FetchOptions fetchOptions=FetchOptions.Builder.withDefaults();
  if (logQuery.getBatchSize() != null) {
    fetchOptions=fetchOptions.chunkSize(logQuery.getBatchSize());
  }
  return fetchOptions;
}
Program: 43156
Project: 43156
Buggy source:
public List<String> getEntityKinds(){
  Set<String> set=new TreeSet<String>();
  for (  Entity entity : getDatastore().prepare(new Query()).asIterable()) {
    if (entity != null) {
      set.add(entity.getKind());
    }
  }
  return new ArrayList<String>(set);
}

Fixed version (ground truth):
public List<String> getEntityKinds(){
  NamespaceServiceInternal namespaceService=NamespaceServiceFactory.getNamespaceService();
  Set<String> set=namespaceService.getKindsPerNamespace(getSelectedNamespace());
  List<String> list=new ArrayList<String>(set);
  Collections.sort(list);
  return list;
}
Program: 43157
Project: 43157
Buggy source:
@Deployment public static WebArchive getDeployment(){
  return getCapedwarfDeployment();
}

Fixed version (ground truth):
@Deployment public static WebArchive getDeployment(){
  return getCapedwarfDeployment().addClass(AbstractTest.class);
}
Program: 43158
Project: 43158
Buggy source:
@Deployment public static Archive getDeployment(){
  final WebArchive war=getCapedwarfDeployment();
  war.addClass(AbstractLoggingTest.class);
  war.addAsWebInfResource("String_Node_Str","String_Node_Str");
  war.addAsWebInfResource("String_Node_Str");
  return war;
}

Fixed version (ground truth):
@Deployment public static Archive getDeployment(){
  final TestContext context=new TestContext().setAppEngineWebXmlFile("String_Node_Str");
  final WebArchive war=getCapedwarfDeployment(context);
  war.addClass(AbstractLoggingTest.class);
  war.addAsWebInfResource("String_Node_Str");
  return war;
}
Program: 43159
Project: 43159
Buggy source:
@Test public void testGetIndexes(){
  Index fooIndex=createIndex("String_Node_Str");
  Index barIndex=createIndex("String_Node_Str");
  GetResponse<Index> response=service.getIndexes(GetIndexesRequest.newBuilder());
  assertEquals(Arrays.asList(barIndex,fooIndex),response.getResults());
}

Fixed version (ground truth):
@Test public void testGetIndexes(){
  Index fooIndex=createIndex("String_Node_Str");
  Index barIndex=createIndex("String_Node_Str");
  GetResponse<Index> response=service.getIndexes(GetIndexesRequest.newBuilder());
  assertEquals(Arrays.asList(barIndex,fooIndex),response.getResults());
  ListIndexesResponse lir=service.listIndexes(ListIndexesRequest.newBuilder().build());
  assertEquals(Arrays.asList(barIndex,fooIndex),lir.getIndexes());
}
Program: 43160
Project: 43160
Buggy source:
protected static WebArchive getBaseDeployment(){
  return getCapedwarfDeployment().addClass(PersistingTest.class);
}

Fixed version (ground truth):
protected static WebArchive getBaseDeployment(){
  return getCapedwarfDeployment().addClasses(PersistingTest.class,AbstractTest.class);
}
Program: 43161
Project: 43161
Buggy source:
@Deployment public static WebArchive getDeployment(){
  return getCapedwarfDeployment();
}

Fixed version (ground truth):
@Deployment public static WebArchive getDeployment(){
  return getCapedwarfDeployment().addClass(X.class);
}
Program: 43162
Project: 43162
Buggy source:
protected static WebArchive getBaseDeployment(){
  final TestContext context=new TestContext().setIgnoreLogging(true);
  final WebArchive war=getCapedwarfDeployment(context);
  war.addPackage(Client.class.getPackage());
  war.addClass(AbstractJPATest.class);
  war.addClass(SimpleJPATest.class);
  return war;
}

Fixed version (ground truth):
protected static WebArchive getBaseDeployment(){
  final TestContext context=new TestContext().setIgnoreLogging(true);
  final WebArchive war=getCapedwarfDeployment(context);
  war.addPackage(Client.class.getPackage());
  war.addClass(AbstractTest.class);
  war.addClass(AbstractJPATest.class);
  war.addClass(SimpleJPATest.class);
  return war;
}
Program: 43163
Project: 43163
Buggy source:
public ListIndexesResponse listIndexes(ListIndexesRequest request){
  final GetIndexesRequest.Builder builder=GetIndexesRequest.newBuilder();
  boolean includeStartIndex=false;
  try {
    includeStartIndex=request.isIncludeStartIndex();
  }
 catch (  NullPointerException ignore) {
  }
  builder.setIncludeStartIndex(includeStartIndex);
  builder.setIndexNamePrefix(request.getIndexNamePrefix());
  builder.setLimit(request.getLimit());
  builder.setNamespace(request.getNamespace());
  builder.setOffset(request.getOffset());
  final Boolean schemaFetched=request.isSchemaFetched();
  builder.setSchemaFetched(schemaFetched != null && schemaFetched);
  builder.setStartIndexName(request.getStartIndexName());
  return new ListIndexesResponse(getIndexes(builder.build()).getResults()){
  }
;
}

Fixed version (ground truth):
public ListIndexesResponse listIndexes(ListIndexesRequest request){
  final GetIndexesRequest.Builder builder=GetIndexesRequest.newBuilder();
  boolean includeStartIndex=false;
  try {
    includeStartIndex=request.isIncludeStartIndex();
  }
 catch (  NullPointerException ignore) {
  }
  builder.setIncludeStartIndex(includeStartIndex);
  builder.setIndexNamePrefix(request.getIndexNamePrefix());
  builder.setLimit(Util.defaultIfNull(request.getLimit(),20));
  builder.setNamespace(request.getNamespace());
  builder.setOffset(Util.defaultIfNull(request.getOffset(),0));
  final Boolean schemaFetched=request.isSchemaFetched();
  builder.setSchemaFetched(schemaFetched != null && schemaFetched);
  builder.setStartIndexName(request.getStartIndexName());
  return new ListIndexesResponse(getIndexes(builder.build()).getResults()){
  }
;
}
Program: 43164
Project: 43164
Buggy source:
public ListIndexesResponse listIndexes(ListIndexesRequest request){
  final GetIndexesRequest.Builder builder=GetIndexesRequest.newBuilder();
  builder.setIncludeStartIndex(request.isIncludeStartIndex());
  builder.setIndexNamePrefix(request.getIndexNamePrefix());
  builder.setLimit(request.getLimit());
  builder.setNamespace(request.getNamespace());
  builder.setOffset(request.getOffset());
  builder.setSchemaFetched(request.isSchemaFetched());
  builder.setStartIndexName(request.getStartIndexName());
  return new ListIndexesResponse(getIndexes(builder.build()).getResults()){
  }
;
}

Fixed version (ground truth):
public ListIndexesResponse listIndexes(ListIndexesRequest request){
  final GetIndexesRequest.Builder builder=GetIndexesRequest.newBuilder();
  boolean includeStartIndex=false;
  try {
    includeStartIndex=request.isIncludeStartIndex();
  }
 catch (  NullPointerException ignore) {
  }
  builder.setIncludeStartIndex(includeStartIndex);
  builder.setIndexNamePrefix(request.getIndexNamePrefix());
  builder.setLimit(request.getLimit());
  builder.setNamespace(request.getNamespace());
  builder.setOffset(request.getOffset());
  final Boolean schemaFetched=request.isSchemaFetched();
  builder.setSchemaFetched(schemaFetched != null && schemaFetched);
  builder.setStartIndexName(request.getStartIndexName());
  return new ListIndexesResponse(getIndexes(builder.build()).getResults()){
  }
;
}
Program: 43165
Project: 43165
Buggy source:
private static int readIndex(Cursor cursor){
  try {
    return getIndex.invoke(cursor);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public static int readIndex(Cursor cursor){
  try {
    return getIndex.invoke(cursor);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 43166
Project: 43166
Buggy source:
protected void apply(){
  final CacheQuery cacheQuery=holder.getCacheQuery();
  final Integer offset=fetchOptions.getOffset();
  if (offset != null) {
    cacheQuery.firstResult(offset);
  }
  final Integer limit=fetchOptions.getLimit();
  if (limit != null) {
    cacheQuery.maxResults(limit);
  }
  final Cursor start=fetchOptions.getStartCursor();
  if (start != null) {
    JBossCursorHelper.applyStartCursor(start,cacheQuery);
  }
  final Cursor end=fetchOptions.getEndCursor();
  if (end != null) {
    JBossCursorHelper.applyEndCursor(end,cacheQuery,start);
  }
}

Fixed version (ground truth):
protected void apply(){
  final CacheQuery cacheQuery=holder.getCacheQuery();
  Integer offset=fetchOptions.getOffset();
  Integer cursorOffset=null;
  Cursor startCursor=fetchOptions.getStartCursor();
  if (startCursor != null) {
    cursorOffset=JBossCursorHelper.readIndex(startCursor);
  }
  if (offset != null || cursorOffset != null) {
    offset=(offset == null ? 0 : offset) + (cursorOffset == null ? 0 : cursorOffset);
    cacheQuery.firstResult(offset);
  }
  Integer limit=fetchOptions.getLimit();
  Integer cursorLimit=null;
  Cursor endCursor=fetchOptions.getEndCursor();
  if (endCursor != null) {
    int last=JBossCursorHelper.readIndex(endCursor) - 1;
    int first=(offset == null) ? 0 : offset;
    cursorLimit=last - first + 1;
  }
  if (limit != null || cursorLimit != null) {
    cacheQuery.maxResults(Math.min(limit == null ? Integer.MAX_VALUE : limit,cursorLimit == null ? Integer.MAX_VALUE : cursorLimit));
  }
}
Program: 43167
Project: 43167
Buggy source:
@Ignore("String_Node_Str") @Test public void testLimit(){
  FetchOptions.Builder.withLimit(1);
}

Fixed version (ground truth):
@Test public void testLimit(){
  List<Entity> results=executeQuery(withLimit(2));
  assertEquals(asList(foo1,foo2),results);
}
Program: 43168
Project: 43168
Buggy source:
@Ignore("String_Node_Str") @Test public void testOffset(){
  FetchOptions.Builder.withOffset(1);
}

Fixed version (ground truth):
@Test public void testOffset(){
  List<Entity> results=executeQuery(withOffset(3));
  assertEquals(asList(foo4,foo5),results);
}
Program: 43169
Project: 43169
Buggy source:
private boolean namespaceMatches(CacheKey key){
  return key.getNamespace().equals(namespace);
}

Fixed version (ground truth):
private boolean namespaceMatches(CacheKey key){
  return key.getNamespace().equals(resolveNamespace());
}
Program: 43170
Project: 43170
Buggy source:
public Map<Key,Entity> get(Transaction tx,Iterable<Key> keyIterable){
  final javax.transaction.Transaction transaction=beforeTx(tx);
  try {
    Map<Key,Entity> result=new HashMap<Key,Entity>();
    for (    Key key : keyIterable)     result.put(key,store.get(key));
    return result;
  }
  finally {
    afterTx(transaction);
  }
}

Fixed version (ground truth):
public Map<Key,Entity> get(Transaction tx,Iterable<Key> keyIterable){
  final javax.transaction.Transaction transaction=beforeTx(tx);
  try {
    Map<Key,Entity> result=new HashMap<Key,Entity>();
    for (    Key key : keyIterable) {
      Entity entity=store.get(key);
      result.put(key,entity == null ? null : entity.clone());
    }
    return result;
  }
  finally {
    afterTx(transaction);
  }
}
Program: 43171
Project: 43171
Buggy source:
@Test public void testMultipleEntityGroupsInSingleTransactionAreNotAllowed(){
  Transaction tx=service.beginTransaction();
  try {
    Entity person=new Entity("String_Node_Str","String_Node_Str");
    service.put(person);
    try {
      Entity photoNotAChild=new Entity("String_Node_Str");
      photoNotAChild.setProperty("String_Node_Str","String_Node_Str");
      service.put(photoNotAChild);
      Assert.fail("String_Node_Str");
    }
 catch (    IllegalArgumentException ex) {
    }
  }
  finally {
    tx.rollback();
  }
}

Fixed version (ground truth):
@Test public void testMultipleEntityGroupsInSingleTransactionAreNotAllowed(){
  Transaction tx=service.beginTransaction();
  try {
    Entity person=new Entity("String_Node_Str","String_Node_Str");
    service.put(person);
    try {
      Entity photoNotAChild=new Entity("String_Node_Str");
      photoNotAChild.setProperty("String_Node_Str","String_Node_Str");
      service.put(photoNotAChild);
      fail("String_Node_Str");
    }
 catch (    IllegalArgumentException ex) {
    }
  }
  finally {
    tx.rollback();
  }
}
Program: 43172
Project: 43172
Buggy source:
@Test public void testNoIdKey() throws Exception {
  Entity entity=new Entity("String_Node_Str");
  Key key=service.put(entity);
  Assert.assertTrue(key.isComplete());
}

Fixed version (ground truth):
@Test public void testNoIdKey() throws Exception {
  Entity entity=new Entity("String_Node_Str");
  Key key=service.put(entity);
  assertTrue(key.isComplete());
}
Program: 43173
Project: 43173
Buggy source:
@Test public void testNested() throws Exception {
  assertTxs();
  Entity e1=createTestEntity("String_Node_Str",1);
  Transaction t1=service.beginTransaction();
  service.put(t1,e1);
  assertStoreContains(e1);
  assertTxs(t1);
  Assert.assertTrue(t1.isActive());
  Transaction t2=service.beginTransaction();
  Entity e2=createTestEntity("String_Node_Str",2);
  service.put(e2);
  assertTxs(t1,t2);
  Assert.assertTrue(t1.isActive());
  Assert.assertTrue(t2.isActive());
  assertStoreContains(e2);
  t2.rollback();
  assertTxs(t1);
  Assert.assertTrue(t1.isActive());
  assertStoreDoesNotContain(e2);
  t1.commit();
  assertStoreContains(e1);
  assertTxs();
}

Fixed version (ground truth):
@Test public void testNested() throws Exception {
  assertTxs();
  Entity e1=createTestEntity("String_Node_Str",1);
  Transaction t1=service.beginTransaction();
  service.put(t1,e1);
  assertStoreContains(e1);
  assertTxs(t1);
  assertTrue(t1.isActive());
  Transaction t2=service.beginTransaction();
  Entity e2=createTestEntity("String_Node_Str",2);
  service.put(e2);
  assertTxs(t1,t2);
  assertTrue(t1.isActive());
  assertTrue(t2.isActive());
  assertStoreContains(e2);
  t2.rollback();
  assertTxs(t1);
  assertTrue(t1.isActive());
  assertStoreDoesNotContain(e2);
  t1.commit();
  assertStoreContains(e1);
  assertTxs();
}
Program: 43174
Project: 43174
Buggy source:
protected void assertTxs(Transaction... txs){
  Collection<Transaction> transactions=service.getActiveTransactions();
  Assert.assertNotNull(txs);
  Set<Transaction> expected=new HashSet<Transaction>(transactions);
  Set<Transaction> existing=new HashSet<Transaction>(Arrays.asList(txs));
  Assert.assertEquals(expected,existing);
}

Fixed version (ground truth):
protected void assertTxs(Transaction... txs){
  Collection<Transaction> transactions=service.getActiveTransactions();
  assertNotNull(txs);
  Set<Transaction> expected=new HashSet<Transaction>(transactions);
  Set<Transaction> existing=new HashSet<Transaction>(Arrays.asList(txs));
  assertEquals(expected,existing);
}
Program: 43175
Project: 43175
Buggy source:
public void delete(Transaction tx,Iterable<Key> keyIterable){
  boolean newTx=(tx == null);
  if (newTx)   tx=beginTransaction();
  try {
    for (    Key key : keyIterable)     store.remove(key);
    if (newTx) {
      newTx=false;
      tx.commit();
    }
  }
 catch (  Throwable t) {
    if (newTx)     tx.rollback();
    throw new RuntimeException(t);
  }
}

Fixed version (ground truth):
public void delete(Transaction tx,Iterable<Key> keyIterable){
  boolean newTx=(tx == null);
  if (newTx)   tx=beginTransaction();
  try {
    for (    Key key : keyIterable) {
      EntityGroupTracker.trackKey(tx,key);
      store.remove(key);
    }
    if (newTx) {
      newTx=false;
      tx.commit();
    }
  }
 catch (  Throwable t) {
    if (newTx)     tx.rollback();
    throw new RuntimeException(t);
  }
}
Program: 43176
Project: 43176
Buggy source:
public List<Key> put(Transaction tx,Iterable<Entity> entityIterable){
  boolean newTx=(tx == null);
  if (newTx)   tx=beginTransaction();
  try {
    List<Key> list=new ArrayList<Key>();
    for (    Entity entity : entityIterable) {
      Key key=entity.getKey();
      if (key.isComplete() == false) {
        long id=KeyGenerator.generateKeyId(key);
        ReflectionUtils.invokeInstanceMethod(key,"String_Node_Str",Long.TYPE,id);
      }
      EntityGroupTracker.trackEntity(tx,entity);
      store.put(key,modify(entity));
      list.add(key);
    }
    if (newTx) {
      newTx=false;
      tx.commit();
    }
    return list;
  }
 catch (  Throwable t) {
    if (newTx)     tx.rollback();
    if (t instanceof RuntimeException) {
      throw (RuntimeException)t;
    }
 else {
      throw new RuntimeException(t);
    }
  }
}

Fixed version (ground truth):
public List<Key> put(Transaction tx,Iterable<Entity> entityIterable){
  boolean newTx=(tx == null);
  if (newTx)   tx=beginTransaction();
  try {
    List<Key> list=new ArrayList<Key>();
    for (    Entity entity : entityIterable) {
      final Key key=entity.getKey();
      if (key.isComplete() == false) {
        long id=KeyGenerator.generateKeyId(key);
        ReflectionUtils.invokeInstanceMethod(key,"String_Node_Str",Long.TYPE,id);
      }
      EntityGroupTracker.trackKey(tx,key);
      store.put(key,modify(entity));
      list.add(key);
    }
    if (newTx) {
      newTx=false;
      tx.commit();
    }
    return list;
  }
 catch (  Throwable t) {
    if (newTx)     tx.rollback();
    if (t instanceof RuntimeException) {
      throw (RuntimeException)t;
    }
 else {
      throw new RuntimeException(t);
    }
  }
}
Program: 43177
Project: 43177
Buggy source:
@Test public void testAllocateId() throws Exception {
  KeyRange keys=service.allocateIds("String_Node_Str",10L);
  Assert.assertNotNull(keys);
  Key start=keys.getStart();
  Assert.assertNotNull(start);
  Assert.assertEquals(1,start.getId());
  Key end=keys.getStart();
  Assert.assertNotNull(end);
  Assert.assertEquals(10,end.getId());
}

Fixed version (ground truth):
@Test public void testAllocateId() throws Exception {
  KeyRange keys=service.allocateIds("String_Node_Str",10L);
  Assert.assertNotNull(keys);
  Key start=keys.getStart();
  Assert.assertNotNull(start);
  Assert.assertEquals(1,start.getId());
  Key end=keys.getEnd();
  Assert.assertNotNull(end);
  Assert.assertEquals(10,end.getId());
}
Program: 43178
Project: 43178
Buggy source:
@Test public void testCheckKeyRange() throws Exception {
  KeyRange kr1=new KeyRange(null,"String_Node_Str",1,5);
  DatastoreService.KeyRangeState state1=service.allocateIdRange(kr1);
  Assert.assertNotNull(state1);
  Assert.assertSame(DatastoreService.KeyRangeState.CONTENTION,state1);
  KeyRange kr2=service.allocateIds("String_Node_Str",6);
  Assert.assertNotNull(kr2);
  KeyRange kr3=new KeyRange(null,"String_Node_Str",2,5);
  DatastoreService.KeyRangeState state2=service.allocateIdRange(kr3);
  Assert.assertNotNull(state2);
  Assert.assertSame(DatastoreService.KeyRangeState.COLLISION,state1);
}

Fixed version (ground truth):
@Test public void testCheckKeyRange() throws Exception {
  KeyRange kr1=new KeyRange(null,"String_Node_Str",1,5);
  DatastoreService.KeyRangeState state1=service.allocateIdRange(kr1);
  Assert.assertNotNull(state1);
  Assert.assertSame(DatastoreService.KeyRangeState.CONTENTION,state1);
  KeyRange kr2=service.allocateIds("String_Node_Str",6);
  Assert.assertNotNull(kr2);
  KeyRange kr3=new KeyRange(null,"String_Node_Str",2,5);
  DatastoreService.KeyRangeState state2=service.allocateIdRange(kr3);
  Assert.assertNotNull(state2);
  Assert.assertSame(DatastoreService.KeyRangeState.COLLISION,state2);
}
Program: 43179
Project: 43179
Buggy source:
@Test public void putStoresAllGivenEntities() throws Exception {
  Collection<Entity> entities=createTestEntities();
  service.put(entities);
  assertStoreContainsAll(entities);
}

Fixed version (ground truth):
@Test public void putStoresAllGivenEntities() throws Exception {
  Collection<Entity> entities=createTestEntities();
  for (  Entity e : entities) {
    service.put(e);
  }
  assertStoreContainsAll(entities);
}
Program: 43180
Project: 43180
Buggy source:
@Test public void deleteRemovesAllGivenEntities() throws Exception {
  Collection<Entity> entities=createTestEntities();
  Collection<Key> keys=extractKeys(entities);
  service.put(entities);
  service.delete(keys);
  assertStoreDoesNotContain(keys);
}

Fixed version (ground truth):
@Test public void deleteRemovesAllGivenEntities() throws Exception {
  Collection<Entity> entities=createTestEntities();
  Collection<Key> keys=extractKeys(entities);
  for (  Entity e : entities) {
    service.put(e);
  }
  for (  Key k : keys) {
    service.delete(k);
  }
  assertStoreDoesNotContain(keys);
}
Program: 43181
Project: 43181
Buggy source:
public void clearLog(){
  Query query=new Query(LOG_LINE_ENTITY_KIND);
  Iterable<Entity> entities=DatastoreServiceFactory.getDatastoreService().prepare(query).asIterable();
  List<Key> keys=new LinkedList<Key>();
  for (  Entity entity : entities) {
    keys.add(entity.getKey());
  }
  DatastoreServiceFactory.getDatastoreService().delete(keys);
}

Fixed version (ground truth):
public void clearLog(){
  final DatastoreService ds=DatastoreServiceFactory.getDatastoreService();
  Query query=new Query(LOG_LINE_ENTITY_KIND);
  Iterable<Entity> entities=ds.prepare(query).asIterable();
  for (  Entity entity : entities) {
    ds.delete(entity.getKey());
  }
}
Program: 43182
Project: 43182
Buggy source:
private void fetchAppLogLines(LogQuery logQuery,Map<Key,RequestLogs> map){
  Query query=createAppLogLinesQuery(logQuery);
  FetchOptions fetchOptions=createAppLogFetchOptions(logQuery);
  List<Entity> entities=DatastoreServiceFactory.getDatastoreService().prepare(query).asList(fetchOptions);
  for (  Entity entity : entities) {
    AppLogLine logLine=new AppLogLine();
    logLine.setLogLevel(LogLevel.values()[(Integer)entity.getProperty(LOG_LINE_LEVEL)]);
    logLine.setLogMessage((String)entity.getProperty(LOG_LINE_MESSAGE));
    logLine.setTimeUsec((Long)entity.getProperty(LOG_LINE_MILLIS));
    RequestLogs requestLogs=map.get((Key)entity.getProperty(LOG_LINE_REQUEST_KEY));
    requestLogs.getAppLogLines().add(logLine);
  }
}

Fixed version (ground truth):
private void fetchAppLogLines(LogQuery logQuery,Map<Key,RequestLogs> map){
  Query query=createAppLogLinesQuery(logQuery);
  FetchOptions fetchOptions=createAppLogFetchOptions(logQuery);
  List<Entity> entities=DatastoreServiceFactory.getDatastoreService().prepare(query).asList(fetchOptions);
  for (  Entity entity : entities) {
    AppLogLine logLine=new AppLogLine();
    logLine.setLogLevel(LogLevel.values()[((Number)entity.getProperty(LOG_LINE_LEVEL)).intValue()]);
    logLine.setLogMessage((String)entity.getProperty(LOG_LINE_MESSAGE));
    logLine.setTimeUsec((Long)entity.getProperty(LOG_LINE_MILLIS));
    RequestLogs requestLogs=map.get((Key)entity.getProperty(LOG_LINE_REQUEST_KEY));
    requestLogs.getAppLogLines().add(logLine);
  }
}
Program: 43183
Project: 43183
Buggy source:
/** 
 * Find method.
 * @param clazz      the class
 * @param methodName the method name
 * @param types      the types
 * @return method's return value
 */
private static Method findMethod(Class<?> clazz,String methodName,Class[] types){
  if (clazz == null)   throw new IllegalArgumentException("String_Node_Str");
  if (methodName == null)   throw new IllegalArgumentException("String_Node_Str");
  try {
    Class<?> current=clazz;
    while (current != null) {
      try {
        final Method m=clazz.getDeclaredMethod(methodName,types);
        m.setAccessible(true);
        return m;
      }
 catch (      NoSuchMethodException ignored) {
      }
      current=current.getSuperclass();
    }
  }
 catch (  Throwable t) {
    throw new RuntimeException(t);
  }
  throw new IllegalStateException("String_Node_Str" + clazz.getName() + "String_Node_Str"+ methodName);
}

Fixed version (ground truth):
/** 
 * Find method.
 * @param clazz      the class
 * @param methodName the method name
 * @param types      the types
 * @return method's return value
 */
private static Method findMethod(Class<?> clazz,String methodName,Class[] types){
  if (clazz == null)   throw new IllegalArgumentException("String_Node_Str");
  if (methodName == null)   throw new IllegalArgumentException("String_Node_Str");
  try {
    Class<?> current=clazz;
    while (current != null) {
      try {
        final Method m=current.getDeclaredMethod(methodName,types);
        m.setAccessible(true);
        return m;
      }
 catch (      NoSuchMethodException ignored) {
      }
      current=current.getSuperclass();
    }
  }
 catch (  Throwable t) {
    throw new RuntimeException(t);
  }
  throw new IllegalStateException("String_Node_Str" + clazz.getName() + "String_Node_Str"+ methodName);
}
Program: 43184
Project: 43184
Buggy source:
@SuppressWarnings("String_Node_Str") public void enhanceMessage(Message message) throws Exception {
  final Map<String,List<String>> headers=(Map<String,List<String>>)ReflectionUtils.invokeInstanceMethod(taskOptions,"String_Node_Str");
  if (headers != null) {
    final Map<String,String> map=new HashMap<String,String>();
    for (    Map.Entry<String,List<String>> entry : headers.entrySet()) {
      final StringBuilder builder=new StringBuilder();
      final List<String> list=entry.getValue();
      if (list.isEmpty() == false) {
        builder.append(list.get(0));
        for (int i=1; i < list.size(); i++) {
          builder.append(TasksServletRequestCreator.DELIMITER).append(list.get(i));
        }
      }
      final String key=entry.getKey();
      map.put(key,builder.toString());
    }
    TasksServletRequestCreator.put(message,TasksServletRequestCreator.HEADERS,map);
  }
  final List<Object> params=(List<Object>)ReflectionUtils.invokeInstanceMethod(taskOptions,"String_Node_Str");
  if (params != null) {
    final Map<String,String> map=new HashMap<String,String>();
    for (    Object param : params) {
      final String key=(String)ReflectionUtils.invokeInstanceMethod(param,"String_Node_Str");
      final String value=(String)ReflectionUtils.invokeInstanceMethod(param,"String_Node_Str");
      map.put(key,value);
    }
    TasksServletRequestCreator.put(message,TasksServletRequestCreator.PARAMS,map);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void enhanceMessage(Message message) throws Exception {
  final Map<String,List<String>> headers=(Map<String,List<String>>)ReflectionUtils.invokeInstanceMethod(taskOptions,"String_Node_Str");
  if (headers != null && headers.size() > 0) {
    final Map<String,String> map=new HashMap<String,String>();
    for (    Map.Entry<String,List<String>> entry : headers.entrySet()) {
      final StringBuilder builder=new StringBuilder();
      final List<String> list=entry.getValue();
      if (list.isEmpty() == false) {
        builder.append(list.get(0));
        for (int i=1; i < list.size(); i++) {
          builder.append(TasksServletRequestCreator.DELIMITER).append(list.get(i));
        }
      }
      final String key=entry.getKey();
      map.put(key,builder.toString());
    }
    TasksServletRequestCreator.put(message,TasksServletRequestCreator.HEADERS,map);
  }
  final List<Object> params=(List<Object>)ReflectionUtils.invokeInstanceMethod(taskOptions,"String_Node_Str");
  if (params != null && params.size() > 0) {
    final Map<String,String> map=new HashMap<String,String>();
    for (    Object param : params) {
      final String key=(String)ReflectionUtils.invokeInstanceMethod(param,"String_Node_Str");
      final String value=(String)ReflectionUtils.invokeInstanceMethod(param,"String_Node_Str");
      map.put(key,value);
    }
    TasksServletRequestCreator.put(message,TasksServletRequestCreator.PARAMS,map);
  }
}
Program: 43185
Project: 43185
Buggy source:
@Test @Ignore public void testParams() throws Exception {
  final Queue queue=QueueFactory.getQueue("String_Node_Str");
  queue.add(TaskOptions.Builder.withParam("String_Node_Str","String_Node_Str").url(URL));
}

Fixed version (ground truth):
@Test public void testParams() throws Exception {
  final Queue queue=QueueFactory.getQueue("String_Node_Str");
  queue.add(TaskOptions.Builder.withParam("String_Node_Str","String_Node_Str").url(URL));
}
Program: 43186
Project: 43186
Buggy source:
@Test @Ignore public void testPayload() throws Exception {
  final Queue queue=QueueFactory.getQueue("String_Node_Str");
  queue.add(TaskOptions.Builder.withPayload("String_Node_Str").url(URL));
}

Fixed version (ground truth):
@Test public void testPayload() throws Exception {
  final Queue queue=QueueFactory.getQueue("String_Node_Str");
  queue.add(TaskOptions.Builder.withPayload("String_Node_Str").url(URL));
}