nus-yam/ex-repair huggingface dataset:
Program: 117558
Project: 117558
Buggy source:
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case CHAMPION_MASTERY_SCORE_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getSummonerId() != 0L) {
    builder.put("String_Node_Str",coreData.getSummonerId());
  }
if (coreData.getPlatform() != null) {
  builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
}
coreData=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.championmastery.ChampionMasteryScore.class,builder.build());
break;
default :
break;
}
}

Fixed version (ground truth):
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case CHAMPION_MASTERY_SCORE_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getSummonerId() != 0L) {
    builder.put("String_Node_Str",coreData.getSummonerId());
  }
if (coreData.getPlatform() != null) {
  builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
}
final com.merakianalytics.orianna.types.data.championmastery.ChampionMasteryScore data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.championmastery.ChampionMasteryScore.class,builder.build());
if (data != null) {
coreData=data;
}
break;
default :
break;
}
}
Program: 117559
Project: 117559
Buggy source:
public int getScore(){
  load(CHAMPION_MASTERY_SCORE_LOAD_GROUP);
  return coreData.getScore();
}

Fixed version (ground truth):
public int getScore(){
  if (coreData.getScore() == 0) {
    load(CHAMPION_MASTERY_SCORE_LOAD_GROUP);
  }
  return coreData.getScore();
}
Program: 117560
Project: 117560
Buggy source:
@Searchable({String.class}) public String getName(){
  load(LIST_PROXY_LOAD_GROUP);
  return coreData.getName();
}

Fixed version (ground truth):
@Searchable({String.class}) public String getName(){
  if (coreData.getName() == null) {
    load(LIST_PROXY_LOAD_GROUP);
  }
  return coreData.getName();
}
Program: 117561
Project: 117561
Buggy source:
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case LIST_PROXY_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getId() != null) {
  builder.put("String_Node_Str",coreData.getId());
}
if (coreData.getTier() != null) {
builder.put("String_Node_Str",Tier.valueOf(coreData.getTier()));
}
if (coreData.getQueue() != null) {
builder.put("String_Node_Str",Queue.valueOf(coreData.getQueue()));
}
coreData=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.league.League.class,builder.build());
loadListProxyData(new Function<com.merakianalytics.orianna.types.data.league.LeagueEntry,LeagueEntry>(){
@Override public LeagueEntry apply(final com.merakianalytics.orianna.types.data.league.LeagueEntry data){
return new LeagueEntry(data);
}
}
);
break;
default :
break;
}
}

Fixed version (ground truth):
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case LIST_PROXY_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getId() != null) {
  builder.put("String_Node_Str",coreData.getId());
}
if (coreData.getTier() != null) {
builder.put("String_Node_Str",Tier.valueOf(coreData.getTier()));
}
if (coreData.getQueue() != null) {
builder.put("String_Node_Str",Queue.valueOf(coreData.getQueue()));
}
final com.merakianalytics.orianna.types.data.league.League data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.league.League.class,builder.build());
if (data != null) {
coreData=data;
}
loadListProxyData(new Function<com.merakianalytics.orianna.types.data.league.LeagueEntry,LeagueEntry>(){
@Override public LeagueEntry apply(final com.merakianalytics.orianna.types.data.league.LeagueEntry data){
return new LeagueEntry(data);
}
}
);
break;
default :
break;
}
}
Program: 117562
Project: 117562
Buggy source:
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case LIST_PROXY_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getSummonerId() != 0L) {
  builder.put("String_Node_Str",coreData.getSummonerId());
}
coreData=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.league.LeaguePositions.class,builder.build());
loadListProxyData(new Function<com.merakianalytics.orianna.types.data.league.LeaguePosition,LeaguePosition>(){
@Override public LeaguePosition apply(final com.merakianalytics.orianna.types.data.league.LeaguePosition data){
return new LeaguePosition(data);
}
}
);
break;
default :
break;
}
}

Fixed version (ground truth):
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case LIST_PROXY_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getSummonerId() != 0L) {
  builder.put("String_Node_Str",coreData.getSummonerId());
}
final com.merakianalytics.orianna.types.data.league.LeaguePositions data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.league.LeaguePositions.class,builder.build());
if (data != null) {
coreData=data;
}
loadListProxyData(new Function<com.merakianalytics.orianna.types.data.league.LeaguePosition,LeaguePosition>(){
@Override public LeaguePosition apply(final com.merakianalytics.orianna.types.data.league.LeaguePosition data){
return new LeaguePosition(data);
}
}
);
break;
default :
break;
}
}
Program: 117563
Project: 117563
Buggy source:
public Duration getDuration(){
  load(MATCH_LOAD_GROUP);
  return coreData.getDuration();
}

Fixed version (ground truth):
public Duration getDuration(){
  if (coreData.getDuration() == null) {
    load(MATCH_LOAD_GROUP);
  }
  return coreData.getDuration();
}
Program: 117564
Project: 117564
Buggy source:
public GameMode getMode(){
  load(MATCH_LOAD_GROUP);
  return GameMode.valueOf(coreData.getMode());
}

