nus-yam/ex-repair huggingface dataset:
Program: 86253
Project: 86253
Buggy source:
@Override public RawData read(InputStream source) throws IOException {
  Reader reader=new InputStreamReader(source,Charset.forName("String_Node_Str"));
  CSVReader dsvReader=new CSVReader(reader,delimiter);
  List<String[]> lines=dsvReader.readAll();
  validate(lines);
  if (lines.isEmpty()) {
    return new RawData(emptyList(),emptyList());
  }
  int headerCount=lines.get(0).length;
  List<Field<?>> fields=new ArrayList<>(headerCount);
  for (int i=0; i < headerCount; i++) {
    final String fieldName=expectingHeaders ? lines.get(0)[i] : "String_Node_Str" + i;
    if (fieldType(lines,i) == NumberField.class) {
      fields.add(new NumberField(fieldName));
    }
 else     if (fieldType(lines,i) == TextField.class) {
      fields.add(new TextField(fieldName));
    }
  }
  List<Entry> entries=new ArrayList<>(lines.size() - indexOfFirstEntry());
  for (int i=indexOfFirstEntry(); i < lines.size(); i++) {
    Entry entry=new SimpleEntry();
    for (int j=0; j < fields.size(); j++) {
      Field currentField=fields.get(j);
      entry.set(currentField,currentField.getStringConverter().fromString(lines.get(i)[j]));
    }
    entries.add(entry);
  }
  return new RawData(fields,entries);
}

Fixed version (ground truth):
@Override public RawData read(InputStream source) throws IOException {
  Reader reader=new InputStreamReader(source,Charset.forName("String_Node_Str"));
  CSVReader dsvReader=new CSVReader(reader,delimiter);
  List<String[]> lines=dsvReader.readAll().stream().filter(line -> line.length != 1 || !line[0].equals("String_Node_Str")).collect(Collectors.toList());
  validate(lines);
  if (lines.isEmpty()) {
    return new RawData(emptyList(),emptyList());
  }
  int headerCount=lines.get(0).length;
  List<Field<?>> fields=new ArrayList<>(headerCount);
  for (int i=0; i < headerCount; i++) {
    final String fieldName=expectingHeaders ? lines.get(0)[i] : "String_Node_Str" + i;
    if (fieldType(lines,i) == NumberField.class) {
      fields.add(new NumberField(fieldName));
    }
 else     if (fieldType(lines,i) == TextField.class) {
      fields.add(new TextField(fieldName));
    }
  }
  List<Entry> entries=new ArrayList<>(lines.size() - indexOfFirstEntry());
  for (int i=indexOfFirstEntry(); i < lines.size(); i++) {
    Entry entry=new SimpleEntry();
    for (int j=0; j < fields.size(); j++) {
      Field currentField=fields.get(j);
      entry.set(currentField,currentField.getStringConverter().fromString(lines.get(i)[j]));
    }
    entries.add(entry);
  }
  return new RawData(fields,entries);
}
Program: 86254
Project: 86254
Buggy source:
private void initializeControl(Variable<T> variable){
  int index=getChildren().size();
  VariableBindingControl control=new VariableBindingControl(variable,fields);
  Field field=fields.get(index);
  control.setFieldSelection(field);
  variable.getFormats().stream().min(comparing(variableFormat -> {
    return new LevenshteinDistance(variableFormat.getName(),field.getName()).compute();
  }
)).ifPresent(control::setVariableFormatSelection);
  getChildren().add(control);
}

Fixed version (ground truth):
private void initializeControl(Variable<T> variable){
  VariableBindingControl control=new VariableBindingControl(variable,fields);
  int defaultFieldIndex=min(controlIndex(),fields.size() - 1);
  Field field=fields.get(defaultFieldIndex);
  control.setFieldSelection(field);
  variable.getFormats().stream().min(comparing(variableFormat -> {
    return new LevenshteinDistance(variableFormat.getName(),field.getName()).compute();
  }
)).ifPresent(control::setVariableFormatSelection);
  getChildren().add(control);
}
Program: 86255
Project: 86255
Buggy source:
@Test public void testInitialization(){
}

Fixed version (ground truth):
@Test public void testInitialization(){
  testVariableBindingView(oneVariable,oneField);
}
Program: 86256
Project: 86256
Buggy source:
@Override public void start(Stage stage) throws Exception {
  Scene scene=new Scene(new VariableBindingView(variables,fields));
  stage.setScene(scene);
  stage.show();
}

Fixed version (ground truth):
@Override public void start(Stage stage) throws Exception {
  parent=new Pane();
  Scene scene=new Scene(parent);
  stage.setScene(scene);
  stage.show();
}
Program: 86257
Project: 86257
Buggy source:
private void initializeAndShow(JavaScriptChart javaScriptChart){
  getCurrentTable().map(dataTableToSet::get).ifPresent(dataset -> {
    initializeAndShow(javaScriptChart,dataset);
  }
);
}

Fixed version (ground truth):
private void initializeAndShow(JavaScriptChart javaScriptChart){
  getCurrentTable().map(TSVTable::getDataset).ifPresent(dataset -> {
    initializeAndShow(javaScriptChart,dataset);
  }
);
}
Program: 86258
Project: 86258
Buggy source:
void loadDataSet(Dataset dataset,Tab tab){
  Node content=tab.getContent();
  if (content instanceof TSVTable) {
    TSVTable table=(TSVTable)content;
    table.setDataset(dataset);
    dataTableToSet.put(table,dataset);
    datasetManager.open(dataset);
    dataset.getName().ifPresent(name -> {
      tab.setText(name);
    }
);
  }
}

Fixed version (ground truth):
void loadDataSet(Dataset dataset,Tab tab){
  Node content=tab.getContent();
  if (content instanceof TSVTable) {
    TSVTable table=(TSVTable)content;
    table.setDataset(dataset);
    datasetManager.open(dataset);
    dataset.getName().ifPresent(name -> {
      tab.setText(name);
    }
);
  }
}
Program: 86259
Project: 86259
Buggy source:
Tab createTab(){
  Tab dataTableTab=new Tab("String_Node_Str");
  dataTableTab.setOnClosed(event -> {
    if (dataTableTab.getContent() instanceof TSVTable) {
      TSVTable table=(TSVTable)dataTableTab.getContent();
      if (dataTableToSet.containsKey(table)) {
        datasetManager.close(dataTableToSet.get(table));
      }
    }
  }
);
  TSVTable dataTable=new TSVTable();
  dataTable.setPlaceholder(new EmptyTablePlaceholder(dataTable));
  dataTableTab.setContent(dataTable);
  dataTableTabPane.getTabs().add(dataTableTab);
  return dataTableTab;
}

