nus-yam/ex-repair huggingface dataset:
Program: 35331
Project: 35331
Buggy source:
public SearchResult search(SearchRequest searchRequest){
  SearchCacheEntry searchCacheEntry=getSearchCacheEntry(searchRequest);
  SearchResult searchResult=new SearchResult();
  int numberOfWantedResults=searchRequest.getOffset() + searchRequest.getLimit();
  Map<Indexer,List<IndexerSearchResult>> indexersToSearchAndTheirResults=getIndexerSearchResultsToSearch(searchCacheEntry.getIndexerSearchResultsByIndexer());
  while (indexersToSearchAndTheirResults.size() > 0 && searchResult.calculateNumberOfResults() < numberOfWantedResults) {
    indexersToSearchAndTheirResults=callSearchModules(searchRequest,indexersToSearchAndTheirResults);
    searchCacheEntry.setIndexerSearchResultsByIndexer(indexersToSearchAndTheirResults);
    searchRequestCache.put(searchRequest.hashCode(),searchCacheEntry);
    List<SearchResultItem> searchResultItems=searchCacheEntry.getIndexerSearchResultsByIndexer().values().stream().flatMap(Collection::stream).filter(IndexerSearchResult::isWasSuccessful).flatMap(x -> x.getSearchResultItems().stream()).collect(Collectors.toList());
    DuplicateDetectionResult duplicateDetectionResult=duplicateDetector.detectDuplicates(searchResultItems);
    searchResult.setDuplicateDetectionResult(duplicateDetectionResult);
    indexersToSearchAndTheirResults=getIndexerSearchResultsToSearch(indexersToSearchAndTheirResults);
  }
  return searchResult;
}

Fixed version (ground truth):
public SearchResult search(SearchRequest searchRequest){
  SearchCacheEntry searchCacheEntry=getSearchCacheEntry(searchRequest);
  SearchResult searchResult=new SearchResult();
  int numberOfWantedResults=searchRequest.getOffset().orElse(0) + searchRequest.getLimit().orElse(100);
  Map<Indexer,List<IndexerSearchResult>> indexersToSearchAndTheirResults=getIndexerSearchResultsToSearch(searchCacheEntry.getIndexerSearchResultsByIndexer());
  while (indexersToSearchAndTheirResults.size() > 0 && searchResult.calculateNumberOfResults() < numberOfWantedResults) {
    indexersToSearchAndTheirResults=callSearchModules(searchRequest,indexersToSearchAndTheirResults);
    searchCacheEntry.updateCache(indexersToSearchAndTheirResults);
    searchRequestCache.put(searchRequest.hashCode(),searchCacheEntry);
    List<SearchResultItem> searchResultItems=searchCacheEntry.getIndexerSearchResultsByIndexer().values().stream().flatMap(Collection::stream).filter(IndexerSearchResult::isWasSuccessful).flatMap(x -> x.getSearchResultItems().stream()).collect(Collectors.toList());
    DuplicateDetectionResult duplicateDetectionResult=duplicateDetector.detectDuplicates(searchResultItems);
    searchResult.setDuplicateDetectionResult(duplicateDetectionResult);
    indexersToSearchAndTheirResults=getIndexerSearchResultsToSearch(indexersToSearchAndTheirResults);
  }
  return searchResult;
}
Program: 35333
Project: 35333
Buggy source:
@Transactional protected void persistSearchResults(List<SearchResultItem> searchResultItems){
  Stopwatch stopwatch=Stopwatch.createStarted();
  ArrayList<SearchResultEntity> searchResultEntities=new ArrayList<>();
  for (  SearchResultItem item : searchResultItems) {
    SearchResultEntity searchResultEntity=searchResultRepository.findByIndexerAndIndexerGuid(indexer,item.getIndexerGuid());
    if (searchResultEntity == null) {
      searchResultEntity=new SearchResultEntity();
      searchResultEntity.setIndexer(indexer);
      searchResultEntity.setTitle(item.getTitle());
      searchResultEntity.setLink(item.getLink());
      searchResultEntity.setDetails(item.getDetails());
      searchResultEntity.setIndexerGuid(item.getIndexerGuid());
      searchResultEntity.setFirstFound(Instant.now());
      searchResultEntities.add(searchResultEntity);
    }
  }
  searchResultRepository.save(searchResultEntities);
  getLogger().debug("String_Node_Str",searchResultItems.size(),stopwatch.elapsed(TimeUnit.MILLISECONDS));
}