Fixed version (ground truth):
public GameMode getMode(){
  if (coreData.getMode() == null) {
    load(MATCH_LOAD_GROUP);
  }
  return GameMode.valueOf(coreData.getMode());
}
Program: 117565
Project: 117565
Buggy source:
public Map getMap(){
  load(MATCH_LOAD_GROUP);
  return Map.withId(coreData.getMap());
}

Fixed version (ground truth):
public Map getMap(){
  if (coreData.getMap() == 0) {
    load(MATCH_LOAD_GROUP);
  }
  return Map.withId(coreData.getMap());
}
Program: 117566
Project: 117566
Buggy source:
public GameType getType(){
  load(MATCH_LOAD_GROUP);
  return GameType.valueOf(coreData.getType());
}

Fixed version (ground truth):
public GameType getType(){
  if (coreData.getType() == null) {
    load(MATCH_LOAD_GROUP);
  }
  return GameType.valueOf(coreData.getType());
}
Program: 117567
Project: 117567
Buggy source:
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case MATCH_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getId() != 0L) {
  builder.put("String_Node_Str",coreData.getId());
}
if (coreData.getTournamentCode() != null) {
builder.put("String_Node_Str",coreData.getTournamentCode());
}
if (!fromReference) {
coreData=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.match.Match.class,builder.build());
}
 else {
final com.merakianalytics.orianna.types.data.match.Match data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.match.Match.class,builder.build());
final com.merakianalytics.orianna.types.data.match.Participant fromReference=coreData.getParticipants().get(0);
final Iterator<com.merakianalytics.orianna.types.data.match.Participant> iterator=data.getParticipants().iterator();
while (iterator.hasNext()) {
final com.merakianalytics.orianna.types.data.match.Participant participant=iterator.next();
if (participant.getCurrentAccountId() == fromReference.getCurrentAccountId()) {
  replaceData(participant,fromReference);
  iterator.remove();
  break;
}
}
data.getParticipants().add(0,fromReference);
coreData=data;
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override protected void loadCoreData(final String group){
  ImmutableMap.Builder<String,Object> builder;
switch (group) {
case MATCH_LOAD_GROUP:
    builder=ImmutableMap.builder();
  if (coreData.getPlatform() != null) {
    builder.put("String_Node_Str",Platform.withTag(coreData.getPlatform()));
  }
if (coreData.getId() != 0L) {
  builder.put("String_Node_Str",coreData.getId());
}
if (coreData.getTournamentCode() != null) {
builder.put("String_Node_Str",coreData.getTournamentCode());
}
if (!fromReference) {
final com.merakianalytics.orianna.types.data.match.Match data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.match.Match.class,builder.build());
if (data != null) {
coreData=data;
}
}
 else {
final com.merakianalytics.orianna.types.data.match.Match data=Orianna.getSettings().getPipeline().get(com.merakianalytics.orianna.types.data.match.Match.class,builder.build());
if (data != null) {
final com.merakianalytics.orianna.types.data.match.Participant fromReference=coreData.getParticipants().get(0);
final Iterator<com.merakianalytics.orianna.types.data.match.Participant> iterator=data.getParticipants().iterator();
while (iterator.hasNext()) {
  final com.merakianalytics.orianna.types.data.match.Participant participant=iterator.next();
  if (participant.getCurrentAccountId() == fromReference.getCurrentAccountId()) {
    replaceData(participant,fromReference);
    iterator.remove();
    break;
  }
}
data.getParticipants().add(0,fromReference);
coreData=data;
}
}
break;
default :
break;
}
}
Program: 117568
Project: 117568
Buggy source:
public String getVersion(){
  load(MATCH_LOAD_GROUP);
  return coreData.getVersion();
}

Fixed version (ground truth):
public String getVersion(){
  if (coreData.getVersion() == null) {
    load(MATCH_LOAD_GROUP);
  }
  return coreData.getVersion();
}
Program: 117569
Project: 117569
Buggy source:
@Override public void call(final Runnable runnable,final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!acquire(timeout,unit)) {
    throw new TimeoutException("String_Node_Str",TimeoutException.Type.RATE_LIMITER);
  }
  permitsIssued.incrementAndGet();
  try {
    runnable.run();
  }
  finally {
    release();
  }
}

Fixed version (ground truth):
@Override public void call(final Runnable runnable,final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!acquire(timeout,unit)) {
    throw new TimeoutException("String_Node_Str",TimeoutException.Type.RATE_LIMITER);
  }
  try {
    runnable.run();
  }
  finally {
    release();
  }
}
Program: 117570
Project: 117570
Buggy source:
@Override public ReservedPermit reserve(final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!permitter.tryAcquire(timeout,unit)) {
    return null;
  }
synchronized (currentlyProcessingLock) {
    currentlyProcessing+=1;
  }
  return new ReservedPermit(){
    @Override public void acquire(){
      if (drainer == null) {
synchronized (resetterLock) {
          if (drainer == null) {
            drainer=new Drainer();
            timer.schedule(drainer,epochUnit.toMillis(epoch));
          }
        }
      }
    }
    @Override public void cancel(){
synchronized (currentlyProcessingLock) {
        currentlyProcessing-=1;
        permitter.release();
      }
    }
  }
