nus-yam/ex-repair huggingface dataset:
Program: 29598
Project: 29598
Buggy source:
public Page<Artist> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createArtistPage(jsonObject.getJSONObject("String_Node_Str"));
}

Fixed version (ground truth):
public Paging<Artist> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createArtistPage(jsonObject.getJSONObject("String_Node_Str"));
}
Program: 29600
Project: 29600
Buggy source:
public Page<LibraryTrack> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createLibraryTracksPage(jsonObject);
}

Fixed version (ground truth):
public Paging<LibraryTrack> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createLibraryTracksPage(jsonObject);
}
Program: 29601
Project: 29601
Buggy source:
public Page<PlaylistTrack> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createPlaylistTrackPage(jsonObject);
}

Fixed version (ground truth):
public Paging<PlaylistTrack> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createPlaylistTrackPage(jsonObject);
}
Program: 29602
Project: 29602
Buggy source:
public Page<Track> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createTrackPage(jsonObject);
}

Fixed version (ground truth):
public Paging<Track> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createTrackPage(jsonObject);
}
Program: 29603
Project: 29603
Buggy source:
public Page<SimplePlaylist> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createSimplePlaylistsPage(jsonObject);
}

Fixed version (ground truth):
public Paging<PlaylistSimplified> get() throws IOException, WebApiException {
  final JSONObject jsonObject=JSONObject.fromObject(getJson());
  return JsonUtil.createSimplePlaylistsPage(jsonObject);
}
Program: 29604
Project: 29604
Buggy source:
public static String assemble(UtilProtos.Url url){
  try {
    if (!url.getPath().contains("String_Node_Str")) {
      final URIBuilder uriBuilder=new URIBuilder();
      URI uri=uriBuilder.build();
      return uri.toString();
    }
 else {
      final URI uri=new URI(SCHEME_NAMES.get(url.getScheme()),null,url.getHost(),url.getPort(),null,null,null);
      return uri.toString() + url.getPath();
    }
  }
 catch (  Throwable e) {
    throw new IllegalStateException(e);
  }
}

Fixed version (ground truth):
public static String assemble(UtilProtos.Url url){
  try {
    if (!url.getPath().contains("String_Node_Str")) {
      final URI uri=new URIBuilder().setScheme(SCHEME_NAMES.get(url.getScheme())).setPath(url.getPath()).setHost(url.getHost()).setPort(url.getPort()).build();
      return uri.toString();
    }
 else {
      final URI uri=new URI(SCHEME_NAMES.get(url.getScheme()),null,url.getHost(),url.getPort(),null,null,null);
      return uri.toString() + url.getPath();
    }
  }
 catch (  Throwable e) {
    throw new IllegalStateException(e);
  }
}
Program: 29605
Project: 29605
Buggy source:
private static String readFromFile(File file) throws IOException {
  Reader reader=new FileReader(file);
  CharBuffer charBuffer=CharBuffer.allocate(MAX_TEST_DATA_FILE_SIZE);
  reader.read(charBuffer);
  charBuffer.position(0);
  return charBuffer.toString();
}

Fixed version (ground truth):
private static String readFromFile(File file) throws IOException {
  BufferedReader in=new BufferedReader(new InputStreamReader(new FileInputStream(file),"String_Node_Str"));
  StringBuilder out=new StringBuilder();
  String line;
  while ((line=in.readLine()) != null) {
    out.append(line);
  }
  in.close();
  return out.toString();
}
Program: 29607
Project: 29607
Buggy source:
@Test public void shouldGetAlbumResultForIds_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final AlbumsRequest request=api.getAlbums("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  List<Album> albums=request.get();
  assertEquals(1,albums.size());
  Album firstAlbum=albums.get(0);
  assertEquals("String_Node_Str",firstAlbum.getId());
  assertEquals(AlbumType.ALBUM,firstAlbum.getAlbumType());
  assertEquals("String_Node_Str",firstAlbum.getReleaseDate());
  assertEquals("String_Node_Str",firstAlbum.getReleaseDatePrecision());
  List<ArtistSimplified> artists=firstAlbum.getArtists();
  ArtistSimplified firstArtist=artists.get(0);
  assertEquals("String_Node_Str",firstArtist.getHref());
  assertEquals("String_Node_Str",firstArtist.getId());
  Paging<TrackSimplified> tracksPage=firstAlbum.getTracks();
  assertEquals("String_Node_Str",tracksPage.getHref());
  assertEquals(0,tracksPage.getOffset());
  assertEquals(50,tracksPage.getLimit());
  assertEquals(20,tracksPage.getTotal());
  assertEquals("String_Node_Str",tracksPage.getItems().get(0).getId());
}

