nus-yam/ex-repair huggingface dataset:
Program: 71212
Project: 71212
Buggy source:
@Override public void onClick(MouseEvent event){
  int x=(int)(event.getX() / this.getTileSize());
  int y=(int)(event.getY() / this.getTileSize());
  if (event.getButton().equals(MouseButton.PRIMARY)) {
    Node node=event.getPickResult().getIntersectedNode();
    if (node == null || !(node instanceof PixelatedImageView)) {
      set(x,y,new WholeTile(1,0,getTileset()));
    }
 else {
      WholeTile wholeTile=(WholeTile)this.grid[x][y];
      wholeTile.setBlockId((wholeTile.getBlockId() + 1) % 45);
      wholeTile.updateImageView();
    }
  }
 else   if (event.getButton().equals(MouseButton.SECONDARY)) {
    remove(x,y);
  }
}

Fixed version (ground truth):
@Override public void onClick(MouseEvent event){
  int x=(int)(event.getX() / this.getTileSize());
  int y=(int)(event.getY() / this.getTileSize());
  if (event.getButton().equals(MouseButton.PRIMARY)) {
    Node node=event.getPickResult().getIntersectedNode();
    if (!(node instanceof PixelatedImageView)) {
      set(x,y,new WholeTile(1,0,getTileset()));
    }
 else {
      WholeTile wholeTile=(WholeTile)this.grid[x][y];
      wholeTile.setBlockId((wholeTile.getBlockId() + 1) % 45);
      wholeTile.updateImageView();
    }
  }
 else   if (event.getButton().equals(MouseButton.SECONDARY)) {
    remove(x,y);
  }
}
Program: 71213
Project: 71213
Buggy source:
@Override public void onDrag(MouseEvent event){
  int x=(int)(event.getX() / this.getTileSize());
  int y=(int)(event.getY() / this.getTileSize());
  if (x >= getWidth() || y >= getHeight() || x < 0 || y < 0) {
    return;
  }
  if (x != previousX || y != previousY) {
    previousX=x;
    previousY=y;
    if (event.getButton().equals(MouseButton.PRIMARY)) {
      Node node=event.getPickResult().getIntersectedNode();
      if (node == null || !(node instanceof PixelatedImageView)) {
        set(x,y,new WholeTile(1,0,getTileset()));
      }
 else {
        WholeTile wholeTile=(WholeTile)this.grid[x][y];
        wholeTile.setBlockId(wholeTile.getBlockId());
        wholeTile.updateImageView();
      }
    }
 else     if (event.getButton().equals(MouseButton.SECONDARY)) {
      remove(x,y);
    }
  }
}

Fixed version (ground truth):
@Override public void onDrag(MouseEvent event){
  int x=(int)(event.getX() / this.getTileSize());
  int y=(int)(event.getY() / this.getTileSize());
  if (x >= getWidth() || y >= getHeight() || x < 0 || y < 0)   return;
  if (isDragging() && x == previousX && y == previousY)   return;
  previousX=x;
  previousY=y;
  if (event.getButton().equals(MouseButton.PRIMARY)) {
    Node node=event.getPickResult().getIntersectedNode();
    if (!(node instanceof PixelatedImageView)) {
      set(x,y,new WholeTile(1,0,getTileset()));
    }
 else {
      WholeTile wholeTile=(WholeTile)this.grid[x][y];
      wholeTile.setBlockId(wholeTile.getBlockId());
      wholeTile.updateImageView();
    }
  }
 else   if (event.getButton().equals(MouseButton.SECONDARY)) {
    remove(x,y);
  }
}
Program: 71214
Project: 71214
Buggy source:
@Override public void onMove(MouseEvent event){
}

Fixed version (ground truth):
@Override public void onMove(MouseEvent event){
  int x=(int)(event.getX() / this.getTileSize());
  int y=(int)(event.getY() / this.getTileSize());
  if (x >= getWidth() || y >= getHeight() || x < 0 || y < 0)   return;
  if (x == previousX && y == previousY)   return;
  previousX=x;
  previousY=y;
}
Program: 71216
Project: 71216
Buggy source:
public PropertiesRClickMenu(EditingCell cell){
  super();
  this.cell=cell;
  MenuItem editMenuItem=new MenuItem("String_Node_Str");
  editMenuItem.setOnAction(event -> {
    if (getProperty() instanceof ParentProperty) {
      Optional<String> name=EditParentDialog.create(((ParentProperty)getProperty()));
      name.ifPresent(string -> getProperty().changeName(string));
    }
 else {
      Optional<Pair<String,String>> nameAndValueOptional=EditValueDialog.create(((StringProperty)getProperty()));
      nameAndValueOptional.ifPresent(nameAndValue -> {
        ((StringProperty)getProperty()).setNameAndValue(nameAndValue.getKey(),nameAndValue.getValue());
      }
);
    }
  }
);
  getItems().add(editMenuItem);
  getItems().add(new SeparatorMenuItem());
  MenuItem createMenuItem=new MenuItem("String_Node_Str");
  createMenuItem.setOnAction(event -> {
    if (!(getProperty() instanceof ParentProperty))     return;
    TextInputDialog dialog=new TextInputDialog();
    dialog.setTitle("String_Node_Str");
    dialog.setContentText("String_Node_Str");
    Optional<String> result=dialog.showAndWait();
    if (!result.isPresent()) {
      return;
    }
    ((ParentProperty)getProperty()).createProperty(result.get());
  }
);
  getItems().add(createMenuItem);
  MenuItem removeMenuItem=new MenuItem("String_Node_Str");
  removeMenuItem.setOnAction(event -> {
    Property parent=getParentProperty();
    if (!(parent instanceof ParentProperty))     return;
    ((ParentProperty)parent).getChildren().remove(getProperty().getName());
  }
);
  getItems().add(removeMenuItem);
}