Fixed version (ground truth):
@Transactional protected List<SearchResultItem> persistSearchResults(List<SearchResultItem> searchResultItems){
  Stopwatch stopwatch=Stopwatch.createStarted();
  ArrayList<SearchResultEntity> searchResultEntities=new ArrayList<>();
  for (  SearchResultItem item : searchResultItems) {
    SearchResultEntity searchResultEntity=searchResultRepository.findByIndexerAndIndexerGuid(indexer,item.getIndexerGuid());
    if (searchResultEntity == null) {
      searchResultEntity=new SearchResultEntity();
      searchResultEntity.setIndexer(indexer);
      searchResultEntity.setTitle(item.getTitle());
      searchResultEntity.setLink(item.getLink());
      searchResultEntity.setDetails(item.getDetails());
      searchResultEntity.setIndexerGuid(item.getIndexerGuid());
      searchResultEntity.setFirstFound(Instant.now());
      searchResultEntities.add(searchResultEntity);
    }
    item.setSearchResultId(SearchResultIdCalculator.calculateSearchResultId(item));
  }
  searchResultRepository.save(searchResultEntities);
  getLogger().debug("String_Node_Str",searchResultItems.size(),stopwatch.elapsed(TimeUnit.MILLISECONDS));
  return searchResultItems;
}
Program: 35334
Project: 35334
Buggy source:
private List<SearchResultItem> getSearchResultItems(RssRoot rssRoot){
  List<SearchResultItem> searchResultItems=new ArrayList<>();
  for (  RssItem item : rssRoot.getRssChannel().getItems()) {
    SearchResultItem searchResultItem=new SearchResultItem();
    searchResultItem.setLink(item.getLink());
    searchResultItem.setDetails("String_Node_Str");
    searchResultItem.setIndexerGuid(item.getRssGuid().getGuid());
    searchResultItem.setFirstFound(Instant.now());
    searchResultItem.setIndexer(indexer);
    searchResultItem.setTitle(item.getTitle());
    searchResultItem.setSize(searchResultItem.getSize());
    searchResultItem.setPubDate(item.getPubDate());
    searchResultItem.setIndexerScore(config.getScore());
    searchResultItem.setGuid(hashItem(searchResultItem));
    for (    NewznabAttribute attribute : item.getAttributes()) {
      searchResultItem.getAttributes().put(attribute.getName(),attribute.getValue());
    }
    searchResultItems.add(searchResultItem);
  }
  persistSearchResults(searchResultItems);
  return searchResultItems;
}

Fixed version (ground truth):
private List<SearchResultItem> getSearchResultItems(RssRoot rssRoot){
  List<SearchResultItem> searchResultItems=new ArrayList<>();
  for (  RssItem item : rssRoot.getRssChannel().getItems()) {
    SearchResultItem searchResultItem=new SearchResultItem();
    searchResultItem.setLink(item.getLink());
    searchResultItem.setDetails("String_Node_Str");
    searchResultItem.setIndexerGuid(item.getRssGuid().getGuid());
    searchResultItem.setFirstFound(Instant.now());
    searchResultItem.setIndexer(indexer);
    searchResultItem.setTitle(item.getTitle());
    searchResultItem.setSize(searchResultItem.getSize());
    searchResultItem.setPubDate(item.getPubDate());
    searchResultItem.setIndexerScore(config.getScore());
    searchResultItem.setGuid(hashItem(searchResultItem));
    for (    NewznabAttribute attribute : item.getAttributes()) {
      searchResultItem.getAttributes().put(attribute.getName(),attribute.getValue());
    }
    searchResultItems.add(searchResultItem);
  }
  searchResultItems=persistSearchResults(searchResultItems);
  return searchResultItems;
}
Program: 35335
Project: 35335
Buggy source:
protected UriComponentsBuilder buildSearchUrl(SearchRequest searchRequest){
  UriComponentsBuilder componentsBuilder=getBaseUri().queryParam("String_Node_Str",searchRequest.getSearchType().name().toLowerCase());
  if (searchRequest.getQuery() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getQuery());
  }
  componentsBuilder=extendQueryWithSearchIds(searchRequest,componentsBuilder);
  if (searchRequest.getSeason() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getSeason());
  }
  if (searchRequest.getEpisode() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getEpisode());
  }
  if (searchRequest.getMinage() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMinage());
  }
  if (searchRequest.getMaxage() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMaxage());
  }
  if (searchRequest.getMinsize() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMinsize());
  }
  if (searchRequest.getMaxsize() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMaxsize());
  }
  if (searchRequest.getTitle() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getTitle());
  }
  if (searchRequest.getMaxsize() != null) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getAuthor());
  }
  return componentsBuilder;
}