Fixed version (ground truth):
Tab createTab(){
  Tab dataTableTab=new Tab("String_Node_Str");
  dataTableTab.setOnClosed(event -> {
    if (dataTableTab.getContent() instanceof TSVTable) {
      TSVTable table=(TSVTable)dataTableTab.getContent();
    }
  }
);
  TSVTable dataTable=new TSVTable();
  dataTable.setPlaceholder(new EmptyTablePlaceholder(dataTable));
  dataTableTab.setContent(dataTable);
  dataTableTabPane.getTabs().add(dataTableTab);
  return dataTableTab;
}
Program: 86260
Project: 86260
Buggy source:
@FXML void loadCustomScripts(){
  chartsMenu.getItems().retainAll(chartsMenu.getItems().subList(0,2));
  Path topsoilScripts=new GetDocumentsDirectoryOperation().perform("String_Node_Str");
  if (Files.exists(topsoilScripts)) {
    try {
      Files.walk(topsoilScripts).forEach(filePath -> {
        String fileName=filePath.getFileName().toString();
        if (fileName.matches("String_Node_Str")) {
          MenuItem chartItem=new MenuItem(fileName.replace("String_Node_Str","String_Node_Str"));
          chartItem.setOnAction(event -> {
            initializeAndShow(new JavaScriptChart(filePath),getCurrentTable().map(dataTableToSet::get).get());
          }
);
          chartsMenu.getItems().add(chartItem);
        }
      }
);
    }
 catch (    IOException ex) {
      LOGGER.log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
@FXML void loadCustomScripts(){
  chartsMenu.getItems().retainAll(chartsMenu.getItems().subList(0,2));
  Path topsoilScripts=new GetDocumentsDirectoryOperation().perform("String_Node_Str");
  if (Files.exists(topsoilScripts)) {
    try {
      Files.walk(topsoilScripts).forEach(filePath -> {
        String fileName=filePath.getFileName().toString();
        if (fileName.matches("String_Node_Str")) {
          MenuItem chartItem=new MenuItem(fileName.replace("String_Node_Str","String_Node_Str"));
          chartItem.setOnAction(event -> {
            initializeAndShow(new JavaScriptChart(filePath),getCurrentTable().map(TSVTable::getDataset).get());
          }
);
          chartsMenu.getItems().add(chartItem);
        }
      }
);
    }
 catch (    IOException ex) {
      LOGGER.log(Level.SEVERE,null,ex);
    }
  }
}
Program: 86261
Project: 86261
Buggy source:
/** 
 * Initializes the controller class.
 * @param url
 * @param resources
 */
@Override public void initialize(URL url,ResourceBundle resources){
  dataTableToSet=new HashMap<>();
  datasetManager=new TSVDatasetManager(DATA_SETS_DIRECTORY);
  datasetManager.getDatasets().stream().filter(datasetManager::isOpen).forEach(this::loadDataSet);
  loadCustomScripts();
  reloadDatasetMenu();
  String applicationName=resources.getString("String_Node_Str");
  String applicationVersion=resources.getString("String_Node_Str");
  setWindowTitle(String.format("String_Node_Str",applicationName,applicationVersion));
}

Fixed version (ground truth):
/** 
 * Initializes the controller class.
 * @param url
 * @param resources
 */
@Override public void initialize(URL url,ResourceBundle resources){
  datasetManager=new TSVDatasetManager(DATA_SETS_DIRECTORY);
  datasetManager.getDatasets().stream().filter(datasetManager::isOpen).forEach(this::loadDataSet);
  loadCustomScripts();
  reloadDatasetMenu();
  String applicationName=resources.getString("String_Node_Str");
  String applicationVersion=resources.getString("String_Node_Str");
  setWindowTitle(String.format("String_Node_Str",applicationName,applicationVersion));
}
Program: 86262
Project: 86262
Buggy source:
@Override public boolean isOpen(Dataset dataset){
  return datasetToPath.get(dataset).getParent().equals(getOpenPath());
}

Fixed version (ground truth):
@Override public boolean isOpen(Dataset dataset){
  return Optional.of(dataset).map(datasetToPath::get).map(Path::getParent).map(parent -> parent.equals(getOpenPath())).orElse(false);
}
Program: 86263
Project: 86263
Buggy source:
@Override public void close(Dataset dataset){
  if (datasetToPath.get(dataset).getParent().equals(getClosedPath())) {
    return;
  }
  try {
    Path datasetPath=datasetToPath.get(dataset);
    Files.move(datasetPath,getClosedPath().resolve(datasetPath.getFileName()));
  }
 catch (  IOException ex) {
    LOGGER.log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
@Override public void close(Dataset dataset){
  if (isClosed(dataset)) {
    return;
  }
  try {
    Path datasetPath=datasetToPath.get(dataset);
    Files.move(datasetPath,getClosedPath().resolve(datasetPath.getFileName()));
  }
 catch (  IOException ex) {
    LOGGER.log(Level.SEVERE,null,ex);
  }
}
Program: 86264
Project: 86264
Buggy source:
@Override public void open(Dataset dataset){
  if (datasetToPath.get(dataset).getParent().equals(getOpenPath())) {
    return;
  }
  try {
    Path datasetPath=datasetToPath.get(dataset);
    Files.move(datasetPath,getOpenPath().resolve(datasetPath.getFileName()));
  }
 catch (  IOException ex) {
    LOGGER.log(Level.SEVERE,null,ex);
  }
}

Fixed version (ground truth):
@Override public void open(Dataset dataset){
  if (isOpen(dataset)) {
    return;
  }
  try {
    Path datasetPath=datasetToPath.get(dataset);
    Files.move(datasetPath,getOpenPath().resolve(datasetPath.getFileName()));
  }
 catch (  IOException ex) {
    LOGGER.log(Level.SEVERE,null,ex);
  }
}
Program: 86265
Project: 86265
Buggy source:
/** 
 * Test of normalizeAbsolute method, of class UncertaintyVariableFormat.
 */
@Test public void testNormalizeAbsolute(){
  assertEquals(3.14,oneSigmaAbsolute.normalizeAbsolute(3.14),10e-10);
  assertEquals(3.14,twoSigmaAbsolute.normalizeAbsolute(6.28),10e-10);
}

Fixed version (ground truth):
/** 
 * Test of normalizeAbsolute method, of class UncertaintyVariableFormat.
 */
@Test public void testNormalizeAbsolute(){
  assertEquals(3.24,oneSigmaAbsolute.normalizeAbsolute(3.24),10e-10);
  assertEquals(3.24,twoSigmaAbsolute.normalizeAbsolute(6.48),10e-10);
}
Program: 86266
Project: 86266
Buggy source:
@Override public void write(Dataset dataset,OutputStream destination) throws IOException {
  Writer outputStreamWriter=new OutputStreamWriter(destination,Charset.forName("String_Node_Str"));
  try (CSVWriter tsvWriter=new CSVWriter(outputStreamWriter,'\t')){
    int actualColumnCount=Math.max(requiredColumnCount,dataset.getFields().size());
    String[] line=new String[actualColumnCount];
    for (int i=0; i < dataset.getFields().size(); i++) {
      line[i]=dataset.getFields().get(i).getName();
    }
    for (int i=dataset.getFields().size(); i < actualColumnCount; i++) {
      line[i]="String_Node_Str" + (i - dataset.getFields().size() + 1);
    }
    tsvWriter.writeNext(line);
    for (    Entry entry : dataset.getEntries()) {
      for (int i=0; i < dataset.getFields().size() + 1; i++) {
        Field field=dataset.getFields().get(i);
        line[i]=entry.get(field).get().toString();
      }
      for (int i=dataset.getFields().size(); i < actualColumnCount; i++) {
        line[i]="String_Node_Str";
      }
      tsvWriter.writeNext(line);
    }
  }
 }

Fixed version (ground truth):
@Override public void write(Dataset dataset,OutputStream destination) throws IOException {
  Writer outputStreamWriter=new OutputStreamWriter(destination,Charset.forName("String_Node_Str"));
  try (CSVWriter tsvWriter=new CSVWriter(outputStreamWriter,'\t')){
    int actualColumnCount=Math.max(requiredColumnCount,dataset.getFields().size());
    String[] line=new String[actualColumnCount];
    for (int i=0; i < dataset.getFields().size(); i++) {
      line[i]=dataset.getFields().get(i).getName();
    }
    for (int i=dataset.getFields().size(); i < actualColumnCount; i++) {
      line[i]="String_Node_Str" + (i - dataset.getFields().size() + 1);
    }
    tsvWriter.writeNext(line);
    for (    Entry entry : dataset.getEntries()) {
      for (int i=0; i < dataset.getFields().size(); i++) {
        Field field=dataset.getFields().get(i);
        line[i]=entry.get(field).get().toString();
      }
      for (int i=dataset.getFields().size(); i < actualColumnCount; i++) {
        line[i]="String_Node_Str";
      }
      tsvWriter.writeNext(line);
    }
  }
 }
Program: 86267
Project: 86267
Buggy source:
public ColumnSelectorDialog(TableView<Record> tableToReadArg){
  super(null,null);
  setContent(new ColumnSelectorView(tableToReadArg));
  getActions().addAll(new ColumnSelectorAction(tableToReadArg),Dialog.ACTION_CANCEL);
  setResizable(false);
  setMasthead(MASTHEAD_TEXT);
}

Fixed version (ground truth):
public ColumnSelectorDialog(TableView<Record> tableToReadArg){
  super(null,null);
  setContent(new ColumnSelectorView(tableToReadArg,this));
  getActions().addAll(new ColumnSelectorAction(tableToReadArg,this),Dialog.ACTION_CANCEL);
  setResizable(false);
  setMasthead(MASTHEAD_TEXT);
}
Program: 86268
Project: 86268
Buggy source:
@FXML private void exportToSVG(){
  SVGExportDialog exportpanel=new SVGExportDialog(this,chart);
  exportpanel.show();
}

Fixed version (ground truth):
@FXML private void exportToSVG(){
  NodeToSVGConverter converter=new NodeToSVGConverter();
  FileChooser fileChooser=new FileChooser();
  fileChooser.setTitle("String_Node_Str");
  fileChooser.setInitialDirectory(new File(System.getProperty("String_Node_Str")));
  fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"));
  File file=fileChooser.showSaveDialog(getScene().getWindow());
  if (file != null) {
    converter.convert(chart,file);
  }
}
Program: 86269
Project: 86269
Buggy source:
@Override protected Path performOnWindows(String... params){
  if (params.length != 1 || params[0] == null || params[0].equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return Paths.get(System.getProperty("String_Node_Str"),params[0]);
}

Fixed version (ground truth):
@Override protected Path performOnWindows(String... params){
  if (params.length != 1 || params[0] == null || params[0].equals("String_Node_Str")) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return Paths.get(System.getenv("String_Node_Str"),params[0]);
}
Program: 86270
Project: 86270
Buggy source:
@Override public void start(Stage primaryStage) throws Exception {
  Files.createDirectory(TOPSOIL_PATH);
  if (Files.exists(OLD_LAST_TABLE_PATH)) {
    Files.move(OLD_LAST_TABLE_PATH,LAST_TABLE_PATH);
  }
  Files.deleteIfExists(OLD_TOPSOIL_PATH);
  ResourceBundle bundle=ResourceBundle.getBundle("String_Node_Str");
  Pane root=(Pane)FXMLLoader.load(getClass().getResource("String_Node_Str"),bundle);
  primaryStage.setScene(new Scene(root));
  primaryStage.setTitle(String.format("String_Node_Str",bundle.getString("String_Node_Str"),bundle.getString("String_Node_Str")));
  primaryStage.show();
}

Fixed version (ground truth):
@Override public void start(Stage primaryStage) throws Exception {
  Files.createDirectories(TOPSOIL_PATH);
  if (Files.exists(OLD_LAST_TABLE_PATH)) {
    Files.move(OLD_LAST_TABLE_PATH,LAST_TABLE_PATH);
  }
  Files.deleteIfExists(OLD_TOPSOIL_PATH);
  ResourceBundle bundle=ResourceBundle.getBundle("String_Node_Str");
  Pane root=(Pane)FXMLLoader.load(getClass().getResource("String_Node_Str"),bundle);
  primaryStage.setScene(new Scene(root));
  primaryStage.setTitle(String.format("String_Node_Str",bundle.getString("String_Node_Str"),bundle.getString("String_Node_Str")));
  primaryStage.show();
}
Program: 86271
Project: 86271
Buggy source:
@Override public ErrorEllipse convert(XYChart.Data data){
  Map<Object,Double> ellipse_data=(Map<Object,Double>)data.getExtraValue();
  double x=ellipse_data.get(key_x);
  double y=ellipse_data.get(key_y);
  double sigmax=ellipse_data.get(key_sigmax);
  double sigmay=ellipse_data.get(key_sigmay);
  double rho=ellipse_data.get(key_rho);
  return new ErrorEllipse(x,y,sigmay,sigmay,rho);
}

Fixed version (ground truth):
@Override public ErrorEllipse convert(XYChart.Data data){
  Map<Object,Double> ellipse_data=(Map<Object,Double>)data.getExtraValue();
  double x=ellipse_data.get(key_x);
  double y=ellipse_data.get(key_y);
  double sigmax=ellipse_data.get(key_sigmax);
  double sigmay=ellipse_data.get(key_sigmay);
  double rho=ellipse_data.get(key_rho);
  return new ErrorEllipse(x,y,sigmax,sigmay,rho);
}
Program: 86272
Project: 86272
Buggy source:
public StreamManager(@NonNull UsbDeviceConnection connection,@NonNull VideoStreamingInterface streamingInterface){
  this.connection=connection;
  this.streamingInterface=streamingInterface;
}

Fixed version (ground truth):
public StreamManager(@NonNull UsbDeviceConnection connection,@NonNull VideoControlInterface controlInterface,@NonNull VideoStreamingInterface streamingInterface){
  this.connection=connection;
  this.controlInterface=controlInterface;
  this.streamingInterface=streamingInterface;
}
Program: 86273
Project: 86273
Buggy source:
public void establishStreaming(@Nullable VideoFormat format,@Nullable VideoFrame frame){
  final ProbeControl current=ProbeControl.getCurrentProbe(streamingInterface);
  int retval=connection.controlTransfer(current.getRequestType(),current.getRequest(),current.getValue(),current.getIndex(),current.getData(),current.getLength(),500);
  Timber.d("String_Node_Str",(retval > 0 ? retval : LibusbError.fromNative(retval)));
  Timber.d("String_Node_Str",Hexdump.dumpHexString(current.getData()));
  final ProbeControl request=ProbeControl.setCurrentProbe(streamingInterface);
  request.setFormatIndex(2);
  request.setFrameIndex(2);
  request.setFrameInterval(333333);
  request.setMaxVideoFrameSize(1843200);
  request.setMaxPayloadTransferSize(3072);
  final ProbeControl commit=request.getCommit();
  retval=connection.controlTransfer(commit.getRequestType(),commit.getRequest(),commit.getValue(),commit.getIndex(),commit.getData(),commit.getLength(),500);
  Timber.d("String_Node_Str",(retval > 0 ? retval : LibusbError.fromNative(retval)));
  initiateStream();
}

Fixed version (ground truth):
public void establishStreaming(@Nullable VideoFormat format,@Nullable VideoFrame frame){
  final ProbeControl current=ProbeControl.getCurrentProbe(streamingInterface);
  int retval=connection.controlTransfer(current.getRequestType(),current.getRequest(),current.getValue(),current.getIndex(),current.getData(),current.getLength(),500);
  Timber.d("String_Node_Str",(retval > 0 ? retval : LibusbError.fromNative(retval)));
  Timber.d("String_Node_Str",Hexdump.dumpHexString(current.getData()));
  final ProbeControl request=ProbeControl.setCurrentProbe(streamingInterface);
  request.setFormatIndex(2);
  request.setFrameIndex(2);
  request.setFrameInterval(333333);
  request.setMaxVideoFrameSize(1843200);
  request.setMaxPayloadTransferSize(3072);
  final ProbeControl commit=request.getCommit();
  retval=connection.controlTransfer(commit.getRequestType(),commit.getRequest(),commit.getValue(),commit.getIndex(),commit.getData(),commit.getLength(),500);
  Timber.d("String_Node_Str",(retval > 0 ? retval : LibusbError.fromNative(retval)));
  final RequestErrorCode requestErrorCode=RequestErrorCode.getCurrentErrorCode(controlInterface);
  retval=connection.controlTransfer(requestErrorCode.getRequestType(),requestErrorCode.getRequest(),requestErrorCode.getValue(),requestErrorCode.getIndex(),requestErrorCode.getData(),requestErrorCode.getLength(),500);
  Timber.d("String_Node_Str",Hexdump.toHexString(requestErrorCode.getData()[0]));
  initiateStream();
}
Program: 86274
Project: 86274
Buggy source:
public void initiateStream(){
  streamingInterface.selectAlternateSetting(connection,6);
  ByteBuffer buffer=ByteBuffer.allocateDirect(4096);
  Endpoint endpoint=streamingInterface.getCurrentEndpoints()[0];
  UsbEndpoint usbEndpoint=streamingInterface.getUsbInterface().getEndpoint(0);
  streamingInterface.printEndpoints();
  try {
    IsochronousAsyncTransfer transfer=new IsochronousAsyncTransfer(this,usbEndpoint,connection,buffer,20);
    int result=connection.isochronousTransfer(this,transfer,usbEndpoint,buffer,500);
    Timber.d("String_Node_Str",result > 0 ? result : LibusbError.fromNative(result));
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void initiateStream(){
  streamingInterface.selectAlternateSetting(connection,6);
  ByteBuffer buffer=ByteBuffer.allocateDirect(4096);
  Endpoint endpoint=streamingInterface.getCurrentEndpoints()[0];
  try {
    IsochronousAsyncTransfer transfer=new IsochronousAsyncTransfer(this,endpoint.getEndpoint(),connection,buffer,20);
    transfer.submit(buffer,500);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 86275
Project: 86275
Buggy source:
WebcamConnection(@NonNull Context context,@NonNull android.hardware.usb.UsbDevice usbDevice) throws UnknownDeviceException, DevicePermissionDenied {
  this.usbManager=new UsbManager(context);
  if (usbDevice.getInterfaceCount() < 2) {
    throw new UnknownDeviceException();
  }
  Timber.d("String_Node_Str");
  usbDeviceConnection=usbManager.registerDevice(usbDevice);
  parseAssiociationDescriptors();
  VideoStreamingInterface streamingInterface=(VideoStreamingInterface)activeIAD.getInterface(1);
  Timber.d("String_Node_Str");
  streamManager=new StreamManager(usbDeviceConnection,streamingInterface);
  streamManager.establishStreaming(null,null);
}

Fixed version (ground truth):
WebcamConnection(@NonNull Context context,@NonNull android.hardware.usb.UsbDevice usbDevice) throws UnknownDeviceException, DevicePermissionDenied {
  this.usbManager=new UsbManager(context);
  if (usbDevice.getInterfaceCount() < 2) {
    throw new UnknownDeviceException();
  }
  Timber.d("String_Node_Str");
  usbDeviceConnection=usbManager.registerDevice(usbDevice);
  parseAssiociationDescriptors();
  VideoControlInterface controlInterface=(VideoControlInterface)activeIAD.getInterface(0);
  VideoStreamingInterface streamingInterface=(VideoStreamingInterface)activeIAD.getInterface(1);
  Timber.d("String_Node_Str");
  streamManager=new StreamManager(usbDeviceConnection,controlInterface,streamingInterface);
  streamManager.establishStreaming(null,null);
}
Program: 86277
Project: 86277
Buggy source:
public void addEndpoint(int index,@NonNull Endpoint endpoint){
  Timber.d("String_Node_Str",currentSetting,index,endpoint);
  Endpoint[] array=endpoints.get(currentSetting);
  Timber.v("String_Node_Str",array,array.length);
  array[index - 1]=endpoint;
  Timber.w("String_Node_Str",Arrays.toString(array));
  endpoints.put(currentSetting,array);
}

Fixed version (ground truth):
public void addEndpoint(int index,@NonNull Endpoint endpoint){
  endpoints.get(currentSetting)[index - 1]=endpoint;
}
Program: 86278
Project: 86278
Buggy source:
public void selectAlternateSetting(@NonNull UsbDeviceConnection connection,int alternateSetting) throws UnsupportedOperationException {
  currentSetting=alternateSetting;
  final UsbInterface usbInterface=getUsbInterface();
  if (usbInterface == null) {
    throw new UnsupportedOperationException("String_Node_Str" + alternateSetting);
  }
  connection.claimInterface(usbInterface,true);
  final LibusbError result=connection.setInterface(usbInterface);
  Timber.d("String_Node_Str",result);
  Timber.d("String_Node_Str",Arrays.toString(getCurrentEndpoints()));
}

Fixed version (ground truth):
public LibusbError selectAlternateSetting(@NonNull UsbDeviceConnection connection,int alternateSetting) throws UnsupportedOperationException {
  currentSetting=alternateSetting;
  final UsbInterface usbInterface=getUsbInterface();
  if (usbInterface == null) {
    throw new UnsupportedOperationException("String_Node_Str" + alternateSetting);
  }
  connection.claimInterface(usbInterface,true);
  return connection.setInterface(usbInterface);
}
Program: 86279
Project: 86279
Buggy source:
public static UvcInterface parseDescriptor(UsbDeviceConnection connection,byte[] descriptor) throws IllegalArgumentException {
  if (descriptor.length < LENGTH_STANDARD_DESCRIPTOR) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (descriptor[bInterfaceClass] == Descriptor.VIDEO_CLASS_CODE) {
    if (descriptor[bInterfaceProtocol] != Protocol.PC_PROTOCOL_15.protocol) {
switch (VideoSubclass.getVideoSubclass(descriptor[bInterfaceSubClass])) {
case SC_VIDEOCONTROL:
        return VideoControlInterface.parseVideoControlInterface(connection,descriptor);
case SC_VIDEOSTREAMING:
      return VideoStreamingInterface.parseVideoStreamingInterface(connection,descriptor);
default :
    throw new IllegalArgumentException("String_Node_Str");
}
}
 else {
throw new IllegalArgumentException("String_Node_Str" + descriptor[bInterfaceProtocol]);
}
}
 else if (descriptor[bInterfaceClass] == Descriptor.AUDIO_CLASS_CODE) {
return null;
}
 else {
throw new IllegalArgumentException("String_Node_Str" + descriptor[bInterfaceClass]);
}
}

Fixed version (ground truth):
public static UvcInterface parseDescriptor(UsbDeviceConnection connection,byte[] descriptor) throws IllegalArgumentException {
  if (descriptor.length < LENGTH_STANDARD_DESCRIPTOR) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (descriptor[bInterfaceClass] == Descriptor.VIDEO_CLASS_CODE) {
    if (descriptor[bInterfaceProtocol] != Protocol.PC_PROTOCOL_15.protocol) {
switch (VideoSubclass.getVideoSubclass(descriptor[bInterfaceSubClass])) {
case SC_VIDEOCONTROL:
        Timber.i("String_Node_Str");
      return VideoControlInterface.parseVideoControlInterface(connection,descriptor);
case SC_VIDEOSTREAMING:
    Timber.i("String_Node_Str");
  return VideoStreamingInterface.parseVideoStreamingInterface(connection,descriptor);
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
 else {
throw new IllegalArgumentException("String_Node_Str" + descriptor[bInterfaceProtocol]);
}
}
 else if (descriptor[bInterfaceClass] == Descriptor.AUDIO_CLASS_CODE) {
return null;
}
 else {
throw new IllegalArgumentException("String_Node_Str" + descriptor[bInterfaceClass]);
}
}
Program: 86280
Project: 86280
Buggy source:
@Override public void parseAlternateFunction(@NonNull UsbDeviceConnection connection,byte[] descriptor){
  currentSetting=0xFF & descriptor[bAlternateSetting];
  Timber.d("String_Node_Str",currentSetting);
  usbInterfaces.put(currentSetting,getUsbInterface(connection,descriptor));
  final int endpointCount=(0xFF & descriptor[bNumEndpoints]);
  endpoints.put(currentSetting,new Endpoint[endpointCount]);
  printEndpoints();
}

Fixed version (ground truth):
@Override public void parseAlternateFunction(@NonNull UsbDeviceConnection connection,byte[] descriptor){
  currentSetting=0xFF & descriptor[bAlternateSetting];
  usbInterfaces.put(currentSetting,getUsbInterface(connection,descriptor));
  final int endpointCount=(0xFF & descriptor[bNumEndpoints]);
  endpoints.put(currentSetting,new Endpoint[endpointCount]);
}
Program: 86281
Project: 86281
Buggy source:
private void VS_INTERFACE_SUBTYPE(int code){
  this.code=(byte)(0xFF & code);
}

Fixed version (ground truth):
void VS_INTERFACE_SUBTYPE(int code){
  this.code=(byte)(0xFF & code);
}
Program: 86282
Project: 86282
Buggy source:
@Override public void onMessage(String chan,String message){
  Core.logDebug(chan + "String_Node_Str" + message+ "String_Node_Str");
  try {
    lock.lock();
switch (chan) {
case REAPCHANNEL:
{
        NetworkServer server=getServer0(message);
        if (server == null)         return;
        removeServer0(server);
        break;
      }
case LINK_CHANNEL:
{
      if (message.equals("String_Node_Str")) {
        linkServer0();
        return;
      }
      String[] split=message.split("String_Node_Str");
      if (split.length == 1)       return;
      String cmd=split[0];
      if (cmd.equals("String_Node_Str")) {
        if (split.length < 2)         return;
        NetworkServer server=getServer0(split[1]);
        if (server == null)         return;
        removeServer0(server);
      }
      break;
    }
case HEARTBEAT_CHAN:
{
    String[] split=message.split("String_Node_Str");
    if (split.length != 3)     return;
    String name=split[0];
    if (name.equals(thisServer.getName()))     return;
    String uuids=split[1];
    Integer maxPlayers=Integer.parseInt(split[2]);
    BungeeCordServer server=(BungeeCordServer)getServer0(name);
    if (server == null) {
      server=new BungeeCordServer(name,maxPlayers,BungeeCordNetworkManager.this);
      addServer0(server);
    }
    server.getUuids().clear();
    if (!uuids.equals("String_Node_Str")) {
      for (      String s : uuids.split("String_Node_Str")) {
        server.getUuids().add(UUID.fromString(s));
      }
    }
    server.setLastPing(new Date());
    break;
  }
case NET_COMMAND_CHANNEL:
{
  try {
    JSONObject parse=(JSONObject)JSONValue.parse(message);
    if (!parse.get("String_Node_Str").equals(getThisServer().getName()))     return;
    String sender=(String)parse.get("String_Node_Str");
    NetworkServer server=getServer0(sender);
    if (server == null)     return;
    JSONObject jsonObject=(JSONObject)parse.get("String_Node_Str");
    NetCommand netCommand=NetworkUtils.decodeNetCommand(jsonObject);
    for (    NetCommandHandler netCommandHandler : netCommandHandlers.get(netCommand.getClass())) {
      netCommandHandler.handleNetCommand(server,netCommand);
    }
  }
 catch (  Exception e) {
    Core.logDebug("String_Node_Str" + message);
    if (Core.DEBUG)     e.printStackTrace();
  }
}
}
}
  finally {
lock.unlock();
}
}

Fixed version (ground truth):
@Override public void onMessage(String chan,String message){
}
Program: 86283
Project: 86283
Buggy source:
private <T extends Punishment>void registerPunishmentManager(Class<T> punishmentClass,PunishmentManager<T> punishmentManager){
  punishmentManagers.put(punishmentClass,punishmentManager);
  if (TimedPunishment.class.isAssignableFrom(punishmentClass))   registerCommand(new TemporaryPunishCommand<>((Class<? extends TimedPunishment>)punishmentClass));
 else   registerCommand(new PermanentPunishCommand<>(punishmentClass));
  registerCommand(new UnPunishCommand<>(punishmentClass));
}

Fixed version (ground truth):
private <T extends Punishment>void registerPunishmentManager(Class<T> punishmentClass,PunishmentManager<T> punishmentManager){
  punishmentManagers.put(punishmentClass,punishmentManager);
  if (!getConfig().getBoolean("String_Node_Str",true))   return;
  if (TimedPunishment.class.isAssignableFrom(punishmentClass))   registerCommand(new TemporaryPunishCommand<>((Class<? extends TimedPunishment>)punishmentClass));
 else   registerCommand(new PermanentPunishCommand<>(punishmentClass));
  registerCommand(new UnPunishCommand<>(punishmentClass));
}
Program: 86284
Project: 86284
Buggy source:
@Override public T punish(COfflinePlayer target,String reason,COfflinePlayer issuer) throws PunishmentException {
  if (getActivePunishmentFor(target) != null)   throw new PunishmentException("String_Node_Str");
  if (!(target instanceof CPlayer) && punishmentClazz.isAnnotationPresent(TargetOnlinesOnly.class))   throw new PunishmentException("String_Node_Str");
  T newPunishment=createNewPunishment(target,reason,issuer);
  DBObject dbObject=convertToDBObject(newPunishment);
  newPunishment.setMongoId((ObjectId)dbObject.get("String_Node_Str"));
  collection.save(dbObject);
  if (target instanceof CPlayer)   onPunish((CPlayer)target,newPunishment);
  return newPunishment;
}

Fixed version (ground truth):
@Override public T punish(COfflinePlayer target,String reason,COfflinePlayer issuer) throws PunishmentException {
  if (getActivePunishmentFor(target) != null)   throw new PunishmentException("String_Node_Str");
  if (!(target instanceof CPlayer) && punishmentClazz.isAnnotationPresent(TargetOnlinesOnly.class))   throw new PunishmentException("String_Node_Str");
  T newPunishment=createNewPunishment(target,reason,issuer);
  PunishEvent punishEvent=new PunishEvent(target,issuer,newPunishment);
  Bukkit.getPluginManager().callEvent(punishEvent);
  if (punishEvent.isCancelled())   throw new PunishmentException("String_Node_Str");
  DBObject dbObject=convertToDBObject(newPunishment);
  newPunishment.setMongoId((ObjectId)dbObject.get("String_Node_Str"));
  collection.save(dbObject);
  if (target instanceof CPlayer)   onPunish((CPlayer)target,newPunishment);
  return newPunishment;
}
Program: 86285
Project: 86285
Buggy source:
public String get(){
  if (formatString == null)   return "String_Node_Str";
  String s=ChatColor.translateAlternateColorCodes('&',formatString);
  for (  Map.Entry<String,String> stringStringEntry : modifiers.entrySet()) {
    String value=stringStringEntry.getValue();
    if (coloredInputs)     value=ChatColor.translateAlternateColorCodes('&',value);
    s=s.replaceAll(String.format("String_Node_Str",stringStringEntry.getKey()),value);
    s=s.replaceAll("String_Node_Str" + stringStringEntry.getKey() + "String_Node_Str",value);
  }
  if (prefix && loadedPrefix != null)   return loadedPrefix + s;
  return s;
}

Fixed version (ground truth):
public String get(){
  if (formatString == null)   return "String_Node_Str";
  String s=ChatColor.translateAlternateColorCodes('&',formatString);
  for (  Map.Entry<String,String> stringStringEntry : modifiers.entrySet()) {
    String value=stringStringEntry.getValue();
    if (coloredInputs)     value=ChatColor.translateAlternateColorCodes('&',value);
    s=s.replaceAll("String_Node_Str" + stringStringEntry.getKey() + "String_Node_Str",value);
    s=s.replaceAll("String_Node_Str" + stringStringEntry.getKey() + "String_Node_Str",value);
  }
  if (prefix && loadedPrefix != null)   return loadedPrefix + s;
  return s;
}
Program: 86287
Project: 86287
Buggy source:
@Override @SneakyThrows public void sendNetCommand(NetCommand command){
  JSONObject jsonObject=NetworkUtils.encodeNetCommand(command);
  final JSONObject sendObject=new JSONObject();
  sendObject.put("String_Node_Str",networkManager.getThisServer().getName());
  sendObject.put("String_Node_Str",jsonObject);
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.NET_COMMAND_CHANNEL,sendObject.toJSONString());
      networkManager.getJedisPool().returnResource(resource);
    }
  }
);
}

Fixed version (ground truth):
@Override @SneakyThrows public void sendNetCommand(NetCommand command){
  JSONObject jsonObject=NetworkUtils.encodeNetCommand(command);
  final JSONObject sendObject=new JSONObject();
  sendObject.put("String_Node_Str",networkManager.getThisServer().getName());
  sendObject.put("String_Node_Str",jsonObject);
  sendObject.put("String_Node_Str",name);
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.NET_COMMAND_CHANNEL,sendObject.toJSONString());
      networkManager.getJedisPool().returnResource(resource);
    }
  }
);
}
Program: 86288
Project: 86288
Buggy source:
@Override public List<NetworkServer> getServers(){
  ArrayList<NetworkServer> bungeeCordServers=new ArrayList<>();
  bungeeCordServers.addAll(servers.values());
  bungeeCordServers.add(thisServer);
  return ImmutableList.copyOf(bungeeCordServers);
}

Fixed version (ground truth):
@Override public List<NetworkServer> getServers(){
  ArrayList<NetworkServer> bungeeCordServers=new ArrayList<>();
  try {
    lock.lock();
    bungeeCordServers.addAll(servers.values());
  }
  finally {
    lock.unlock();
  }
  bungeeCordServers.add(thisServer);
  return ImmutableList.copyOf(bungeeCordServers);
}
Program: 86289
Project: 86289
Buggy source:
@Override public NetworkServer getServer(String name){
  if (thisServer.getName().equals(name))   return thisServer;
  return servers.get(name);
}

Fixed version (ground truth):
@Override public NetworkServer getServer(String name){
  try {
    lock.lock();
    return getServer0(name);
  }
  finally {
    lock.unlock();
  }
}
Program: 86290
Project: 86290
Buggy source:
public BungeeCordNetworkManager(YAMLConfigurationFile config) throws SocketException {
  bungeeYAML=config.getConfig();
  JedisPoolConfig jedisPoolConfig=new JedisPoolConfig();
  jedisPoolConfig.setMinIdle(10);
  jedisPoolConfig.setMaxTotal(50);
  jedisPoolConfig.setMaxWaitMillis(100);
  jedisPoolConfig.setBlockWhenExhausted(false);
  jedisPoolConfig.setTestOnBorrow(true);
  jedisPoolConfig.setTestOnReturn(true);
  this.jedisPool=new JedisPool(jedisPoolConfig,bungeeYAML.getString("String_Node_Str"),bungeeYAML.getInt("String_Node_Str"));
  this.thisServer=new BungeeCordServer(bungeeYAML.getString("String_Node_Str"),Bukkit.getMaxPlayers(),this);
  updateThisServer();
  new Thread(new JedisListener()).start();
  scheduleHeartbeat(5l,TimeUnit.SECONDS);
  Enumeration<InetAddress> inetAddresses=NetworkInterface.getByName(bungeeYAML.getString("String_Node_Str")).getInetAddresses();
  InetAddress address=null;
  while (inetAddresses.hasMoreElements() && !(address=inetAddresses.nextElement()).getHostAddress().matches("String_Node_Str")) {
  }
  if (address == null)   throw new IllegalStateException("String_Node_Str");
  ip=address.getHostAddress();
  linkServer();
  Bukkit.getServer().getMessenger().registerOutgoingPluginChannel(Core.getInstance(),"String_Node_Str");
}

Fixed version (ground truth):
public BungeeCordNetworkManager(YAMLConfigurationFile config) throws SocketException {
  bungeeYAML=config.getConfig();
  JedisPoolConfig jedisPoolConfig=new JedisPoolConfig();
  jedisPoolConfig.setMinIdle(10);
  jedisPoolConfig.setMaxTotal(50);
  jedisPoolConfig.setMaxWaitMillis(100);
  jedisPoolConfig.setBlockWhenExhausted(false);
  jedisPoolConfig.setTestOnBorrow(true);
  jedisPoolConfig.setTestOnReturn(true);
  this.jedisPool=new JedisPool(jedisPoolConfig,bungeeYAML.getString("String_Node_Str"),bungeeYAML.getInt("String_Node_Str"));
  this.thisServer=new BungeeCordServer(bungeeYAML.getString("String_Node_Str"),Bukkit.getMaxPlayers(),this);
  updateThisServer();
  new Thread(new JedisListener()).start();
  scheduleHeartbeat(5l,TimeUnit.SECONDS);
  Enumeration<InetAddress> inetAddresses=NetworkInterface.getByName(bungeeYAML.getString("String_Node_Str")).getInetAddresses();
  InetAddress address=null;
  while (inetAddresses.hasMoreElements() && !(address=inetAddresses.nextElement()).getHostAddress().matches("String_Node_Str")) {
  }
  if (address == null)   throw new IllegalStateException("String_Node_Str");
  ip=address.getHostAddress();
  linkServer0();
}
Program: 86291
Project: 86291
Buggy source:
@Override @Synchronized public void updateHeartbeat(){
  Iterator<BungeeCordServer> iterator=servers.values().iterator();
  Long time=System.currentTimeMillis();
  while (iterator.hasNext()) {
    BungeeCordServer next=iterator.next();
    if (time - next.getLastPing().getTime() > 10000) {
      for (      NetworkServerDiscoverObserver discoverObserver : discoverObservers) {
        discoverObserver.onNetworkServerRemove(next);
      }
      iterator.remove();
    }
  }
  updateThisServer();
  String[] heartbeat=new String[3];
  heartbeat[0]=getThisServer().getName();
  heartbeat[1]=getThisServer().getPlayers().size() == 0 ? "String_Node_Str" : Joiner.on(',').join(getThisServer().getPlayers());
  heartbeat[2]=String.valueOf(getThisServer().getMaximumPlayers());
  final String join=Joiner.on(';').join(heartbeat);
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=jedisPool.getResource();
      resource.publish(HEARTBEAT_CHAN,join);
      jedisPool.returnResource(resource);
    }
  }
);
  linkServer();
  resetHeartbeat(5L,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Override public void updateHeartbeat(){
  try {
    lock.lock();
    Iterator<BungeeCordServer> iterator=servers.values().iterator();
    Long time=System.currentTimeMillis();
    while (iterator.hasNext()) {
      BungeeCordServer next=iterator.next();
      if (time - next.getLastPing().getTime() > 10000) {
        for (        NetworkServerDiscoverObserver discoverObserver : discoverObservers) {
          discoverObserver.onNetworkServerRemove(next);
        }
        iterator.remove();
      }
    }
    updateThisServer();
    String[] heartbeat=new String[3];
    heartbeat[0]=getThisServer().getName();
    heartbeat[1]=getThisServer().getPlayers().size() == 0 ? "String_Node_Str" : Joiner.on(',').join(getThisServer().getPlayers());
    heartbeat[2]=String.valueOf(getThisServer().getMaximumPlayers());
    final String join=Joiner.on(';').join(heartbeat);
    Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
      @Override public void run(){
        Jedis resource=jedisPool.getResource();
        resource.publish(HEARTBEAT_CHAN,join);
        jedisPool.returnResource(resource);
      }
    }
);
    linkServer0();
    resetHeartbeat(5L,TimeUnit.SECONDS);
  }
  finally {
    lock.unlock();
  }
}
Program: 86293
Project: 86293
Buggy source:
@Override @SneakyThrows public void sendNetCommand(NetCommand command){
  JSONObject jsonObject=NetworkUtils.encodeNetCommand(command);
  final JSONObject sendObject=new JSONObject();
  sendObject.put("String_Node_Str",networkManager.getThisServer().getName());
  sendObject.put("String_Node_Str",jsonObject);
  sendObject.put("String_Node_Str",name);
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.NET_COMMAND_CHANNEL,sendObject.toJSONString());
      networkManager.getJedisPool().returnResource(resource);
    }
  }
);
}