Fixed version (ground truth):
public PropertiesRClickMenu(Property property){
  super();
  MenuItem editMenuItem=new MenuItem();
  if (property instanceof ParentProperty) {
    editMenuItem.setText("String_Node_Str");
  }
 else {
    editMenuItem.setText("String_Node_Str");
  }
  editMenuItem.setOnAction(event -> {
    if (property instanceof ParentProperty) {
      Optional<String> name=EditParentDialog.create(((ParentProperty)property));
      name.ifPresent(property::changeName);
    }
 else {
      Optional<Pair<String,String>> nameAndValueOptional=EditValueDialog.create(((StringProperty)property));
      nameAndValueOptional.ifPresent(nameAndValue -> {
        ((StringProperty)property).setNameAndValue(nameAndValue.getKey(),nameAndValue.getValue());
      }
);
    }
  }
);
  getItems().add(editMenuItem);
  getItems().add(new SeparatorMenuItem());
  MenuItem createMenuItem=new MenuItem("String_Node_Str");
  createMenuItem.setOnAction(event -> {
    if (!(property instanceof ParentProperty))     return;
    TextInputDialog dialog=new TextInputDialog();
    dialog.setTitle("String_Node_Str");
    dialog.setContentText("String_Node_Str");
    Optional<String> result=dialog.showAndWait();
    if (!result.isPresent()) {
      return;
    }
    ((ParentProperty)property).createProperty(result.get());
  }
);
  getItems().add(createMenuItem);
  MenuItem removeMenuItem=new MenuItem("String_Node_Str");
  removeMenuItem.setOnAction(event -> property.getParent().getChildren().remove(property.getName()));
  getItems().add(removeMenuItem);
}
Program: 71217
Project: 71217
Buggy source:
public PropertiesRootRClickMenu(RootProperty property){
  MenuItem createMenuItem=new MenuItem("String_Node_Str");
  createMenuItem.setOnAction(event -> {
    TextInputDialog dialog=new TextInputDialog();
    dialog.setTitle("String_Node_Str");
    dialog.setContentText("String_Node_Str");
    Optional<String> result=dialog.showAndWait();
    if (!result.isPresent()) {
      return;
    }
    Property testing=property.createProperty(result.get());
  }
);
  getItems().add(createMenuItem);
}

Fixed version (ground truth):
public PropertiesRootRClickMenu(RootProperty property){
  MenuItem createMenuItem=new MenuItem("String_Node_Str");
  createMenuItem.setOnAction(event -> {
    TextInputDialog dialog=new TextInputDialog();
    dialog.setTitle("String_Node_Str");
    dialog.setContentText("String_Node_Str");
    Optional<String> result=dialog.showAndWait();
    if (!result.isPresent()) {
      return;
    }
    property.createProperty(result.get());
  }
);
  getItems().add(createMenuItem);
}
Program: 71219
Project: 71219
Buggy source:
@DontOverride public default void saveAs(){
  FileChooser fileChooser=new FileChooser();
  fileChooser.setTitle("String_Node_Str");
  fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"));
  File saveFile=fileChooser.showSaveDialog(null);
  if (saveFile == null) {
    Logger.info("String_Node_Str");
  }
  updateSaveFile(saveFile);
  save();
}

Fixed version (ground truth):
@DontOverride public default void saveAs(){
  FileChooser fileChooser=new FileChooser();
  fileChooser.setTitle("String_Node_Str");
  fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"));
  File saveFile=fileChooser.showSaveDialog(null);
  if (saveFile == null) {
    Logger.info("String_Node_Str");
    return;
  }
  updateSaveFile(saveFile);
  save();
}
Program: 71220
Project: 71220
Buggy source:
/** 
 * Set backoff algorithm<br /> You can choose from the following algorithms or you can set your own algorithm. <ul> <li>  {@link FixedIntervalAlgorithm}</li> <li>  {@link ExponentialAlgorithm}</li> </ul> or e.g. <code><pre> public long interval(int retryCount, long elapsedTime) { 2F.pow(retry - 1).toLong().times(1000L).coerceAtMost(5000L) } </pre></code> When you want to force stop retrying process, return ABORT.
 * @param algorithm Algorithm for calculating the interval time until the next retry
 * @see BackoffAlgorithm
 */
public Builder setAlgorithm(@NonNull BackoffAlgorithm algorithm){
  this.algorithm=algorithm;
  return this;
}

Fixed version (ground truth):
/** 
 * Set backoff algorithm. You can choose from the following algorithms or you can set your own algorithm. <ul> <li>  {@link FixedIntervalAlgorithm}</li> <li>  {@link ExponentialAlgorithm}</li> </ul> or e.g. <pre><code> public long interval(int retryCount, long elapsedTime) { 2F.pow(retry - 1).toLong().times(1000L).coerceAtMost(5000L) } </code></pre> When you want to force stop retrying process, return ABORT.
 * @param algorithm Algorithm for calculating the interval time until the next retry
 * @return Backoff builder
 * @see BackoffAlgorithm
 */
public Builder setAlgorithm(@NonNull BackoffAlgorithm algorithm){
  this.algorithm=algorithm;
  return this;
}
Program: 71221
Project: 71221
Buggy source:
/** 
 * Set the maximum count of retry. The retry is aborted when either the maximum count or the maximum elapsed time is satisfied. The count must be greater or equal 0.
 * @param count maximum count of retry
 * @see #DEFAULT_MAX_RETRY_COUNT
 * @see #setUnlimitedRetryCount()
 */