Fixed version (ground truth):
protected UriComponentsBuilder buildSearchUrl(SearchRequest searchRequest){
  UriComponentsBuilder componentsBuilder=getBaseUri().queryParam("String_Node_Str",searchRequest.getSearchType().name().toLowerCase());
  if (searchRequest.getQuery().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getQuery().get());
  }
  componentsBuilder=extendQueryWithSearchIds(searchRequest,componentsBuilder);
  if (searchRequest.getSeason().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getSeason().get());
  }
  if (searchRequest.getEpisode().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getEpisode().get());
  }
  if (searchRequest.getMinage().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMinage().get());
  }
  if (searchRequest.getMaxage().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMaxage().get());
  }
  if (searchRequest.getMinsize().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMinsize().get());
  }
  if (searchRequest.getMaxsize().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getMaxsize().get());
  }
  if (searchRequest.getTitle().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getTitle().get());
  }
  if (searchRequest.getAuthor().isPresent()) {
    componentsBuilder.queryParam("String_Node_Str",searchRequest.getAuthor().get());
  }
  return componentsBuilder;
}
Program: 35336
Project: 35336
Buggy source:
private Response generateBinaryDataResponse(JobId jobId,Optional<BinaryData> maybeBinaryData){
  if (maybeBinaryData.isPresent()) {
    final BinaryData binaryData=maybeBinaryData.get();
    final StreamingOutput body=outputStream -> IOUtils.copy(binaryData.getData(),outputStream);
    return Response.ok(body,binaryData.getMimeType()).header("String_Node_Str",binaryData.getSizeOf()).build();
  }
 else {
    return Response.status(404).build();
  }
}

Fixed version (ground truth):
private Response generateBinaryDataResponse(JobId jobId,Optional<BinaryData> maybeBinaryData){
  if (maybeBinaryData.isPresent()) {
    final BinaryData binaryData=maybeBinaryData.get();
    final StreamingOutput body=outputStream -> IOUtils.copy(binaryData.getData(),outputStream);
    final Response.ResponseBuilder b=Response.ok(body,binaryData.getMimeType()).header("String_Node_Str",binaryData.getSizeOf());
    if (binaryData.getSizeOf() > Constants.MAX_JOB_OUTPUT_SIZE_IN_BYTES_BEFORE_DISABLING_COMPRESSION)     b.header("String_Node_Str","String_Node_Str");
    return b.build();
  }
 else {
    return Response.status(404).build();
  }
}
Program: 35337
Project: 35337
Buggy source:
public static byte[] generateRandomBytes(){
  return generateRandomString().getBytes();
}

Fixed version (ground truth):
public static byte[] generateRandomBytes(int numBytes){
  final byte[] b=new byte[numBytes];
  rng.nextBytes(b);
  return b;
}
Program: 35338
Project: 35338
Buggy source:
@Test public void testExecuteStdoutListenerIsCalledWithCompletedOnceApplicationExecutionEnds() throws Throwable {
  final JobExecutor jobExecutor=getInstance();
  final AtomicBoolean completedCalled=new AtomicBoolean(false);
  final Subject<byte[]> stdoutSubject=PublishSubject.create();
  stdoutSubject.doOnComplete(() -> completedCalled.set(true)).subscribe();
  final JobEventListeners listeners=createStdoutListener(stdoutSubject);
  final CancelablePromise<JobExecutionResult> ret=jobExecutor.execute(STANDARD_REQUEST,listeners);
  promiseAssert(ret,result -> {
    assertThat(completedCalled.get()).isTrue();
  }
);
}

Fixed version (ground truth):
@Test public void testExecuteStdoutListenerIsCalledWithCompletedOnceApplicationExecutionEnds() throws Throwable {
  final JobExecutor jobExecutor=getInstance();
  final AtomicBoolean completedCalled=new AtomicBoolean(false);
  final Subject<byte[]> stdoutSubject=PublishSubject.create();
  stdoutSubject.doOnComplete(() -> completedCalled.set(true)).subscribe();
  final JobEventListeners listeners=createStdoutListener(stdoutSubject);
  final CancelablePromise<JobExecutionResult> ret=jobExecutor.execute(STANDARD_REQUEST,listeners);
  promiseAssert(ret,result -> {
    try {
      Thread.sleep(50);
      assertThat(completedCalled.get()).isTrue();
    }
 catch (    InterruptedException ignored) {
    }
  }
);
}
Program: 35339
Project: 35339
Buggy source:
@Test public void testExecuteStderrListenerIsCompletedOnceApplicationExecutionEnds() throws Throwable {
  final JobExecutor jobExecutor=getInstance();
  final AtomicBoolean completedCalled=new AtomicBoolean(false);
  final Subject<byte[]> stderrSubject=PublishSubject.create();
  stderrSubject.doOnComplete(() -> completedCalled.set(true)).subscribe();
  final JobEventListeners listeners=createStderrListener(stderrSubject);
  final CancelablePromise<JobExecutionResult> ret=jobExecutor.execute(STANDARD_REQUEST,listeners);
  promiseAssert(ret,result -> assertThat(completedCalled.get()).isTrue());
}