;
}

Fixed version (ground truth):
@Override public ReservedPermit reserve(final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!permitter.tryAcquire(timeout,unit)) {
    return null;
  }
  permitsIssued.decrementAndGet();
synchronized (currentlyProcessingLock) {
    currentlyProcessing+=1;
  }
  return new ReservedPermit(){
    @Override public void acquire(){
      permitsIssued.incrementAndGet();
      if (drainer == null) {
synchronized (resetterLock) {
          if (drainer == null) {
            drainer=new Drainer();
            timer.schedule(drainer,epochUnit.toMillis(epoch));
          }
        }
      }
    }
    @Override public void cancel(){
synchronized (currentlyProcessingLock) {
        currentlyProcessing-=1;
        permitter.release();
      }
    }
  }
;
}
Program: 117571
Project: 117571
Buggy source:
@Override public void acquire(){
  if (drainer == null) {
synchronized (resetterLock) {
      if (drainer == null) {
        drainer=new Drainer();
        timer.schedule(drainer,epochUnit.toMillis(epoch));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void acquire(){
  permitsIssued.incrementAndGet();
  if (drainer == null) {
synchronized (resetterLock) {
      if (drainer == null) {
        drainer=new Drainer();
        timer.schedule(drainer,epochUnit.toMillis(epoch));
      }
    }
  }
}
Program: 117572
Project: 117572
Buggy source:
@Override public void call(final Runnable runnable,final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!acquire(timeout,unit)) {
    throw new TimeoutException("String_Node_Str",TimeoutException.Type.RATE_LIMITER);
  }
  permitsIssued.incrementAndGet();
  try {
    runnable.run();
  }
  finally {
    release();
  }
}

Fixed version (ground truth):
@Override public void call(final Runnable runnable,final long timeout,final TimeUnit unit) throws InterruptedException {
  if (!acquire(timeout,unit)) {
    throw new TimeoutException("String_Node_Str",TimeoutException.Type.RATE_LIMITER);
  }
  try {
    runnable.run();
  }
  finally {
    release();
  }
}
Program: 117573
Project: 117573
Buggy source:
@Override public boolean acquire(final long timeout,final TimeUnit unit) throws InterruptedException {
  final long deadline=System.currentTimeMillis() + unit.toMillis(timeout);
  final Set<ReservedPermit> reservations=new HashSet<>();
  for (  final RateLimiter limiter : limiters.values()) {
    final long left=deadline - System.currentTimeMillis();
    try {
      final ReservedPermit reservation=limiter.reserve(left,TimeUnit.MILLISECONDS);
      if (reservation == null) {
        for (        final ReservedPermit permit : reservations) {
          permit.cancel();
        }
        return false;
      }
 else {
        reservations.add(reservation);
      }
    }
 catch (    final InterruptedException e) {
      for (      final ReservedPermit permit : reservations) {
        permit.cancel();
      }
      throw e;
    }
  }
  for (  final ReservedPermit permit : reservations) {
    permit.acquire();
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean acquire(final long timeout,final TimeUnit unit) throws InterruptedException {
  if (timeout <= 0L) {
    acquire();
    return true;
  }
  final long deadline=System.currentTimeMillis() + unit.toMillis(timeout);
  final Set<ReservedPermit> reservations=new HashSet<>();
  for (  final RateLimiter limiter : limiters.values()) {
    final long left=deadline - System.currentTimeMillis();
    try {
      final ReservedPermit reservation=limiter.reserve(left,TimeUnit.MILLISECONDS);
      if (reservation == null) {
        for (        final ReservedPermit permit : reservations) {
          permit.cancel();
        }
        return false;
      }
 else {
        reservations.add(reservation);
      }
    }
 catch (    final InterruptedException e) {
      for (      final ReservedPermit permit : reservations) {
        permit.cancel();
      }
      throw e;
    }
  }
  for (  final ReservedPermit permit : reservations) {
    permit.acquire();
  }
  permitsIssued.incrementAndGet();
  return true;
}
Program: 117574
Project: 117574
Buggy source:
private MultiRateLimiter newRateLimiter(final List<Long> epochsInSeconds,final List<Integer> limits,final long windowLowerBound,final long windowUpperBound){
  final Map<String,AbstractRateLimiter> limiters=new HashMap<>();
  for (int i=0; i < epochsInSeconds.size(); i++) {
    try {
      final AbstractRateLimiter limiter=limitingType.getLimiterClass().getConstructor(int.class,long.class,TimeUnit.class).newInstance(limits.get(i),epochsInSeconds.get(i),TimeUnit.SECONDS);
      final long windowLockoutIn=Math.max(0,TimeUnit.SECONDS.toMillis(epochsInSeconds.get(i)) + windowLowerBound - System.currentTimeMillis());
      limiter.restrict(windowLockoutIn,TimeUnit.MILLISECONDS,windowUpperBound - windowLowerBound,TimeUnit.MILLISECONDS);
      limiter.acquire();
      limiter.release();
      limiters.put(epochsInSeconds.get(i).toString(),limiter);
    }
 catch (    InstantiationException|IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException|InterruptedException e) {
      LOGGER.error("String_Node_Str" + limitingType + "String_Node_Str",e);
      throw new OriannaException("String_Node_Str" + limitingType + "String_Node_Str",e);
    }
  }
  return new MultiRateLimiter(limiters);
}

Fixed version (ground truth):
private MultiRateLimiter newRateLimiter(final List<Long> epochsInSeconds,final List<Integer> limits,final long windowLowerBound,final long windowUpperBound){
  final Map<String,AbstractRateLimiter> limiters=new HashMap<>();
  for (int i=0; i < epochsInSeconds.size(); i++) {
    try {
      final AbstractRateLimiter limiter=limitingType.getLimiterClass().getConstructor(int.class,long.class,TimeUnit.class).newInstance(limits.get(i),epochsInSeconds.get(i),TimeUnit.SECONDS);
      final long windowLockoutIn=Math.max(0,TimeUnit.SECONDS.toMillis(epochsInSeconds.get(i)) + windowLowerBound - System.currentTimeMillis());
      limiter.restrict(windowLockoutIn,TimeUnit.MILLISECONDS,windowUpperBound - windowLowerBound,TimeUnit.MILLISECONDS);
      limiters.put(epochsInSeconds.get(i).toString(),limiter);
    }
 catch (    InstantiationException|IllegalAccessException|IllegalArgumentException|InvocationTargetException|NoSuchMethodException|SecurityException e) {
      LOGGER.error("String_Node_Str" + limitingType + "String_Node_Str",e);
      throw new OriannaException("String_Node_Str" + limitingType + "String_Node_Str",e);
    }
  }
  return new MultiRateLimiter(limiters);
}
Program: 117577
Project: 117577
Buggy source:
public static int forCurrentGameInfoDto(final CurrentGameInfo game){
  return Arrays.hashCode(new Object[]{CurrentGameInfo.class.getCanonicalName(),game.getPlatformId(),game.getGameId()});
}

Fixed version (ground truth):
public static int forCurrentGameInfoDto(final CurrentGameInfo game){
  return Arrays.hashCode(new Object[]{CurrentGameInfo.class.getCanonicalName(),game.getPlatformId(),game.getSummonerId()});
}
Program: 117578
Project: 117578
Buggy source:
@SuppressWarnings("String_Node_Str") public static int forChampionListDtoQuery(final java.util.Map<String,Object> query){
  return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),((Platform)query.get("String_Node_Str")).getTag(),(String)query.get("String_Node_Str"),(String)query.get("String_Node_Str"),(Set<String>)query.get("String_Node_Str")});
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static int forChampionListDtoQuery(final java.util.Map<String,Object> query){
  return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),((Platform)query.get("String_Node_Str")).getTag(),(String)query.get("String_Node_Str"),(String)query.get("String_Node_Str"),(Set<String>)query.get("String_Node_Str"),(Boolean)query.get("String_Node_Str")});
}
Program: 117579
Project: 117579
Buggy source:
public static int forChampionListDto(final ChampionList champions){
  return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),champions.getPlatform(),champions.getVersion(),champions.getLocale(),champions.getIncludedData()});
}