public Builder setMaxRetryCount(@IntRange(from=0) int count){
  if (count < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.maxRetryCount=count;
  return this;
}

Fixed version (ground truth):
/** 
 * Set the maximum count of retry. The retry is aborted when either the maximum count or the maximum elapsed time is satisfied. The count must be greater or equal 0.
 * @param count maximum count of retry
 * @return Backoff builder
 * @see #DEFAULT_MAX_RETRY_COUNT
 * @see #setUnlimitedRetryCount()
 */
public Builder setMaxRetryCount(@IntRange(from=0) int count){
  if (count < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.maxRetryCount=count;
  return this;
}
Program: 71222
Project: 71222
Buggy source:
/** 
 * Set the maximum elapsed time to retry milliseconds time. The retry is aborted when either the maximum count or the maximum elapsed time is satisfied. The elapsed time must be greater or equal 0.
 * @param elapsedTime maximum elapsed time in milliseconds
 * @param unit the units of time that {@code elapsedTime} is expressed in
 * @see #DEFAULT_MAX_ELAPSED_TIME
 * @see #setUnlimitedElapsedTime()
 */
public Builder setMaxElapsedTime(@IntRange(from=0) long elapsedTime,TimeUnit unit){
  long t=unit.toMillis(elapsedTime);
  if (t < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.maxElapsedTime=t;
  return this;
}

Fixed version (ground truth):
/** 
 * Set the maximum elapsed time to retry milliseconds time. The retry is aborted when either the maximum count or the maximum elapsed time is satisfied. The elapsed time must be greater or equal 0.
 * @param elapsedTime maximum elapsed time in milliseconds
 * @param unit the units of time that {@code elapsedTime} is expressed in
 * @return Backoff builder
 * @see #DEFAULT_MAX_ELAPSED_TIME
 * @see #setUnlimitedElapsedTime()
 */
public Builder setMaxElapsedTime(@IntRange(from=0) long elapsedTime,TimeUnit unit){
  long t=unit.toMillis(elapsedTime);
  if (t < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.maxElapsedTime=t;
  return this;
}
Program: 71223
Project: 71223
Buggy source:
/** 
 * Filters errors emitted by an ObservableSource by only emitting those that satisfy a specified predicate.
 * @param predicate a function that evaluates each error emitted by the source ObservableSource,returning  {@code true} if it passes the filter
 */
public RxBackoff filter(@NonNull Predicate<Throwable> predicate){
  this.filter=predicate;
  return this;
}

Fixed version (ground truth):
/** 
 * Filters errors emitted by an ObservableSource by only emitting those that satisfy a specified predicate.
 * @param predicate a function that evaluates each error emitted by the source ObservableSource,returning  {@code true} if it passes the filter
 * @return RxBackoff instance
 */
public RxBackoff filter(@NonNull Predicate<Throwable> predicate){
  this.filter=predicate;
  return this;
}
Program: 71224
Project: 71224
Buggy source:
/** 
 * Set callback function called when abort retry
 */
public RxBackoff doOnAbort(@NonNull Consumer<Throwable> onAbort){
  this.onAbort=onAbort;
  return this;
}

Fixed version (ground truth):
/** 
 * Set callback function called when abort retry
 * @param onAbort action to be executed when abort
 * @return RxBackoff instance
 */
public RxBackoff doOnAbort(@NonNull Consumer<Throwable> onAbort){
  this.onAbort=onAbort;
  return this;
}
Program: 71225
Project: 71225
Buggy source:
/** 
 * Set callback function called every time before retry processing
 */
public RxBackoff doOnRetry(@NonNull BiConsumer<Throwable,Integer> onRetry){
  this.onRetry=onRetry;
  return this;
}

Fixed version (ground truth):
/** 
 * Set callback function called every time before retry processing
 * @param onRetry action to be executed at each retry
 * @return RxBackoff instance
 */
public RxBackoff doOnRetry(@NonNull BiConsumer<Throwable,Integer> onRetry){
  this.onRetry=onRetry;
  return this;
}
Program: 71227
Project: 71227
Buggy source:
public static void handleFlush(Main main,List<List<Number>> chunks,String id){
  System.out.println(String.format("String_Node_Str",chunks.size()));
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  Map<String,List<Number>> playerChunkMap=new HashMap<>();
  for (  List<Number> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0).intValue(),chunkIdx.get(1).intValue());
    for (    Entity entity : chunk.getEntities()) {
      if (entity instanceof Player) {
        Player myPlayer=(Player)entity;
        myPlayer.saveData();
        playerChunkMap.put(myPlayer.getUniqueId().toString(),chunkIdx);
      }
    }
    NMSServer.getChunkProviderServer().saveChunk(((CraftChunk)chunk).getHandle(),false);
    System.out.println(String.format("String_Node_Str",chunk.getX(),chunk.getZ()));
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  parameters.put("String_Node_Str",id);
  parameters.put("String_Node_Str",playerChunkMap);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}

Fixed version (ground truth):
public static void handleFlush(Main main,List<List<Number>> chunks,String id){
  System.out.println(String.format("String_Node_Str",chunks.size()));
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  Map<String,List<Number>> playerChunkMap=new HashMap<>();
  for (  List<Number> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0).intValue(),chunkIdx.get(1).intValue());
    for (    Entity entity : chunk.getEntities()) {
      if (entity instanceof Player) {
        Player myPlayer=(Player)entity;
        myPlayer.saveData();
        playerChunkMap.put(myPlayer.getUniqueId().toString(),chunkIdx);
      }
    }
    NMSServer.getChunkProviderServer().saveChunk(((CraftChunk)chunk).getHandle(),false);
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  parameters.put("String_Node_Str",id);
  parameters.put("String_Node_Str",playerChunkMap);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}
Program: 71228
Project: 71228
Buggy source:
public void RPCHandler(String jsonStr){
  try {
    JSONParser parser=new JSONParser();
    JSONObject json=(JSONObject)parser.parse(jsonStr);
    String route=(String)json.get("String_Node_Str");
switch (route) {
case "String_Node_Str":
      StateHandler.handleStateJSON(jsonStr,this);
    break;
case "String_Node_Str":
  StateHandler.handleLoaded(this);
break;
case "String_Node_Str":
StateHandler.handleFlush(this,(List<List<Integer>>)json.get("String_Node_Str"));
break;
case "String_Node_Str":
StateHandler.handleLoad(this,(List<List<Integer>>)json.get("String_Node_Str"));
break;
default :
System.out.println("String_Node_Str" + route);
}
}
 catch (ParseException e) {
System.out.println("String_Node_Str");
}
catch (ClassCastException e) {
System.out.println("String_Node_Str");
}
}

Fixed version (ground truth):
public void RPCHandler(String jsonStr){
  try {
    JSONParser parser=new JSONParser();
    JSONObject json=(JSONObject)parser.parse(jsonStr);
    String route=(String)json.get("String_Node_Str");
switch (route) {
case "String_Node_Str":
      StateHandler.handleStateJSON(jsonStr,this);
    break;
case "String_Node_Str":
  StateHandler.handleLoaded(this);
break;
case "String_Node_Str":
StateHandler.handleFlush(this,(List<List<Number>>)json.get("String_Node_Str"));
break;
case "String_Node_Str":
StateHandler.handleLoad(this,(List<List<Number>>)json.get("String_Node_Str"));
break;
default :
System.out.println("String_Node_Str" + route);
}
}
 catch (ParseException e) {
System.out.println("String_Node_Str");
}
catch (ClassCastException e) {
System.out.println("String_Node_Str");
}
}
Program: 71229
Project: 71229
Buggy source:
public static void handleFlush(Main main,List<List<Integer>> chunks){
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  for (  List<Integer> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0),chunkIdx.get(1));
    NMSServer.getChunkProviderServer().saveChunk(((CraftChunk)chunk).getHandle(),false);
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}

Fixed version (ground truth):
public static void handleFlush(Main main,List<List<Number>> chunks){
  System.out.println(String.format("String_Node_Str",chunks.size()));
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  Map<String,List<Number>> playerChunkMap=new HashMap<>();
  for (  List<Number> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0).intValue(),chunkIdx.get(1).intValue());
    for (    Entity entity : chunk.getEntities()) {
      if (entity instanceof Player) {
        Player myPlayer=(Player)entity;
        playerChunkMap.put(myPlayer.getUniqueId().toString(),chunkIdx);
      }
    }
    NMSServer.getChunkProviderServer().saveChunk(((CraftChunk)chunk).getHandle(),false);
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  parameters.put("String_Node_Str",playerChunkMap);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}
Program: 71230
Project: 71230
Buggy source:
public static void handleLoad(Main main,List<List<Integer>> chunks){
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  RegionFileCache.a();
  for (  List<Integer> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0),chunkIdx.get(1));
    net.minecraft.server.v1_12_R1.Chunk NMSChunk=NMSServer.getChunkProviderServer().loadChunk(chunk.getX(),chunk.getZ());
    net.minecraft.server.v1_12_R1.Chunk PlayerChunk=((CraftChunk)chunk).getHandle();
    PlayerChunk.a(NMSChunk.getSections());
    world.refreshChunk(chunk.getX(),chunk.getZ());
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}