Fixed version (ground truth):
@Test public void shouldGetAlbumResultForIds_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final AlbumsRequest request=api.getAlbums("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  List<Album> albums=request.get();
  assertEquals(1,albums.size());
  Album firstAlbum=albums.get(0);
  assertEquals("String_Node_Str",firstAlbum.getId());
  assertEquals(AlbumType.ALBUM,firstAlbum.getAlbumType());
  assertEquals("String_Node_Str",firstAlbum.getReleaseDate());
  assertEquals(ReleaseDatePrecision.day,firstAlbum.getReleaseDatePrecision());
  List<ArtistSimplified> artists=firstAlbum.getArtists();
  ArtistSimplified firstArtist=artists.get(0);
  assertEquals("String_Node_Str",firstArtist.getHref());
  assertEquals("String_Node_Str",firstArtist.getId());
  Paging<TrackSimplified> tracksPage=firstAlbum.getTracks();
  assertEquals("String_Node_Str",tracksPage.getHref());
  assertEquals(0,tracksPage.getOffset());
  assertEquals(50,tracksPage.getLimit());
  assertEquals(20,tracksPage.getTotal());
  assertEquals("String_Node_Str",tracksPage.getItems().get(0).getId());
}
Program: 29608
Project: 29608
Buggy source:
@Test public void shouldGetCurrentUser_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final CurrentUserRequest request=api.getMe().accessToken("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<User> userFuture=request.getAsync();
  Futures.addCallback(userFuture,new FutureCallback<User>(){
    @Override public void onSuccess(    User user){
      assertNotNull(user);
      assertEquals("String_Node_Str",user.getDisplayName());
      assertEquals("String_Node_Str",user.getEmail());
      assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
      assertEquals("String_Node_Str",user.getHref());
      assertEquals("String_Node_Str",user.getId());
      assertEquals("String_Node_Str",user.getCountry());
      assertNotNull(user.getFollowers());
      assertNull(user.getImages().get(0).getHeight());
      assertNull(user.getImages().get(0).getWidth());
      assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
      assertEquals(ProductType.PREMIUM,user.getProduct());
      assertEquals("String_Node_Str",user.getUri());
      assertEquals("String_Node_Str",user.getBirthdate());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail("String_Node_Str" + throwable.getMessage());
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test public void shouldGetCurrentUser_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final CurrentUserRequest request=api.getMe().accessToken("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<User> userFuture=request.getAsync();
  Futures.addCallback(userFuture,new FutureCallback<User>(){
    @Override public void onSuccess(    User user){
      assertNotNull(user);
      assertEquals("String_Node_Str",user.getDisplayName());
      assertEquals("String_Node_Str",user.getEmail());
      assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
      assertEquals("String_Node_Str",user.getHref());
      assertEquals("String_Node_Str",user.getId());
      assertEquals(CountryCode.SE,user.getCountry());
      assertNotNull(user.getFollowers());
      assertEquals(0,user.getImages().get(0).getHeight());
      assertEquals(0,user.getImages().get(0).getWidth());
      assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
      assertEquals(ProductType.PREMIUM,user.getProduct());
      assertEquals("String_Node_Str",user.getUri());
      assertEquals("String_Node_Str",user.getBirthdate());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail("String_Node_Str" + throwable.getMessage());
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}
Program: 29609
Project: 29609
Buggy source:
@Test public void shouldGetCurrentUser_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final CurrentUserRequest request=api.getMe().accessToken("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final User user=request.get();
  assertNotNull(user);
  assertEquals("String_Node_Str",user.getDisplayName());
  assertEquals("String_Node_Str",user.getEmail());
  assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
  assertEquals("String_Node_Str",user.getHref());
  assertEquals("String_Node_Str",user.getId());
  assertEquals("String_Node_Str",user.getCountry());
  assertNotNull(user.getFollowers());
  assertNull(user.getImages().get(0).getHeight());
  assertNull(user.getImages().get(0).getWidth());
  assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
  assertEquals(ProductType.PREMIUM,user.getProduct());
  assertEquals("String_Node_Str",user.getUri());
  assertEquals("String_Node_Str",user.getBirthdate());
}

Fixed version (ground truth):
@Test public void shouldGetCurrentUser_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final CurrentUserRequest request=api.getMe().accessToken("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final User user=request.get();
  assertNotNull(user);
  assertEquals("String_Node_Str",user.getDisplayName());
  assertEquals("String_Node_Str",user.getEmail());
  assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
  assertEquals("String_Node_Str",user.getHref());
  assertEquals("String_Node_Str",user.getId());
  assertEquals(CountryCode.SE,user.getCountry());
  assertNotNull(user.getFollowers());
  assertEquals(0,user.getImages().get(0).getHeight());
  assertEquals(0,user.getImages().get(0).getWidth());
  assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
  assertEquals(ProductType.PREMIUM,user.getProduct());
  assertEquals("String_Node_Str",user.getUri());
  assertEquals("String_Node_Str",user.getBirthdate());
}
Program: 29610
Project: 29610
Buggy source:
@Override public void onSuccess(User user){
  assertNotNull(user);
  assertEquals("String_Node_Str",user.getDisplayName());
  assertEquals("String_Node_Str",user.getEmail());
  assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
  assertEquals("String_Node_Str",user.getHref());
  assertEquals("String_Node_Str",user.getId());
  assertEquals("String_Node_Str",user.getCountry());
  assertNotNull(user.getFollowers());
  assertNull(user.getImages().get(0).getHeight());
  assertNull(user.getImages().get(0).getWidth());
  assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
  assertEquals(ProductType.PREMIUM,user.getProduct());
  assertEquals("String_Node_Str",user.getUri());
  assertEquals("String_Node_Str",user.getBirthdate());
  asyncCompleted.countDown();
}

Fixed version (ground truth):
@Override public void onSuccess(User user){
  assertNotNull(user);
  assertEquals("String_Node_Str",user.getDisplayName());
  assertEquals("String_Node_Str",user.getEmail());
  assertEquals("String_Node_Str",user.getExternalUrls().get("String_Node_Str"));
  assertEquals("String_Node_Str",user.getHref());
  assertEquals("String_Node_Str",user.getId());
  assertEquals(CountryCode.SE,user.getCountry());
  assertNotNull(user.getFollowers());
  assertEquals(0,user.getImages().get(0).getHeight());
  assertEquals(0,user.getImages().get(0).getWidth());
  assertEquals("String_Node_Str",user.getImages().get(0).getUrl());
  assertEquals(ProductType.PREMIUM,user.getProduct());
  assertEquals("String_Node_Str",user.getUri());
  assertEquals("String_Node_Str",user.getBirthdate());
  asyncCompleted.countDown();
}
Program: 29611
Project: 29611
Buggy source:
@Test public void shouldGetNewReleases_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final NewReleasesRequest request=api.getNewReleases().limit(3).offset(1).country("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<NewReleases> future=request.getAsync();
  Futures.addCallback(future,new FutureCallback<NewReleases>(){
    @Override public void onSuccess(    NewReleases newReleases){
      assertNotNull(newReleases.getAlbums());
      Paging<AlbumSimplified> albums=newReleases.getAlbums();
      assertEquals("String_Node_Str",albums.getHref());
      assertEquals(3,albums.getLimit());
      assertEquals(1,albums.getOffset());
      assertEquals("String_Node_Str",albums.getNext());
      assertEquals("String_Node_Str",albums.getPrevious());
      assertEquals(500,albums.getTotal());
      AlbumSimplified firstItem=albums.getItems().get(0);
      assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
      assertEquals(1,firstItem.getAvailableMarkets().size());
      assertEquals("String_Node_Str",firstItem.getAvailableMarkets().get(0));
      assertNotNull(firstItem.getExternalUrls());
      assertEquals("String_Node_Str",firstItem.getUri());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail("String_Node_Str");
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test public void shouldGetNewReleases_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final NewReleasesRequest request=api.getNewReleases().limit(3).offset(1).country("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<NewReleases> future=request.getAsync();
  Futures.addCallback(future,new FutureCallback<NewReleases>(){
    @Override public void onSuccess(    NewReleases newReleases){
      assertNotNull(newReleases.getAlbums());
      Paging<AlbumSimplified> albums=newReleases.getAlbums();
      assertEquals("String_Node_Str",albums.getHref());
      assertEquals(3,albums.getLimit());
      assertEquals(1,albums.getOffset());
      assertEquals("String_Node_Str",albums.getNext());
      assertEquals("String_Node_Str",albums.getPrevious());
      assertEquals(500,albums.getTotal());
      AlbumSimplified firstItem=albums.getItems().get(0);
      assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
      assertEquals(1,firstItem.getAvailableMarkets().size());
      assertEquals(CountryCode.SE,firstItem.getAvailableMarkets().get(0));
      assertNotNull(firstItem.getExternalUrls());
      assertEquals("String_Node_Str",firstItem.getUri());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail("String_Node_Str");
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}
Program: 29612
Project: 29612
Buggy source:
@Test public void shouldGetArtistsResult_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final NewReleasesRequest request=api.getNewReleases().limit(3).offset(1).country("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  NewReleases newReleases=request.get();
  assertNotNull(newReleases.getAlbums());
  Paging<AlbumSimplified> albums=newReleases.getAlbums();
  assertEquals("String_Node_Str",albums.getHref());
  assertEquals(3,albums.getLimit());
  assertEquals(1,albums.getOffset());
  assertEquals("String_Node_Str",albums.getNext());
  assertEquals("String_Node_Str",albums.getPrevious());
  assertEquals(500,albums.getTotal());
  AlbumSimplified firstItem=albums.getItems().get(0);
  assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
  assertEquals(1,firstItem.getAvailableMarkets().size());
  assertEquals("String_Node_Str",firstItem.getAvailableMarkets().get(0));
  assertNotNull(firstItem.getExternalUrls());
  assertEquals("String_Node_Str",firstItem.getUri());
}

Fixed version (ground truth):
@Test public void shouldGetArtistsResult_sync() throws Exception {
  final Api api=Api.DEFAULT_API;
  final NewReleasesRequest request=api.getNewReleases().limit(3).offset(1).country("String_Node_Str").httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str")).build();
  NewReleases newReleases=request.get();
  assertNotNull(newReleases.getAlbums());
  Paging<AlbumSimplified> albums=newReleases.getAlbums();
  assertEquals("String_Node_Str",albums.getHref());
  assertEquals(3,albums.getLimit());
  assertEquals(1,albums.getOffset());
  assertEquals("String_Node_Str",albums.getNext());
  assertEquals("String_Node_Str",albums.getPrevious());
  assertEquals(500,albums.getTotal());
  AlbumSimplified firstItem=albums.getItems().get(0);
  assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
  assertEquals(1,firstItem.getAvailableMarkets().size());
  assertEquals(CountryCode.SE,firstItem.getAvailableMarkets().get(0));
  assertNotNull(firstItem.getExternalUrls());
  assertEquals("String_Node_Str",firstItem.getUri());
}
Program: 29613
Project: 29613
Buggy source:
@Override public void onSuccess(NewReleases newReleases){
  assertNotNull(newReleases.getAlbums());
  Paging<AlbumSimplified> albums=newReleases.getAlbums();
  assertEquals("String_Node_Str",albums.getHref());
  assertEquals(3,albums.getLimit());
  assertEquals(1,albums.getOffset());
  assertEquals("String_Node_Str",albums.getNext());
  assertEquals("String_Node_Str",albums.getPrevious());
  assertEquals(500,albums.getTotal());
  AlbumSimplified firstItem=albums.getItems().get(0);
  assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
  assertEquals(1,firstItem.getAvailableMarkets().size());
  assertEquals("String_Node_Str",firstItem.getAvailableMarkets().get(0));
  assertNotNull(firstItem.getExternalUrls());
  assertEquals("String_Node_Str",firstItem.getUri());
  asyncCompleted.countDown();
}

Fixed version (ground truth):
@Override public void onSuccess(NewReleases newReleases){
  assertNotNull(newReleases.getAlbums());
  Paging<AlbumSimplified> albums=newReleases.getAlbums();
  assertEquals("String_Node_Str",albums.getHref());
  assertEquals(3,albums.getLimit());
  assertEquals(1,albums.getOffset());
  assertEquals("String_Node_Str",albums.getNext());
  assertEquals("String_Node_Str",albums.getPrevious());
  assertEquals(500,albums.getTotal());
  AlbumSimplified firstItem=albums.getItems().get(0);
  assertEquals(AlbumType.SINGLE,firstItem.getAlbumType());
  assertEquals(1,firstItem.getAvailableMarkets().size());
  assertEquals(CountryCode.SE,firstItem.getAvailableMarkets().get(0));
  assertNotNull(firstItem.getExternalUrls());
  assertEquals("String_Node_Str",firstItem.getUri());
  asyncCompleted.countDown();
}
Program: 29616
Project: 29616
Buggy source:
@Override public void onSuccess(Paging<PlaylistSimplified> playlistsPage){
  assertTrue(playlistsPage.getTotal() >= 0);
  assertNull(playlistsPage.getNext());
  assertEquals("String_Node_Str",playlistsPage.getPrevious());
  assertEquals(10,playlistsPage.getLimit());
  assertEquals(2,playlistsPage.getOffset());
  assertEquals("String_Node_Str",playlistsPage.getHref());
  final PlaylistSimplified simplePlaylist=playlistsPage.getItems().get(0);
  final String playlistId=simplePlaylist.getId();
  assertNotNull(playlistId);
  assertTrue(playlistId.length() > 0);
  assertEquals(false,simplePlaylist.getIsCollaborative());
  assertEquals("String_Node_Str" + playlistId,simplePlaylist.getExternalUrls().get("String_Node_Str"));
  assertNotNull(simplePlaylist.getName());
  assertNotNull(simplePlaylist.getOwner());
  assertNotNull(simplePlaylist.getIsPublicAccess());
  assertNotNull(simplePlaylist.getTracks().getHref());
  assertNotNull(simplePlaylist.getTracks().getTotal());
  assertEquals(ObjectType.PLAYLIST,simplePlaylist.getType());
  assertEquals("String_Node_Str" + playlistId,simplePlaylist.getUri());
  assertEquals(1,simplePlaylist.getImages().size());
  assertEquals("String_Node_Str",simplePlaylist.getImages().get(0).getUrl());
  assertNull(simplePlaylist.getImages().get(0).getWidth());
  assertNull(simplePlaylist.getImages().get(0).getHeight());
  asyncCompleted.countDown();
}

Fixed version (ground truth):
@Override public void onSuccess(Paging<PlaylistSimplified> playlistsPage){
  assertTrue(playlistsPage.getTotal() >= 0);
  assertNull(playlistsPage.getNext());
  assertEquals("String_Node_Str",playlistsPage.getPrevious());
  assertEquals(10,playlistsPage.getLimit());
  assertEquals(2,playlistsPage.getOffset());
  assertEquals("String_Node_Str",playlistsPage.getHref());
  final PlaylistSimplified simplePlaylist=playlistsPage.getItems().get(0);
  final String playlistId=simplePlaylist.getId();
  assertNotNull(playlistId);
  assertTrue(playlistId.length() > 0);
  assertEquals(false,simplePlaylist.getIsCollaborative());
  assertEquals("String_Node_Str" + playlistId,simplePlaylist.getExternalUrls().get("String_Node_Str"));
  assertNotNull(simplePlaylist.getName());
  assertNotNull(simplePlaylist.getOwner());
  assertNotNull(simplePlaylist.getIsPublicAccess());
  assertNotNull(simplePlaylist.getTracks().getHref());
  assertNotNull(simplePlaylist.getTracks().getTotal());
  assertEquals(ObjectType.PLAYLIST,simplePlaylist.getType());
  assertEquals("String_Node_Str" + playlistId,simplePlaylist.getUri());
  assertEquals(1,simplePlaylist.getImages().size());
  assertEquals("String_Node_Str",simplePlaylist.getImages().get(0).getUrl());
  assertEquals(0,simplePlaylist.getImages().get(0).getWidth());
  assertEquals(0,simplePlaylist.getImages().get(0).getHeight());
  asyncCompleted.countDown();
}
Program: 29617
Project: 29617
Buggy source:
public CategoryRequest build(){
  path("String_Node_Str");
  return new CategoryRequest(this);
}

Fixed version (ground truth):
public CategoryRequest build(){
  return new CategoryRequest(this);
}
Program: 29618
Project: 29618
Buggy source:
/** 
 * Get a playlist's tracks.
 * @param userId The playlist's owner's username.
 * @param playlistId The playlist's id.
 * @return A builder object that can be used to build a request to retrieve playlist tracks.
 */
public PlaylistTracksRequest.Builder getPlaylistTracks(String userId,String playlistId){
  final PlaylistTracksRequest.Builder builder=PlaylistTracksRequest.builder();
  setDefaults(builder);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId+ "String_Node_Str");
  return builder;
}

Fixed version (ground truth):
/** 
 * Get a playlist's tracks.
 * @param userId The playlist's owner's username.
 * @param playlistId The playlist's id.
 * @return A builder object that can be used to build a request to retrieve playlist tracks.
 */
public PlaylistTracksRequest.Builder getPlaylistTracks(String userId,String playlistId){
  final PlaylistTracksRequest.Builder builder=PlaylistTracksRequest.builder();
  setDefaults(builder);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId+ "String_Node_Str");
  return builder;
}
Program: 29619
Project: 29619
Buggy source:
/** 
 * Add tracks to a playlist.
 * @param userId The owner's username.
 * @param playlistId The playlist's ID.
 * @param trackUris URIs of the tracks to add.
 * @return A builder object that can e used to build a request to add tracks to a playlist.
 */
public AddTrackToPlaylistRequest.Builder addTracksToPlaylist(String userId,String playlistId,List<String> trackUris){
  final AddTrackToPlaylistRequest.Builder builder=AddTrackToPlaylistRequest.builder();
  setDefaults(builder);
  final JSONArray jsonArrayUri=new JSONArray();
  jsonArrayUri.addAll(trackUris);
  builder.body(jsonArrayUri);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId+ "String_Node_Str");
  return builder;
}

Fixed version (ground truth):
/** 
 * Add tracks to a playlist.
 * @param userId The owner's username.
 * @param playlistId The playlist's ID.
 * @param trackUris URIs of the tracks to add.
 * @return A builder object that can e used to build a request to add tracks to a playlist.
 */
public AddTrackToPlaylistRequest.Builder addTracksToPlaylist(String userId,String playlistId,List<String> trackUris){
  final AddTrackToPlaylistRequest.Builder builder=AddTrackToPlaylistRequest.builder();
  setDefaults(builder);
  final JSONArray jsonArrayUri=new JSONArray();
  jsonArrayUri.addAll(trackUris);
  builder.body(jsonArrayUri);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId+ "String_Node_Str");
  return builder;
}
Program: 29620
Project: 29620
Buggy source:
/** 
 * Get a playlist.
 * @param userId The playlist's owner's username.
 * @param playlistId The playlist's ID.
 * @return A builder object that can be used to build a request to retrieve a playlist.
 */
public PlaylistRequest.Builder getPlaylist(String userId,String playlistId){
  PlaylistRequest.Builder builder=PlaylistRequest.builder();
  setDefaults(builder);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  return builder;
}

Fixed version (ground truth):
/** 
 * Get a playlist.
 * @param userId The playlist's owner's username.
 * @param playlistId The playlist's ID.
 * @return A builder object that can be used to build a request to retrieve a playlist.
 */
public PlaylistRequest.Builder getPlaylist(String userId,String playlistId){
  PlaylistRequest.Builder builder=PlaylistRequest.builder();
  setDefaults(builder);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  return builder;
}
Program: 29621
Project: 29621
Buggy source:
/** 
 * Create a playlist.
 * @param userId The playlist's owner.
 * @param title The name of the playlist.
 * @return A builder object that can be used to build a request to create a playlist.
 */
public PlaylistCreationRequest.Builder createPlaylist(String userId,String title){
  final PlaylistCreationRequest.Builder builder=PlaylistCreationRequest.builder();
  setDefaults(builder);
  builder.title(title);
  builder.path("String_Node_Str" + userId + "String_Node_Str");
  return builder;
}

Fixed version (ground truth):
/** 
 * Create a playlist.
 * @param userId The playlist's owner.
 * @param title The name of the playlist.
 * @return A builder object that can be used to build a request to create a playlist.
 */
public PlaylistCreationRequest.Builder createPlaylist(String userId,String title){
  final PlaylistCreationRequest.Builder builder=PlaylistCreationRequest.builder();
  setDefaults(builder);
  builder.title(title);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str");
  return builder;
}
Program: 29622
Project: 29622
Buggy source:
/** 
 * Get a user's starred tracks.
 * @param userId The starred playlist's owner's username.
 * @return A builder object that can be used to build a request to retrieve a user's starredtracks.
 */
public PlaylistTracksRequest.Builder getStarred(String userId){
  final PlaylistTracksRequest.Builder builder=PlaylistTracksRequest.builder();
  setDefaults(builder);
  builder.path("String_Node_Str" + userId + "String_Node_Str");
  return builder;
}

Fixed version (ground truth):
/** 
 * Get a user's starred tracks.
 * @param userId The starred playlist's owner's username.
 * @return A builder object that can be used to build a request to retrieve a user's starredtracks.
 */
public PlaylistTracksRequest.Builder getStarred(String userId){
  final PlaylistTracksRequest.Builder builder=PlaylistTracksRequest.builder();
  setDefaults(builder);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str");
  return builder;
}
Program: 29623
Project: 29623
Buggy source:
/** 
 * Update a playlist's properties.
 * @param userId The owner's username.
 * @param playlistId The playlist's ID.
 * @return A builder object that can be used to build a request to change a playlist's details.
 */
public ChangePlaylistDetailsRequest.Builder changePlaylistDetails(String userId,String playlistId){
  final ChangePlaylistDetailsRequest.Builder builder=ChangePlaylistDetailsRequest.builder();
  setDefaults(builder);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  return builder;
}

Fixed version (ground truth):
/** 
 * Update a playlist's properties.
 * @param userId The owner's username.
 * @param playlistId The playlist's ID.
 * @return A builder object that can be used to build a request to change a playlist's details.
 */
public ChangePlaylistDetailsRequest.Builder changePlaylistDetails(String userId,String playlistId){
  final ChangePlaylistDetailsRequest.Builder builder=ChangePlaylistDetailsRequest.builder();
  setDefaults(builder);
  userId=UrlUtil.userToUri(userId);
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  return builder;
}
Program: 29624
Project: 29624
Buggy source:
public PlaylistRequest.Builder getPlaylist(String playlistId,String userId){
  PlaylistRequest.Builder builder=PlaylistRequest.builder();
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  setDefaults(builder);
  return builder;
}

Fixed version (ground truth):
public PlaylistRequest.Builder getPlaylist(String userId,String playlistId){
  PlaylistRequest.Builder builder=PlaylistRequest.builder();
  builder.path("String_Node_Str" + userId + "String_Node_Str"+ playlistId);
  setDefaults(builder);
  return builder;
}
Program: 29625
Project: 29625
Buggy source:
public static ReleaseDate createReleaseDate(JSONObject releaseDateJson){
  ReleaseDate releaseDate=new ReleaseDate();
  releaseDate.setYear(releaseDateJson.getInt("String_Node_Str"));
  if (releaseDateJson.has("String_Node_Str") && !releaseDateJson.get("String_Node_Str").equals("String_Node_Str")) {
    releaseDate.setMonth(releaseDateJson.getInt("String_Node_Str"));
  }
  if (releaseDateJson.has("String_Node_Str") && !releaseDateJson.get("String_Node_Str").equals("String_Node_Str")) {
    releaseDate.setDate(releaseDateJson.getInt("String_Node_Str"));
  }
  return releaseDate;
}

Fixed version (ground truth):
public static ReleaseDate createReleaseDate(JSONObject releaseDateJson){
  ReleaseDate releaseDate=new ReleaseDate();
  releaseDate.setYear(releaseDateJson.getInt("String_Node_Str"));
  if (releaseDateJson.has("String_Node_Str") && !releaseDateJson.get("String_Node_Str").equals("String_Node_Str")) {
    releaseDate.setMonth(releaseDateJson.getInt("String_Node_Str"));
  }
 else {
    releaseDate.setMonth(null);
  }
  if (releaseDateJson.has("String_Node_Str") && !releaseDateJson.get("String_Node_Str").equals("String_Node_Str")) {
    releaseDate.setDate(releaseDateJson.getInt("String_Node_Str"));
  }
 else {
    releaseDate.setDate(null);
  }
  return releaseDate;
}
Program: 29626
Project: 29626
Buggy source:
public void setMonth(int month){
  this.month=month;
}

Fixed version (ground truth):
public void setMonth(Integer month){
  this.month=month;
}
Program: 29627
Project: 29627
Buggy source:
public void setDate(int date){
  this.date=date;
}

Fixed version (ground truth):
public void setDate(Integer date){
  this.date=date;
}
Program: 29628
Project: 29628
Buggy source:
public int getDate(){
  return date;
}

Fixed version (ground truth):
public Integer getDate(){
  return date;
}
Program: 29629
Project: 29629
Buggy source:
public int getMonth(){
  return month;
}

Fixed version (ground truth):
public Integer getMonth(){
  return month;
}
Program: 29630
Project: 29630
Buggy source:
@Test public void shouldGetAlbumResultForIds_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final HttpManager mockedHttpManager=TestUtil.MockedHttpManager.returningJson("String_Node_Str");
  final AlbumsRequest request=api.getAlbums("String_Node_Str").httpManager(mockedHttpManager).build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<List<Album>> albumsFuture=request.getAsync();
  Futures.addCallback(albumsFuture,new FutureCallback<List<Album>>(){
    @Override public void onSuccess(    List<Album> albums){
      assertEquals(1,albums.size());
      Album firstAlbum=albums.get(0);
      assertEquals("String_Node_Str",firstAlbum.getId());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail();
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test public void shouldGetAlbumResultForIds_async() throws Exception {
  final Api api=Api.DEFAULT_API;
  final AlbumsRequest.Builder requestBuilder=api.getAlbums("String_Node_Str");
  if (TestConfiguration.USE_MOCK_RESPONSES) {
    requestBuilder.httpManager(TestUtil.MockedHttpManager.returningJson("String_Node_Str"));
  }
  final AlbumsRequest request=requestBuilder.build();
  final CountDownLatch asyncCompleted=new CountDownLatch(1);
  final SettableFuture<List<Album>> albumsFuture=request.getAsync();
  Futures.addCallback(albumsFuture,new FutureCallback<List<Album>>(){
    @Override public void onSuccess(    List<Album> albums){
      assertEquals(1,albums.size());
      Album firstAlbum=albums.get(0);
      assertEquals("String_Node_Str",firstAlbum.getId());
      assertEquals(AlbumType.ALBUM,firstAlbum.getAlbumType());
      assertTrue(firstAlbum.getReleaseDate().getDate().equals(8));
      assertTrue(firstAlbum.getReleaseDate().getMonth().equals(11));
      assertEquals(2013,firstAlbum.getReleaseDate().getYear());
      List<SimpleArtist> artists=firstAlbum.getArtists();
      SimpleArtist firstArtist=artists.get(0);
      assertEquals("String_Node_Str",firstArtist.getHref());
      assertEquals("String_Node_Str",firstArtist.getId());
      Page<SimpleTrack> tracksPage=firstAlbum.getTracks();
      assertEquals("String_Node_Str",tracksPage.getHref());
      assertEquals(0,tracksPage.getOffset());
      assertEquals(50,tracksPage.getLimit());
      assertEquals(38,tracksPage.getTotal());
      assertEquals("String_Node_Str",tracksPage.getItems().get(0).getId());
      asyncCompleted.countDown();
    }
    @Override public void onFailure(    Throwable throwable){
      fail();
    }
  }
);
  asyncCompleted.await(1,TimeUnit.SECONDS);
}
Program: 29631
Project: 29631
Buggy source:
private String execute(HttpMethod method){
  HttpClient httpClient=new HttpClient(connectionManager);
  try {
    int statusCode=httpClient.executeMethod(method);
    if (statusCode != HttpStatus.SC_OK) {
      String error=String.format("String_Node_Str",statusCode,HttpStatus.getStatusText(statusCode),method.getResponseBodyAsString());
      throw new RuntimeException(error);
    }
    String responseBody=method.getResponseBodyAsString();
    if (responseBody == null) {
      throw new RuntimeException("String_Node_Str");
    }
    return responseBody;
  }
 catch (  HttpException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
 finally {
    method.releaseConnection();
  }
}

Fixed version (ground truth):
private String execute(HttpMethod method){
  HttpClient httpClient=new HttpClient(connectionManager);
  try {
    httpClient.executeMethod(method);
    String responseBody=method.getResponseBodyAsString();
    if (responseBody == null) {
      throw new RuntimeException("String_Node_Str");
    }
    return responseBody;
  }
 catch (  HttpException e) {
    throw new RuntimeException("String_Node_Str");
  }
catch (  IOException e) {
    throw new RuntimeException("String_Node_Str");
  }
 finally {
    method.releaseConnection();
  }
}
Program: 29633
Project: 29633
Buggy source:
public Property property(ObjectNode node,String location,ParseResult result){
  if (node != null) {
    if (node.get("String_Node_Str") == null) {
      JsonNode enumNode=node.get("String_Node_Str");
      if (enumNode != null && enumNode.isArray()) {
        String type=inferTypeFromArray((ArrayNode)enumNode);
        node.put("String_Node_Str",type);
      }
    }
  }
  if (node.get("String_Node_Str") != null && node.get("String_Node_Str").isTextual()) {
    String mungedRef=mungedRef(node.get("String_Node_Str").textValue());
    if (mungedRef != null) {
      node.put("String_Node_Str",mungedRef);
    }
  }
  return Json.mapper().convertValue(node,Property.class);
}

Fixed version (ground truth):
public Property property(ObjectNode node,String location,ParseResult result){
  if (node != null) {
    if (node.get("String_Node_Str") == null) {
      JsonNode enumNode=node.get("String_Node_Str");
      if (enumNode != null && enumNode.isArray()) {
        String type=inferTypeFromArray((ArrayNode)enumNode);
        node.put("String_Node_Str",type);
      }
    }
  }
  return Json.mapper().convertValue(node,Property.class);
}
Program: 29636
Project: 29636
Buggy source:
@Test public void testIssue306(){
  SwaggerDeserializationResult result=new SwaggerParser().readWithInfo("String_Node_Str",null,true);
  assertNotNull(result.getSwagger());
  Swagger swagger=result.getSwagger();
  assertTrue(swagger.getDefinitions().size() == 5);
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testIssue306(){
  SwaggerDeserializationResult result=new SwaggerParser().readWithInfo("String_Node_Str",null,true);
  assertNotNull(result.getSwagger());
  Swagger swagger=result.getSwagger();
  assertTrue(swagger.getDefinitions().size() == 6);
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}
Program: 29637
Project: 29637
Buggy source:
private void processRefProperty(RefProperty subRef,String externalFile){
  if (isAnExternalRefFormat(subRef.getRefFormat())) {
    String joinedRef=join(externalFile,subRef.get$ref());
    subRef.set$ref(processRefToExternalDefinition(joinedRef,subRef.getRefFormat()));
  }
 else {
    processRefToExternalDefinition(externalFile + subRef.get$ref(),RefFormat.RELATIVE);
  }
}

Fixed version (ground truth):
private void processRefProperty(RefProperty subRef,String externalFile){
  if (isAnExternalRefFormat(subRef.getRefFormat())) {
    String joinedRef=join(externalFile,subRef.get$ref());
    subRef.set$ref(processRefToExternalDefinition(joinedRef,subRef.getRefFormat()));
  }
 else   if (isAnExternalRefFormat(subRef.getOriginalRefFormat())) {
    String joinedRef=join(externalFile,subRef.getOriginalRef());
    subRef.set$ref(processRefToExternalDefinition(joinedRef,subRef.getOriginalRefFormat()));
  }
 else {
    processRefToExternalDefinition(externalFile + subRef.get$ref(),RefFormat.RELATIVE);
  }
}
Program: 29639
Project: 29639
Buggy source:
private void processRefModel(RefModel refModel){
  if (isAnExternalRefFormat(refModel.getRefFormat())) {
    final String newRef=externalRefProcessor.processRefToExternalDefinition(refModel.get$ref(),refModel.getRefFormat());
    if (newRef != null) {
      refModel.set$ref(newRef);
    }
  }
}

Fixed version (ground truth):
private void processRefModel(RefModel refModel){
  String newRef=null;
  if (isAnExternalRefFormat(refModel.getRefFormat())) {
    newRef=externalRefProcessor.processRefToExternalDefinition(refModel.get$ref(),refModel.getRefFormat());
  }
 else   if (isAnExternalRefFormat(refModel.getOriginalRefFormat())) {
    newRef=externalRefProcessor.processRefToExternalDefinition(refModel.getOriginalRef(),refModel.getOriginalRefFormat());
  }
  if (newRef != null) {
    refModel.set$ref(newRef);
  }
}
Program: 29642
Project: 29642
Buggy source:
@Test public void testAllOfFlatAndNested(){
  for (  String path : Arrays.asList("String_Node_Str","String_Node_Str")) {
    Swagger swagger=new SwaggerParser().read(path);
    assertEquals(3,swagger.getDefinitions().size());
    ComposedModel composedModel=(ComposedModel)swagger.getDefinitions().get("String_Node_Str");
    assertEquals(((RefModel)composedModel.getParent()).getSimpleRef(),"String_Node_Str");
    Map<String,Property> props=composedModel.getChild().getProperties();
    assertEquals(((RefProperty)props.get("String_Node_Str")).getSimpleRef(),"String_Node_Str");
    assertEquals(((RefProperty)((ArrayProperty)props.get("String_Node_Str")).getItems()).getSimpleRef(),"String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testAllOfFlatAndNested(){
  for (  String path : Arrays.asList("String_Node_Str","String_Node_Str")) {
    Swagger swagger=new SwaggerParser().read(path);
    assertEquals(3,swagger.getDefinitions().size());
    assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
    assertTrue(swagger.getDefinitions().get("String_Node_Str") instanceof RefModel);
    assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
    assertTrue(swagger.getDefinitions().get("String_Node_Str") instanceof ComposedModel);
    ComposedModel composedModel=(ComposedModel)swagger.getDefinitions().get("String_Node_Str");
    assertEquals(((RefModel)composedModel.getParent()).getSimpleRef(),"String_Node_Str");
    Map<String,Property> props=composedModel.getChild().getProperties();
    assertEquals(((RefProperty)props.get("String_Node_Str")).getSimpleRef(),"String_Node_Str");
    assertEquals(((RefProperty)((ArrayProperty)props.get("String_Node_Str")).getItems()).getSimpleRef(),"String_Node_Str");
  }
}
Program: 29643
Project: 29643
Buggy source:
@Test public void testIssue306(){
  SwaggerDeserializationResult result=new SwaggerParser().readWithInfo("String_Node_Str",null,true);
  assertNotNull(result.getSwagger());
  Swagger swagger=result.getSwagger();
  assertTrue(swagger.getDefinitions().size() == 6);
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testIssue306(){
  SwaggerDeserializationResult result=new SwaggerParser().readWithInfo("String_Node_Str",null,true);
  assertNotNull(result.getSwagger());
  Swagger swagger=result.getSwagger();
  assertTrue(swagger.getDefinitions().size() == 5);
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}
Program: 29648
Project: 29648
Buggy source:
public static String computeDefinitionName(String ref,Set<String> reserved){
  final String[] refParts=ref.split("String_Node_Str");
  if (refParts.length > 2) {
    throw new RuntimeException("String_Node_Str" + ref);
  }
  final String file=refParts[0];
  final String definitionPath=refParts.length == 2 ? refParts[1] : null;
  String plausibleName;
  if (definitionPath != null) {
    final String[] jsonPathElements=definitionPath.split("String_Node_Str");
    plausibleName=jsonPathElements[jsonPathElements.length - 1];
  }
 else {
    final String[] filePathElements=file.split("String_Node_Str");
    plausibleName=filePathElements[filePathElements.length - 1];
    final String[] split=plausibleName.split("String_Node_Str");
    plausibleName=split[0];
  }
  String tryName=plausibleName;
  for (int i=2; reserved.contains(tryName); i++) {
    tryName=plausibleName + "String_Node_Str" + i;
  }
  return tryName;
}

Fixed version (ground truth):
public static String computeDefinitionName(String ref){
  final String[] refParts=ref.split("String_Node_Str");
  if (refParts.length > 2) {
    throw new RuntimeException("String_Node_Str" + ref);
  }
  final String file=refParts[0];
  final String definitionPath=refParts.length == 2 ? refParts[1] : null;
  String plausibleName;
  if (definitionPath != null) {
    final String[] jsonPathElements=definitionPath.split("String_Node_Str");
    plausibleName=jsonPathElements[jsonPathElements.length - 1];
  }
 else {
    final String[] filePathElements=file.split("String_Node_Str");
    plausibleName=filePathElements[filePathElements.length - 1];
    final String[] split=plausibleName.split("String_Node_Str");
    plausibleName=split[0];
  }
  return plausibleName;
}
Program: 29649
Project: 29649
Buggy source:
@Test public void testRefNameConflicts() throws Exception {
  Swagger swagger=new SwaggerParser().read("String_Node_Str");
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",swagger.getDefinitions().get("String_Node_Str").getProperties().get("String_Node_Str").getExample());
  assertEquals("String_Node_Str",swagger.getDefinitions().get("String_Node_Str").getProperties().get("String_Node_Str").getExample());
}

Fixed version (ground truth):
@Test public void testRefNameConflicts() throws Exception {
  Swagger swagger=new SwaggerParser().read("String_Node_Str");
  Yaml.prettyPrint(swagger);
  assertTrue(swagger.getDefinitions().size() == 2);
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",((RefProperty)swagger.getPath("String_Node_Str").getPost().getResponses().get("String_Node_Str").getSchema()).get$ref());
  assertEquals("String_Node_Str",swagger.getDefinitions().get("String_Node_Str").getProperties().get("String_Node_Str").getExample());
  assertEquals("String_Node_Str",swagger.getDefinitions().get("String_Node_Str").getProperties().get("String_Node_Str").getExample());
}
Program: 29650
Project: 29650
Buggy source:
@Test public void testRefEnum() throws Exception {
  Swagger swagger=new SwaggerParser().read("String_Node_Str");
  Assert.assertNotNull(swagger);
  Assert.assertTrue(swagger.getDefinitions().size() == 5);
  Yaml.prettyPrint(swagger);
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testRefEnum() throws Exception {
  Swagger swagger=new SwaggerParser().read("String_Node_Str");
  Assert.assertNotNull(swagger);
  Assert.assertTrue(swagger.getDefinitions().size() == 5);
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
  Assert.assertNotNull(swagger.getDefinitions().get("String_Node_Str"));
}