Fixed version (ground truth):
@Override @SneakyThrows @Synchronized public void sendNetCommand(NetCommand command){
  JSONObject jsonObject=NetworkUtils.encodeNetCommand(command);
  final JSONObject sendObject=new JSONObject();
  sendObject.put("String_Node_Str",networkManager.getThisServer().getName());
  sendObject.put("String_Node_Str",jsonObject);
  sendObject.put("String_Node_Str",name);
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.NET_COMMAND_CHANNEL,sendObject.toJSONString());
      networkManager.getJedisPool().returnResource(resource);
    }
  }
);
}
Program: 86294
Project: 86294
Buggy source:
@Override public Integer getOnlineCount(){
  return uuids.size();
}

Fixed version (ground truth):
@Override @Synchronized public Integer getOnlineCount(){
  return uuids.size();
}
Program: 86295
Project: 86295
Buggy source:
@Override public void sendPlayerToServer(final CPlayer player){
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.TELEPORT,player.getUniqueIdentifier() + "String_Node_Str" + name);
      resource.close();
    }
  }
);
}

Fixed version (ground truth):
@Override @Synchronized public void sendPlayerToServer(final CPlayer player){
  Bukkit.getScheduler().runTaskAsynchronously(Core.getInstance(),new Runnable(){
    @Override public void run(){
      Jedis resource=networkManager.getJedisPool().getResource();
      resource.publish(BungeeCordNetworkManager.TELEPORT,player.getUniqueIdentifier() + "String_Node_Str" + name);
      resource.close();
    }
  }
);
}
Program: 86296
Project: 86296
Buggy source:
@Override public List<UUID> getPlayers(){
  return ImmutableList.copyOf(uuids);
}