Fixed version (ground truth):
public static void handleLoad(Main main,List<List<Number>> chunks){
  World world=Bukkit.getServer().getWorld("String_Node_Str");
  WorldServer NMSServer=((CraftWorld)world).getHandle();
  RegionFileCache.a();
  for (  List<Number> chunkIdx : chunks) {
    Chunk chunk=world.getChunkAt(chunkIdx.get(0).intValue(),chunkIdx.get(1).intValue());
    net.minecraft.server.v1_12_R1.Chunk NMSChunk=NMSServer.getChunkProviderServer().loadChunk(chunk.getX(),chunk.getZ());
    net.minecraft.server.v1_12_R1.Chunk PlayerChunk=((CraftChunk)chunk).getHandle();
    PlayerChunk.a(NMSChunk.getSections());
    world.refreshChunk(chunk.getX(),chunk.getZ());
  }
  Map<String,Object> parameters=new HashMap<>();
  parameters.put("String_Node_Str","String_Node_Str");
  parameters.put("String_Node_Str",true);
  JSONObject json=new JSONObject(parameters);
  main.out.println(json.toJSONString());
}
Program: 71231
Project: 71231
Buggy source:
public void function(){
  System.out.println("String_Node_Str");
  System.out.println();
  System.out.print("String_Node_Str");
  Scanner scan=new Scanner(System.in);
  String formula=scan.nextLine();
  String revisedFormula=formula;
  System.out.println();
  System.out.print("String_Node_Str");
  double leftBound=scan.nextDouble();
  System.out.println();
  System.out.print("String_Node_Str");
  double rightBound=scan.nextDouble();
  System.out.println();
  System.out.print("String_Node_Str");
  double step=scan.nextDouble();
  scan.close();
  for (double i=leftBound; i <= rightBound; i+=step) {
    String input=Double.toString(i);
    revisedFormula=formula.replaceAll("String_Node_Str",input);
    coordinates.add(new Coordinate(i,eval(revisedFormula)));
  }
}