Fixed version (ground truth):
@Test public void testExecuteStderrListenerIsCompletedOnceApplicationExecutionEnds() throws Throwable {
  final JobExecutor jobExecutor=getInstance();
  final AtomicBoolean completedCalled=new AtomicBoolean(false);
  final Subject<byte[]> stderrSubject=PublishSubject.create();
  stderrSubject.doOnComplete(() -> completedCalled.set(true)).subscribe();
  final JobEventListeners listeners=createStderrListener(stderrSubject);
  final CancelablePromise<JobExecutionResult> ret=jobExecutor.execute(STANDARD_REQUEST,listeners);
  promiseAssert(ret,result -> {
    try {
      Thread.sleep(50);
      assertThat(completedCalled.get()).isTrue();
    }
 catch (    InterruptedException ignored) {
    }
  }
);
}
Program: 35340
Project: 35340
Buggy source:
@Override public void filter(ContainerRequestContext containerRequestContext) throws IOException {
  this.authenticate(containerRequestContext,null,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void filter(ContainerRequestContext containerRequestContext) throws IOException {
  this.authenticate(containerRequestContext,"String_Node_Str",DEFAULT_GUEST_AUTH_REALM);
}
Program: 35341
Project: 35341
Buggy source:
@Override public AuthFilter<?,Principal> createAuthFilter(AuthenticationBootstrap bootstrap){
  return new GuestAuthFilter.Builder<>().setAuthenticator(new GuestAuthenticator(guestUserName)).setAuthorizer(new PermitAllAuthorizer()).setRealm("String_Node_Str").buildAuthFilter();
}

Fixed version (ground truth):
@Override public AuthFilter<?,Principal> createAuthFilter(AuthenticationBootstrap bootstrap){
  return new GuestAuthFilter.Builder<>().setAuthenticator(new GuestAuthenticator(guestUserName)).setAuthorizer(new PermitAllAuthorizer()).setRealm(DEFAULT_GUEST_AUTH_REALM).buildAuthFilter();
}
Program: 35342
Project: 35342
Buggy source:
@Override public Optional<Principal> authenticate(Void aVoid) throws AuthenticationException {
  return p;
}

Fixed version (ground truth):
@Override public Optional<Principal> authenticate(String ignoredString) throws AuthenticationException {
  return p;
}
Program: 35343
Project: 35343
Buggy source:
@OnWebSocketConnect public void onWebSocketConnect(Session session){
  log.info("String_Node_Str" + session.getRemote().getInetSocketAddress().toString());
  this.session=session;
}

Fixed version (ground truth):
@OnWebSocketConnect public void onWebSocketConnect(Session session){
  log.info("String_Node_Str");
  this.session=session;
}
Program: 35344
Project: 35344
Buggy source:
@OnWebSocketClose public void onWebSocketClose(Session session,int closeCode,String closeReason){
  log.debug("String_Node_Str" + closeReason + "String_Node_Str"+ session.getRemote().getInetSocketAddress().toString());
  this.eventsSubscription.dispose();
}

Fixed version (ground truth):
@OnWebSocketClose public void onWebSocketClose(Session session,int closeCode,String closeReason){
  this.eventsSubscription.dispose();
}
Program: 35345
Project: 35345
Buggy source:
@Override public String execute() throws Exception {
  pageModel.setPageNo(1);
  pageModel.setPageCount(15);
  String keyword=ServletActionContext.getRequest().getParameter("String_Node_Str");
  System.out.println(keyword);
  pageModel=VIDEO_SERVICE.soso(pageModel,keyword);
  return SUCCESS;
}

Fixed version (ground truth):
@Override public String execute() throws Exception {
  pageModel.setPageNo(1);
  pageModel.setPageCount(15);
  String keyword=ServletActionContext.getRequest().getParameter("String_Node_Str");
  pageModel=VIDEO_SERVICE.soso(pageModel,keyword);
  return SUCCESS;
}
Program: 35346
Project: 35346
Buggy source:
public static Object getInstacne(String daoName){
  Object obj=cach.get(daoName);
  if (obj == null) {
    String clazz=p.getProperty(daoName);
    if (clazz != null && !clazz.equals("String_Node_Str")) {
      try {
        obj=Class.forName(clazz).newInstance();
      }
 catch (      InstantiationException e) {
        e.printStackTrace();
      }
catch (      IllegalAccessException e) {
        e.printStackTrace();
      }
catch (      ClassNotFoundException e) {
        e.printStackTrace();
      }
    }
  }
  return obj;
}

Fixed version (ground truth):
public static Object getInstacne(String daoName){
  Object obj=cach.get(daoName);
  if (obj == null) {
    String clazz=p.getProperty(daoName);
    if (clazz != null && !clazz.equals("String_Node_Str")) {
      try {
        obj=Class.forName(clazz).newInstance();
      }
 catch (      InstantiationException|IllegalAccessException|ClassNotFoundException e) {
        e.printStackTrace();
      }
    }
  }
  return obj;
}
Program: 35347
Project: 35347
Buggy source:
/** 
 * 传入dao名，创建这个实现类的一个实例
 * @param daoName dao名
 * @return 这个实现类的一个实例
 */
public synchronized static <T>T getInstance(String daoName,Class daoClass){
  T obj=(T)cach.get(daoName);
  if (null == obj) {
    String className=p.getProperty(daoName);
    if (null != className && !"String_Node_Str".equals(className)) {
      try {
        Class clazz=Class.forName(className);
        obj=(T)daoClass.cast(clazz.newInstance());
        cach.put(daoName,obj);
      }
 catch (      ClassNotFoundException e) {
        e.printStackTrace();
      }
catch (      InstantiationException e) {
        e.printStackTrace();
      }
catch (      IllegalAccessException e) {
        e.printStackTrace();
      }
    }
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * 传入dao名，创建这个实现类的一个实例
 * @param daoName dao名
 * @return 这个实现类的一个实例
 */
public synchronized static <T>T getInstance(String daoName,Class daoClass){
  T obj=(T)cach.get(daoName);
  if (null == obj) {
    String className=p.getProperty(daoName);
    if (null != className && !"String_Node_Str".equals(className)) {
      try {
        Class<Object> clazz=(Class<Object>)Class.forName(className);
        obj=(T)daoClass.cast(clazz.newInstance());
        cach.put(daoName,obj);
      }
 catch (      ClassNotFoundException|InstantiationException|IllegalAccessException e) {
        e.printStackTrace();
      }
    }
  }
  return obj;
}
Program: 35348
Project: 35348
Buggy source:
int binarySearch(int ar[],int l,int r,int x){
  if (r >= l) {
    int mid=l + (r - l) / 2;
    if (ar[mid] == x) {
      return mid;
    }
    if (ar[mid] > x) {
      return binarySearch(ar,l,mid - 1,x);
    }
    return binarySearch(ar,mid + 1,r,x);
  }
  return -1;
}

Fixed version (ground truth):
int binarySearch(int ar[],int l,int r,int x){
  if (ar.length == 0) {
    return -1;
  }
  if (r >= l) {
    int mid=l + (r - l) / 2;
    if (ar[mid] == x) {
      return mid;
    }
    if (ar[mid] > x) {
      return binarySearch(ar,l,mid - 1,x);
    }
    return binarySearch(ar,mid + 1,r,x);
  }
  return -1;
}
Program: 35349
Project: 35349
Buggy source:
static void printArray(int arr[]){
  int n=arr.length;
  for (int i=0; i < n; ++i)   System.out.print(arr[i] + "String_Node_Str");
  System.out.println();
}

Fixed version (ground truth):
public static void printArray(int arr[]){
  int n=arr.length;
  for (int i=0; i < n; ++i)   System.out.print(arr[i] + "String_Node_Str");
  System.out.println();
}
Program: 35350
Project: 35350
Buggy source:
void merge(int arr[],int l,int m,int r){
  int n1=m - l + 1;
  int n2=r - m;
  int L[]=new int[n1];
  int R[]=new int[n2];
  for (int i=0; i < n1; ++i)   L[i]=arr[l + i];
  for (int j=0; j < n2; ++j)   R[j]=arr[m + 1 + j];
  int i=0, j=0;
  int k=l;
  while (i < n1 && j < n2) {
    if (L[i] <= R[j]) {
      arr[k]=L[i];
      i++;
    }
 else {
      arr[k]=R[j];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k]=L[i];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k]=R[j];
    j++;
    k++;
  }
}

Fixed version (ground truth):
private static void merge(int arr[],int l,int m,int r){
  int n1=m - l + 1;
  int n2=r - m;
  int L[]=new int[n1];
  int R[]=new int[n2];
  for (int i=0; i < n1; ++i)   L[i]=arr[l + i];
  for (int j=0; j < n2; ++j)   R[j]=arr[m + 1 + j];
  int i=0, j=0;
  int k=l;
  while (i < n1 && j < n2) {
    if (L[i] <= R[j]) {
      arr[k]=L[i];
      i++;
    }
 else {
      arr[k]=R[j];
      j++;
    }
    k++;
  }
  while (i < n1) {
    arr[k]=L[i];
    i++;
    k++;
  }
  while (j < n2) {
    arr[k]=R[j];
    j++;
    k++;
  }
}
Program: 35351
Project: 35351
Buggy source:
public static void main(String args[]){
  int arr[]={12,11,13,5,6,7};
  System.out.println("String_Node_Str");
  printArray(arr);
  MergeSort ob=new MergeSort();
  ob.sort(arr,0,arr.length - 1);
  System.out.println("String_Node_Str");
  printArray(arr);
}

Fixed version (ground truth):
public static void main(String args[]){
  int arr[]={12,11,13,5,6,7};
  System.out.println("String_Node_Str");
  printArray(arr);
  MergeSort.sort(arr);
  System.out.println("String_Node_Str");
  printArray(arr);
}
Program: 35352
Project: 35352
Buggy source:
void sort(int arr[],int l,int r){
  if (l < r) {
    int m=(l + r) / 2;
    sort(arr,l,m);
    sort(arr,m + 1,r);
    merge(arr,l,m,r);
  }
}

Fixed version (ground truth):
public static boolean sort(int[] arr){
  if (arr == null) {
    return false;
  }
  if (arr.length != 0) {
    sort(arr,0,arr.length - 1);
  }
  return true;
}
Program: 35353
Project: 35353
Buggy source:
@Override public boolean onLongClick(View v){
  String s=QRUtils.getInstance().decodeQRcode(iv_qr);
  Toast.makeText(getApplicationContext(),"String_Node_Str" + s,Toast.LENGTH_SHORT).show();
  return true;
}

Fixed version (ground truth):
@Override public boolean onLongClick(View v){
  String s=null;
  try {
    s=QRUtils.getInstance().decodeQRcode(iv_qr);
  }
 catch (  Exception e) {
    e.printStackTrace();
    Log.e(TAG,"String_Node_Str" + e.toString());
  }
  Toast.makeText(getApplicationContext(),"String_Node_Str" + s,Toast.LENGTH_SHORT).show();
  return true;
}
Program: 35354
Project: 35354
Buggy source:
private void initView(){
  bt=(Button)findViewById(R.id.bt);
  bt.setOnClickListener(this);
  iv_qr=(ImageView)findViewById(R.id.iv_qr);
  iv_qr.setOnClickListener(this);
  bt_make=(Button)findViewById(R.id.bt_make);
  bt_make.setOnClickListener(this);
  iv_qr.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      String s=QRUtils.getInstance().decodeQRcode(iv_qr);
      Toast.makeText(getApplicationContext(),"String_Node_Str" + s,Toast.LENGTH_SHORT).show();
      return true;
    }
  }
);
}