Fixed version (ground truth):
public static int forChampionListDto(final ChampionList champions){
  return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),champions.getPlatform(),champions.getVersion(),champions.getLocale(),champions.getIncludedData(),champions.isDataById()});
}
Program: 117580
Project: 117580
Buggy source:
@SuppressWarnings("String_Node_Str") public static Iterator<Integer> forManyChampionListDtoQuery(final java.util.Map<String,Object> query){
  final Iterable<String> versions=(Iterable<String>)query.get("String_Node_Str");
  final Iterator<String> iterator=versions.iterator();
  return new Iterator<Integer>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public Integer next(){
      return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),((Platform)query.get("String_Node_Str")).getTag(),iterator.next(),(String)query.get("String_Node_Str"),(Set<String>)query.get("String_Node_Str")});
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static Iterator<Integer> forManyChampionListDtoQuery(final java.util.Map<String,Object> query){
  final Iterable<String> versions=(Iterable<String>)query.get("String_Node_Str");
  final Iterator<String> iterator=versions.iterator();
  return new Iterator<Integer>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public Integer next(){
      return Arrays.hashCode(new Object[]{ChampionList.class.getCanonicalName(),((Platform)query.get("String_Node_Str")).getTag(),iterator.next(),(String)query.get("String_Node_Str"),(Set<String>)query.get("String_Node_Str"),(Boolean)query.get("String_Node_Str")});
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
;
}
Program: 117581
Project: 117581
Buggy source:
/** 
 * @param defaultPlatform the defaultPlatform to set
 */
public void setDefaultPlatform(final Platform defaultPlatform){
  this.defaultPlatform=defaultPlatform;
}

Fixed version (ground truth):
/** 
 * Sets the default platform. If this is not set or is set to null, platforms must be provided for all API queries.
 * @param defaultPlatform
 */
public static void setDefaultPlatform(final Platform defaultPlatform){
  settings.setDefaultPlatform(defaultPlatform);
}
Program: 117582
Project: 117582
Buggy source:
private Settings(final Configuration config){
  pipeline=PipelineConfiguration.toPipeline(config.getPipeline());
  defaultPlatform=config.getDefaultPlatform();
  defaultLocale=config.getDefaultLocale();
  final Supplier<String> supplier=new Supplier<String>(){
    @Override public String get(){
      return pipeline.get(com.merakianalytics.orianna.types.dto.staticdata.Realm.class,ImmutableMap.<String,Object>of("String_Node_Str",defaultPlatform)).getV();
    }
  }
;
  final ExpirationPeriod period=config.getCurrentVersionExpiration();
  if (period.getPeriod() == 0) {
    currentVersion=supplier;
  }
 else   if (period.getPeriod() < 0) {
    currentVersion=Suppliers.memoize(supplier);
  }
 else {
    currentVersion=Suppliers.memoizeWithExpiration(supplier,period.getPeriod(),period.getUnit());
  }
}

Fixed version (ground truth):
private Settings(final Configuration config){
  pipeline=newPipelineSupplier();
  configuration=config;
  currentVersion=newVersionSupplier();
}
Program: 117583
Project: 117583
Buggy source:
@Override public String get(){
  return pipeline.get(com.merakianalytics.orianna.types.dto.staticdata.Realm.class,ImmutableMap.<String,Object>of("String_Node_Str",defaultPlatform)).getV();
}

Fixed version (ground truth):
@Override public String get(){
  return pipeline.get().get(com.merakianalytics.orianna.types.dto.staticdata.Realm.class,ImmutableMap.<String,Object>of("String_Node_Str",getDefaultPlatform())).getV();
}
Program: 117584
Project: 117584
Buggy source:
/** 
 * @return the defaultLocale
 */
public String getDefaultLocale(){
  return defaultLocale;
}

Fixed version (ground truth):
/** 
 * @return the defaultLocale
 */
public String getDefaultLocale(){
  return configuration.getDefaultLocale();
}
Program: 117585
Project: 117585
Buggy source:
/** 
 * @return the defaultPlatform
 */
public Platform getDefaultPlatform(){
  return defaultPlatform;
}

Fixed version (ground truth):
/** 
 * @return the defaultPlatform
 */
public Platform getDefaultPlatform(){
  if (configuration.getDefaultPlatform() == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return configuration.getDefaultPlatform();
}
Program: 117586
Project: 117586
Buggy source:
/** 
 * @return the pipeline
 */
public DataPipeline getPipeline(){
  return pipeline;
}

Fixed version (ground truth):
/** 
 * @return the pipeline
 */
public DataPipeline getPipeline(){
  return pipeline.get();
}
Program: 117587
Project: 117587
Buggy source:
/** 
 * @param defaultLocale the defaultLocale to set
 */
public void setDefaultLocale(final String defaultLocale){
  this.defaultLocale=defaultLocale;
}

Fixed version (ground truth):
/** 
 * Sets the default locale. The default locale will be used for locale-aware information from the Static Data API like champion names and descriptions. The default locale starts null, and if it is set to null the default locale for the region/platform the data is from will be used.
 * @param defaultLocale the default locale
 */
public static void setDefaultLocale(final String defaultLocale){
  settings.setDefaultLocale(defaultLocale);
}
Program: 117588
Project: 117588
Buggy source:
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + (APIKey == null ? 0 : APIKey.hashCode());
  result=prime * result + (http404Strategy == null ? 0 : http404Strategy.hashCode());
  result=prime * result + (http429Strategy == null ? 0 : http429Strategy.hashCode());
  result=prime * result + (http500Strategy == null ? 0 : http500Strategy.hashCode());
  result=prime * result + (http503Strategy == null ? 0 : http503Strategy.hashCode());
  result=prime * result + (httpTimeoutStrategy == null ? 0 : httpTimeoutStrategy.hashCode());
  long temp;
  temp=Double.doubleToLongBits(limitingShare);
  result=prime * result + (int)(temp ^ temp >>> 32);
  result=prime * result + (limitingType == null ? 0 : limitingType.hashCode());
  result=prime * result + (rateLimiterTimeoutStrategy == null ? 0 : rateLimiterTimeoutStrategy.hashCode());
  result=prime * result + (requests == null ? 0 : requests.hashCode());
  result=prime * result + (services == null ? 0 : services.hashCode());
  return result;
}

Fixed version (ground truth):
@Override public int hashCode(){
  final int prime=31;
  int result=1;
  result=prime * result + (apiKey == null ? 0 : apiKey.hashCode());
  result=prime * result + (http404Strategy == null ? 0 : http404Strategy.hashCode());
  result=prime * result + (http429Strategy == null ? 0 : http429Strategy.hashCode());
  result=prime * result + (http500Strategy == null ? 0 : http500Strategy.hashCode());
  result=prime * result + (http503Strategy == null ? 0 : http503Strategy.hashCode());
  result=prime * result + (httpTimeoutStrategy == null ? 0 : httpTimeoutStrategy.hashCode());
  long temp;
  temp=Double.doubleToLongBits(limitingShare);
  result=prime * result + (int)(temp ^ temp >>> 32);
  result=prime * result + (limitingType == null ? 0 : limitingType.hashCode());
  result=prime * result + (rateLimiterTimeoutStrategy == null ? 0 : rateLimiterTimeoutStrategy.hashCode());
  result=prime * result + (requests == null ? 0 : requests.hashCode());
  result=prime * result + (services == null ? 0 : services.hashCode());
  return result;
}
Program: 117590
Project: 117590
Buggy source:
private static Map<String,String> getDefaultHeaders(final Configuration config){
  return ImmutableMap.of("String_Node_Str",config.getAPIKey());
}

Fixed version (ground truth):
private static Map<String,String> getDefaultHeaders(final Configuration config){
  if (config.getApiKey() != null) {
    return ImmutableMap.of("String_Node_Str",config.getApiKey());
  }
  return ImmutableMap.of();
}
Program: 117593
Project: 117593
Buggy source:
@Override public SummonerSpell next(){
  final com.merakianalytics.orianna.types.data.staticdata.SummonerSpell data=new com.merakianalytics.orianna.types.data.staticdata.SummonerSpell();
  data.setPlatform(platform.getTag());
  data.setVersion(version);
  data.setLocale(locale);
  data.setIncludedData(includedData);
  if (ids != null) {
    data.setId((Integer)iterator.next());
  }
 else   if (names != null) {
    data.setName((String)iterator.next());
  }
 else {
    return null;
  }
  return new SummonerSpell(data);
}

Fixed version (ground truth):
@Override public VerificationString next(){
  final com.merakianalytics.orianna.types.data.thirdpartycode.VerificationString data=new com.merakianalytics.orianna.types.data.thirdpartycode.VerificationString();
  data.setPlatform(platform.getTag());
  data.setSummonerId(iterator.next().longValue());
  return new VerificationString(data);
}
Program: 117594
Project: 117594
Buggy source:
private Settings(final Configuration config){
  pipeline=PipelineConfiguration.toPipeline(config.getPipeline());
  defaultPlatform=config.getDefaultPlatform();
  defaultLocale=config.getDefaultLocale();
  currentVersion=Suppliers.memoizeWithExpiration(new Supplier<String>(){
    @Override public String get(){
      return pipeline.get(com.merakianalytics.orianna.types.dto.staticdata.Realm.class,ImmutableMap.<String,Object>of("String_Node_Str",defaultPlatform)).getV();
    }
  }
,config.getCurrentVersionExpiration().getPeriod(),config.getCurrentVersionExpiration().getUnit());
}

Fixed version (ground truth):
private Settings(final Configuration config){
  pipeline=PipelineConfiguration.toPipeline(config.getPipeline());
  defaultPlatform=config.getDefaultPlatform();
  defaultLocale=config.getDefaultLocale();
  final Supplier<String> supplier=new Supplier<String>(){
    @Override public String get(){
      return pipeline.get(com.merakianalytics.orianna.types.dto.staticdata.Realm.class,ImmutableMap.<String,Object>of("String_Node_Str",defaultPlatform)).getV();
    }
  }
;
  final ExpirationPeriod period=config.getCurrentVersionExpiration();
  if (period.getPeriod() == 0) {
    currentVersion=supplier;
  }
 else   if (period.getPeriod() < 0) {
    currentVersion=Suppliers.memoize(supplier);
  }
 else {
    currentVersion=Suppliers.memoizeWithExpiration(supplier,period.getPeriod(),period.getUnit());
  }
}
Program: 117599
Project: 117599
Buggy source:
@Override public long calculateExpiryTime(final Integer key,final Object value,final long loadTime,final CacheEntry<Integer,Object> oldEntry){
  return loadTime + expirationPeriods.get(value.getClass()).longValue();
}

Fixed version (ground truth):
@Override public long calculateExpiryTime(final Integer key,final Object value,final long loadTime,final CacheEntry<Integer,Object> oldEntry){
  final Long period=expirationPeriods.get(value.getClass());
  if (period != null && period > 0L) {
    return loadTime + period.longValue();
  }
  return ExpiryTimeValues.ETERNAL;
}
Program: 117600
Project: 117600
Buggy source:
@Get(MatchTimeline.class) public MatchTimeline getMatchTimeline(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  final Number matchId=(Number)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str",matchId,"String_Node_Str");
  final String endpoint="String_Node_Str" + matchId;
  final MatchTimeline data=get(MatchTimeline.class,endpoint,platform,"String_Node_Str");
  data.setPlatform(platform.getTag());
  data.setMatchId(matchId.longValue());
  return data;
}

Fixed version (ground truth):
@Get(MatchTimeline.class) public MatchTimeline getMatchTimeline(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  final Number id=(Number)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str",id,"String_Node_Str");
  final String endpoint="String_Node_Str" + id;
  final MatchTimeline data=get(MatchTimeline.class,endpoint,platform,"String_Node_Str");
  data.setPlatform(platform.getTag());
  data.setMatchId(id.longValue());
  return data;
}
Program: 117602
Project: 117602
Buggy source:
@Get(LeagueList.class) public LeagueList getLeagueList(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final Tier tier=(Tier)query.get("String_Node_Str");
  final Queue queue=(Queue)query.get("String_Node_Str");
  final String leagueId=(String)query.get("String_Node_Str");
  if (leagueId == null && (tier == null || queue == null)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (leagueId == null && !LEAGUE_LIST_ENDPOINTS.containsKey(tier)) {
    return null;
  }
  if (leagueId == null && !Queue.RANKED.contains(queue)) {
    return null;
  }
  LeagueList data;
  if (leagueId == null) {
    final String endpoint=LEAGUE_LIST_ENDPOINTS.get(tier) + queue;
    data=get(LeagueList.class,endpoint,platform,LEAGUE_LIST_ENDPOINTS.get(tier) + "String_Node_Str");
  }
 else {
    final String endpoint="String_Node_Str" + leagueId;
    data=get(LeagueList.class,endpoint,platform,"String_Node_Str");
  }
  data.setPlatform(platform.getTag());
  return data;
}

Fixed version (ground truth):
@Get(LeagueList.class) public LeagueList getLeagueList(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final Tier tier=(Tier)query.get("String_Node_Str");
  final Queue queue=(Queue)query.get("String_Node_Str");
  final String leagueId=(String)query.get("String_Node_Str");
  if (leagueId == null) {
    if (tier == null || queue == null) {
      throw new IllegalArgumentException("String_Node_Str");
    }
 else     if (!LEAGUE_LIST_ENDPOINTS.containsKey(tier) || !Queue.RANKED.contains(queue)) {
      return null;
    }
  }
  LeagueList data;
  if (leagueId == null) {
    final String endpoint=LEAGUE_LIST_ENDPOINTS.get(tier) + queue;
    data=get(LeagueList.class,endpoint,platform,LEAGUE_LIST_ENDPOINTS.get(tier) + "String_Node_Str");
  }
 else {
    final String endpoint="String_Node_Str" + leagueId;
    data=get(LeagueList.class,endpoint,platform,"String_Node_Str");
  }
  data.setPlatform(platform.getTag());
  return data;
}
Program: 117603
Project: 117603
Buggy source:
@Override public Versions next(){
  final Platform platform=iterator.next();
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str",null,null);
  final Versions data=DataObject.fromJSON(Versions.class,content);
  data.setPlatform(platform.getTag());
  return data;
}

Fixed version (ground truth):
@Override public Versions next(){
  final Platform platform=iterator.next();
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str",null,null);
  final Versions data=DataObject.fromJSON(Versions.class,content);
  if (data == null) {
    return null;
  }
  data.setPlatform(platform.getTag());
  return data;
}
Program: 117607
Project: 117607
Buggy source:
@SuppressWarnings("String_Node_Str") @GetMany(Realm.class) public CloseableIterator<Realm> getManyRealm(final Map<String,Object> query,final PipelineContext context){
  final Iterable<Platform> platforms=(Iterable<Platform>)query.get("String_Node_Str");
  Utilities.checkNotNull(platforms,"String_Node_Str");
  final Iterator<Platform> iterator=platforms.iterator();
  return CloseableIterators.from(new Iterator<Realm>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public Realm next(){
      final Platform platform=iterator.next();
      final String content=get("String_Node_Str" + platform.getRegion().getTag().toLowerCase(),null,null);
      final Realm data=DataObject.fromJSON(Realm.class,content);
      data.setPlatform(platform.getTag());
      return data;
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @GetMany(Realm.class) public CloseableIterator<Realm> getManyRealm(final Map<String,Object> query,final PipelineContext context){
  final Iterable<Platform> platforms=(Iterable<Platform>)query.get("String_Node_Str");
  Utilities.checkNotNull(platforms,"String_Node_Str");
  final Iterator<Platform> iterator=platforms.iterator();
  return CloseableIterators.from(new Iterator<Realm>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public Realm next(){
      final Platform platform=iterator.next();
      final String content=get("String_Node_Str" + platform.getRegion().getTag().toLowerCase(),null,null);
      final Realm data=DataObject.fromJSON(Realm.class,content);
      if (data == null) {
        return null;
      }
      data.setPlatform(platform.getTag());
      return data;
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
);
}
Program: 117608
Project: 117608
Buggy source:
@Get(Languages.class) public Languages getLanguages(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str",null,null);
  final Languages data=DataObject.fromJSON(Languages.class,content);
  data.setPlatform(platform.getTag());
  return data;
}

Fixed version (ground truth):
@Get(Languages.class) public Languages getLanguages(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str",null,null);
  final Languages data=DataObject.fromJSON(Languages.class,content);
  if (data == null) {
    return null;
  }
  data.setPlatform(platform.getTag());
  return data;
}
Program: 117611
Project: 117611
Buggy source:
@SuppressWarnings("String_Node_Str") @GetMany(ProfileIconData.class) public CloseableIterator<ProfileIconData> getManyProfileIconData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  final Iterable<String> versions=(Iterable<String>)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str",versions,"String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final Iterator<String> iterator=versions.iterator();
  return CloseableIterators.from(new Iterator<ProfileIconData>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public ProfileIconData next(){
      final String version=iterator.next();
      final String content=get("String_Node_Str",version,locale);
      final ProfileIconData data=DataObject.fromJSON(ProfileIconData.class,content);
      data.setPlatform(platform.getTag());
      data.setLocale(locale);
      for (      final ProfileIconDetails icon : data.getData().values()) {
        icon.setPlatform(platform.getTag());
        icon.setVersion(data.getVersion());
        icon.setLocale(locale);
      }
      return data;
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @GetMany(ProfileIconData.class) public CloseableIterator<ProfileIconData> getManyProfileIconData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  final Iterable<String> versions=(Iterable<String>)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str",versions,"String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final Iterator<String> iterator=versions.iterator();
  return CloseableIterators.from(new Iterator<ProfileIconData>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public ProfileIconData next(){
      final String version=iterator.next();
      final String content=get("String_Node_Str",version,locale);
      final ProfileIconData data=DataObject.fromJSON(ProfileIconData.class,content);
      if (data == null) {
        return null;
      }
      data.setPlatform(platform.getTag());
      data.setLocale(locale);
      for (      final ProfileIconDetails icon : data.getData().values()) {
        icon.setPlatform(platform.getTag());
        icon.setVersion(data.getVersion());
        icon.setLocale(locale);
      }
      return data;
    }
    @Override public void remove(){
      throw new UnsupportedOperationException();
    }
  }
);
}
Program: 117612
Project: 117612
Buggy source:
@Get(Realm.class) public Realm getRealm(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str" + platform.getRegion().getTag().toLowerCase(),null,null);
  final Realm data=DataObject.fromJSON(Realm.class,content);
  data.setPlatform(platform.getTag());
  return data;
}

Fixed version (ground truth):
@Get(Realm.class) public Realm getRealm(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String content=get("String_Node_Str" + platform.getRegion().getTag().toLowerCase(),null,null);
  final Realm data=DataObject.fromJSON(Realm.class,content);
  if (data == null) {
    return null;
  }
  data.setPlatform(platform.getTag());
  return data;
}
Program: 117614
Project: 117614
Buggy source:
@Get(ProfileIconData.class) public ProfileIconData getProfileIconData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String version=query.get("String_Node_Str") == null ? getCurrentVersion(platform,context) : (String)query.get("String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final String content=get("String_Node_Str",version,locale);
  final ProfileIconData data=DataObject.fromJSON(ProfileIconData.class,content);
  data.setPlatform(platform.getTag());
  data.setLocale(locale);
  for (  final ProfileIconDetails icon : data.getData().values()) {
    icon.setPlatform(platform.getTag());
    icon.setVersion(data.getVersion());
    icon.setLocale(locale);
  }
  return data;
}

Fixed version (ground truth):
@Get(ProfileIconData.class) public ProfileIconData getProfileIconData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String version=query.get("String_Node_Str") == null ? getCurrentVersion(platform,context) : (String)query.get("String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final String content=get("String_Node_Str",version,locale);
  final ProfileIconData data=DataObject.fromJSON(ProfileIconData.class,content);
  if (data == null) {
    return null;
  }
  data.setPlatform(platform.getTag());
  data.setLocale(locale);
  for (  final ProfileIconDetails icon : data.getData().values()) {
    icon.setPlatform(platform.getTag());
    icon.setVersion(data.getVersion());
    icon.setLocale(locale);
  }
  return data;
}
Program: 117617
Project: 117617
Buggy source:
@Get(MapData.class) public MapData getMapData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String version=query.get("String_Node_Str") == null ? getCurrentVersion(platform,context) : (String)query.get("String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final String content=get("String_Node_Str",version,locale);
  final MapData data=DataObject.fromJSON(MapData.class,content);
  data.setPlatform(platform.getTag());
  data.setLocale(locale);
  for (  final MapDetails map : data.getData().values()) {
    map.setPlatform(platform.getTag());
    map.setVersion(data.getVersion());
    map.setLocale(locale);
  }
  return data;
}

Fixed version (ground truth):
@Get(MapData.class) public MapData getMapData(final Map<String,Object> query,final PipelineContext context){
  final Platform platform=(Platform)query.get("String_Node_Str");
  Utilities.checkNotNull(platform,"String_Node_Str");
  final String version=query.get("String_Node_Str") == null ? getCurrentVersion(platform,context) : (String)query.get("String_Node_Str");
  final String locale=query.get("String_Node_Str") == null ? platform.getDefaultLocale() : (String)query.get("String_Node_Str");
  final String content=get("String_Node_Str",version,locale);
  final MapData data=DataObject.fromJSON(MapData.class,content);
  if (data == null) {
    return null;
  }
  data.setPlatform(platform.getTag());
  data.setLocale(locale);
  for (  final MapDetails map : data.getData().values()) {
    map.setPlatform(platform.getTag());
    map.setVersion(data.getVersion());
    map.setLocale(locale);
  }
  return data;
}