Fixed version (ground truth):
public void function(){
  System.out.println("String_Node_Str");
  System.out.println();
  System.out.print("String_Node_Str");
  Scanner scan=new Scanner(System.in);
  String formula=scan.nextLine();
  String revisedFormula=formula;
  System.out.println();
  System.out.print("String_Node_Str");
  double leftBound=scan.nextDouble();
  System.out.println();
  System.out.print("String_Node_Str");
  double rightBound=scan.nextDouble();
  System.out.println();
  System.out.print("String_Node_Str");
  double step=scan.nextDouble();
  scan.close();
  for (double i=leftBound; i <= rightBound; i+=step) {
    String input=Double.toString(i);
    revisedFormula=formula.replaceAll("String_Node_Str","String_Node_Str" + input + "String_Node_Str");
    coordinates.add(new Coordinate(i,eval(revisedFormula)));
  }
  scale(leftBound,rightBound);
}
Program: 71232
Project: 71232
Buggy source:
public static void main(String[] args){
  System.out.println("String_Node_Str");
  Scanner scan=new Scanner(System.in);
  System.out.println("String_Node_Str");
  String isContinuous=scan.nextLine();
  isContinuous=isContinuous.toLowerCase();
  boolean continuity=true;
  if (isContinuous == "String_Node_Str") {
    System.out.println("String_Node_Str");
    continuity=false;
  }
  if (continuity) {
    System.out.println("String_Node_Str");
    double min=scan.nextDouble();
    System.out.println("String_Node_Str");
    double max=scan.nextDouble();
    System.out.println("String_Node_Str");
    double value=scan.nextDouble();
    System.out.println("String_Node_Str");
    if ((min < value) && (max > value)) {
      System.out.println("String_Node_Str");
    }
 else {
      System.out.println("String_Node_Str");
    }
  }
  scan.close();
}

Fixed version (ground truth):
public static void main(String[] args){
  System.out.println("String_Node_Str");
  Scanner scan=new Scanner(System.in);
  System.out.println("String_Node_Str");
  String isContinuous=scan.nextLine();
  isContinuous=isContinuous.toLowerCase();
  if (!isContinuous.equals("String_Node_Str")) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  System.out.println("String_Node_Str");
  double min=scan.nextDouble();
  System.out.println("String_Node_Str");
  double max=scan.nextDouble();
  System.out.println("String_Node_Str");
  double value=scan.nextDouble();
  System.out.println("String_Node_Str");
  if ((min < value) && (max > value)) {
    System.out.println("String_Node_Str");
  }
 else {
    System.out.println("String_Node_Str");
  }
  scan.close();
}
Program: 71233
Project: 71233
Buggy source:
public ServerSocket createServerSocket(int port) throws IOException {
  ServerSocket ss=new ServerSocket();
  if (port == 0) {
    ss.setReuseAddress(false);
  }
  ss.bind(new InetSocketAddress(port));
  return ss;
}

Fixed version (ground truth):
public ServerSocket createServerSocket(int port) throws IOException {
  return new ServerSocket(port);
}
Program: 71234
Project: 71234
Buggy source:
public ServerSocket createServerSocket(int port) throws IOException {
  ServerSocket ss=new ServerSocket();
  if (port == 0) {
    ss.setReuseAddress(false);
  }
  ss.bind(new InetSocketAddress(port));
  return ss;
}

Fixed version (ground truth):
public ServerSocket createServerSocket(int port) throws IOException {
  return new ServerSocket(port);
}
Program: 71236
Project: 71236
Buggy source:
/** 
 * Sets the SO_RCVBUF option to the specified value for this  {@code DatagramSocket}. The SO_RCVBUF option is used by the the network implementation as a hint to size the underlying network I/O buffers. The SO_RCVBUF setting may also be used by the network implementation to determine the maximum size of the packet that can be received on this socket. <p> Because SO_RCVBUF is a hint, applications that want to verify what size the buffers were set to should call  {@link #getReceiveBufferSize()}. <p> Increasing SO_RCVBUF may allow the network implementation to buffer multiple packets when packets arrive faster than are being received using   {@link #receive(DatagramPacket)}. <p> Note: It is implementation specific if a packet larger than SO_RCVBUF can be received.
 * @param size the size to which to set the receive buffersize. This value must be greater than 0.
 * @exception SocketException if there is an error inthe underlying protocol, such as an UDP error.
 * @exception IllegalArgumentException if the value is 0 or isnegative.
 * @see #getReceiveBufferSize()
 */
public synchronized void setReceiveBufferSize(int size) throws SocketException {
  if (size <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isClosed())   throw new SocketException("String_Node_Str");
  getImpl().setOption(SocketOptions.SO_RCVBUF,size);
}

Fixed version (ground truth):
/** 
 * Sets the SO_RCVBUF option to the specified value for this  {@code DatagramSocket}. The SO_RCVBUF option is used by the network implementation as a hint to size the underlying network I/O buffers. The SO_RCVBUF setting may also be used by the network implementation to determine the maximum size of the packet that can be received on this socket. <p> Because SO_RCVBUF is a hint, applications that want to verify what size the buffers were set to should call  {@link #getReceiveBufferSize()}. <p> Increasing SO_RCVBUF may allow the network implementation to buffer multiple packets when packets arrive faster than are being received using   {@link #receive(DatagramPacket)}. <p> Note: It is implementation specific if a packet larger than SO_RCVBUF can be received.
 * @param size the size to which to set the receive buffersize. This value must be greater than 0.
 * @exception SocketException if there is an error inthe underlying protocol, such as an UDP error.
 * @exception IllegalArgumentException if the value is 0 or isnegative.
 * @see #getReceiveBufferSize()
 */
public synchronized void setReceiveBufferSize(int size) throws SocketException {
  if (size <= 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isClosed())   throw new SocketException("String_Node_Str");
  getImpl().setOption(SocketOptions.SO_RCVBUF,size);
}
Program: 71238
Project: 71238
Buggy source:
/** 
 * Sends the Bind request to the SOCKS proxy. In the SOCKS protocol, bind means "accept incoming connection from", so the SocketAddress is the the one of the host we do accept connection from.
 * @param saddr   the Socket address of the remote host.
 * @exception IOException  if an I/O error occurs when binding this socket.
 */