Fixed version (ground truth):
private void initView(){
  bt=(Button)findViewById(R.id.bt);
  bt.setOnClickListener(this);
  iv_qr=(ImageView)findViewById(R.id.iv_qr);
  iv_qr.setOnClickListener(this);
  bt_make=(Button)findViewById(R.id.bt_make);
  bt_make.setOnClickListener(this);
  iv_qr.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View v){
      String s=null;
      try {
        s=QRUtils.getInstance().decodeQRcode(iv_qr);
      }
 catch (      Exception e) {
        e.printStackTrace();
        Log.e(TAG,"String_Node_Str" + e.toString());
      }
      Toast.makeText(getApplicationContext(),"String_Node_Str" + s,Toast.LENGTH_SHORT).show();
      return true;
    }
  }
);
}
Program: 35355
Project: 35355
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (resultCode == RESULT_OK) {
    final Uri uri=data.getData();
    final ContentResolver cr=this.getContentResolver();
    textDialog=showProgressDialog();
    textDialog.setText("String_Node_Str");
    new Thread(new Runnable(){
      @Override public void run(){
        try {
          Bitmap Qrbitmap=BitmapFactory.decodeStream(cr.openInputStream(uri));
          String qrcontent=QRUtils.getInstance().decodeQRcode(Qrbitmap);
          Qrbitmap.recycle();
          Qrbitmap=null;
          System.gc();
          if (!TextUtils.isEmpty(qrcontent)) {
            Intent videoPath=new Intent().putExtra("String_Node_Str",qrcontent);
            setResult(RESULT_OK,videoPath);
            finish();
            closeProgressDialog();
          }
 else {
            runOnUiThread(new Runnable(){
              @Override public void run(){
                Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
                closeProgressDialog();
              }
            }
);
          }
        }
 catch (        FileNotFoundException e) {
          Log.e("String_Node_Str",e.getMessage(),e);
        }
      }
    }
).start();
  }
  super.onActivityResult(requestCode,resultCode,data);
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (resultCode == RESULT_OK) {
    final Uri uri=data.getData();
    final ContentResolver cr=this.getContentResolver();
    textDialog=showProgressDialog();
    textDialog.setText("String_Node_Str");
    new Thread(new Runnable(){
      @Override public void run(){
        try {
          Bitmap Qrbitmap=BitmapFactory.decodeStream(cr.openInputStream(uri));
          String qrcontent=QRUtils.getInstance().decodeQRcode(Qrbitmap);
          Qrbitmap.recycle();
          Qrbitmap=null;
          System.gc();
          if (!TextUtils.isEmpty(qrcontent)) {
            Intent videoPath=new Intent().putExtra("String_Node_Str",qrcontent);
            setResult(RESULT_OK,videoPath);
            finish();
            closeProgressDialog();
          }
 else {
            runOnUiThread(new Runnable(){
              @Override public void run(){
                Toast.makeText(getApplicationContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
                closeProgressDialog();
              }
            }
);
          }
        }
 catch (        Exception e) {
          Log.e("String_Node_Str",e.getMessage(),e);
        }
      }
    }
).start();
  }
  super.onActivityResult(requestCode,resultCode,data);
}
Program: 35356
Project: 35356
Buggy source:
public String decodeQRcode(Bitmap bm){
  Bitmap obmp=bm;
  int width=obmp.getWidth();
  int height=obmp.getHeight();
  int[] data=new int[width * height];
  obmp.getPixels(data,0,width,0,0,width,height);
  RGBLuminanceSource source=new RGBLuminanceSource(width,height,data);
  BinaryBitmap bitmap1=new BinaryBitmap(new HybridBinarizer(source));
  QRCodeReader reader=new QRCodeReader();
  Result re=null;
  try {
    re=reader.decode(bitmap1);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (re == null) {
    return "String_Node_Str";
  }
 else {
    return re.getText();
  }
}

Fixed version (ground truth):
public String decodeQRcode(Bitmap bm) throws Exception {
  Bitmap obmp=bm;
  if (bm != null) {
    int width=obmp.getWidth();
    int height=obmp.getHeight();
    int[] data=new int[width * height];
    obmp.getPixels(data,0,width,0,0,width,height);
    RGBLuminanceSource source=new RGBLuminanceSource(width,height,data);
    BinaryBitmap bitmap1=new BinaryBitmap(new HybridBinarizer(source));
    QRCodeReader reader=new QRCodeReader();
    Result re=null;
    try {
      re=reader.decode(bitmap1);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    if (re == null) {
      return "String_Node_Str";
    }
 else {
      return re.getText();
    }
  }
 else {
    return "String_Node_Str";
  }
}
Program: 35357
Project: 35357
Buggy source:
@Test public void mandatoryParametersTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(101)).statusCode(400);
}

