nus-yam/ex-repair huggingface dataset:
Program: 27767
Project: 27767
Buggy source:
private static Text formatNoChecks(Text template,Map<String,?> replacements){
  if (template instanceof Placeholder) {
    Object replacement=replacements.get(((Placeholder)template).getKey());
    if (replacement != null) {
      List<Object> formats=new ArrayList<Object>();
      formats.add(template.getColor());
      formats.add(template.getStyle());
      Optional<HoverAction<?>> hoverAction=template.getHoverAction();
      if (hoverAction.isPresent()) {
        formats.add(hoverAction.get());
      }
      Optional<ClickAction<?>> clickAction=template.getClickAction();
      if (clickAction.isPresent()) {
        formats.add(clickAction.get());
      }
      Optional<ShiftClickAction<?>> shiftClickAction=template.getShiftClickAction();
      if (shiftClickAction.isPresent()) {
        formats.add(shiftClickAction.get());
      }
      formats.add(replacement);
      return Texts.of(formats.toArray());
    }
  }
  TextBuilder builder=null;
  for (  Text child : template.getChildren()) {
    Text formatted=formatNoChecks(child,replacements);
    if (builder == null) {
      if (formatted == child) {
        continue;
      }
      builder=template.builder();
      builder.removeAll();
    }
    builder.append(formatted);
  }
  return builder == null ? template : builder.build();
}

Fixed version (ground truth):
private static Text formatNoChecks(Text template,Map<String,?> replacements){
  if (template instanceof Placeholder) {
    Object replacement=replacements.get(((Placeholder)template).getKey());
    if (replacement != null) {
      List<Object> formats=new ArrayList<Object>();
      formats.add(template.getColor());
      formats.add(template.getStyle());
      Optional<HoverAction<?>> hoverAction=template.getHoverAction();
      if (hoverAction.isPresent()) {
        formats.add(hoverAction.get());
      }
      Optional<ClickAction<?>> clickAction=template.getClickAction();
      if (clickAction.isPresent()) {
        formats.add(clickAction.get());
      }
      Optional<ShiftClickAction<?>> shiftClickAction=template.getShiftClickAction();
      if (shiftClickAction.isPresent()) {
        formats.add(shiftClickAction.get());
      }
      formats.add(replacement);
      return Texts.of(formats.toArray());
    }
  }
  TextBuilder builder=null;
  List<Text> children=template.getChildren();
  for (int i=0; i < children.size(); ++i) {
    final Text child=children.get(i);
    Text formatted=formatNoChecks(child,replacements);
    if (builder == null) {
      if (formatted == child) {
        continue;
      }
      builder=template.builder();
      builder.remove(children.subList(i,children.size()));
    }
    builder.append(formatted);
  }
  return builder == null ? template : builder.build();
}
Program: 27768
Project: 27768
Buggy source:
/** 
 * Creates a   {@link HarvestingProperty} with a specific set of {@link BlockType}s.
 * @param value The harvestable block types
 * @param op The operator to use when comparing against other properties
 */
public DisplacementProperty(@Nullable Set<BlockType> value,Operator op){
  super(value == null ? ImmutableSet.<BlockType>of() : ImmutableSet.copyOf(value),op);
}

Fixed version (ground truth):
/** 
 * Creates a   {@link DisplacementProperty} with a specific set of{@link BlockType}s.
 * @param value The displaceable block types
 * @param op The operator to use when comparing against other properties
 */
public DisplacementProperty(@Nullable Set<BlockType> value,Operator op){
  super(value == null ? ImmutableSet.<BlockType>of() : ImmutableSet.copyOf(value),op);
}
Program: 27769
Project: 27769
Buggy source:
/** 
 * Launches a   {@link Projectile} from this projectile source.
 * @param projectileClass The class of the projectile
 * @param velocity The velocity to launch the projectile
 * @param < T > The Type of Projectile
 * @return The projectile instance that was launched
 */
<T extends Projectile>T launchProjectile(Class<T> projectileClass,Vector3d velocity);

Fixed version (ground truth):
/** 
 * Launches a   {@link Projectile} from this projectile source.
 * @param projectileClass The class of the projectile
 * @param velocity The velocity to launch the projectile
 * @param < T > The Type of Projectile
 * @return The projectile instance if it was launched, or absent
 */
<T extends Projectile>Optional<T> launchProjectile(Class<T> projectileClass,Vector3d velocity);
Program: 27770
Project: 27770
Buggy source:
@Override public <T extends Projectile>T launchProjectile(Class<T> projectileClass,Vector3d velocity){
  return null;
}

Fixed version (ground truth):
@Override public <T extends Projectile>Optional<T> launchProjectile(Class<T> projectileClass,Vector3d velocity){
  return Optional.absent();
}
Program: 27771
Project: 27771
Buggy source:
/** 
 * Create a new   {@link RconQuitEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param source The {@link RconSource} that caused this event
 * @return A new instance of the event
 */