protected synchronized void socksBind(InetSocketAddress saddr) throws IOException {
}

Fixed version (ground truth):
/** 
 * Sends the Bind request to the SOCKS proxy. In the SOCKS protocol, bind means "accept incoming connection from", so the SocketAddress is the one of the host we do accept connection from.
 * @param saddr   the Socket address of the remote host.
 * @exception IOException  if an I/O error occurs when binding this socket.
 */
protected synchronized void socksBind(InetSocketAddress saddr) throws IOException {
}
Program: 71240
Project: 71240
Buggy source:
/** 
 * Obtains an instance of   {@code WeekFields} from the first day-of-week and minimal days.<p> The first day-of-week defines the ISO  {@code DayOfWeek} that is day 1 of the week.The minimal number of days in the first week defines how many days must be present in a month or year, starting from the first day-of-week, before the week is counted as the first week. A value of 1 will count the first day of the month or year as part of the first week, whereas a value of 7 will require the whole seven days to be in the new month or year. <p> WeekFields instances are singletons; for each unique combination of  {@code firstDayOfWeek} and {@code minimalDaysInFirstWeek} thethe same instance will be returned.
 * @param firstDayOfWeek  the first day of the week, not null
 * @param minimalDaysInFirstWeek  the minimal number of days in the first week, from 1 to 7
 * @return the week-definition, not null
 * @throws IllegalArgumentException if the minimal days value is less than oneor greater than 7
 */
public static WeekFields of(DayOfWeek firstDayOfWeek,int minimalDaysInFirstWeek){
  String key=firstDayOfWeek.toString() + minimalDaysInFirstWeek;
  WeekFields rules=CACHE.get(key);
  if (rules == null) {
    rules=new WeekFields(firstDayOfWeek,minimalDaysInFirstWeek);
    CACHE.putIfAbsent(key,rules);
    rules=CACHE.get(key);
  }
  return rules;
}

Fixed version (ground truth):
/** 
 * Obtains an instance of   {@code WeekFields} from the first day-of-week and minimal days.<p> The first day-of-week defines the ISO  {@code DayOfWeek} that is day 1 of the week.The minimal number of days in the first week defines how many days must be present in a month or year, starting from the first day-of-week, before the week is counted as the first week. A value of 1 will count the first day of the month or year as part of the first week, whereas a value of 7 will require the whole seven days to be in the new month or year. <p> WeekFields instances are singletons; for each unique combination of  {@code firstDayOfWeek} and {@code minimalDaysInFirstWeek}the same instance will be returned.
 * @param firstDayOfWeek  the first day of the week, not null
 * @param minimalDaysInFirstWeek  the minimal number of days in the first week, from 1 to 7
 * @return the week-definition, not null
 * @throws IllegalArgumentException if the minimal days value is less than oneor greater than 7
 */
public static WeekFields of(DayOfWeek firstDayOfWeek,int minimalDaysInFirstWeek){
  String key=firstDayOfWeek.toString() + minimalDaysInFirstWeek;
  WeekFields rules=CACHE.get(key);
  if (rules == null) {
    rules=new WeekFields(firstDayOfWeek,minimalDaysInFirstWeek);
    CACHE.putIfAbsent(key,rules);
    rules=CACHE.get(key);
  }
  return rules;
}
Program: 71241
Project: 71241
Buggy source:
/** 
 * The object on which the Event initially occurred.
 * @return   The object on which the Event initially occurred.
 */
public Object getSource(){
  return source;
}

Fixed version (ground truth):
/** 
 * The object on which the Event initially occurred.
 * @return the object on which the Event initially occurred
 */
public Object getSource(){
  return source;
}
Program: 71242
Project: 71242
Buggy source:
/** 
 * Returns a String representation of this EventObject.
 * @return  A a String representation of this EventObject.
 */
