nus-yam/ex-repair huggingface dataset:
Program: 34198
Project: 34198
Buggy source:
public void testGetSummonerSpells() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getSummonerSpells(SpellData.COOLDOWN_BURN).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummonerSpells() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getSummonerSpells(SpellData.COOLDOWN_BURN).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34199
Project: 34199
Buggy source:
public void testGetFreeToPlayChampions() throws Exception {
  try {
    Future<List<BasicChampData>> ftpChamps=handler.getFreeToPlayChampions();
    assertNotNull(ftpChamps.get(1,MINUTES));
    assertEquals((ftpChamps.get()).size(),10);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetFreeToPlayChampions() throws Exception {
  try {
    Future<List<BasicChampData>> ftpChamps=handler.getFreeToPlayChampions();
    assertNotNull(ftpChamps.get(1,MINUTES));
    assertEquals((ftpChamps.get()).size(),10);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34200
Project: 34200
Buggy source:
public void testGetSummonersById() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoners(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummonersById() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoners(SUMMONER_ID_1,SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34201
Project: 34201
Buggy source:
public void testGetMatchHistory() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMatchHistory(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetMatchHistory() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getMatchHistory(SUMMONER_ID_1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34202
Project: 34202
Buggy source:
public void testGetChampionBasicData() throws Exception {
  try {
    handler.getBasicChampData(1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetChampionBasicData() throws Exception {
  try {
    handler.getBasicChampData(1).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34203
Project: 34203
Buggy source:
public void testGetSummonerById() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoner(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetSummonerById() throws InterruptedException, TimeoutException, ExecutionException {
  try {
    handler.getSummoner(SUMMONER_ID_2).get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34204
Project: 34204
Buggy source:
public void testGetShards() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getShards().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetShards() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getShards().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34205
Project: 34205
Buggy source:
public void testGetLocales() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getLocales().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (ex.getErrorType().code < 500 || ex.getErrorType().code > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetLocales() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    handler.getLocales().get(1,MINUTES);
  }
 catch (  RequestException ex) {
    if (isNotServerside(ex))     throw ex;
  }
}
Program: 34206
Project: 34206
Buggy source:
/** 
 * Open the request to the web target and returns an InputStreamReader for the message body
 * @param target the web target to access
 * @return the reader for the message body
 */
@SneakyThrows(IOException.class) private InputStreamReader $(WebTarget target){
  Response response=target.request().accept(MediaType.APPLICATION_JSON_TYPE).acceptEncoding("String_Node_Str").get();
  if (response.getStatus() != 200) {
    throw new RequestException(response.getStatus(),RequestException.ErrorType.getByCode(response.getStatus()));
  }
  if (response.getHeaderString("String_Node_Str").equals("String_Node_Str")) {
    return new InputStreamReader(new GZIPInputStream((java.io.InputStream)response.getEntity()));
  }
 else {
    return new InputStreamReader((java.io.InputStream)response.getEntity());
  }
}

Fixed version (ground truth):
/** 
 * Open the request to the web target and returns an InputStreamReader for the message body
 * @param target the web target to access
 * @return the reader for the message body
 */
@SneakyThrows(IOException.class) private InputStreamReader $(WebTarget target){
  Response response=target.request().accept(MediaType.APPLICATION_JSON_TYPE).acceptEncoding("String_Node_Str").get();
  if (response.getStatus() != 200) {
    throw new RequestException(response.getStatus(),RequestException.ErrorType.getByCode(response.getStatus()));
  }
  String encoding=response.getHeaderString("String_Node_Str");
  if (encoding != null && encoding.equals("String_Node_Str")) {
    return new InputStreamReader(new GZIPInputStream((java.io.InputStream)response.getEntity()));
  }
 else {
    return new InputStreamReader((java.io.InputStream)response.getEntity());
  }
}
Program: 34207
Project: 34207
Buggy source:
public List<Object> getPendingInvitations(){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Retrieve all currently pending invitations. Invitations are pending if the user has neither accepted nor declined.
 * @return The pending invitations
 */
public List<Object> getPendingInvitations(){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str");
}
Program: 34208
Project: 34208
Buggy source:
public LobbyStatus getLobbyStatus(){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Retrieve the lobby status for the current team lobby
 * @return The lobby status
 */
public LobbyStatus getLobbyStatus(){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str");
}
Program: 34209
Project: 34209
Buggy source:
public void leave(){
  client.sendRpc(SERVICE,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Leave the current lobby.
 */
public void leave(){
  client.sendRpc(SERVICE,"String_Node_Str");
}
Program: 34210
Project: 34210
Buggy source:
public LobbyStatus createArrangedBotTeamLobby(double queueId,BotDifficulty difficulty){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",difficulty);
}

Fixed version (ground truth):
/** 
 * Create a premade team lobby for bot games
 * @param queueId The target queue
 * @param difficulty The difficulty of the bots
 * @return The lobby status
 */
public LobbyStatus createArrangedBotTeamLobby(long queueId,BotDifficulty difficulty){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",queueId,difficulty);
}
Program: 34211
Project: 34211
Buggy source:
public void decline(String inviteId){
  client.sendRpc(SERVICE,"String_Node_Str",inviteId);
}

Fixed version (ground truth):
/** 
 * Decline an invitation
 * @param inviteId The id of the invitation (transmitted via {@link net.boreeas.riotapi.com.riotgames.platform.gameinvite.contract.InvitationRequest})
 */
public void decline(String inviteId){
  client.sendRpc(SERVICE,"String_Node_Str",inviteId);
}
Program: 34212
Project: 34212
Buggy source:
public void transferOwnership(double summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}

Fixed version (ground truth):
/** 
 * Transfer lobby ownership to the target user
 * @param summonerId The id of the summoner
 */
public void transferOwnership(long summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}
Program: 34213
Project: 34213
Buggy source:
public void invite(double summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}

Fixed version (ground truth):
/** 
 * Invite the target user to the current lobby.
 * @param summonerId The id of the summoner
 */
public void invite(long summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}
Program: 34214
Project: 34214
Buggy source:
public LobbyStatus createGroupFinderLobby(double gameMode,String uuid){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",gameMode,uuid);
}

Fixed version (ground truth):
/** 
 * Create a groupfinder lobby
 * @param queueId The target queue
 * @param uuid The uuid for this lobby
 * @return The lobby status
 */
public LobbyStatus createGroupFinderLobby(long queueId,String uuid){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",queueId,uuid);
}
Program: 34215
Project: 34215
Buggy source:
public LobbyStatus createArrangedTeamLobby(double queueId){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",queueId);
}

Fixed version (ground truth):
/** 
 * Create a premade team lobby
 * @param queueId The target queue
 * @return The lobby status
 */
public LobbyStatus createArrangedTeamLobby(long queueId){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",queueId);
}
Program: 34216
Project: 34216
Buggy source:
public void grantInvitePrivileges(double summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}

Fixed version (ground truth):
/** 
 * Grant invite privileges to the target summoner
 * @param summonerId The id of the summoner
 */
public void grantInvitePrivileges(long summonerId){
  client.sendRpc(SERVICE,"String_Node_Str",summonerId);
}
Program: 34217
Project: 34217
Buggy source:
public LobbyStatus accept(String inviteId){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",inviteId);
}

Fixed version (ground truth):
/** 
 * Accept a game invitation.
 * @param inviteId The id of the invitation (transmitted via {@link net.boreeas.riotapi.com.riotgames.platform.gameinvite.contract.InvitationRequest})
 * @return The lobby status
 */
public LobbyStatus accept(String inviteId){
  return client.sendRpcAndWait(SERVICE,"String_Node_Str",inviteId);
}
Program: 34218
Project: 34218
Buggy source:
public RequestException(int responseCode,ErrorType error){
  super(responseCode + "String_Node_Str" + error+ "String_Node_Str");
  this.error=error;
  this.code=code;
}

Fixed version (ground truth):
public RequestException(int responseCode,ErrorType error){
  super(responseCode + "String_Node_Str" + error+ "String_Node_Str");
  this.error=error;
  this.code=responseCode;
}
Program: 34219
Project: 34219
Buggy source:
/** 
 * <p> Retrieves detailed information about the specified shard. </p><br> This method does not count towards your rate limit.
 * @param shard The target region
 * @return A list of shard infomation.
 * @see <a href="https://developer.riotgames.com/api/methods#!/835/2938">Official API Documentation</a>
 */
public ShardStatus getShardStatus(Shard shard){
  WebTarget tgt=statusTarget.path(shard.name);
  return gson.fromJson($(tgt),ShardStatus.class);
}

Fixed version (ground truth):
/** 
 * <p> Retrieves detailed information about the specified shard. </p><br> This method does not count towards your rate limit.
 * @param shard The target region
 * @return A list of shard infomation.
 * @see <a href="https://developer.riotgames.com/api/methods#!/835/2938">Official API Documentation</a>
 */
public ShardStatus getShardStatus(Shard shard){
  System.out.println("String_Node_Str" + shard.name);
  WebTarget tgt=statusTarget.path(shard.name);
  return gson.fromJson($(tgt),ShardStatus.class);
}
Program: 34220
Project: 34220
Buggy source:
public void testGetShardStatus() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    List<ShardData> shardDatas=handler.getShards().get(1,MINUTES);
    for (    ShardData data : shardDatas) {
      handler.getShardStatus(Shard.get(data.getSlug()));
    }
  }
 catch (  RequestException ex) {
    if (ex.getErrorType() == null)     System.out.println(ex.getErrorCode());
    if (ex.getErrorCode() < 500 || ex.getErrorCode() > 599)     throw ex;
  }
}

Fixed version (ground truth):
public void testGetShardStatus() throws InterruptedException, ExecutionException, TimeoutException {
  try {
    List<ShardData> shardDatas=handler.getShards().get(1,MINUTES);
    for (    ShardData data : shardDatas) {
      System.out.println(data);
      handler.getShardStatus(Shard.get(data.getSlug()));
    }
  }
 catch (  RequestException ex) {
    if (ex.getErrorType() == null)     System.out.println("String_Node_Str" + ex.getErrorCode());
    if (ex.getErrorCode() < 500 || ex.getErrorCode() > 599)     throw ex;
  }
}
Program: 34221
Project: 34221
Buggy source:
@Override public void serialize(String val,DataOutputStream out) throws IOException {
  writer.serializeAmf3(val.length() << 1 | 1);
  out.write(val.getBytes("String_Node_Str"));
}

Fixed version (ground truth):
@Override public void serialize(String val,DataOutputStream out) throws IOException {
  byte[] data=val.getBytes("String_Node_Str");
  writer.serializeAmf3(data.length << 1 | 1);
  out.write(data);
}
Program: 34222
Project: 34222
Buggy source:
public GameUpdateTask submit(InProgressGame game,Consumer<Exception> errorCallback){
  GameUpdateTask task=new GameUpdateTask(game,errorCallback);
  pool.schedule(() -> task.run(),10,TimeUnit.MILLISECONDS);
  ScheduledFuture<?> self=pool.scheduleAtFixedRate(task,game.getLastChunkInfo().getNextAvailableChunk(),game.getChunkInterval(),TimeUnit.MILLISECONDS);
  task.setSelf(self);
  return task;
}

Fixed version (ground truth):
public GameUpdateTask submit(InProgressGame game,Consumer<Exception> errorCallback){
  GameUpdateTask task=new GameUpdateTask(game,errorCallback);
  pool.schedule(() -> task.run(),0,TimeUnit.MILLISECONDS);
  ScheduledFuture<?> self=pool.scheduleAtFixedRate(task,game.getLastChunkInfo().getNextAvailableChunk(),game.getChunkInterval(),TimeUnit.MILLISECONDS);
  task.setSelf(self);
  return task;
}
Program: 34223
Project: 34223
Buggy source:
private void pullNewChunks(int maxId){
  log.debug("String_Node_Str" + game.getGameId() + "String_Node_Str"+ (maxId - game.getLastAvailableChunk())+ "String_Node_Str"+ (game.getLastAvailableChunk() + 1)+ "String_Node_Str"+ maxId+ "String_Node_Str");
  for (int id=game.getLastAvailableChunk() + 1; id <= maxId; id++) {
    pullChunk(id);
  }
}

Fixed version (ground truth):
private void pullNewChunks(int maxId){
  for (int id=game.getLastAvailableChunk() + 1; id <= maxId; id++) {
    pullChunk(id);
  }
}
Program: 34224
Project: 34224
Buggy source:
private void doRetriesChunk(){
  Set<Integer> retriesExceeded=new HashSet<>();
  Set<Integer> retrySuccessful=new HashSet<>();
  for (  Map.Entry<Integer,Integer> retryData : retriesChunks.entrySet()) {
    retryChunk(retriesExceeded,retrySuccessful,retryData.getKey(),retryData.getValue());
  }
  if (!retriesExceeded.isEmpty()) {
    for (    int i : retriesExceeded) {
      retriesChunks.remove(i);
      if (onChunkFailed != null) {
        onChunkFailed.accept(i);
      }
    }
    throw new RequestException("String_Node_Str" + retriesExceeded);
  }
  if (!retrySuccessful.isEmpty()) {
    retrySuccessful.forEach(retriesChunks::remove);
  }
}

Fixed version (ground truth):
private void doRetriesChunk(){
  Set<Integer> retriesExceeded=new HashSet<>();
  Set<Integer> retrySuccessful=new HashSet<>();
  for (  Map.Entry<Integer,Integer> retryData : retriesChunks.entrySet()) {
    retryChunk(retriesExceeded,retrySuccessful,retryData.getKey(),retryData.getValue());
  }
  if (!retriesExceeded.isEmpty()) {
    for (    int i : retriesExceeded) {
      retriesChunks.remove(i);
      if (onChunkFailed != null) {
        onChunkFailed.accept(i);
      }
    }
  }
  if (!retrySuccessful.isEmpty()) {
    retrySuccessful.forEach(retriesChunks::remove);
  }
}
Program: 34225
Project: 34225
Buggy source:
private void doRetriesKeyframes(){
  Set<Integer> retriesExceeded=new HashSet<>();
  Set<Integer> retrySuccessful=new HashSet<>();
  for (  Map.Entry<Integer,Integer> retryData : retriesKeyframes.entrySet()) {
    retryKeyframe(retriesExceeded,retrySuccessful,retryData.getKey(),retryData.getValue());
  }
  if (!retriesExceeded.isEmpty()) {
    for (    int i : retriesExceeded) {
      retriesKeyframes.remove(i);
      if (onKeyframePulled != null) {
        onKeyframeFailed.accept(i);
      }
    }
    throw new RequestException("String_Node_Str" + retriesExceeded);
  }
  if (!retrySuccessful.isEmpty()) {
    retrySuccessful.forEach(retriesKeyframes::remove);
  }
}

Fixed version (ground truth):
private void doRetriesKeyframes(){
  Set<Integer> retriesExceeded=new HashSet<>();
  Set<Integer> retrySuccessful=new HashSet<>();
  for (  Map.Entry<Integer,Integer> retryData : retriesKeyframes.entrySet()) {
    retryKeyframe(retriesExceeded,retrySuccessful,retryData.getKey(),retryData.getValue());
  }
  if (!retriesExceeded.isEmpty()) {
    for (    int i : retriesExceeded) {
      retriesKeyframes.remove(i);
      if (onKeyframePulled != null) {
        onKeyframeFailed.accept(i);
      }
    }
  }
  if (!retrySuccessful.isEmpty()) {
    retrySuccessful.forEach(retriesKeyframes::remove);
  }
}
Program: 34226
Project: 34226
Buggy source:
public static ErrorType getByCode(int code){
switch (code) {
case 400:
    return BAD_REQUEST;
case 401:
  return UNAUTHORIZED;
case 404:
return NOT_FOUND;
case 429:
return RATE_LIMIT_EXCEEDED;
case 500:
return INTERNAL_SERVER_ERROR;
case 503:
return SERVICE_UNAVAILABLE;
default :
return null;
}
}

Fixed version (ground truth):
public static ErrorType getByCode(int code){
  for (  ErrorType type : values()) {
    if (type.code == code) {
      return type;
    }
  }
  return null;
}
Program: 34227
Project: 34227
Buggy source:
public long getPosition(){
  return result.getPosition();
}

Fixed version (ground truth):
public long getPosition(){
  if (result != null) {
    return result.getPosition();
  }
  throw new IllegalStateException("String_Node_Str");
}
Program: 34228
Project: 34228
Buggy source:
public void run(){
  while (latch.getCount() > 0) {
    try {
      result=loginQueue.getAuthToken(user,password);
      if (result.getStatus() == AuthResult.Status.OK) {
        latch.countDown();
      }
 else {
        try {
          Thread.sleep(overrideDelay > 0 ? overrideDelay : result.getDelay());
        }
 catch (        InterruptedException ex) {
          throw new AccountManagementException("String_Node_Str",ex);
        }
      }
    }
 catch (    AccountManagementException ex) {
      this.ex=ex;
      isError=true;
      latch.countDown();
    }
  }
}

Fixed version (ground truth):
public void run(){
  while (latch.getCount() > 0) {
    try {
      result=loginQueue.getAuthToken(user,password);
      if (result.getStatus() == AuthResult.Status.OK) {
        latch.countDown();
      }
 else {
        try {
          Thread.sleep(overrideDelay > 0 ? overrideDelay : result.getDelay());
        }
 catch (        InterruptedException ex) {
          throw new AccountManagementException("String_Node_Str",ex);
        }
      }
    }
 catch (    AccountManagementException ex) {
      this.ex=ex;
      isError=true;
      latch.countDown();
    }
catch (    RequestException ex) {
      int type=ex.getErrorType().code;
      if ((type >= RequestException.ErrorType.CLOUDFLARE_GENERIC.code && type <= RequestException.ErrorType.CLOUDFLARE_SSL_HANDSHAKE_FAILED.code) && cloudflareErrorCounter < MAX_CLOUDFLARE_ERROR_RETRY) {
        cloudflareErrorCounter++;
        log.warn("String_Node_Str" + type + "String_Node_Str"+ cloudflareErrorCounter+ "String_Node_Str"+ MAX_CLOUDFLARE_ERROR_RETRY+ "String_Node_Str");
      }
 else {
        this.ex=ex;
        isError=true;
        latch.countDown();
      }
    }
  }
}
Program: 34229
Project: 34229
Buggy source:
public long getCurrentDelay(){
  return overrideDelay > 0 ? overrideDelay : result.getDelay();
}

Fixed version (ground truth):
public long getCurrentDelay(){
  if (overrideDelay > 0) {
    return overrideDelay;
  }
  if (result != null) {
    return result.getDelay();
  }
  throw new IllegalStateException("String_Node_Str");
}
Program: 34230
Project: 34230
Buggy source:
/** 
 * Serializes the specified object to amf3
 * @param obj The object to serialize
 * @param marker The type of the object to check for referencability
 * @throws IOException
 */
@SneakyThrows(value={InstantiationException.class,IllegalAccessException.class}) public void serializeAmf3(Object obj,Amf3Type marker) throws IOException {
  if (checkReferenceable(obj,marker)) {
    return;
  }
  Serialization context;
  if (amf3Serializers.containsKey(obj.getClass())) {
    amf3Serializers.get(obj.getClass()).serialize(obj,out);
  }
 else   if ((context=Util.searchClassHierarchy(obj.getClass(),Serialization.class)) != null) {
    Amf3ObjectSerializer serializer=context.amf3Serializer().newInstance();
    serializer.setTraitRefTable(traitRefTable);
    serializer.setTraitDefCache(traitDefCache);
    serializer.setWriter(this);
    serializer.serialize(obj,out);
  }
 else   if (obj.getClass().isArray()) {
    serializeArrayAmf3(obj);
  }
 else   if (obj instanceof Enum) {
    serializeAmf3(((Enum)obj).name());
  }
 else {
    Amf3ObjectSerializer serializer=new Amf3ObjectSerializer();
    serializer.setTraitRefTable(traitRefTable);
    serializer.setTraitDefCache(traitDefCache);
    serializer.setWriter(this);
    serializer.serialize(obj,out);
  }
  out.flush();
}

Fixed version (ground truth):
/** 
 * Serializes the specified object to amf3
 * @param obj The object to serialize
 * @param marker The type of the object to check for referencability
 * @throws IOException
 */
@SneakyThrows(value={InstantiationException.class,IllegalAccessException.class}) public void serializeAmf3(Object obj,Amf3Type marker) throws IOException {
  if (checkReferenceable(obj,marker)) {
    return;
  }
  Serialization context;
  if (amf3Serializers.containsKey(obj.getClass())) {
    amf3Serializers.get(obj.getClass()).serialize(obj,out);
  }
 else   if ((context=Util.searchClassHierarchy(obj.getClass(),Serialization.class)) != null && !context.deserializeOnly()) {
    Amf3ObjectSerializer serializer=context.amf3Serializer().newInstance();
    serializer.setTraitRefTable(traitRefTable);
    serializer.setTraitDefCache(traitDefCache);
    serializer.setWriter(this);
    serializer.serialize(obj,out);
  }
 else   if (obj.getClass().isArray()) {
    serializeArrayAmf3(obj);
  }
 else   if (obj instanceof Enum) {
    serializeAmf3(((Enum)obj).name());
  }
 else {
    Amf3ObjectSerializer serializer=new Amf3ObjectSerializer();
    serializer.setTraitRefTable(traitRefTable);
    serializer.setTraitDefCache(traitDefCache);
    serializer.setWriter(this);
    serializer.serialize(obj,out);
  }
  out.flush();
}
Program: 34231
Project: 34231
Buggy source:
@Override @SneakyThrows({NoSuchFieldException.class,IllegalAccessException.class}) public void serialize(Object o,DataOutputStream out) throws IOException {
  TraitDefinition traitDef;
  if ((traitDef=getCachedTraitDef(o)) != null) {
    writer.serializeAmf3(traitRefTable.get(traitDef) << 2 | 1);
  }
 else {
    traitDef=getTraitDefiniton(o);
    cacheTraitDef(o,traitDef);
    traitRefTable.put(traitDef,traitRefTable.size());
    writer.serializeAmf3(traitDef.getHeader());
    writer.serializeAmf3(traitDef.getName());
    for (    FieldRef field : traitDef.getStaticFields()) {
      writer.serializeAmf3(field.getSerializedName());
    }
  }
  if (traitDef.isExternalizable()) {
    System.out.println("String_Node_Str" + traitDef);
  }
  if (o instanceof Externalizable) {
    ((Externalizable)o).writeExternal(writer);
    return;
  }
 else   if (traitDef.isExternalizable()) {
    log.warn("String_Node_Str" + traitDef.getName() + "String_Node_Str");
  }
  for (  FieldRef ref : traitDef.getStaticFields()) {
    writer.encodeAmf3(getStaticField(o,ref));
  }
  if (traitDef.isDynamic()) {
    for (    FieldRef ref : traitDef.getDynamicFields()) {
      writer.serializeAmf3(ref.getSerializedName());
      writer.encodeAmf3(getDynamicField(o,ref));
    }
    writer.serializeAmf3("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override @SneakyThrows({NoSuchFieldException.class,IllegalAccessException.class}) public void serialize(Object o,DataOutputStream out) throws IOException {
  TraitDefinition traitDef;
  if ((traitDef=getCachedTraitDef(o)) != null) {
    writer.serializeAmf3(traitRefTable.get(traitDef) << 2 | 1);
  }
 else {
    traitDef=getTraitDefiniton(o);
    cacheTraitDef(o,traitDef);
    traitRefTable.put(traitDef,traitRefTable.size());
    writer.serializeAmf3(traitDef.getHeader());
    writer.serializeAmf3(traitDef.getName());
    for (    FieldRef field : traitDef.getStaticFields()) {
      writer.serializeAmf3(field.getSerializedName());
    }
  }
  if (o instanceof Externalizable) {
    ((Externalizable)o).writeExternal(writer);
    return;
  }
 else   if (traitDef.isExternalizable()) {
    log.warn("String_Node_Str" + traitDef.getName() + "String_Node_Str");
  }
  for (  FieldRef ref : traitDef.getStaticFields()) {
    writer.encodeAmf3(getStaticField(o,ref));
  }
  if (traitDef.isDynamic()) {
    for (    FieldRef ref : traitDef.getDynamicFields()) {
      writer.serializeAmf3(ref.getSerializedName());
      writer.encodeAmf3(getDynamicField(o,ref));
    }
    writer.serializeAmf3("String_Node_Str");
  }
}
Program: 34232
Project: 34232
Buggy source:
public static ErrorType getByCode(int code){
switch (code) {
case 400:
    return BAD_REQUEST;
case 401:
  return UNAUTHORIZED;
case 404:
return NOT_FOUND;
case 421:
return RATE_LIMIT_EXCEEDED;
case 500:
return INTERNAL_SERVER_ERROR;
case 503:
return SERVICE_UNAVAILABLE;
default :
return null;
}
}

Fixed version (ground truth):
public static ErrorType getByCode(int code){
switch (code) {
case 400:
    return BAD_REQUEST;
case 401:
  return UNAUTHORIZED;
case 404:
return NOT_FOUND;
case 429:
return RATE_LIMIT_EXCEEDED;
case 500:
return INTERNAL_SERVER_ERROR;
case 503:
return SERVICE_UNAVAILABLE;
default :
return null;
}
}
Program: 34233
Project: 34233
Buggy source:
public RequestException(ErrorType error){
  super(error + "String_Node_Str");
  this.error=error;
}

Fixed version (ground truth):
public RequestException(int responseCode,ErrorType error){
  super(responseCode + "String_Node_Str" + error+ "String_Node_Str");
  this.error=error;
}
Program: 34234
Project: 34234
Buggy source:
public void testGetSummoners() throws InterruptedException {
  Thread.sleep(1500);
  handler.getSummoners(SUMMONER_NAME_1,SUMMONER_NAME_2);
}

Fixed version (ground truth):
public void testGetSummoners() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getSummoners(SUMMONER_NAME_1,SUMMONER_NAME_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34235
Project: 34235
Buggy source:
public void testGetSummonerSpell(){
  handler.getSummonerSpell(1,SpellData.ALL);
}

Fixed version (ground truth):
public void testGetSummonerSpell(){
  try {
    handler.getSummonerSpell(1,SpellData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34236
Project: 34236
Buggy source:
public void testGetMastery(){
  handler.getMastery(4353,MasteryData.SANITIZED_DESCRIPTION);
}

Fixed version (ground truth):
public void testGetMastery(){
  try {
    handler.getMastery(4353,MasteryData.SANITIZED_DESCRIPTION);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34237
Project: 34237
Buggy source:
public void testGetStatSummary() throws InterruptedException {
  Thread.sleep(1500);
  handler.getStatsSummary(SUMMONER_ID_1,Season.SEASON3);
}

Fixed version (ground truth):
public void testGetStatSummary() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getStatsSummary(SUMMONER_ID_1,Season.SEASON3);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34238
Project: 34238
Buggy source:
public void testGetRunePages() throws InterruptedException {
  Thread.sleep(1500);
  handler.getRunePages(SUMMONER_ID_2);
  handler.getRunePagesMultipleUsers(SUMMONER_ID_2,SUMMONER_ID_1);
}

Fixed version (ground truth):
public void testGetRunePages() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getRunePages(SUMMONER_ID_2);
    handler.getRunePagesMultipleUsers(SUMMONER_ID_2,SUMMONER_ID_1);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34239
Project: 34239
Buggy source:
public void testGetChampions() throws Exception {
  handler.getChampions(ChampData.ALL);
}

Fixed version (ground truth):
public void testGetChampions() throws Exception {
  try {
    handler.getChampions(ChampData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34240
Project: 34240
Buggy source:
public void testGetMasteries(){
  handler.getMasteries(MasteryData.ALL);
}

Fixed version (ground truth):
public void testGetMasteries(){
  try {
    handler.getMasteries(MasteryData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34241
Project: 34241
Buggy source:
public void testGetItem(){
  handler.getItem(2003,ItemData.CONSUME_ON_FULL);
}

Fixed version (ground truth):
public void testGetItem(){
  try {
    handler.getItem(2003,ItemData.CONSUME_ON_FULL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34242
Project: 34242
Buggy source:
public void testGetChampion() throws Exception {
  handler.getChampion(1,ChampData.ALL);
}

Fixed version (ground truth):
public void testGetChampion() throws Exception {
  try {
    handler.getChampion(1,ChampData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34243
Project: 34243
Buggy source:
public void testGetItems(){
  handler.getItemList(ItemData.ALL);
}

Fixed version (ground truth):
public void testGetItems(){
  try {
    handler.getItemList(ItemData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34244
Project: 34244
Buggy source:
public void testGetMasteryPages() throws InterruptedException {
  Thread.sleep(1500);
  handler.getMasteryPages(SUMMONER_ID_1);
  handler.getMasteryPagesMultipleUsers(SUMMONER_ID_1,SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetMasteryPages() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getMasteryPages(SUMMONER_ID_1);
    handler.getMasteryPagesMultipleUsers(SUMMONER_ID_1,SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34245
Project: 34245
Buggy source:
public void testGetChallenger() throws Exception {
  Thread.sleep(1500);
  handler.getChallenger(Queue.RANKED_SOLO_5v5);
}

Fixed version (ground truth):
public void testGetChallenger() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getChallenger(Queue.RANKED_SOLO_5v5);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34246
Project: 34246
Buggy source:
public void testGetRunes(){
  handler.getRuneList(ItemData.ALL);
}

Fixed version (ground truth):
public void testGetRunes(){
  try {
    handler.getRuneList(ItemData.ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34247
Project: 34247
Buggy source:
public void testGetBasicChampData() throws Exception {
  Thread.sleep(1500);
  List<BasicChampData> euwBasicChampDatas=handler.getBasicChampData();
  assertNotNull(euwBasicChampDatas);
  assertFalse(euwBasicChampDatas.isEmpty());
}

Fixed version (ground truth):
public void testGetBasicChampData() throws Exception {
  try {
    Thread.sleep(1500);
    List<BasicChampData> euwBasicChampDatas=handler.getBasicChampData();
    assertNotNull(euwBasicChampDatas);
    assertFalse(euwBasicChampDatas.isEmpty());
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34248
Project: 34248
Buggy source:
public void testGetLeagues() throws Exception {
  Thread.sleep(1500);
  handler.getLeagues(SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetLeagues() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getLeagues(SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34249
Project: 34249
Buggy source:
public void testGetRune(){
  handler.getRune(5235,ItemData.HIDE_FROM_ALL);
}

Fixed version (ground truth):
public void testGetRune(){
  try {
    handler.getRune(5235,ItemData.HIDE_FROM_ALL);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34250
Project: 34250
Buggy source:
public void testGetRecentGames() throws Exception {
  Thread.sleep(1500);
  handler.getRecentGames(SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetRecentGames() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getRecentGames(SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34251
Project: 34251
Buggy source:
public void testGetLeagueEntries() throws Exception {
  Thread.sleep(1500);
  handler.getLeagueEntries(SUMMONER_ID_1);
}

Fixed version (ground truth):
public void testGetLeagueEntries() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getLeagueEntries(SUMMONER_ID_1);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34252
Project: 34252
Buggy source:
public void testGetLeagueEntriesByTeam() throws Exception {
  Thread.sleep(1500);
  handler.getLeagueEntriesByTeam(TEAM_ID);
}

Fixed version (ground truth):
public void testGetLeagueEntriesByTeam() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getLeagueEntriesByTeam(TEAM_ID);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34253
Project: 34253
Buggy source:
public void testGetNames() throws InterruptedException {
  Thread.sleep(1500);
  handler.getSummonerName(SUMMONER_ID_2);
  handler.getSummonerNames(SUMMONER_ID_1,SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetNames() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getSummonerName(SUMMONER_ID_2);
    handler.getSummonerNames(SUMMONER_ID_1,SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34254
Project: 34254
Buggy source:
public void testGetLeaguesByTeam() throws Exception {
  Thread.sleep(1500);
  handler.getLeaguesByTeam(TEAM_ID);
}

Fixed version (ground truth):
public void testGetLeaguesByTeam() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getLeaguesByTeam(TEAM_ID);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34255
Project: 34255
Buggy source:
public void testGetRealm(){
  handler.getRealm();
}

Fixed version (ground truth):
public void testGetRealm(){
  try {
    handler.getRealm();
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34256
Project: 34256
Buggy source:
public void testGetRankedStats() throws InterruptedException {
  Thread.sleep(1500);
  handler.getRankedStats(SUMMONER_ID_1);
}

Fixed version (ground truth):
public void testGetRankedStats() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getRankedStats(SUMMONER_ID_1);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34257
Project: 34257
Buggy source:
public void testGetTeams() throws InterruptedException {
  Thread.sleep(1500);
  handler.getTeams(SUMMONER_ID_1);
  handler.getTeams(TEAM_ID);
}

Fixed version (ground truth):
public void testGetTeams() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getTeams(SUMMONER_ID_1);
    handler.getTeams(TEAM_ID);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    System.out.println(ex.getMessage());
  }
}
Program: 34258
Project: 34258
Buggy source:
public void testGetSummoner() throws InterruptedException {
  Thread.sleep(1500);
  handler.getSummoner(SUMMONER_NAME_2);
}

Fixed version (ground truth):
public void testGetSummoner() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getSummoner(SUMMONER_NAME_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34259
Project: 34259
Buggy source:
public void testGetSummonerSpells(){
  handler.getSummonerSpells(SpellData.COOLDOWN_BURN);
}

Fixed version (ground truth):
public void testGetSummonerSpells(){
  try {
    handler.getSummonerSpells(SpellData.COOLDOWN_BURN);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34260
Project: 34260
Buggy source:
public void testGetFreeToPlayChampions() throws Exception {
  Thread.sleep(1500);
  assertNotNull(handler.getFreeToPlayChampions());
  assertEquals(handler.getFreeToPlayChampions().size(),10);
}

Fixed version (ground truth):
public void testGetFreeToPlayChampions() throws Exception {
  try {
    Thread.sleep(1500);
    assertNotNull(handler.getFreeToPlayChampions());
    assertEquals(handler.getFreeToPlayChampions().size(),10);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34261
Project: 34261
Buggy source:
public void testGetSummonersById() throws InterruptedException {
  Thread.sleep(1500);
  handler.getSummoners(SUMMONER_ID_1,SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetSummonersById() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getSummoners(SUMMONER_ID_1,SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34262
Project: 34262
Buggy source:
public void testGetChampionBasicData() throws Exception {
  Thread.sleep(1500);
  handler.getBasicChampData(1);
}

Fixed version (ground truth):
public void testGetChampionBasicData() throws Exception {
  try {
    Thread.sleep(1500);
    handler.getBasicChampData(1);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34263
Project: 34263
Buggy source:
public void testGetSummonerById() throws InterruptedException {
  Thread.sleep(1500);
  handler.getSummoner(SUMMONER_ID_2);
}

Fixed version (ground truth):
public void testGetSummonerById() throws InterruptedException {
  try {
    Thread.sleep(1500);
    handler.getSummoner(SUMMONER_ID_2);
  }
 catch (  RequestException ex) {
    System.out.println("String_Node_Str");
    ex.printStackTrace();
  }
}
Program: 34264
Project: 34264
Buggy source:
public int describeContents(){
  return baseDescribeContents();
}

Fixed version (ground truth):
public int describeContents(){
  return 0;
}
Program: 34265
Project: 34265
Buggy source:
@Test public void testGet2() throws NoIdAnnotationFoundException, NoColumnAnnotationFoundException, IOException, SQLException {
  build();
  JdbcTemplateTool jtt=super.applicationContext.getBean("String_Node_Str",JdbcTemplateTool.class);
  Employee e=jtt.get(Person.class,1);
  assertThat(e.getName(),is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testGet2() throws NoIdAnnotationFoundException, NoColumnAnnotationFoundException, IOException, SQLException {
  build();
  JdbcTemplateTool jtt=super.applicationContext.getBean("String_Node_Str",JdbcTemplateTool.class);
  Person e=jtt.get(Person.class,1);
  assertThat(e.getName(),is("String_Node_Str"));
}
Program: 34271
Project: 34271
Buggy source:
public void run(){
  for (  MessageAndMetadata msgAndMessageData : stream) {
    HttpPost post=new HttpPost(url);
    post.setHeader("String_Node_Str","String_Node_Str");
    StringEntity fakeJsonEntity=new StringEntity("String_Node_Str",ContentType.APPLICATION_JSON);
    post.setEntity(fakeJsonEntity);
    try {
      HttpResponse response=client.execute(post);
      System.out.println("String_Node_Str" + response.getStatusLine().getStatusCode());
    }
 catch (    java.io.IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void run(){
  for (  MessageAndMetadata msgAndMetadata : stream) {
    HttpPost post=new HttpPost(url);
    post.setHeader("String_Node_Str","String_Node_Str");
    try {
      StringEntity jsonEntity=new StringEntity(new String(((Message)msgAndMetadata.message()).payload().array(),"String_Node_Str"),ContentType.APPLICATION_JSON);
      post.setEntity(jsonEntity);
      HttpResponse response=client.execute(post);
      System.out.println("String_Node_Str" + response.getStatusLine().getStatusCode());
    }
 catch (    java.io.UnsupportedEncodingException e) {
      e.printStackTrace();
    }
catch (    java.io.IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 34272
Project: 34272
Buggy source:
public MapStateListener(GoogleMap map,TouchableMapFragment touchableMapFragment,Activity activity){
  this.mMap=map;
  this.mActivity=activity;
  map.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener(){
    @Override public void onCameraChange(    CameraPosition cameraPosition){
      unsettleMap();
      if (!mMapTouched) {
        runSettleTimer();
      }
    }
  }
);
  touchableMapFragment.setTouchListener(new TouchableMapFragment.OnTouchListener(){
    @Override public void onTouch(){
      touchMap();
      unsettleMap();
    }
    @Override public void onRelease(){
      releaseMap();
      runSettleTimer();
    }
  }
);
}

Fixed version (ground truth):
public MapStateListener(GoogleMap map,TouchableMapFragment touchableMapFragment,Activity activity){
  this.mMap=map;
  this.mActivity=activity;
  map.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener(){
    @Override public void onCameraChange(    CameraPosition cameraPosition){
      unsettleMap();
      if (!mMapTouched) {
        runSettleTimer();
      }
    }
  }
);
  touchableMapFragment.setTouchListener(new TouchableWrapper.OnTouchListener(){
    @Override public void onTouch(){
      touchMap();
      unsettleMap();
    }
    @Override public void onRelease(){
      releaseMap();
      runSettleTimer();
    }
  }
);
}
Program: 34273
Project: 34273
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup parent,Bundle savedInstanceState){
  mOriginalContentView=super.onCreateView(inflater,parent,savedInstanceState);
  mTouchView=new FrameLayout(getActivity());
  mTouchView.setOnTouchListener(new View.OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
        if (!isTouched) {
          if (onTouchListener != null) {
            onTouchListener.onTouch();
          }
        }
      isTouched=true;
    break;
case MotionEvent.ACTION_UP:
  isTouched=false;
if (onTouchListener != null) {
  onTouchListener.onRelease();
}
break;
}
return false;
}
}
);
mTouchView.addView(mOriginalContentView);
return mTouchView;
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup parent,Bundle savedInstanceState){
  mOriginalContentView=super.onCreateView(inflater,parent,savedInstanceState);
  mTouchView=new TouchableWrapper(getActivity());
  mTouchView.addView(mOriginalContentView);
  return mTouchView;
}
Program: 34274
Project: 34274
Buggy source:
public void setTouchListener(OnTouchListener onTouchListener){
  this.onTouchListener=onTouchListener;
}

Fixed version (ground truth):
public void setTouchListener(TouchableWrapper.OnTouchListener onTouchListener){
  mTouchView.setTouchListener(onTouchListener);
}
Program: 34275
Project: 34275
Buggy source:
public void loadConfig(){
  File conffile=new File(SkinsRestorer.getInstance().getDataFolder(),"String_Node_Str");
  FileConfiguration conf=YamlConfiguration.loadConfiguration(conffile);
  ServerVersion version=ServerVersion.valueOf(conf.getString("String_Node_Str",serverversion.toString()));
  debug=conf.getBoolean("String_Node_Str",debug);
  if (version != null) {
    serverversion=version;
  }
  conf=new YamlConfiguration();
  conf.set("String_Node_Str",serverversion.toString());
  conf.set("String_Node_Str",allPossibleVersions);
  conf.set("String_Node_Str",debug);
  try {
    conf.save(conffile);
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void loadConfig(){
  File conffile=new File(SkinsRestorer.getInstance().getDataFolder(),"String_Node_Str");
  FileConfiguration conf=YamlConfiguration.loadConfiguration(conffile);
  ServerVersion version=ServerVersion.valueOf(conf.getString("String_Node_Str",serverversion.toString()));
  if (version != null) {
    serverversion=version;
  }
  conf=new YamlConfiguration();
  conf.set("String_Node_Str",serverversion.toString());
  conf.set("String_Node_Str",allPossibleVersions);
  try {
    conf.save(conffile);
  }
 catch (  IOException e) {
  }
}
Program: 34276
Project: 34276
Buggy source:
@Override public void onPacketSending(PacketEvent event){
  StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
  GameProfile profile=profiles.read(0);
  String name=profile.getName();
  SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
  if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
    SkinsRestorer.getInstance().logDebug("String_Node_Str" + name);
    SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
    profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
  }
}

Fixed version (ground truth):
@Override public void onPacketSending(PacketEvent event){
  StructureModifier<GameProfile> profiles=event.getPacket().getSpecificModifier(GameProfile.class);
  GameProfile profile=profiles.read(0);
  String name=profile.getName();
  if (SkinsRestorer.getInstance().getSkinStorage().hasLoadedSkinData(name)) {
    SkinProfile skinprofile=SkinsRestorer.getInstance().getSkinStorage().getLoadedSkinData(name);
    profiles.write(0,ProfileUtils.recreateProfile(profile,skinprofile));
  }
}