Fixed version (ground truth):
@Test public void mandatoryParametersTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.MISSING_PARAMETER)).statusCode(400);
}
Program: 35358
Project: 35358
Buggy source:
@Test public void boundaryTypeWrongRectValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(102)).statusCode(400);
}

Fixed version (ground truth):
@Test public void boundaryTypeWrongRectValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
}
Program: 35359
Project: 35359
Buggy source:
@Test public void locationWrongValueTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(102)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
}

Fixed version (ground truth):
@Test public void locationWrongValueTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35360
Project: 35360
Buggy source:
@Test public void limitWrongValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
}

Fixed version (ground truth):
@Test public void limitWrongValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35361
Project: 35361
Buggy source:
@Test public void boundaryTypeWrongCircleValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(102)).statusCode(400);
}

Fixed version (ground truth):
@Test public void boundaryTypeWrongCircleValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
}
Program: 35362
Project: 35362
Buggy source:
@Test public void addressNoValidParametersTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
}

Fixed version (ground truth):
@Test public void addressNoValidParametersTest(){
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35363
Project: 35363
Buggy source:
@Test public void postRequestTest(){
  given().param("String_Node_Str","String_Node_Str").when().post(getEndPointName()).then().assertThat().body("String_Node_Str",is(199)).statusCode(405);
}

Fixed version (ground truth):
@Test public void postRequestTest(){
  given().param("String_Node_Str","String_Node_Str").when().post(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.UNKNOWN)).statusCode(405);
}
Program: 35364
Project: 35364
Buggy source:
@Test public void limitOutOfRangeValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(104)).statusCode(400);
}