public String toString(){
  return getClass().getName() + "String_Node_Str" + source+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Returns a String representation of this EventObject.
 * @return a String representation of this EventObject
 */
public String toString(){
  return getClass().getName() + "String_Node_Str" + source+ "String_Node_Str";
}
Program: 71243
Project: 71243
Buggy source:
/** 
 * Constructs a prototypical Event.
 * @param source    The object on which the Event initially occurred.
 * @exception IllegalArgumentException  if source is null.
 */
public EventObject(Object source){
  if (source == null)   throw new IllegalArgumentException("String_Node_Str");
  this.source=source;
}

Fixed version (ground truth):
/** 
 * Constructs a prototypical Event.
 * @param source the object on which the Event initially occurred
 * @throws IllegalArgumentException if source is null
 */
public EventObject(Object source){
  if (source == null)   throw new IllegalArgumentException("String_Node_Str");
  this.source=source;
}
Program: 71245
Project: 71245
Buggy source:
/** 
 * Static factory. Given a (generic) class, actual type arguments and an owner type, creates a parameterized type. This class can be instantiated with a a raw type that does not represent a generic type, provided the list of actual type arguments is empty. If the ownerType argument is null, the declaring class of the raw type is used as the owner type. <p> This method throws a MalformedParameterizedTypeException under the following circumstances: If the number of actual type arguments (i.e., the size of the array   {@code typeArgs}) does not correspond to the number of formal type arguments. If any of the actual type arguments is not an instance of the bounds on the corresponding formal.
 * @param rawType the Class representing the generic type declaration beinginstantiated
 * @param actualTypeArguments a (possibly empty) array of typesrepresenting the actual type arguments to the parameterized type
 * @param ownerType the enclosing type, if known.
 * @return An instance of {@code ParameterizedType}
 * @throws MalformedParameterizedTypeException if the instantiationis invalid
 */
public static ParameterizedTypeImpl make(Class<?> rawType,Type[] actualTypeArguments,Type ownerType){
  return new ParameterizedTypeImpl(rawType,actualTypeArguments,ownerType);
}

Fixed version (ground truth):
/** 
 * Static factory. Given a (generic) class, actual type arguments and an owner type, creates a parameterized type. This class can be instantiated with a raw type that does not represent a generic type, provided the list of actual type arguments is empty. If the ownerType argument is null, the declaring class of the raw type is used as the owner type. <p> This method throws a MalformedParameterizedTypeException under the following circumstances: If the number of actual type arguments (i.e., the size of the array   {@code typeArgs}) does not correspond to the number of formal type arguments. If any of the actual type arguments is not an instance of the bounds on the corresponding formal.
 * @param rawType the Class representing the generic type declaration beinginstantiated
 * @param actualTypeArguments a (possibly empty) array of typesrepresenting the actual type arguments to the parameterized type
 * @param ownerType the enclosing type, if known.
 * @return An instance of {@code ParameterizedType}
 * @throws MalformedParameterizedTypeException if the instantiationis invalid
 */
public static ParameterizedTypeImpl make(Class<?> rawType,Type[] actualTypeArguments,Type ownerType){
  return new ParameterizedTypeImpl(rawType,actualTypeArguments,ownerType);
}
Program: 71247
Project: 71247
Buggy source:
/** 
 * Get the certificate constraints path length from the the critical BasicConstraints extension, (oid = 2.5.29.19).
 * @return the length of the constraint.
 */
public int getBasicConstraints(){
  try {
    String extAlias=OIDMap.getName(PKIXExtensions.BasicConstraints_Id);
    if (extAlias == null)     return -1;
    BasicConstraintsExtension certExt=(BasicConstraintsExtension)this.get(extAlias);
    if (certExt == null)     return -1;
    if (((Boolean)certExt.get(BasicConstraintsExtension.IS_CA)).booleanValue() == true)     return ((Integer)certExt.get(BasicConstraintsExtension.PATH_LEN)).intValue();
 else     return -1;
  }
 catch (  Exception e) {
    return -1;
  }
}

Fixed version (ground truth):
/** 
 * Get the certificate constraints path length from the critical BasicConstraints extension, (oid = 2.5.29.19).
 * @return the length of the constraint.
 */
public int getBasicConstraints(){
  try {
    String extAlias=OIDMap.getName(PKIXExtensions.BasicConstraints_Id);
    if (extAlias == null)     return -1;
    BasicConstraintsExtension certExt=(BasicConstraintsExtension)this.get(extAlias);
    if (certExt == null)     return -1;
    if (((Boolean)certExt.get(BasicConstraintsExtension.IS_CA)).booleanValue() == true)     return ((Integer)certExt.get(BasicConstraintsExtension.PATH_LEN)).intValue();
 else     return -1;
  }
 catch (  Exception e) {
    return -1;
  }
}
Program: 71248
Project: 71248
Buggy source:
/** 
 * Get the particular property in the underlying implementation of  {@code Marshaller}.  This method can only be used to get one of the standard JAXB defined properties above or a provider specific property.  Attempting to get an undefined property will result in a PropertyException being thrown.  See <a href="#supportedProps"> Supported Properties</a>.
 * @param name the name of the property to retrieve
 * @return the value of the requested property
 * @throws PropertyException when there is an error retrieving the given property or value property name
 * @throws IllegalArgumentException If the name parameter is null
 */
public Object getProperty(String name) throws PropertyException ;

Fixed version (ground truth):
/** 
 * Get the particular property in the underlying implementation of  {@code Marshaller}.  This method can only be used to get one of the standard JAXB defined properties above or a provider specific property.  Attempting to get an undefined property will result in a PropertyException being thrown.  See <a href="  {@docRoot}/javax/xml/bind/Marshaller.html#supportedProps"> Supported Properties</a>.
 * @param name the name of the property to retrieve
 * @return the value of the requested property
 * @throws PropertyException when there is an error retrieving the given property or value property name
 * @throws IllegalArgumentException If the name parameter is null
 */
public Object getProperty(String name) throws PropertyException ;
Program: 71249
Project: 71249
Buggy source:
/** 
 * Marshal the content tree rooted at   {@code jaxbElement} into a{@link javax.xml.stream.XMLEventWriter}.
 * @param jaxbElement The content tree rooted at jaxbElement to be marshalled.
 * @param writer XML will be sent to this writer.
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 * @throws MarshalException If the  {@link ValidationEventHandler ValidationEventHandler}returns false from its   {@code handleEvent} method or the{@code Marshaller} is unable to marshal {@code jaxbElement} (or anyobject reachable from  {@code jaxbElement}).  See <a href="#elementMarshalling"> Marshalling a JAXB element</a>.
 * @throws IllegalArgumentException If any of the method parameters are null
 * @since 1.6, JAXB 2.0
 */
public void marshal(Object jaxbElement,javax.xml.stream.XMLEventWriter writer) throws JAXBException ;

Fixed version (ground truth):
/** 
 * Marshal the content tree rooted at   {@code jaxbElement} into a{@link javax.xml.stream.XMLEventWriter}.
 * @param jaxbElement The content tree rooted at jaxbElement to be marshalled.
 * @param writer XML will be sent to this writer.
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 * @throws MarshalException If the  {@link ValidationEventHandler ValidationEventHandler}returns false from its   {@code handleEvent} method or the{@code Marshaller} is unable to marshal {@code jaxbElement} (or anyobject reachable from  {@code jaxbElement}).  See <a href="  {@docRoot}/javax/xml/bind/Marshaller.html#elementMarshalling"> Marshalling a JAXB element</a>.
 * @throws IllegalArgumentException If any of the method parameters are null
 * @since 1.6, JAXB 2.0
 */
public void marshal(Object jaxbElement,javax.xml.stream.XMLEventWriter writer) throws JAXBException ;
Program: 71250
Project: 71250
Buggy source:
/** 
 * Set the particular property in the underlying implementation of  {@code Marshaller}.  This method can only be used to set one of the standard JAXB defined properties above or a provider specific property.  Attempting to set an undefined property will result in a PropertyException being thrown.  See <a href="#supportedProps"> Supported Properties</a>.
 * @param name the name of the property to be set. This value can eitherbe specified using one of the constant fields or a user supplied string.
 * @param value the value of the property to be set
 * @throws PropertyException when there is an error processing the givenproperty or value
 * @throws IllegalArgumentException If the name parameter is null
 */
public void setProperty(String name,Object value) throws PropertyException ;

Fixed version (ground truth):
/** 
 * Set the particular property in the underlying implementation of  {@code Marshaller}.  This method can only be used to set one of the standard JAXB defined properties above or a provider specific property.  Attempting to set an undefined property will result in a PropertyException being thrown.  See <a href="  {@docRoot}/javax/xml/bind/Marshaller.html#supportedProps"> Supported Properties</a>.
 * @param name the name of the property to be set. This value can eitherbe specified using one of the constant fields or a user supplied string.
 * @param value the value of the property to be set
 * @throws PropertyException when there is an error processing the givenproperty or value
 * @throws IllegalArgumentException If the name parameter is null
 */
public void setProperty(String name,Object value) throws PropertyException ;
Program: 71251
Project: 71251
Buggy source:
/** 
 * Returns a   {@code LockInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must contain the following attributes:<blockquote> <table border="1"> <caption style="display:none">The attributes and the types the given CompositeData contains</caption> <tr> <th style="text-align:left">Attribute Name</th> <th style="text-align:left">Type</th> </tr> <tr> <td>className</td> <td> {@code java.lang.String}</td> </tr> <tr> <td>identityHashCode</td> <td>  {@code java.lang.Integer}</td> </tr> </table> </blockquote>
 * @param cd {@code CompositeData} representing a {@code LockInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code LockInfo} with the attributes describedabove.
 * @return a {@code LockInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 * @since 1.8
 */
public static LockInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof LockInfoCompositeData) {
    return ((LockInfoCompositeData)cd).getLockInfo();
  }
 else {
    return LockInfoCompositeData.toLockInfo(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a   {@code LockInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must contain the following attributes:<table class="striped" style="margin-left:2em;"> <caption style="display:none">The attributes and the types the given CompositeData contains</caption> <thead style="text-align:left"> <tr> <th scope="col">Attribute Name</th> <th scope="col">Type</th> </tr> </thead> <tbody style="text-align:left"> <tr> <th scope="row">className</th> <td> {@code java.lang.String}</td> </tr> <tr> <th scope="row">identityHashCode</th> <td>  {@code java.lang.Integer}</td> </tr> </tbody> </table>
 * @param cd {@code CompositeData} representing a {@code LockInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code LockInfo} with the attributes describedabove.
 * @return a {@code LockInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 * @since 1.8
 */
public static LockInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof LockInfoCompositeData) {
    return ((LockInfoCompositeData)cd).getLockInfo();
  }
 else {
    return LockInfoCompositeData.toLockInfo(cd);
  }
}
Program: 71252
Project: 71252
Buggy source:
/** 
 * Returns a   {@code MemoryNotificationInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must containthe following attributes: <blockquote> <table border="1"> <caption style="display:none">The attributes and the types the given CompositeData contains</caption> <tr> <th style="text-align:left">Attribute Name</th> <th style="text-align:left">Type</th> </tr> <tr> <td>poolName</td> <td> {@code java.lang.String}</td> </tr> <tr> <td>usage</td> <td>  {@code javax.management.openmbean.CompositeData}</td> </tr> <tr> <td>count</td> <td>  {@code java.lang.Long}</td> </tr> </table> </blockquote>
 * @param cd {@code CompositeData} representing a{@code MemoryNotificationInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code MemoryNotificationInfo} object.
 * @return a {@code MemoryNotificationInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}

Fixed version (ground truth):
/** 
 * Returns a   {@code MemoryNotificationInfo} object represented by thegiven  {@code CompositeData}. The given   {@code CompositeData} must containthe following attributes: <table class="striped" style="margin-left:2em"> <caption style="display:none">The attributes and the types the given CompositeData contains</caption> <thead> <tr> <th scope="col">Attribute Name</th> <th scope="col">Type</th> </tr> </thead> <tbody style="text-align:left"> <tr> <th scope="row">poolName</th> <td> {@code java.lang.String}</td> </tr> <tr> <th scope="row">usage</th> <td>  {@code javax.management.openmbean.CompositeData}</td> </tr> <tr> <th scope="row">count</th> <td>  {@code java.lang.Long}</td> </tr> </tbody> </table>
 * @param cd {@code CompositeData} representing a{@code MemoryNotificationInfo}
 * @throws IllegalArgumentException if {@code cd} does notrepresent a  {@code MemoryNotificationInfo} object.
 * @return a {@code MemoryNotificationInfo} object representedby  {@code cd} if {@code cd} is not {@code null};  {@code null} otherwise.
 */
public static MemoryNotificationInfo from(CompositeData cd){
  if (cd == null) {
    return null;
  }
  if (cd instanceof MemoryNotifInfoCompositeData) {
    return ((MemoryNotifInfoCompositeData)cd).getMemoryNotifInfo();
  }
 else {
    return new MemoryNotificationInfo(cd);
  }
}