nus-yam/ex-repair huggingface dataset:
Program: 27710
Project: 27710
Buggy source:
/** 
 * Perform pre-flight checks on the mixin and target classes
 * @param targetClass
 * @param mixinClass
 */
protected void verifyClasses(ClassNode targetClass,ClassNode mixinClass){
  if (targetClass.superName == null || mixinClass.superName == null || !targetClass.superName.equals(mixinClass.superName)) {
    throw new InvalidMixinException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Perform pre-flight checks on the mixin and target classes
 * @param targetClass
 * @param mixin
 */
protected void verifyClasses(ClassNode targetClass,MixinData mixin){
  String superName=mixin.getClassNode().superName;
  if (targetClass.superName == null || superName == null || !targetClass.superName.equals(superName)) {
    throw new InvalidMixinException("String_Node_Str");
  }
}
Program: 27711
Project: 27711
Buggy source:
/** 
 * Mixin interfaces implemented by the mixin class onto the target class
 * @param targetClass
 * @param mixinClass
 */
private void applyMixinInterfaces(ClassNode targetClass,ClassNode mixinClass){
  for (  String interfaceName : mixinClass.interfaces) {
    if (!targetClass.interfaces.contains(interfaceName)) {
      targetClass.interfaces.add(interfaceName);
    }
  }
}

Fixed version (ground truth):
/** 
 * Mixin interfaces implemented by the mixin class onto the target class
 * @param targetClass
 * @param mixin
 */
private void applyMixinInterfaces(ClassNode targetClass,MixinData mixin){
  for (  String interfaceName : mixin.getClassNode().interfaces) {
    if (!targetClass.interfaces.contains(interfaceName)) {
      targetClass.interfaces.add(interfaceName);
    }
  }
}
Program: 27712
Project: 27712
Buggy source:
/** 
 * Mixin fields from mixin class into the target class. It is vital that this is done before mixinMethods because we need to compute renamed fields so that transformMethod can rename field references in the method body
 * @param targetClass
 * @param mixinClass
 */
private void applyMixinFields(ClassNode targetClass,ClassNode mixinClass){
  for (  FieldNode field : mixinClass.fields) {
    if (MixinTransformer.hasFlag(field,Opcodes.ACC_STATIC) && !MixinTransformer.hasFlag(field,Opcodes.ACC_PRIVATE)) {
      throw new InvalidMixinException(String.format("String_Node_Str",field.name));
    }
    FieldNode target=this.findTargetField(targetClass,field);
    if (target == null) {
      boolean isShadow=ASMHelper.getVisibleAnnotation(field,Shadow.class) != null;
      if (isShadow) {
        throw new InvalidMixinException(String.format("String_Node_Str",field.name));
      }
      targetClass.fields.add(field);
    }
 else {
      if (!target.desc.equals(field.desc)) {
        throw new InvalidMixinException(String.format("String_Node_Str",field.name));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Mixin fields from mixin class into the target class. It is vital that this is done before mixinMethods because we need to compute renamed fields so that transformMethod can rename field references in the method body
 * @param targetClass
 * @param mixin
 */
private void applyMixinFields(ClassNode targetClass,MixinData mixin){
  for (  FieldNode field : mixin.getClassNode().fields) {
    if (MixinTransformer.hasFlag(field,Opcodes.ACC_STATIC) && !MixinTransformer.hasFlag(field,Opcodes.ACC_PRIVATE)) {
      throw new InvalidMixinException(String.format("String_Node_Str",field.name));
    }
    FieldNode target=this.findTargetField(targetClass,field);
    if (target == null) {
      boolean isShadow=ASMHelper.getVisibleAnnotation(field,Shadow.class) != null;
      if (isShadow) {
        throw new InvalidMixinException(String.format("String_Node_Str",field.name));
      }
      targetClass.fields.add(field);
    }
 else {
      if (!target.desc.equals(field.desc)) {
        throw new InvalidMixinException(String.format("String_Node_Str",field.name));
      }
    }
  }
}
Program: 27714
Project: 27714
Buggy source:
/** 
 * Similar to   {@link #spawnEntity(Entity)} except where multiple entitiescan be attempted to be spawned.
 * @param entities The entities which spawned correctly, or empty if none
 * @return True if any of the entities were successfully spawned
 */
Collection<Entity> spawnEntities(Iterable<? extends Entity> entities);

Fixed version (ground truth):
/** 
 * Similar to   {@link #spawnEntity(Entity)} except where multiple entitiescan be attempted to be spawned.
 * @param entities The created entities you wish to spawn
 * @return The entities which spawned correctly, or empty if none
 */
Collection<Entity> spawnEntities(Iterable<? extends Entity> entities);
Program: 27715
Project: 27715
Buggy source:
/** 
 * Create a new   {@link CommandSpec} based on the data provided in thisbuilder.
 * @return the new spec
 */
public CommandSpec build(){
  if (this.childCommandMap == null || this.childCommandMap.isEmpty()) {
    checkNotNull(this.executor,"String_Node_Str");
  }
 else   if (this.executor == null) {
    arguments(this.args,registerInDispatcher(new ChildCommandElementExecutor(null,null,false)));
  }
 else {
    arguments(registerInDispatcher(new ChildCommandElementExecutor(this.executor,this.args,this.childCommandFallback)));
  }
  return new CommandSpec(this.args,this.executor,this.description,this.extendedDescription,this.permission,this.argumentParser);
}

Fixed version (ground truth):
/** 
 * Create a new   {@link CommandSpec} based on the data provided in thisbuilder.
 * @return the new spec
 */
public CommandSpec build(){
  if (this.childCommandMap == null || this.childCommandMap.isEmpty()) {
    checkNotNull(this.executor,"String_Node_Str");
  }
 else   if (this.executor == null) {
    ChildCommandElementExecutor childCommandElementExecutor=registerInDispatcher(new ChildCommandElementExecutor(null,null,false));
    if (this.args == DEFAULT_ARG) {
      arguments(childCommandElementExecutor);
    }
 else {
      arguments(this.args,childCommandElementExecutor);
    }
  }
 else {
    arguments(registerInDispatcher(new ChildCommandElementExecutor(this.executor,this.args,this.childCommandFallback)));
  }
  return new CommandSpec(this.args,this.executor,this.description,this.extendedDescription,this.permission,this.argumentParser);
}
Program: 27716
Project: 27716
Buggy source:
/** 
 * Create a new   {@link CommandSpec} based on the data provided in thisbuilder.
 * @return the new spec
 */
public CommandSpec build(){
  if (this.childCommandMap == null) {
    checkNotNull(this.executor,"String_Node_Str");
  }
 else {
    if (this.args == DEFAULT_ARG) {
      ChildCommandElementExecutor childDispatcher=registerInDispatcher(new ChildCommandElementExecutor(this.executor,null,false));
      arguments(this.executor == null ? childDispatcher : optional(childDispatcher));
    }
 else {
      if (this.executor == null) {
        arguments(this.args,registerInDispatcher(new ChildCommandElementExecutor(null,null,false)));
      }
 else {
        arguments(registerInDispatcher(new ChildCommandElementExecutor(this.executor,this.args,this.childCommandFallback)));
      }
    }
  }
  return new CommandSpec(this.args,this.executor,this.description,this.extendedDescription,this.permission,this.argumentParser);
}

Fixed version (ground truth):
/** 
 * Create a new   {@link CommandSpec} based on the data provided in thisbuilder.
 * @return the new spec
 */
public CommandSpec build(){
  if (this.childCommandMap == null) {
    checkNotNull(this.executor,"String_Node_Str");
  }
 else {
    if (this.args == DEFAULT_ARG) {
      CommandExecutor baseExecutor=this.executor;
      ChildCommandElementExecutor childDispatcher=registerInDispatcher(new ChildCommandElementExecutor(baseExecutor,null,false));
      arguments(baseExecutor == null ? childDispatcher : optional(childDispatcher));
    }
 else {
      if (this.executor == null) {
        arguments(this.args,registerInDispatcher(new ChildCommandElementExecutor(null,null,false)));
      }
 else {
        arguments(registerInDispatcher(new ChildCommandElementExecutor(this.executor,this.args,this.childCommandFallback)));
      }
    }
  }
  return new CommandSpec(this.args,this.executor,this.description,this.extendedDescription,this.permission,this.argumentParser);
}
Program: 27717
Project: 27717
Buggy source:
/** 
 * Gets the pitch used when playing sounds.
 * @return The pitch
 */
double getVolume();

Fixed version (ground truth):
/** 
 * Gets the volume used when playing sounds.
 * @return The volume
 */
double getVolume();
Program: 27718
Project: 27718
Buggy source:
/** 
 * Gets the volume used when playing sounds.
 * @return The volume
 */
double getPitch();

Fixed version (ground truth):
/** 
 * Gets the pitch used when playing sounds.
 * @return The pitch
 */
double getPitch();
Program: 27719
Project: 27719
Buggy source:
/** 
 * Removes the element at the specified position in this list (optional operation).  Shifts any subsequent elements to the left, subtracts one from their indices.
 * @param index The index of the element to remove
 * @return This value, for chaining
 */
ListValue<E> remove(int index);

Fixed version (ground truth):
/** 
 * Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left, subtracts one from their indices.
 * @param index The index of the element to remove
 * @return This value, for chaining
 */
ListValue<E> remove(int index);
Program: 27720
Project: 27720
Buggy source:
/** 
 * Return the next sibling inventory, allows traversing the inventory hierarchy without using an iterator. If no more children, returns an  {@link EmptyInventory}.
 * @param < T > expected inventory type, specified as generic to allow easypseudo-duck-typing
 * @return the next sibiling inventory, or an {@link EmptyInventory} ifthere are no further siblings
 */
<T extends Inventory>T next();

Fixed version (ground truth):
/** 
 * Return the next sibling inventory, allows traversing the inventory hierarchy without using an iterator. If no more siblings, returns an  {@link EmptyInventory}.
 * @param < T > expected inventory type, specified as generic to allow easypseudo-duck-typing
 * @return the next sibiling inventory, or an {@link EmptyInventory} ifthere are no further siblings
 */
<T extends Inventory>T next();
Program: 27721
Project: 27721
Buggy source:
/** 
 * Removes the   {@link Score} with the specified name from this objectie, if present.
 * @param name The name of the {@link Score} to remove.
 * @return Whether the score existed on this objective
 */
boolean removeScore(Text name);

Fixed version (ground truth):
/** 
 * Removes the   {@link Score} with the specified name from this objective, if present.
 * @param name The name of the {@link Score} to remove.
 * @return Whether the score existed on this objective
 */
boolean removeScore(Text name);
Program: 27722
Project: 27722
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public MatcherBuilder from(StateMatcher value){
  reset();
  type(value.type);
  for (int i=0; i < value.traits.length; i++) {
    trait(value.traits[i],(Comparable)value.values[i]);
  }
  return this;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public MatcherBuilder from(StateMatcher value){
  reset();
  type(value.type);
  for (int i=0; i < value.traits.length; i++) {
    trait((BlockTrait)value.traits[i],(Comparable)value.values[i]);
  }
  return this;
}
Program: 27723
Project: 27723
Buggy source:
/** 
 * Consumes a series of arguments. Usage is the elements concated
 * @param elements The series of arguments to expect
 * @return the element to match the input
 */
public static CommandElement seq(CommandElement... elements){
  return new SequenceCommandElement(ImmutableList.copyOf(elements));
}

Fixed version (ground truth):
/** 
 * Consumes a series of arguments. Usage is the elements concencated
 * @param elements The series of arguments to expect
 * @return the element to match the input
 */
public static CommandElement seq(CommandElement... elements){
  return new SequenceCommandElement(ImmutableList.copyOf(elements));
}
Program: 27724
Project: 27724
Buggy source:
/** 
 * Gets the active input tokenizer used for this commmand.
 * @return This command's input tokenizer
 */
public InputTokenizer getInputTokenizer(){
  return this.argumentParser;
}

Fixed version (ground truth):
/** 
 * Gets the active input tokenizer used for this command.
 * @return This command's input tokenizer
 */
public InputTokenizer getInputTokenizer(){
  return this.argumentParser;
}
Program: 27725
Project: 27725
Buggy source:
/** 
 * Gets the content version of this   {@link DataSerializable}. The version may differ between instances of plugins and implementations such that the   {@link DataView} from {@link #toContainer()} may include differentinformation, or remove other information as they are no longer deemend necessary. The version goes hand in hand with  {@link DataContentUpdater}as it is required when there exists any   {@link DataView} of this{@link DataSerializable} with an "older" version.
 * @return The version of the content being serialized
 */
int getContentVersion();

Fixed version (ground truth):
/** 
 * Gets the content version of this   {@link DataSerializable}. The version may differ between instances of plugins and implementations such that the   {@link DataView} from {@link #toContainer()} may include differentinformation, or remove other information as they are no longer deemed necessary. The version goes hand in hand with  {@link DataContentUpdater}as it is required when there exists any   {@link DataView} of this{@link DataSerializable} with an "older" version.
 * @return The version of the content being serialized
 */
int getContentVersion();
Program: 27726
Project: 27726
Buggy source:
/** 
 * Gets the map of custom keys and values to respond with. <p>If settings any of the keys or values causes the message to go oer the maximum size, the message will be automatically truncated.</p>
 * @return The map of custom keys and values to respond with
 */
Map<String,String> getCustomValuesMap();

Fixed version (ground truth):
/** 
 * Gets the map of custom keys and values to respond with. <p>If settings any of the keys or values causes the message to go over the maximum size, the message will be automatically truncated.</p>
 * @return The map of custom keys and values to respond with
 */
Map<String,String> getCustomValuesMap();
Program: 27727
Project: 27727
Buggy source:
/** 
 * Returns true if <em>other</em> is also an   {@link AcceptsItems} propertyand <b>any</b> item appearing in the other property's collecion appears in this property's collection. In formal terms, the method returns true if the size of the intersection between the two item type collections is greater than zero.
 */
@Override public boolean equals(Object obj){
  if (!(obj instanceof InventoryProperty)) {
    return false;
  }
  InventoryProperty<?,?> other=(InventoryProperty<?,?>)obj;
  if (!other.getKey().equals(this.getKey())) {
    return false;
  }
  List<ItemType> otherTypes=Coerce.toListOf(other.getValue(),ItemType.class);
  for (  ItemType t : this.value) {
    if (otherTypes.contains(t)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Returns true if <em>other</em> is also an   {@link AcceptsItems} propertyand <b>any</b> item appearing in the other property's collection appears in this property's collection. In formal terms, the method returns true if the size of the intersection between the two item type collections is greater than zero.
 */
@Override public boolean equals(Object obj){
  if (!(obj instanceof InventoryProperty)) {
    return false;
  }
  InventoryProperty<?,?> other=(InventoryProperty<?,?>)obj;
  if (!other.getKey().equals(this.getKey())) {
    return false;
  }
  List<ItemType> otherTypes=Coerce.toListOf(other.getValue(),ItemType.class);
  for (  ItemType t : this.value) {
    if (otherTypes.contains(t)) {
      return true;
    }
  }
  return false;
}
Program: 27728
Project: 27728
Buggy source:
/** 
 * Sets the specified   {@link DataView} at the current writerIndex andincreases the writerIndex according to the lenght of the data view in this buffer.
 * @param data The data view data
 * @return This stream for chaining
 */
ChannelBuf writeDataView(DataView data);

Fixed version (ground truth):
/** 
 * Sets the specified   {@link DataView} at the current writerIndex andincreases the writerIndex according to the length of the data view in this buffer.
 * @param data The data view data
 * @return This stream for chaining
 */
ChannelBuf writeDataView(DataView data);
Program: 27729
Project: 27729
Buggy source:
/** 
 * Formats the given value from the statistic to a human readable form.
 * @param value The value to format
 * @return The formated value
 */
String format(long value);

Fixed version (ground truth):
/** 
 * Formats the given value from the statistic to a human readable form.
 * @param value The value to format
 * @return The formatted value
 */
String format(long value);
Program: 27730
Project: 27730
Buggy source:
/** 
 * Sets the number of chunks this ticket will load at once.
 * @param numChunks The number of chunks this ticket can load at once
 * @return True if sucessful, false if the number of chunks is above themaximum allowed for this ticket
 */
boolean setNumChunks(int numChunks);

Fixed version (ground truth):
/** 
 * Sets the number of chunks this ticket will load at once.
 * @param numChunks The number of chunks this ticket can load at once
 * @return True if successful, false if the number of chunks is above themaximum allowed for this ticket
 */
boolean setNumChunks(int numChunks);
Program: 27731
Project: 27731
Buggy source:
/** 
 * Gets a   {@link DataContainer} including all data related to a{@link Chunk}. <p>The container is a read only instance of the data, and therefor should not be considered as mutable data. Changes are NOT saved, and the data may not be in synch with the server if the chunk is currently loaded.</p> <p>This may not return a   {@link DataContainer} in the event there is nochunk data generated at the desired coordinates.</p> <p>It is imperative to understand that the  {@link CompletableFuture} taskis blocking, and should avoid using  {@link CompletableFuture#get()} whileon the main thread.</p>
 * @param chunkCoords The chunk coordinates
 * @return The data container representing the chunk data, if available
 */
CompletableFuture<Optional<DataContainer>> getChunkData(Vector3i chunkCoords);

Fixed version (ground truth):
/** 
 * Gets a   {@link DataContainer} including all data related to a{@link Chunk}. <p>The container is a read only instance of the data, and therefor should not be considered as mutable data. Changes are NOT saved, and the data may not be in sync with the server if the chunk is currently loaded.</p> <p>This may not return a   {@link DataContainer} in the event there is nochunk data generated at the desired coordinates.</p> <p>It is imperative to understand that the  {@link CompletableFuture} taskis blocking, and should avoid using  {@link CompletableFuture#get()} whileon the main thread.</p>
 * @param chunkCoords The chunk coordinates
 * @return The data container representing the chunk data, if available
 */
CompletableFuture<Optional<DataContainer>> getChunkData(Vector3i chunkCoords);
Program: 27732
Project: 27732
Buggy source:
/** 
 * Checks if the given chunk coordinates represented by   {@link Vector3i}exist in the world. <p>Note that this is an asynchronous check as the storage of chunks can not be guaranteed to remain in synch with the server, let alone on the server thread.</p> <p>It is imperative to understand that the   {@link CompletableFuture} taskis blocking, and should avoid using  {@link CompletableFuture#get()} whileon the main thread.</p>
 * @param chunkCoords The chunk coordinates
 * @return Whether the chunk exists or not
 */
CompletableFuture<Boolean> doesChunkExist(Vector3i chunkCoords);

Fixed version (ground truth):
/** 
 * Checks if the given chunk coordinates represented by   {@link Vector3i}exist in the world. <p>Note that this is an asynchronous check as the storage of chunks can not be guaranteed to remain in sync with the server, let alone on the server thread.</p> <p>It is imperative to understand that the   {@link CompletableFuture} taskis blocking, and should avoid using  {@link CompletableFuture#get()} whileon the main thread.</p>
 * @param chunkCoords The chunk coordinates
 * @return Whether the chunk exists or not
 */
CompletableFuture<Boolean> doesChunkExist(Vector3i chunkCoords);
Program: 27735
Project: 27735
Buggy source:
@Override protected Optional<Text> buildContent(DataView container) throws InvalidDataException {
  Optional<Object> json=container.get(Queries.JSON);
  if (json.isPresent()) {
    try {
      return Optional.of(TextSerializers.JSON.deserialize(json.get().toString()));
    }
 catch (    TextParseException e) {
      throw new InvalidDataException(e);
    }
  }
  return Optional.empty();
}

Fixed version (ground truth):
@Override protected Optional<Text> buildContent(DataView container) throws InvalidDataException {
  try {
    return container.get(Queries.JSON).map(json -> TextSerializers.JSON.deserialize(json.toString()));
  }
 catch (  TextParseException e) {
    throw new InvalidDataException(e);
  }
}
Program: 27736
Project: 27736
Buggy source:
@Override public Text deserialize(TypeToken<?> type,ConfigurationNode value) throws ObjectMappingException {
  StringWriter writer=new StringWriter();
  GsonConfigurationLoader gsonLoader=GsonConfigurationLoader.builder().setSink(() -> new BufferedWriter(writer)).build();
  try {
    gsonLoader.save(value);
  }
 catch (  IOException e) {
    throw new ObjectMappingException(e);
  }
  return Sponge.getDataManager().deserialize(Text.class,new MemoryDataContainer().set(Queries.JSON,writer.getBuffer().toString())).get();
}

Fixed version (ground truth):
@Override public Text deserialize(TypeToken<?> type,ConfigurationNode value) throws ObjectMappingException {
  StringWriter writer=new StringWriter();
  GsonConfigurationLoader gsonLoader=GsonConfigurationLoader.builder().setIndent(0).setSink(() -> new BufferedWriter(writer)).build();
  value=gsonLoader.createEmptyNode().setValue(value);
  try {
    gsonLoader.save(value);
  }
 catch (  IOException e) {
    throw new ObjectMappingException(e);
  }
  return Sponge.getDataManager().deserialize(Text.class,new MemoryDataContainer().set(Queries.JSON,writer.toString())).get();
}
Program: 27737
Project: 27737
Buggy source:
private Pattern getFormattedPattern(String input){
  if (!input.startsWith("String_Node_Str")) {
    input="String_Node_Str" + input;
  }
  return Pattern.compile(input,Pattern.CASE_INSENSITIVE);
}

Fixed version (ground truth):
Pattern getFormattedPattern(String input){
  if (!input.startsWith("String_Node_Str")) {
    input="String_Node_Str" + input;
  }
  return Pattern.compile(input,Pattern.CASE_INSENSITIVE);
}
Program: 27738
Project: 27738
Buggy source:
private Text.Builder applyArg(TextElement param,Arg arg,@Nullable Text.Builder builder){
  Text.Builder wrapper=Text.builder().format(arg.format);
  param.applyTo(wrapper);
  if (builder == null) {
    builder=wrapper;
  }
 else {
    builder.append(wrapper.build());
  }
  return builder;
}

Fixed version (ground truth):
private Text.Builder applyArg(TextElement param,Arg arg,@Nullable Text.Builder builder){
  if (builder == null) {
    builder=Text.builder();
  }
  Text.Builder wrapper=Text.builder().format(arg.format);
  param.applyTo(wrapper);
  builder.append(wrapper.build());
  return builder;
}
Program: 27739
Project: 27739
Buggy source:
/** 
 * Gets the   {@link Value} for the targeted {@link Location}.
 * @return The value for the targeted location
 */
default Value<Location<World>> target(){
  return getValue(Keys.TARGETED_LOCATION).get();
}

Fixed version (ground truth):
/** 
 * Gets the   {@link Value} for the targeted {@link Location}.
 * @return The value for the targeted location
 */
default Value<Vector3d> target(){
  return getValue(Keys.TARGETED_LOCATION).get();
}
Program: 27740
Project: 27740
Buggy source:
/** 
 * Adds the specified   {@link Text} to this team.<p>While any  {@link Text} may be added, the {@link Text}to use should normally be obtained by calling   {@link TeamMember#getTeamRepresentation()}on a   {@link TeamMember}, such as a   {@link Player}.</p>
 * @param member the {@link Text} to add
 */
void addMember(Text member);

Fixed version (ground truth):
/** 
 * Adds the specified   {@link Text} to this team.<p>While any  {@link Text} may be added, the {@link Text} to use shouldnormally be obtained by calling {@link TeamMember#getTeamRepresentation()} on a {@link TeamMember}, such as a   {@link Player}.</p>
 * @param member the {@link Text} to add
 */
void addMember(Text member);
Program: 27741
Project: 27741
Buggy source:
/** 
 * Removes the specified   {@link Text} from this team.<p>While any  {@link Text} may be removed, the {@link Text}to use should normally be obtained by calling   {@link TeamMember#getTeamRepresentation()}on a   {@link TeamMember}, such as a   {@link Player}.</p
 * @param member The {@link Text} to remove
 * @return Whether the {@link Text} was on this team
 */
boolean removeMember(Text member);

Fixed version (ground truth):
/** 
 * Removes the specified   {@link Text} from this team.<p>While any  {@link Text} may be removed, the {@link Text}to use should normally be obtained by calling   {@link TeamMember#getTeamRepresentation()}on a   {@link TeamMember}, such as a   {@link Player}.</p>
 * @param member The {@link Text} to remove
 * @return Whether the {@link Text} was on this team
 */
boolean removeMember(Text member);
Program: 27742
Project: 27742
Buggy source:
/** 
 * Gets an   {@link Text} representing this team member, suitable foradding to an  {@link Team} with {@link Team#addMember(Text).}
 * @return an {@link Text} representing this team member
 */
Text getTeamRepresentation();

Fixed version (ground truth):
/** 
 * Gets a   {@link Text} representing this team member, suitable for addingto an  {@link Team} with {@link Team#addMember(Text)}.
 * @return an {@link Text} representing this team member
 */
Text getTeamRepresentation();
Program: 27743
Project: 27743
Buggy source:
<T extends DataSerializable>void registerContentUpdater(Class<T> clazz,DataContentUpdater updater);

Fixed version (ground truth):
/** 
 * Registers a   {@link DataContentUpdater} for the desired{@link DataSerializable} such that any versioned data may be updated tonewer versions for the most up to date  {@link DataBuilder}.
 * @param clazz The data serializable class
 * @param updater The updater
 * @param < T > The type of DataSerializable
 */
<T extends DataSerializable>void registerContentUpdater(Class<T> clazz,DataContentUpdater updater);
Program: 27744
Project: 27744
Buggy source:
<T extends DataSerializable>Optional<DataContentUpdater> getWrappedContentUpdater(Class<T> clazz,int fromVersion,int toVersion);

Fixed version (ground truth):
/** 
 * Gets a wrapped fake   {@link DataContentUpdater} that may wrap several{@link DataContentUpdater}s to translate versioned data from the desired  {@code fromVersion} to the {@code toVersion}. If the version jump is too great or a   {@link DataContentUpdater} has not been registered to coverthe complete jump,  {@link Optional#empty()} may be returned.
 * @param clazz The data serializable class
 * @param fromVersion The version converting from
 * @param toVersion The version converting to
 * @param < T > The type of data serializable
 * @return The content updater, if available
 */
<T extends DataSerializable>Optional<DataContentUpdater> getWrappedContentUpdater(Class<T> clazz,int fromVersion,int toVersion);
Program: 27745
Project: 27745
Buggy source:
/** 
 * Registers the given   {@link DataManipulator} class with it's associated{@link DataManipulatorBuilder}. The builder can be used to create new instances of the given   {@link DataManipulator} for data retrieval,data representation, and mass application of a  {@link DataManipulator}to multiple   {@link DataHolder}s.
 * @param manipulatorClass The class of the data manipulator
 * @param immutableManipulatorClass The class of the immutable datamanipulator
 * @param builder The builder instance of the data manipulator
 * @param < T > The type of data manipulator
 * @param < I > The type of immutable datamanipulator
 */
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>>void register(Class<? extends T> manipulatorClass,Class<? extends I> immutableManipulatorClass,DataManipulatorBuilder<T,I> builder);

Fixed version (ground truth):
/** 
 * Registers the given   {@link DataManipulator} class with it's associated{@link DataManipulatorBuilder}. The builder can be used to create new instances of the given   {@link DataManipulator} for data retrieval,data representation, and mass application of a  {@link DataManipulator}to multiple   {@link DataHolder}s.
 * @param manipulatorClass The class of the data manipulator
 * @param immutableManipulatorClass The class of the immutabledatamanipulator
 * @param builder The builder instance of the data manipulator
 * @param < T > The type of data manipulator
 * @param < I > The type of immutable datamanipulator
 */
<T extends DataManipulator<T,I>,I extends ImmutableDataManipulator<I,T>>void register(Class<? extends T> manipulatorClass,Class<? extends I> immutableManipulatorClass,DataManipulatorBuilder<T,I> builder);
Program: 27746
Project: 27746
Buggy source:
/** 
 * Constructs a query using the given parts.
 * @param parts The parts
 */
public DataQuery(List<String> parts){
  this.parts=ImmutableList.copyOf(parts);
}

Fixed version (ground truth):
/** 
 * Constructs a query using the given parts.
 * @param parts The parts
 */
private DataQuery(List<String> parts){
  this.parts=ImmutableList.copyOf(parts);
}
Program: 27747
Project: 27747
Buggy source:
/** 
 * Creates a new   {@link Key} based on a {@link ListValue} of a type<code>E</code> element along with the provided  {@link DataQuery}.
 * @param elementClass The element class
 * @param query The query to access the data
 * @param < E > The type of element
 * @return The generated key
 */
public static <E>Key<ListValue<E>> makeListKey(final Class<E> elementClass,final DataQuery query){
  return new Key<ListValue<E>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<ListValue<E>> getValueClass(){
      return (Class<ListValue<E>>)(Class)ListValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + elementClass + "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link Key} based on a {@link ListValue} of a type<code>E</code> element along with the provided  {@link DataQuery}.
 * @param elementClass The element class
 * @param query The query to access the data
 * @param < E > The type of element
 * @return The generated key
 */
public static <E>Key<ListValue<E>> makeListKey(final Class<E> elementClass,final DataQuery query){
  return new Key<ListValue<E>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<ListValue<E>> getValueClass(){
      return (Class<ListValue<E>>)(Class)ListValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + elementClass.getSimpleName() + "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}
Program: 27748
Project: 27748
Buggy source:
/** 
 * Creates a new   {@link Key} based on a {@link SetValue} of a type<code>E</code> element along with the provided  {@link DataQuery}.
 * @param elementClass The element class
 * @param query The query to access the data
 * @param < E > The type of element
 * @return The generated key
 */
public static <E>Key<SetValue<E>> makeSetKey(final Class<E> elementClass,final DataQuery query){
  return new Key<SetValue<E>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<SetValue<E>> getValueClass(){
      return (Class<SetValue<E>>)(Class)SetValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + elementClass + "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link Key} based on a {@link SetValue} of a type<code>E</code> element along with the provided  {@link DataQuery}.
 * @param elementClass The element class
 * @param query The query to access the data
 * @param < E > The type of element
 * @return The generated key
 */
public static <E>Key<SetValue<E>> makeSetKey(final Class<E> elementClass,final DataQuery query){
  return new Key<SetValue<E>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<SetValue<E>> getValueClass(){
      return (Class<SetValue<E>>)(Class)SetValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + elementClass.getSimpleName() + "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}
Program: 27749
Project: 27749
Buggy source:
/** 
 * Creates a new   {@link Key} based on a {@link MapValue} of the types<code>K</code> keys and <code>V</code> values with the provided {@link DataQuery} for accessing the {@link Map} in {@link DataView}s.
 * @param keyClass The key class of the map
 * @param valueclass The value class of the map
 * @param query The query
 * @param < K > The type of keys
 * @param < V > The type of values
 * @return The generated key
 */
public static <K,V>Key<MapValue<K,V>> makeMapKey(final Class<K> keyClass,final Class<V> valueclass,final DataQuery query){
  return new Key<MapValue<K,V>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<MapValue<K,V>> getValueClass(){
      return (Class<MapValue<K,V>>)(Class)MapValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(keyClass,valueclass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + keyClass + "String_Node_Str"+ valueclass+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link Key} based on a {@link MapValue} of the types<code>K</code> keys and <code>V</code> values with the provided {@link DataQuery} for accessing the {@link Map} in {@link DataView}s.
 * @param keyClass The key class of the map
 * @param valueclass The value class of the map
 * @param query The query
 * @param < K > The type of keys
 * @param < V > The type of values
 * @return The generated key
 */
public static <K,V>Key<MapValue<K,V>> makeMapKey(final Class<K> keyClass,final Class<V> valueclass,final DataQuery query){
  return new Key<MapValue<K,V>>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<MapValue<K,V>> getValueClass(){
      return (Class<MapValue<K,V>>)(Class)MapValue.class;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(keyClass,valueclass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + "String_Node_Str" + keyClass.getSimpleName() + "String_Node_Str"+ valueclass.getSimpleName()+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}
Program: 27750
Project: 27750
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + keyClass + "String_Node_Str"+ valueclass+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + "String_Node_Str" + keyClass.getSimpleName() + "String_Node_Str"+ valueclass.getSimpleName()+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
}
Program: 27751
Project: 27751
Buggy source:
/** 
 * Creates a new   {@link Key} with the provided <code>E</code> elementclass and <code>V</code>  {@link Value} class along with the provideddefault  {@link DataQuery} to be used with the generated {@link Key}. <p>Note that   {@link Key}s are not registered, but it is recommended to avoid generating   {@link Key}s of potentially conflicting  {@link DataQuery}(s).</p>
 * @param elementClass The element class
 * @param valueClass The value class
 * @param query The query
 * @param < E > The type of element
 * @param < T > The type of base value class
 * @param < V > The inferred return type
 * @return The generated key
 */
public static <E,T extends BaseValue,V extends BaseValue<E>>Key<V> makeSingleKey(final Class<E> elementClass,final Class<T> valueClass,final DataQuery query){
  return new Key<V>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<V> getValueClass(){
      return (Class<V>)(Class)valueClass;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,valueClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + valueClass.getName() + "String_Node_Str"+ elementClass+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link Key} with the provided <code>E</code> elementclass and <code>V</code>  {@link Value} class along with the provideddefault  {@link DataQuery} to be used with the generated {@link Key}. <p>Note that   {@link Key}s are not registered, but it is recommended to avoid generating   {@link Key}s of potentially conflicting  {@link DataQuery}(s).</p>
 * @param elementClass The element class
 * @param valueClass The value class
 * @param query The query
 * @param < E > The type of element
 * @param < T > The type of base value class
 * @param < V > The inferred return type
 * @return The generated key
 */
public static <E,T extends BaseValue,V extends BaseValue<E>>Key<V> makeSingleKey(final Class<E> elementClass,final Class<T> valueClass,final DataQuery query){
  return new Key<V>(){
    @SuppressWarnings("String_Node_Str") @Override public Class<V> getValueClass(){
      return (Class<V>)(Class)valueClass;
    }
    @Override public DataQuery getQuery(){
      return query;
    }
    @Override public int hashCode(){
      return Objects.hashCode(elementClass,valueClass,query);
    }
    @Override public String toString(){
      return "String_Node_Str" + valueClass.getSimpleName() + "String_Node_Str"+ elementClass.getSimpleName()+ "String_Node_Str"+ query.toString()+ "String_Node_Str";
    }
  }
;
}
Program: 27752
Project: 27752
Buggy source:
/** 
 * Gets the   {@link ImmutableWeightedEntityCollectionValue} of all possible{@link Entity} instances that can be spawned by the spawner. As theyare all  {@link WeightedSerializableObject} instances, their weight is defined asa  {@link Random} to determine the next {@link Entity} that will bespawned, unless overriden by  {@link #nextEntityToSpawn()}.
 * @return The immutable weighted entity collection value of entities
 */
ImmutableWeightedCollectionValue<EntitySnapshot> possibleEntitiesToSpawn();

Fixed version (ground truth):
/** 
 * Gets the   {@link ImmutableWeightedCollectionValue} of all possible{@link Entity} instances that can be spawned by the spawner. As theyare all  {@link WeightedSerializableObject} instances, their weight isdefined as a  {@link Random} to determine the next {@link Entity} thatwill be spawned, unless overriden by  {@link #nextEntityToSpawn()}.
 * @return The immutable weighted entity collection value of entities
 */
ImmutableWeightedCollectionValue<EntitySnapshot> possibleEntitiesToSpawn();
Program: 27753
Project: 27753
Buggy source:
/** 
 * Gets the   {@link ImmutableBoundedValue} for the minimum range a{@link Player} must remain in proximity of the spawner, such that if a{@link Player} is NOT within the provided range, no attempts to spawn an{@link Entity} is made.
 * @return The immutable value of the required player range to spawn entities
 */
ImmutableBoundedValue<Short> requiredPlayerRange();

Fixed version (ground truth):
/** 
 * Gets the   {@link ImmutableBoundedValue} for the minimum range a{@link Player} must remain in proximity of the spawner, such that if a{@link Player} is NOT within the provided range, no attempts to spawn an{@link Entity} is made.
 * @return The immutable value of the required player range to spawnentities
 */
ImmutableBoundedValue<Short> requiredPlayerRange();
Program: 27754
Project: 27754
Buggy source:
Builder proxySource(Entity projectile);

Fixed version (ground truth):
B proxySource(Entity proxy);
Program: 27755
Project: 27755
Buggy source:
protected AbstractDamageSource(AbstractBuilder builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
}

Fixed version (ground truth):
protected AbstractDamageSource(AbstractDamageSourceBuilder<?,?> builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
}
Program: 27756
Project: 27756
Buggy source:
protected AbstractEntityDamageSource(AbstractEntityDamageSourceBuilder builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
  this.source=checkNotNull(builder.source,"String_Node_Str");
}

Fixed version (ground truth):
protected AbstractEntityDamageSource(AbstractEntityDamageSourceBuilder<?,?> builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
  this.source=checkNotNull(builder.source,"String_Node_Str");
}
Program: 27757
Project: 27757
Buggy source:
@Override public Builder reset(){
  super.reset();
  this.damageType=null;
  return this;
}

Fixed version (ground truth):
@Override public B reset(){
  super.reset();
  this.damageType=null;
  return (B)this;
}
Program: 27758
Project: 27758
Buggy source:
@Override public EntityDamageSource.Builder entity(Entity entity){
  this.source=checkNotNull(entity,"String_Node_Str");
  return this;
}

Fixed version (ground truth):
@Override public B entity(Entity entity){
  this.source=checkNotNull(entity,"String_Node_Str");
  return (B)this;
}
Program: 27759
Project: 27759
Buggy source:
@Override public Builder proxySource(Entity projectile){
  this.indirect=checkNotNull(projectile);
  return this;
}

Fixed version (ground truth):
@Override public B proxySource(Entity projectile){
  this.indirect=checkNotNull(projectile);
  return (B)this;
}
Program: 27760
Project: 27760
Buggy source:
protected AbstractIndirectEntityDamageSource(AbstractEntityDamageSourceBuilder builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
  this.source=checkNotNull(builder.source,"String_Node_Str");
  this.indirect=checkNotNull(builder.indirect,"String_Node_Str");
}

Fixed version (ground truth):
protected AbstractIndirectEntityDamageSource(AbstractIndirectEntityDamageSourceBuilder<?,?> builder){
  this.apiDamageType=checkNotNull(builder.damageType,"String_Node_Str");
  this.absolute=builder.absolute;
  this.bypassesArmor=builder.bypasses;
  this.scales=builder.scales;
  this.explosive=builder.explosion;
  this.magic=builder.magical;
  this.creative=builder.creative;
  this.source=checkNotNull(builder.source,"String_Node_Str");
  this.indirect=checkNotNull(builder.indirect,"String_Node_Str");
}
Program: 27761
Project: 27761
Buggy source:
@Override public Builder reset(){
  super.reset();
  this.source=null;
  this.indirect=null;
  return this;
}

Fixed version (ground truth):
@Override public B reset(){
  super.reset();
  this.source=null;
  this.indirect=null;
  return (B)this;
}
Program: 27762
Project: 27762
Buggy source:
@Override public Builder entity(Entity entity){
  this.source=checkNotNull(entity,"String_Node_Str");
  return this;
}

Fixed version (ground truth):
@Override public B entity(Entity entity){
  this.source=checkNotNull(entity,"String_Node_Str");
  return (B)this;
}
Program: 27763
Project: 27763
Buggy source:
/** 
 * Creates a placeholder   {@link Text} with the specified key and fallback.The created message won't have any formatting or events configured.
 * @param key The key of the placeholder
 * @param fallback The fallback of the text if it is not replaced
 * @return The created text
 * @see Text.Placeholder
 */
public static Text.Placeholder placeholder(String key,Text fallback){
  checkArgument(!checkNotNull(key,"String_Node_Str").isEmpty(),"String_Node_Str");
  checkNotNull(fallback,"String_Node_Str");
  return new Text.Placeholder(key,fallback);
}

Fixed version (ground truth):
/** 
 * Creates a placeholder   {@link Text} with the specified key and fallback.The created message won't have any formatting or events configured.
 * @param key The key of the placeholder
 * @param fallback The fallback of the text if it is not replaced
 * @return The created text
 * @see Text.Placeholder
 */
public static Text.Placeholder placeholder(String key,@Nullable Text fallback){
  return new Text.Placeholder(key,fallback);
}
Program: 27764
Project: 27764
Buggy source:
@Override public int hashCode(){
  return Objects.hashCode(style,color);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hashCode(this.style,this.color);
}
Program: 27765
Project: 27765
Buggy source:
@Override public String toString(){
  return Objects.toStringHelper(this).add("String_Node_Str",style).add("String_Node_Str",color).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return Objects.toStringHelper(this).add("String_Node_Str",this.style).add("String_Node_Str",this.color).toString();
}
Program: 27766
Project: 27766
Buggy source:
@Override public String toString(){
  if (this.bold.isPresent() || this.italic.isPresent() || this.underline.isPresent()|| this.strikethrough.isPresent()|| this.obfuscated.isPresent()) {
    return Objects.toStringHelper(this).add("String_Node_Str",this.bold).add("String_Node_Str",this.italic).add("String_Node_Str",this.underline).add("String_Node_Str",this.strikethrough).add("String_Node_Str",this.obfuscated).toString();
  }
 else {
    return Objects.toStringHelper(this).addValue("String_Node_Str").toString();
  }
}

Fixed version (ground truth):
@Override public String toString(){
  return Objects.toStringHelper(this).omitNullValues().add("String_Node_Str",this.bold.orElse(null)).add("String_Node_Str",this.italic.orElse(null)).add("String_Node_Str",this.underline.orElse(null)).add("String_Node_Str",this.strikethrough.orElse(null)).add("String_Node_Str",this.obfuscated.orElse(null)).toString();
}