Fixed version (ground truth):
@Test public void limitOutOfRangeValueTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.PARAMETER_VALUE_EXCEEDS_MAXIMUM)).statusCode(400);
}
Program: 35365
Project: 35365
Buggy source:
@Test public void boundaryTypeUnknownValuesTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(103)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(101)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(101)).statusCode(400);
}

Fixed version (ground truth):
@Test public void boundaryTypeUnknownValuesTest(){
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.MISSING_PARAMETER)).statusCode(400);
  given().param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().assertThat().body("String_Node_Str",is(GeocodingErrorCodes.MISSING_PARAMETER)).statusCode(400);
}
Program: 35366
Project: 35366
Buggy source:
@Test public void testRangeRestrictionDistance(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().statusCode(400).body("String_Node_Str",is(304));
}

Fixed version (ground truth):
@Test public void testRangeRestrictionDistance(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().statusCode(400).body("String_Node_Str",is(IsochronesErrorCodes.PARAMETER_VALUE_EXCEEDS_MAXIMUM));
}
Program: 35367
Project: 35367
Buggy source:
@Test public void testRangeType_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testRangeType_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35368
Project: 35368
Buggy source:
@Test public void testAttributes_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testAttributes_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35369
Project: 35369
Buggy source:
@Test public void testNotEnoughParams(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().body("String_Node_Str",is(301)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testNotEnoughParams(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.MISSING_PARAMETER)).statusCode(400);
}
Program: 35370
Project: 35370
Buggy source:
@Test public void testWrongAttributes(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().log().all().statusCode(400).body("String_Node_Str",is(303));
}