Fixed version (ground truth):
@Override @Synchronized public List<UUID> getPlayers(){
  return ImmutableList.copyOf(uuids);
}
Program: 86297
Project: 86297
Buggy source:
public String get(){
  if (formatString == null)   return "String_Node_Str";
  String s=ChatColor.translateAlternateColorCodes('&',formatString);
  for (  Map.Entry<String,String> stringStringEntry : modifiers.entrySet()) {
    String value=stringStringEntry.getValue();
    if (coloredInputs)     value=ChatColor.translateAlternateColorCodes('&',value);
    s=s.replaceAll(String.format("String_Node_Str",stringStringEntry.getKey()),value).replaceAll("String_Node_Str" + stringStringEntry.getKey() + "String_Node_Str",stringStringEntry.getValue());
  }
  if (prefix && loadedPrefix != null)   return loadedPrefix + s;
  return s;
}

Fixed version (ground truth):
public String get(){
  if (formatString == null)   return "String_Node_Str";
  String s=ChatColor.translateAlternateColorCodes('&',formatString);
  for (  Map.Entry<String,String> stringStringEntry : modifiers.entrySet()) {
    String value=stringStringEntry.getValue();
    if (coloredInputs)     value=ChatColor.translateAlternateColorCodes('&',value);
    s=s.replaceAll(String.format("String_Node_Str",stringStringEntry.getKey()),value);
    s=s.replaceAll("String_Node_Str" + stringStringEntry.getKey() + "String_Node_Str",value);
  }
  if (prefix && loadedPrefix != null)   return loadedPrefix + s;
  return s;
}
Program: 86298
Project: 86298
Buggy source:
@Override public boolean kickViaNetworkManager(String message,CPlayer player){
  Jedis resource=jedisPool.getResource();
  resource.publish(KICK,player.getUniqueIdentifier().toString() + "String_Node_Str" + message);
  jedisPool.returnResource(resource);
  return true;
}

Fixed version (ground truth):
@Override public boolean kickViaNetworkManager(String message,CPlayer player){
  Jedis resource=jedisPool.getResource();
  resource.publish(KICK,player.getUniqueIdentifier().toString() + message);
  jedisPool.returnResource(resource);
  return true;
}
Program: 86299
Project: 86299
Buggy source:
@Override public void onMessage(String chan,String message){
  String[] split=message.split("String_Node_Str");
  if (split.length != 2)   return;
  ProxiedPlayer player=ProxyServer.getInstance().getPlayer(UUID.fromString(split[0]));
  if (player == null)   return;
  player.disconnect(split[1]);
}

Fixed version (ground truth):
@Override public void onMessage(String chan,String message){
  String[] split=new String[]{message.substring(0,36),message.substring(36)};
  if (split.length != 2)   return;
  ProxiedPlayer player=ProxyServer.getInstance().getPlayer(UUID.fromString(split[0]));
  if (player == null)   return;
  player.disconnect(split[1]);
}