public static RconQuitEvent createRconQuit(Game game,RconSource source){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",source);
  return createEvent(RconQuitEvent.class,values);
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link RconQuitEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param source The {@link RconSource} that caused this event
 * @return A new instance of the event
 */
public static RconQuitEvent createRconQuit(Game game,RconSource source){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",source);
  return createEvent(RconQuitEvent.class,values);
}
Program: 27772
Project: 27772
Buggy source:
/** 
 * Create a new   {@link RconLoginEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param source The {@link RconSource} that caused this event
 * @return A new instance of the event
 */
public static RconLoginEvent createRconLogin(Game game,RconSource source){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",source);
  return createEvent(RconLoginEvent.class,values);
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link RconLoginEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param source The {@link RconSource} that caused this event
 * @return A new instance of the event
 */
public static RconLoginEvent createRconLogin(Game game,RconSource source){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",source);
  return createEvent(RconLoginEvent.class,values);
}
Program: 27773
Project: 27773
Buggy source:
/** 
 * Gets the next air block in the buffer, starting from the given y coordinate and going down until yEnd. Returns yEnd if none is found.
 * @param buffer The buffer to iterate
 * @param x The x coordinate of the starting point
 * @param y The y coordinate of the starting point
 * @param z The z coordinate of the starting point
 * @param yEnd The lowest y coordinate to check
 * @return The y coordinate of the next air block or yEnd if none found.
 */
@SuppressWarnings("String_Node_Str") static int getNextAir(MutableBlockVolume buffer,int x,int y,int z,int yEnd){
  for (; y >= yEnd && !buffer.getBlockType(x,y,z).equals(BlockTypes.AIR); y--) {
  }
  return y;
}

Fixed version (ground truth):
/** 
 * Gets the next air block in the buffer, starting from the given y coordinate and going down until yEnd. Returns yEnd if none is found.
 * @param buffer The buffer to iterate
 * @param x The x coordinate of the starting point
 * @param y The y coordinate of the starting point
 * @param z The z coordinate of the starting point
 * @param yEnd The lowest y coordinate to check
 * @return The y coordinate of the next air block or yEnd if none found.
 */
static int getNextAir(MutableBlockVolume buffer,int x,int y,int z,int yEnd){
  for (; y >= yEnd && !buffer.getBlockType(x,y,z).equals(BlockTypes.AIR); y--) {
  }
  return y;
}
Program: 27774
Project: 27774
Buggy source:
/** 
 * Gets the next non-air block in the buffer, starting from the given y coordinate and going down until yEnd. Returns yEnd if none is found.
 * @param buffer The buffer to iterate
 * @param x The x coordinate of the starting point
 * @param y The y coordinate of the starting point
 * @param z The z coordinate of the starting point
 * @param yEnd The lowest y coordinate to check
 * @return The y coordinate of the next non-air block or yEnd if nonefound.
 */
@SuppressWarnings("String_Node_Str") static int getNextSolid(MutableBlockVolume buffer,int x,int y,int z,int yEnd){
  for (; y >= yEnd && buffer.getBlockType(x,y,z).equals(BlockTypes.AIR); y--) {
  }
  return y;
}

Fixed version (ground truth):
/** 
 * Gets the next non-air block in the buffer, starting from the given y coordinate and going down until yEnd. Returns yEnd if none is found.
 * @param buffer The buffer to iterate
 * @param x The x coordinate of the starting point
 * @param y The y coordinate of the starting point
 * @param z The z coordinate of the starting point
 * @param yEnd The lowest y coordinate to check
 * @return The y coordinate of the next non-air block or yEnd if nonefound.
 */
static int getNextSolid(MutableBlockVolume buffer,int x,int y,int z,int yEnd){
  for (; y >= yEnd && buffer.getBlockType(x,y,z).equals(BlockTypes.AIR); y--) {
  }
  return y;
}
Program: 27775
Project: 27775
Buggy source:
/** 
 * Creates a new builder with the given ItemStack as a blueprint with all the defaults.
 * @param itemStack The item stack to copy
 * @return This builder, for chaining
 */
ItemStackBuilder fromItemStack(ItemStack itemStack);

Fixed version (ground truth):
/** 
 * Sets all the settings in this builder from the item stack blueprint.
 * @param itemStack The item stack to copy
 * @return This builder, for chaining
 */
ItemStackBuilder fromItemStack(ItemStack itemStack);
Program: 27776
Project: 27776
Buggy source:
/** 
 * A message sink that targets all subjects contained within the given sinks and applies the message transformations of each sink in order (so with n sinks,   {@code sinks[n-1].transform(sinks[n-2].transform(sink[...].transform(sink[0].transform(input))))} would occur)
 * @param sinks The sinks to combine
 * @return The sink
 */
MessageSink combined(MessageSink... sinks);

Fixed version (ground truth):
/** 
 * A message sink that targets all subjects contained within the given sinks and applies the message transformations of each sink in order (so with n sinks,  {@code sinks[n-1].transformMessage(sinks[n-2].transformMessage(sinks[...].transformMessage(sinks[0].transformMessage(input))))} would occur)
 * @param sinks The sinks to combine
 * @return The sink
 */
MessageSink combined(MessageSink... sinks);
Program: 27777
Project: 27777
Buggy source:
/** 
 * A message sink that targets all subjects contained within the given sinks and applies the message transformations of each sink in order (so with n sinks,   {@code sinks[n-1].transform(sinks[n-2].transform(sink[...].transform(sink[0].transform(input))))} would occur)
 * @param sinks The sinks to combine
 * @return The sink
 */
public static MessageSink combined(MessageSink... sinks){
  return factory.combined(sinks);
}

Fixed version (ground truth):
/** 
 * A message sink that targets all subjects contained within the given sinks and applies the message transformations of each sink in order (so with n sinks,  {@code sinks[n-1].transformMessage(sinks[n-2].transformMessage(sinks[...].transformMessage(sinks[0].transformMessage(input))))} would occur)
 * @param sinks The sinks to combine
 * @return The sink
 */
public static MessageSink combined(MessageSink... sinks){
  return factory.combined(sinks);
}
Program: 27778
Project: 27778
Buggy source:
/** 
 * Gets the user this ban applies to.
 * @return The user
 */
User getUser();

Fixed version (ground truth):
/** 
 * Gets the user this ban applies to.
 * @return The user
 */
org.spongepowered.api.entity.player.User getUser();
Program: 27779
Project: 27779
Buggy source:
/** 
 * Initializes a block ray builder for the entity's eye. If the eye location isn't defined for the entity, the regular location is used. This sets both the starting point and direction.
 * @param entity The entity
 * @return A new block ray builder
 */
public static BlockRayBuilder from(Entity entity){
  Preconditions.checkNotNull(entity,"String_Node_Str");
  final Vector3d rotation=entity.getRotation();
  final Vector3d direction=Quaterniond.fromAxesAnglesDeg(rotation.getY(),360 - rotation.getX(),rotation.getZ()).getDirection();
  final Location location=entity.getLocation();
  final Vector3d position;
  final Optional<EyeLocationData> data=entity.getData(EyeLocationData.class);
  if (data.isPresent()) {
    position=data.get().getEyeLocation();
  }
 else {
    position=location.getPosition();
  }
  return from(location.getExtent(),position).direction(direction);
}

Fixed version (ground truth):
/** 
 * Initializes a block ray builder for the entity's eye. If the eye location isn't defined for the entity, the regular location is used. This sets both the starting point and direction.
 * @param entity The entity
 * @return A new block ray builder
 */
public static BlockRayBuilder from(Entity entity){
  checkNotNull(entity,"String_Node_Str");
  final Vector3d rotation=entity.getRotation();
  final Vector3d direction=Quaterniond.fromAxesAnglesDeg(rotation.getY(),360 - rotation.getX(),rotation.getZ()).getDirection();
  final Location location=entity.getLocation();
  final Vector3d position;
  final Optional<EyeLocationData> data=entity.getData(EyeLocationData.class);
  if (data.isPresent()) {
    position=data.get().getEyeLocation();
  }
 else {
    position=location.getPosition();
  }
  return from(location.getExtent(),position).direction(direction);
}
Program: 27780
Project: 27780
Buggy source:
/** 
 * Sets the direction. This or setting the ending location is required and can only be done once.
 * @param direction The direction
 * @return This for chained calls
 */
public BlockRayBuilder direction(Vector3d direction){
  Preconditions.checkState(this.direction == null,"String_Node_Str");
  Preconditions.checkNotNull(direction,"String_Node_Str");
  Preconditions.checkArgument(direction.lengthSquared() != 0,"String_Node_Str");
  this.direction=direction.normalize();
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the direction. This or setting the ending location is required and can only be done once.
 * @param direction The direction
 * @return This for chained calls
 */
public BlockRayBuilder direction(Vector3d direction){
  checkState(this.direction == null,"String_Node_Str");
  checkNotNull(direction,"String_Node_Str");
  checkArgument(direction.lengthSquared() != 0,"String_Node_Str");
  this.direction=direction.normalize();
  return this;
}
Program: 27781
Project: 27781
Buggy source:
/** 
 * Adds filters to the block ray. This is optional. Multiple filters will be ANDed together.
 * @param filters The filters to add
 * @return This for chained calls
 */
public BlockRayBuilder filter(final Predicate<BlockRayHit>... filters){
  Preconditions.checkNotNull(filters,"String_Node_Str");
  final Predicate<BlockRayHit> filter=filters.length == 1 ? filters[0] : Predicates.<BlockRayHit>and(filters);
  if (this.filter == ALL_FILTER) {
    this.filter=filter;
  }
 else {
    this.filter=Predicates.and(this.filter,filter);
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Adds filters to the block ray. This is optional. Multiple filters will be ANDed together.
 * @param filters The filters to add
 * @return This for chained calls
 */
public BlockRayBuilder filter(final Predicate<BlockRayHit>... filters){
  checkNotNull(filters,"String_Node_Str");
  final Predicate<BlockRayHit> filter=filters.length == 1 ? filters[0] : Predicates.<BlockRayHit>and(filters);
  if (this.filter == ALL_FILTER) {
    this.filter=filter;
  }
 else {
    this.filter=Predicates.and(this.filter,filter);
  }
  return this;
}
Program: 27782
Project: 27782
Buggy source:
/** 
 * Returns a block ray build from the settings. An ending location or direction needs to have been set.
 * @return A block ray
 */
public BlockRay build(){
  Preconditions.checkState(this.direction != null,"String_Node_Str");
  final BlockRay blockRay=new BlockRay(this.filter,this.extent,this.position,this.direction);
  blockRay.setBlockLimit(this.blockLimit);
  return blockRay;
}

Fixed version (ground truth):
/** 
 * Returns a block ray build from the settings. An ending location or direction needs to have been set.
 * @return A block ray
 */
public BlockRay build(){
  checkState(this.direction != null,"String_Node_Str");
  final BlockRay blockRay=new BlockRay(this.filter,this.extent,this.position,this.direction);
  blockRay.setBlockLimit(this.blockLimit);
  return blockRay;
}
Program: 27783
Project: 27783
Buggy source:
/** 
 * Sets the direction and ending location. This or setting the direction is required and can only be done once.
 * @param end The ending location
 * @return This for chained calls
 */
public BlockRayBuilder to(Vector3d end){
  Preconditions.checkState(this.direction == null,"String_Node_Str");
  Preconditions.checkNotNull(end,"String_Node_Str");
  Preconditions.checkArgument(!this.position.equals(end),"String_Node_Str");
  this.direction=end.sub(this.position).normalize();
  return filter(new TargetBlockFilter(end));
}

Fixed version (ground truth):
/** 
 * Sets the direction and ending location. This or setting the direction is required and can only be done once.
 * @param end The ending location
 * @return This for chained calls
 */
public BlockRayBuilder to(Vector3d end){
  checkState(this.direction == null,"String_Node_Str");
  checkNotNull(end,"String_Node_Str");
  checkArgument(!this.position.equals(end),"String_Node_Str");
  this.direction=end.sub(this.position).normalize();
  return filter(new TargetBlockFilter(end));
}
Program: 27785
Project: 27785
Buggy source:
@Override public List<String> getSuggestions(CommandSource src,String arguments){
  try {
    final String[] argSplit=arguments.split("String_Node_Str",2);
    List<String> suggestions=new ArrayList<String>(this.dispatcher.getSuggestions(src,arguments));
    final CommandSuggestionsEvent event=SpongeEventFactory.createCommandSuggestions(this.game,argSplit.length > 1 ? argSplit[1] : "String_Node_Str",src,argSplit[0],suggestions);
    game.getEventManager().post(event);
    if (event.isCancelled()) {
      return ImmutableList.of();
    }
 else {
      return ImmutableList.copyOf(event.getSuggestions());
    }
  }
 catch (  CommandException e) {
    src.sendMessage(error(t("String_Node_Str",e.getText())));
    return Collections.emptyList();
  }
}

Fixed version (ground truth):
@Override public List<String> getSuggestions(CommandSource src,String arguments){
  try {
    final String[] argSplit=arguments.split("String_Node_Str",2);
    List<String> suggestions=new ArrayList<String>(this.dispatcher.getSuggestions(src,arguments));
    final CommandSuggestionsEvent event=SpongeEventFactory.createCommandSuggestions(this.game,argSplit.length > 1 ? argSplit[1] : "String_Node_Str",src,argSplit[0],suggestions);
    this.game.getEventManager().post(event);
    if (event.isCancelled()) {
      return ImmutableList.of();
    }
 else {
      return ImmutableList.copyOf(event.getSuggestions());
    }
  }
 catch (  CommandException e) {
    src.sendMessage(error(t("String_Node_Str",e.getText())));
    return Collections.emptyList();
  }
}
Program: 27786
Project: 27786
Buggy source:
/** 
 * Gets the unique human-readable name of this individual   {@link CatalogType}.
 * @return The uniquely identifiable name of this catalog type
 */
String getName();

Fixed version (ground truth):
/** 
 * Gets the unique human-readable name of this individual  {@link CatalogType}.
 * @return The uniquely identifiable name of this catalog type
 */
String getName();
Program: 27787
Project: 27787
Buggy source:
/** 
 * Gets a collection of all available found specific types of   {@link CatalogType} requested.<p>The presented  {@link CatalogType}s may not exist in default catalogs due to various reasons including but not restricted to: mods, plugins, game changes.</p>
 * @param typeClass The class of {@link CatalogType}
 * @param < T > The type of {@link CatalogType}
 * @return A collection of all known types of the requested catalog type
 */
<T extends CatalogType>Collection<? extends T> getAllOf(Class<T> typeClass);

Fixed version (ground truth):
/** 
 * Gets a collection of all available found specific types of  {@link CatalogType} requested.<p>The presented  {@link CatalogType}s may not exist in default catalogs due to various reasons including but not restricted to: mods, plugins, game changes.</p>
 * @param typeClass The class of {@link CatalogType}
 * @param < T > The type of {@link CatalogType}
 * @return A collection of all known types of the requested catalog type
 */
<T extends CatalogType>Collection<? extends T> getAllOf(Class<T> typeClass);
Program: 27788
Project: 27788
Buggy source:
/** 
 * Return the internal ID for the block. <p>The format of the internal ID may vary between implementations but in Minecraft, it follows the format of   {@code domain:type}, an example being   {@code minecraft:stone}.</p>
 * @return The id
 */
String getName();

Fixed version (ground truth):
/** 
 * Return the internal ID for the block. <p>The format of the internal ID may vary between implementations but in Minecraft, it follows the format of   {@code domain:type}, an example being   {@code minecraft:stone}.</p>
 * @return The id
 */
@Override String getName();
Program: 27789
Project: 27789
Buggy source:
/** 
 * Offers the given   {@link DataManipulator} to this {@link DataHolder}. <p>If any data is rejected or existing data is replaced, the   {@link DataTransactionResult} will retain the rejected and replaced data.</p>
 * @param manipulatorData The manipulator data to offer
 * @param < T > The type of manipulator data
 * @param priority The data priority to use
 * @return The transaction result
 */
<T extends DataManipulator<T>>DataTransactionResult offer(T manipulatorData,DataPriority priority);

Fixed version (ground truth):
/** 
 * Offers the given   {@link DataManipulator} to this {@link DataHolder}. <p>If any data is rejected or existing data is replaced, the  {@link DataTransactionResult} will retain the rejected and replaceddata.</p>
 * @param manipulatorData The manipulator data to offer
 * @param < T > The type of manipulator data
 * @param priority The data priority to use
 * @return The transaction result
 */
<T extends DataManipulator<T>>DataTransactionResult offer(T manipulatorData,DataPriority priority);
Program: 27790
Project: 27790
Buggy source:
/** 
 * Attempts to retrieve a specific   {@link Property} type of this {@link DataHolder}. If the property is not applicable,   {@link Optional#absent()}is returned. <p>  {@link Property}s can define various immutable information about a  {@link DataHolder} that is dependent on the instance of the holder.As  {@link Property}s cannot be changed, the   {@link DataHolder} cannot change the information about it's own properties either.</p>
 * @param propertyClass The property class
 * @param < T > The type of property
 * @return The property, if available
 */
<T extends Property<?,?>>Optional<T> getProperty(Class<T> propertyClass);

Fixed version (ground truth):
/** 
 * Attempts to retrieve a specific   {@link Property} type of this{@link DataHolder}. If the property is not applicable,  {@link Optional#absent()} is returned.<p> {@link Property}s can define various immutable information about a  {@link DataHolder} that is dependent on the instance of the holder.As  {@link Property}s cannot be changed, the   {@link DataHolder} cannot change the information about it's own properties either.</p>
 * @param propertyClass The property class
 * @param < T > The type of property
 * @return The property, if available
 */
<T extends Property<?,?>>Optional<T> getProperty(Class<T> propertyClass);
Program: 27791
Project: 27791
Buggy source:
/** 
 * Gets or creates a new   {@link DataManipulator} that can be accepted bythis  {@link DataHolder}. In the event that there is no data that can be represented by the given   {@link DataManipulator}, a new   {@link DataManipulator} object is created with default values.<p>In the event the  {@link DataManipulator} can not represent any datapertaining to this  {@link DataHolder},   {@link Optional#absent()} isreturned.</p>
 * @param manipulatorClass The data class
 * @param < T > The type of data
 * @return An instance of the class, if not available
 */
<T extends DataManipulator<T>>Optional<T> getOrCreate(Class<T> manipulatorClass);

Fixed version (ground truth):
/** 
 * Gets or creates a new   {@link DataManipulator} that can be accepted bythis  {@link DataHolder}. In the event that there is no data that can be represented by the given   {@link DataManipulator}, a new  {@link DataManipulator} object is created with default values.<p>In the event the  {@link DataManipulator} can not represent any datapertaining to this  {@link DataHolder},   {@link Optional#absent()} isreturned.</p>
 * @param manipulatorClass The data class
 * @param < T > The type of data
 * @return An instance of the class, if not available
 */
<T extends DataManipulator<T>>Optional<T> getOrCreate(Class<T> manipulatorClass);
Program: 27792
Project: 27792
Buggy source:
/** 
 * Gets an copied collection of all known   {@link DataManipulator}s belonging to this   {@link DataHolder}. An individual   {@link DataManipulator} can be used for creating new data to replace on this{@link DataHolder}.
 * @return A collection of copied data manipulators belonging to thisdata holder
 */
Collection<? extends DataManipulator<?>> getManipulators();

Fixed version (ground truth):
/** 
 * Gets an copied collection of all known   {@link DataManipulator}s belonging to this   {@link DataHolder}. An individual  {@link DataManipulator} can be used for creating new data to replace onthis  {@link DataHolder}.
 * @return A collection of copied data manipulators belonging to thisdata holder
 */
Collection<? extends DataManipulator<?>> getManipulators();
Program: 27793
Project: 27793
Buggy source:
/** 
 * Checks if the given   {@link DataManipulator} class is able to representdata within this  {@link DataHolder}.
 * @param manipulatorClass The data class
 * @param < T > The type of data
 * @return True if this {@link DataHolder} can accept the {@link DataManipulator} object
 */
<T extends DataManipulator<T>>boolean isCompatible(Class<T> manipulatorClass);

Fixed version (ground truth):
/** 
 * Checks if the given   {@link DataManipulator} class is able to representdata within this  {@link DataHolder}.
 * @param manipulatorClass The data class
 * @param < T > The type of data
 * @return True if this {@link DataHolder} can accept the{@link DataManipulator} object
 */
<T extends DataManipulator<T>>boolean isCompatible(Class<T> manipulatorClass);
Program: 27794
Project: 27794
Buggy source:
/** 
 * Attempts to read data from the given   {@link DataHolder} and constructsa new copy of this  {@link DataManipulator} as an instance of<code>T</code>. Any data overlap that exists in both the  {@link DataHolder} and this {@link DataManipulator} will be resolved using thegiven  {@link DataPriority}. <p>Any data that overlaps existing data from the   {@link DataHolder} willtake priority and be overwriten from the pre-existing data from the {@link DataHolder}. It is recommended that a call from   {@link DataHolder#isCompatible(Class)} is checked prior to using this method onany  {@link DataHolder}.</p>
 * @param dataHolder The {@link DataHolder} to extract data
 * @param overlap The overlap resolver to decide which data to retain
 * @return A new instance of this {@link DataManipulator} with relevant datafilled from the given  {@link DataHolder}
 */
Optional<T> fill(DataHolder dataHolder,DataPriority overlap);

Fixed version (ground truth):
/** 
 * Attempts to read data from the given   {@link DataHolder} and constructsa new copy of this  {@link DataManipulator} as an instance of<code>T</code>. Any data that overlaps between this and the given {@link DataHolder} will be resolved using the given{@link DataPriority}. <p>Any data that overlaps existing data from the   {@link DataHolder} willtake priority and be overwriten from the pre-existing data from the {@link DataHolder}. It is recommended that a call from  {@link DataHolder#isCompatible(Class)} is checked prior to using thismethod on any  {@link DataHolder}.</p>
 * @param dataHolder The {@link DataHolder} to extract data
 * @param overlap The overlap resolver to decide which data to retain
 * @return A new instance of this {@link DataManipulator} with relevantdata filled from the given  {@link DataHolder}
 */
Optional<T> fill(DataHolder dataHolder,DataPriority overlap);
Program: 27795
Project: 27795
Buggy source:
/** 
 * Sets the location using a safe one from  {@link TeleportHelper#getSafeLocation(Location)} and the rotation of thisentity.  {@link RelativePositions} listed inside the EnumSet areconsidered relative. <p>The format of the rotation is represented by:</p> <ul><code>x -> yaw</code>, <code>y -> pitch</code>, <code>z -> roll </code></ul>
 * @param location The location to set
 * @param rotation The rotation to set
 * @param relativePositions The coordinates to set relatively
 * @return True if location was set successfully, false if location couldn'tbe set as no safe location was found
 */
boolean setLocationAndRotationSafely(Location location,Vector3d rotation,EnumSet<RelativePositions> relativePositions);

Fixed version (ground truth):
/** 
 * Sets the location using a safe one from  {@link TeleportHelper#getSafeLocation(Location)} and the rotation of thisentity.  {@link RelativePositions} listed inside the EnumSet areconsidered relative. <p>The format of the rotation is represented by:</p> <ul><code>x -> yaw</code>, <code>y -> pitch</code>, <code>z -> roll </code></ul>
 * @param location The location to set
 * @param rotation The rotation to set
 * @param relativePositions The coordinates to set relatively
 * @return True if location was set successfully, false if locationcouldn't be set as no safe location was found
 */
boolean setLocationAndRotationSafely(Location location,Vector3d rotation,EnumSet<RelativePositions> relativePositions);
Program: 27796
Project: 27796
Buggy source:
/** 
 * Sets the location of this entity to a new position in a world which does not have to be loaded (but must at least be enabled). <p>If the target world is loaded then this is equivalent to setting the location via   {@link TargetedLocationData}.</p> <p>If the target world is unloaded but is enabled according to its  {@link org.spongepowered.api.world.storage.WorldProperties#isEnabled()}then this will first load the world before transferring the entity to that world.</p> <p>If the target world is unloaded and not enabled then the transfer will fail.</p>
 * @param uuid The UUID of the target world to transfer to
 * @param position The position in the target world
 * @return True if the teleport was successful
 */
boolean transferToWorld(UUID uuid,Vector3d position);

Fixed version (ground truth):
/** 
 * Sets the location of this entity to a new position in a world which does not have to be loaded (but must at least be enabled). <p>If the target world is loaded then this is equivalent to setting the location via   {@link TargetedLocationData}.</p> <p>If the target world is unloaded but is enabled according to its  {@link WorldProperties#isEnabled()} then this will first load the worldbefore transferring the entity to that world.</p> <p>If the target world is unloaded and not enabled then the transfer will fail.</p>
 * @param uuid The UUID of the target world to transfer to
 * @param position The position in the target world
 * @return True if the teleport was successful
 */
boolean transferToWorld(UUID uuid,Vector3d position);
Program: 27797
Project: 27797
Buggy source:
/** 
 * Gets the id of this enchantment. <p>Ex. Minecraft registers Efficiency as "minecraft:efficiency".</p>
 * @return The id
 */
String getName();

Fixed version (ground truth):
/** 
 * Gets the id of this enchantment. <p>Ex. Minecraft registers Efficiency as "minecraft:efficiency".</p>
 * @return The id
 */
@Override String getName();
Program: 27798
Project: 27798
Buggy source:
/** 
 * Gets the id of this item. <p>Ex. Minecraft registers a golden carrot as "minecraft:golden_carrot".</p>
 * @return The id
 */
String getName();

Fixed version (ground truth):
/** 
 * Gets the id of this item. <p>Ex. Minecraft registers a golden carrot as "minecraft:golden_carrot".</p>
 * @return The id
 */
@Override String getName();
Program: 27799
Project: 27799
Buggy source:
/** 
 * Gets the name of this criterion.
 * @return The name of this criterion
 */
String getName();

Fixed version (ground truth):
/** 
 * Gets the name of this criterion.
 * @return The name of this criterion
 */
@Override String getName();
Program: 27800
Project: 27800
Buggy source:
/** 
 * Create a new combined argument element and executor to handle the parsing and execution of child commands.
 * @param fallbackExecutor The executor to execute if the child command has been marked optional (Generally when this is wrapped in a {@link GenericArguments#optional(CommandElement)}
 */
public ChildCommandElementExecutor(@Nullable CommandExecutor fallbackExecutor){
  super(Texts.of("String_Node_Str" + COUNTER.getAndIncrement()));
  this.fallbackExecutor=fallbackExecutor;
}

Fixed version (ground truth):
/** 
 * Create a new combined argument element and executor to handle the parsing and execution of child commands.
 * @param fallbackExecutor The executor to execute if the child commandhas been marked optional (Generally when this is wrapped in a {@link GenericArguments#optional(CommandElement)}
 */
public ChildCommandElementExecutor(@Nullable CommandExecutor fallbackExecutor){
  super(Texts.of("String_Node_Str" + COUNTER.getAndIncrement()));
  this.fallbackExecutor=fallbackExecutor;
}
Program: 27801
Project: 27801
Buggy source:
/** 
 * Requests this   {@link Hopper} to transfer an item to the next carrier.<p>Since  {@link Hopper}s normally send items to other   {@link TileEntityCarrier}s adjacent to themselves, if there is no available carrier to send an item to, this will perform nothing.</p>
 */
void transferItem();

Fixed version (ground truth):
/** 
 * Requests this   {@link Hopper} to transfer an item to the next carrier.<p>Since  {@link Hopper}s normally send items to other  {@link TileEntityCarrier}s adjacent to themselves, if there is no available carrier to send an item to, this will perform nothing.</p>
 */
void transferItem();
Program: 27802
Project: 27802
Buggy source:
/** 
 * Sets the location using a safe one from   {@link TeleportHelper#getSafeLocation(Location)} and the rotation of this entity. {@link RelativePositions} listed inside the EnumSet are considered relative.<p>The format of the rotation is represented by:</p> <ul><code>x -> yaw</code>, <code>y -> pitch</code>, <code>z -> roll </code></ul>
 * @param location The location to set
 * @param rotation The rotation to set
 * @param relativePositions The coordinates to set relatively
 * @return True if location was set successfully, false if location couldn't be set as no safe location was found
 */
boolean setLocationAndRotationSafely(Location location,Vector3d rotation,EnumSet<RelativePositions> relativePositions);

Fixed version (ground truth):
/** 
 * Sets the location using a safe one from  {@link TeleportHelper#getSafeLocation(Location)} and the rotation of thisentity.  {@link RelativePositions} listed inside the EnumSet areconsidered relative. <p>The format of the rotation is represented by:</p> <ul><code>x -> yaw</code>, <code>y -> pitch</code>, <code>z -> roll </code></ul>
 * @param location The location to set
 * @param rotation The rotation to set
 * @param relativePositions The coordinates to set relatively
 * @return True if location was set successfully, false if location couldn'tbe set as no safe location was found
 */
boolean setLocationAndRotationSafely(Location location,Vector3d rotation,EnumSet<RelativePositions> relativePositions);
Program: 27803
Project: 27803
Buggy source:
/** 
 * Sets the damage this projectile will deal to the specified   {@link EntityType} if hit.<p>Note that in events, the damage defined for the provided  {@link EntityType} will take priority over the "default" damage as definedfrom  {@link #getDamage()}.</p>
 * @param entityType The {@link EntityType} to set the damage amount for
 * @param damage The damage to deal to the specified {@link EntityType}
 */
void setDamageForEntity(EntityType entityType,double damage);

Fixed version (ground truth):
/** 
 * Sets the damage this projectile will deal to the specified  {@link EntityType} if hit.<p>Note that in events, the damage defined for the provided {@link EntityType} will take priority over the "default" damage asdefined from  {@link #getDamage()}.</p>
 * @param entityType The {@link EntityType} to set the damage amount for
 * @param damage The damage to deal to the specified {@link EntityType}
 */
void setDamageForEntity(EntityType entityType,double damage);
Program: 27804
Project: 27804
Buggy source:
/** 
 * Gets the damage this projectile will deal to the specified   {@link EntityType} if hit.<p>Note that in events, the damage defined for the provided  {@link EntityType} will take priority over the "default" damage as definedfrom  {@link #getDamage()}.</p>
 * @param entityType The {@link EntityType} to set the damage amount for
 * @return The damage to deal to the specified {@link EntityType}
 */
double getDamageForEntity(EntityType entityType);

Fixed version (ground truth):
/** 
 * Gets the damage this projectile will deal to the specified  {@link EntityType} if hit.<p>Note that in events, the damage defined for the provided {@link EntityType} will take priority over the "default" damage asdefined from  {@link #getDamage()}.</p>
 * @param entityType The {@link EntityType} to set the damage amount for
 * @return The damage to deal to the specified {@link EntityType}
 */
double getDamageForEntity(EntityType entityType);
Program: 27805
Project: 27805
Buggy source:
/** 
 * Creates a new   {@link PlayerPickUpItemEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param player The player involved in this event
 * @param items The items that will be picked up
 * @return A new instance of the event
 */
public static PlayerPickUpItemEvent createPlayerPickUpItem(Game game,Player player,Collection<Entity> items,Inventory inventory){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",items);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",inventory);
  return createEvent(PlayerPickUpItemEvent.class,values);
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link PlayerPickUpItemEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param player The player involved in this event
 * @param items The items that will be picked up
 * @param inventory The inventory involved with the event
 * @return A new instance of the event
 */
public static PlayerPickUpItemEvent createPlayerPickUpItem(Game game,Player player,Collection<Entity> items,Inventory inventory){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",items);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",player);
  values.put("String_Node_Str",inventory);
  return createEvent(PlayerPickUpItemEvent.class,values);
}
Program: 27806
Project: 27806
Buggy source:
/** 
 * Creates a new   {@link EntityPickUpItemEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param entity The entity involved in this event
 * @param items The items that will be picked up
 * @return A new instance of the event
 */
public static EntityPickUpItemEvent createEntityPickUpItem(Game game,Entity entity,Collection<Entity> items,Inventory inventory){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",entity);
  values.put("String_Node_Str",items);
  values.put("String_Node_Str",inventory);
  return createEvent(EntityPickUpItemEvent.class,values);
}

Fixed version (ground truth):
/** 
 * Creates a new   {@link EntityPickUpItemEvent}.
 * @param game The game instance for this {@link GameEvent}
 * @param entity The entity involved in this event
 * @param items The items that will be picked up
 * @param inventory The inventory involved with the event
 * @return A new instance of the event
 */
public static EntityPickUpItemEvent createEntityPickUpItem(Game game,Entity entity,Collection<Entity> items,Inventory inventory){
  Map<String,Object> values=Maps.newHashMap();
  values.put("String_Node_Str",game);
  values.put("String_Node_Str",entity);
  values.put("String_Node_Str",items);
  values.put("String_Node_Str",inventory);
  return createEvent(EntityPickUpItemEvent.class,values);
}
Program: 27807
Project: 27807
Buggy source:
/** 
 * Create a new cause instance.
 * @param parent An optional parent
 * @param cause The causing object (may be a block, entity, etc.)
 * @param reason An optional reason
 */
public Cause(@Nullable Cause parent,Object cause,@Nullable Reason reason){
  checkNotNull(cause);
  this.parent=Optional.fromNullable(parent);
  this.cause=cause;
  this.reason=Optional.fromNullable(reason);
}

Fixed version (ground truth):
/** 
 * Create a new cause instance.
 * @param parent An optional parent
 * @param cause The causing object (may be a block, entity, etc.)
 * @param reason An optional reason
 */
public Cause(@Nullable Cause parent,Object cause,@Nullable Reason reason){
  checkNotNull(cause,"String_Node_Str");
  this.parent=Optional.fromNullable(parent);
  this.cause=cause;
  this.reason=Optional.fromNullable(reason);
}
Program: 27808
Project: 27808
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override Player getUser();

Fixed version (ground truth):
@Override Player getUser();
Program: 27809
Project: 27809
Buggy source:
/** 
 * Gets the name of this score
 * @return The name of this score
 */
Text getName();

Fixed version (ground truth):
/** 
 * Gets the name of this score.
 * @return The name of this score
 */
Text getName();
Program: 27810
Project: 27810
Buggy source:
/** 
 * Adds the specified   {@link Objective} to this scoreboard.
 * @param team The {@link Objective} add
 * @throws IllegalArgumentException if an {@link Objective} with the same {@link Objective#getName() name} already exists,or if the specified  {@link Objective} has already been added.
 */
void addObjective(Objective team) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Adds the specified   {@link Objective} to this scoreboard.
 * @param team The {@link Objective} add
 * @throws IllegalArgumentException if an {@link Objective} with the same{@link Objective#getName() name} already exists, or if thespecified  {@link Objective} has already been added.
 */
void addObjective(Objective team) throws IllegalArgumentException ;
Program: 27811
Project: 27811
Buggy source:
/** 
 * Gets a   {@link User}'s   {@link Team}s on this scoreboard.
 * @param user The {@link User} to search for
 * @return The {@link User}'s   {@link Team}s, if the user has any   {@link Team}s
 */
Set<Team> getPlayerTeams(User user);

Fixed version (ground truth):
/** 
 * Gets a   {@link User}'s   {@link Team}s on this scoreboard.
 * @param user The {@link User} to search for
 * @return The {@link User}'s   {@link Team}s, if the user has any  {@link Team}s
 */
Set<Team> getPlayerTeams(User user);
Program: 27812
Project: 27812
Buggy source:
/** 
 * Adds the specified   {@link Team} to this scoreboard.
 * @param team The {@link Team} to add
 * @throws IllegalArgumentException if a team with the same {@link Team#getName() name} already exists, or the specified {@link Team} has been added
 */
void addTeam(Team team) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Adds the specified   {@link Team} to this scoreboard.
 * @param team The {@link Team} to add
 * @throws IllegalArgumentException if a team with the same{@link Team#getName() name} already exists, or the specified{@link Team} has been added
 */
void addTeam(Team team) throws IllegalArgumentException ;
Program: 27813
Project: 27813
Buggy source:
/** 
 * Sets the color of the   {@link Team}. <p>The team's color is a distinct concept from its prefix or suffix. It is only used for colored sidebar display slots, and certain statistic criteria.</p>
 * @param color The color to set
 * @throws IllegalArgumentException If color is {@link org.spongepowered.api.text.format.TextColors#RESET}
 * @return This builder
 */
TeamBuilder color(TextColor color) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Sets the color of the   {@link Team}. <p>The team's color is a distinct concept from its prefix or suffix. It is only used for colored sidebar display slots, and certain statistic criteria.</p>
 * @param color The color to set
 * @return This builder
 * @throws IllegalArgumentException If color is {@link org.spongepowered.api.text.format.TextColors#RESET}
 */
TeamBuilder color(TextColor color) throws IllegalArgumentException ;
Program: 27814
Project: 27814
Buggy source:
/** 
 * Sets the name displayed to users for the   {@link Team}. <p>Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.</p>
 * @param displayName The {@link Text} to set
 * @return This builder
 */
TeamBuilder displayName(Text displayName) throws IllegalArgumentException ;

Fixed version (ground truth):
/** 
 * Sets the name displayed to users for the   {@link Team}. <p>Display names may be truncated in order to meet an implementation-defined length limit. In Vanilla, this is sixteen characters.</p>
 * @param displayName The {@link Text} to set
 * @return This builder
 * @throws IllegalArgumentException If the name is invalid
 */
TeamBuilder displayName(Text displayName) throws IllegalArgumentException ;
Program: 27815
Project: 27815
Buggy source:
/** 
 * Gets an entry's   {@link Score} for this Objective.<p>If the  {@link Score} does not exist, it will be created.<x/p>
 * @param name The name of the {@link Score} to get
 * @return The {@link Score} for the specified {@link Text}
 */
Score getScore(Text name);

Fixed version (ground truth):
/** 
 * Gets an entry's   {@link Score} for this Objective.<p>If the  {@link Score} does not exist, it will be created.</p>
 * @param name The name of the {@link Score} to get
 * @return The {@link Score} for the specified {@link Text}
 */
Score getScore(Text name);
Program: 27816
Project: 27816
Buggy source:
/** 
 * Constructs a new   {@link ProvisioningException} for the specified service withthe specified cause and a null message.
 * @param cause The cause of this exception
 * @param service The service requested
 */
public ProvisioningException(Throwable cause,Class<?> service){
  super(cause);
  checkNotNull(service);
  this.service=service;
}

Fixed version (ground truth):
/** 
 * Constructs a new   {@link ProvisioningException} for the specified service withthe specified cause and a null message.
 * @param cause The cause of this exception
 * @param service The service requested
 */
public ProvisioningException(Throwable cause,Class<?> service){
  super(cause);
  checkNotNull(service,"String_Node_Str");
  this.service=service;
}