Fixed version (ground truth):
@Test public void testWrongAttributes(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().log().all().statusCode(400).body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE));
}
Program: 35371
Project: 35371
Buggy source:
@Test public void testUnits_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testUnits_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put(200));
  jTraveller.put("String_Node_Str","String_Node_Str");
  json.put("String_Node_Str","String_Node_Str");
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35372
Project: 35372
Buggy source:
@Test public void testWrongLocationType(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testWrongLocationType(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}
Program: 35373
Project: 35373
Buggy source:
@Test public void testRange_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put("String_Node_Str"));
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(302)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testRange_POST(){
  JSONObject json=new JSONObject();
  JSONArray jTravellers=new JSONArray();
  json.put("String_Node_Str",jTravellers);
  JSONObject jTraveller=new JSONObject();
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTravellers.put(jTraveller);
  jTraveller.put("String_Node_Str",new JSONArray().put(8.7).put("String_Node_Str"));
  jTraveller.put("String_Node_Str","String_Node_Str");
  jTraveller.put("String_Node_Str",new JSONArray().put(120).put("String_Node_Str"));
  given().body(json.toString()).when().post(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_FORMAT)).statusCode(400);
}
Program: 35374
Project: 35374
Buggy source:
@Test public void testRangeRestrictionTime(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().statusCode(400).body("String_Node_Str",is(304));
}

Fixed version (ground truth):
@Test public void testRangeRestrictionTime(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().statusCode(400).body("String_Node_Str",is(IsochronesErrorCodes.PARAMETER_VALUE_EXCEEDS_MAXIMUM));
}
Program: 35375
Project: 35375
Buggy source:
@Test public void testParamSpelling(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(301)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testParamSpelling(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.MISSING_PARAMETER)).statusCode(400);
}
Program: 35376
Project: 35376
Buggy source:
@Test public void testUnknownUnits(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(303)).statusCode(400);
}

Fixed version (ground truth):
@Test public void testUnknownUnits(){
  given().param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str",getParameter("String_Node_Str")).param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").param("String_Node_Str","String_Node_Str").when().get(getEndPointName()).then().body("String_Node_Str",is(IsochronesErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);
}