nus-yam/ex-repair huggingface dataset:
Program: 170672
Project: 170672
Buggy source:
public static List<NewEle> handlerTextType(String text,String outerHtml){
  List<NewEle> newEleList=new ArrayList<>();
  if (!TextUtils.isEmpty(text)) {
    String removeLogo=text.replaceAll(NewEle.TAG_LOGO,"String_Node_Str");
    if (removeLogo.contains(NewEle.TAG_PERIOD)) {
      String[] splitArr=removeLogo.split(NewEle.TAG_PERIOD);
      for (      String str : splitArr) {
        NewEle newEleText=new NewEle();
        newEleText.type=NewEle.TYPE_TEXT;
        String itemStr=str.concat(NewEle.TAG_PERIOD);
        newEleText.text=itemStr.trim();
        newEleText.html=outerHtml;
        newEleList.add(newEleText);
      }
    }
 else {
      NewEle newEleText=new NewEle();
      newEleText.type=NewEle.TYPE_TEXT;
      newEleText.text=text.trim();
      newEleText.html=outerHtml;
      newEleList.add(newEleText);
    }
  }
  return newEleList;
}

Fixed version (ground truth):
public static List<NewEle> handlerTextType(String text,String outerHtml){
  List<NewEle> newEleList=new ArrayList<>();
  if (!TextUtils.isEmpty(text)) {
    String removeLogo=text.replaceAll(NewEle.TAG_LOGO,"String_Node_Str");
    if (removeLogo.contains(NewEle.TAG_PERIOD)) {
      String[] splitArr=removeLogo.split(NewEle.TAG_PERIOD);
      for (      String str : splitArr) {
        if (str.length() > 1) {
          NewEle newEleText=new NewEle();
          newEleText.type=NewEle.TYPE_TEXT;
          String itemStr=str.concat(NewEle.TAG_PERIOD);
          newEleText.text=itemStr.trim();
          newEleText.html=outerHtml;
          newEleList.add(newEleText);
        }
      }
    }
 else {
      NewEle newEleText=new NewEle();
      newEleText.type=NewEle.TYPE_TEXT;
      newEleText.text=text.trim();
      newEleText.html=outerHtml;
      newEleList.add(newEleText);
    }
  }
  return newEleList;
}
Program: 170673
Project: 170673
Buggy source:
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  String videoHtml=getIntent().getStringExtra(VIDEO_HTML);
  if (TextUtils.isEmpty(videoHtml)) {
    finish();
  }
  if (videoDetailFragment == null) {
    videoDetailFragment=VideoDetailFragment.newInstance(videoHtml);
    getSupportFragmentManager().beginTransaction().add(R.id.container_fl,videoDetailFragment,VideoDetailFragment.class.getSimpleName()).commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  setContentView(R.layout.container);
  String videoHtml=getIntent().getStringExtra(VIDEO_HTML);
  if (TextUtils.isEmpty(videoHtml)) {
    finish();
  }
  if (videoDetailFragment == null) {
    videoDetailFragment=VideoDetailFragment.newInstance(videoHtml);
    getSupportFragmentManager().beginTransaction().add(R.id.container_fl,videoDetailFragment,VideoDetailFragment.class.getSimpleName()).commit();
  }
}
Program: 170674
Project: 170674
Buggy source:
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (savedInstanceState != null) {
    convertListener=(ViewConvertListener)savedInstanceState.getSerializable("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onCreate(@Nullable Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (savedInstanceState != null) {
    convertListener=savedInstanceState.getParcelable("String_Node_Str");
  }
}
Program: 170675
Project: 170675
Buggy source:
/** 
 * 保存接口
 * @param outState
 */
@Override public void onSaveInstanceState(Bundle outState){
  super.onSaveInstanceState(outState);
  outState.putSerializable("String_Node_Str",convertListener);
}

Fixed version (ground truth):
/** 
 * 保存接口
 * @param outState
 */
@Override public void onSaveInstanceState(Bundle outState){
  super.onSaveInstanceState(outState);
  outState.putParcelable("String_Node_Str",convertListener);
}
Program: 170676
Project: 170676
Buggy source:
void convertView(ViewHolder holder,BaseNiceDialog dialog);

Fixed version (ground truth):
@Override protected void convertView(ViewHolder holder,BaseNiceDialog dialog){
}
Program: 170677
Project: 170677
Buggy source:
@Scheduled(cron="String_Node_Str") @SuppressWarnings("String_Node_Str") public void refreshIndex() throws Exception {
  String ip=IPUtils.getServerIp().replaceAll("String_Node_Str","String_Node_Str");
  if (REGULARIP.equals(ip)) {
    String content=HttpHelper.getInstance().get("String_Node_Str");
    logService.record("String_Node_Str","String_Node_Str");
    JedisUtil.getInstance().set("String_Node_Str",content);
  }
}

Fixed version (ground truth):
@Scheduled(cron="String_Node_Str") @SuppressWarnings("String_Node_Str") public void refreshIndex() throws Exception {
  String ip=IPUtils.getServerIp().replaceAll("String_Node_Str","String_Node_Str");
  if (REGULARIP.equals(ip)) {
    String content=HttpHelper.getInstance().get("String_Node_Str");
    logService.record("String_Node_Str","String_Node_Str");
    if (!Strings.isNullOrEmpty(content)) {
      JedisUtil.getInstance().set("String_Node_Str",content);
    }
  }
}
Program: 170679
Project: 170679
Buggy source:
public BytesRef next(){
  if (productIterator.hasNext()) {
    currentBlog=productIterator.next();
    try {
      return new BytesRef(Jsoup.parse(currentBlog.getTitle()).text().getBytes("String_Node_Str"));
    }
 catch (    Exception e) {
      e.printStackTrace();
      return null;
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public BytesRef next(){
  if (blogIterator.hasNext()) {
    currentBlog=blogIterator.next();
    try {
      return new BytesRef(Jsoup.parse(currentBlog.getTitle()).text().getBytes("String_Node_Str"));
    }
 catch (    Exception e) {
      e.printStackTrace();
      return null;
    }
  }
 else {
    return null;
  }
}
Program: 170680
Project: 170680
Buggy source:
/** 
 * 将Blog对象序列化存入payload [这里仅仅是个示例，其实这种做法不可取,一般不会把整个对象存入payload,这样索引体积会很大，浪费硬盘空间]
 */
public BytesRef payload(){
  try {
    ByteArrayOutputStream bos=new ByteArrayOutputStream();
    ObjectOutputStream out=new ObjectOutputStream(bos);
    out.writeObject(currentBlog);
    out.close();
    BytesRef bytesRef=new BytesRef(bos.toByteArray());
    return bytesRef;
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * 将Blog对象序列化存入payload 可以只将所需要的字段存入payload，这里对整个实体类进行序列化，方便以后需求，不建议采用这种方法
 */
public BytesRef payload(){
  try {
    ByteArrayOutputStream bos=new ByteArrayOutputStream();
    ObjectOutputStream out=new ObjectOutputStream(bos);
    out.writeObject(currentBlog);
    out.close();
    BytesRef bytesRef=new BytesRef(bos.toByteArray());
    return bytesRef;
  }
 catch (  IOException e) {
    logger.error("String_Node_Str",e);
    return null;
  }
}
Program: 170681
Project: 170681
Buggy source:
/** 
 * 返回权重值，这个值会影响排序 这里以产品的销售量作为权重值，weight值即最终返回的热词列表里每个热词的权重值 怎么设计返回这个权重值，发挥你们的想象力吧
 */
public long weight(){
  return currentBlog.getHits();
}

Fixed version (ground truth):
/** 
 * 返回权重值，这个值会影响排序 这里以产品的销售量作为权重值，weight值即最终返回的热词列表里每个热词的权重值
 */
public long weight(){
  return currentBlog.getHits();
}
Program: 170682
Project: 170682
Buggy source:
/** 
 * 把产品的销售区域存入context，context里可以是任意的自定义数据，一般用于数据过滤 Set集合里的每一个元素都会被创建一个TermQuery，你只是提供一个Set集合，至于new TermQuery Lucene底层API去做了，但你必须要了解底层干了些什么
 */
public Set<BytesRef> contexts(){
  try {
    Set<BytesRef> regions=new HashSet<BytesRef>();
    regions.add(new BytesRef(currentBlog.getTitle().getBytes("String_Node_Str")));
    return regions;
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * 文章标题
 */
public Set<BytesRef> contexts(){
  try {
    Set<BytesRef> regions=new HashSet<BytesRef>();
    regions.add(new BytesRef(currentBlog.getTitle().getBytes("String_Node_Str")));
    return regions;
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 170683
Project: 170683
Buggy source:
public BlogIterator(Iterator<Blog> productIterator){
  this.productIterator=productIterator;
}

Fixed version (ground truth):
public BlogIterator(Iterator<Blog> blogIterator){
  this.blogIterator=blogIterator;
}
Program: 170684
Project: 170684
Buggy source:
/** 
 * lookup
 * @param suggester
 * @param keyword
 * @throws IOException
 */
private static List<String> lookup(AnalyzingInfixSuggester suggester,String keyword) throws IOException {
  List<LookupResult> results=suggester.lookup(keyword,20,true,true);
  System.out.println(keyword);
  List<String> list=new ArrayList<>();
  for (  LookupResult result : results) {
    list.add(result.key.toString());
  }
  return list;
}

Fixed version (ground truth):
/** 
 * lookup
 * @param suggester
 * @param keyword
 * @throws IOException
 */
private static List<String> lookup(AnalyzingInfixSuggester suggester,String keyword) throws IOException {
  List<LookupResult> results=suggester.lookup(keyword,20,true,true);
  List<String> list=new ArrayList<>();
  for (  LookupResult result : results) {
    list.add(result.key.toString());
  }
  return list;
}
Program: 170685
Project: 170685
Buggy source:
/** 
 * ajax简历索引
 */
@Override public void ajaxbuild(){
  try {
    Directory dir=FSDirectory.open(Paths.get("String_Node_Str"));
    RAMDirectory indexDir=new RAMDirectory();
    SmartChineseAnalyzer analyzer=new SmartChineseAnalyzer();
    AnalyzingInfixSuggester suggester=new AnalyzingInfixSuggester(dir,analyzer);
    List<Blog> blogs=blogMapper.getAllBlog();
    suggester.build(new BlogIterator(blogs.iterator()));
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * ajax简历索引
 */
@Override public void ajaxbuild(){
  try {
    Directory dir=FSDirectory.open(Paths.get("String_Node_Str"));
    SmartChineseAnalyzer analyzer=new SmartChineseAnalyzer();
    AnalyzingInfixSuggester suggester=new AnalyzingInfixSuggester(dir,analyzer);
    List<Blog> blogs=blogMapper.getAllBlog();
    suggester.build(new BlogIterator(blogs.iterator()));
  }
 catch (  IOException e) {
    System.err.println("String_Node_Str");
  }
}
Program: 170686
Project: 170686
Buggy source:
@SuppressWarnings("String_Node_Str") private void dataMatches(String address,DataTable dataTable,Consumer<Map<String,String>[]> dataProcessor){
  List<Map<String,String>> expectedMaps=dataTable.asMaps(String.class,String.class);
  List<Map<String,String>> actualMaps=new ArrayList<>();
  await().atMost(5,SECONDS).until(() -> {
    actualMaps.clear();
    Collections.addAll(actualMaps,retrieveDataMaps(address,dataProcessor));
    return expectedMaps.size() == actualMaps.size();
  }
);
  if (expectedMaps.isEmpty() && actualMaps.isEmpty()) {
    return;
  }
  LOG.info("String_Node_Str",actualMaps);
  dataTable.diff(DataTable.create(actualMaps));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void dataMatches(String address,DataTable dataTable,Consumer<Map<String,String>[]> dataProcessor){
  List<Map<String,String>> expectedMaps=dataTable.asMaps(String.class,String.class);
  List<Map<String,String>> actualMaps=new ArrayList<>();
  await().atMost(5,SECONDS).until(() -> {
    actualMaps.clear();
    Collections.addAll(actualMaps,retrieveDataMaps(address,dataProcessor));
    boolean result=expectedMaps.size() == actualMaps.size();
    if (!result) {
      LOG.warn("String_Node_Str",expectedMaps.size(),actualMaps.size());
    }
    return expectedMaps.size() == actualMaps.size();
  }
);
  if (expectedMaps.isEmpty() && actualMaps.isEmpty()) {
    return;
  }
  LOG.info("String_Node_Str",actualMaps);
  dataTable.diff(DataTable.create(actualMaps));
}
Program: 170687
Project: 170687
Buggy source:
@Test public void abortTimeoutTxStartedEvent(){
  asyncStub.onConnected(serviceConfig,compensateResponseObserver);
  blockingStub.onTxEvent(someGrpcEvent(SagaStartedEvent,globalTxId,globalTxId,null));
  blockingStub.onTxEvent(someGrpcEventWithTimeout(TxStartedEvent,localTxId,globalTxId,1));
  await().atMost(2,SECONDS).until(() -> {
    List<TxEvent> events=eventRepo.findByGlobalTxId(globalTxId);
    return eventRepo.count() == 5 && events.get(events.size() - 1).type().equals(SagaEndedEvent.name());
  }
);
  List<TxEvent> events=eventRepo.findByGlobalTxId(globalTxId);
  assertThat(events.get(0).type(),is(SagaStartedEvent.name()));
  assertThat(events.get(1).type(),is(TxStartedEvent.name()));
  assertThat(events.get(2).type(),is(TxAbortedEvent.name()));
  assertThat(events.get(3).type(),is(TxCompensatedEvent.name()));
  assertThat(events.get(4).type(),is(SagaEndedEvent.name()));
  await().atMost(2,SECONDS).until(this::waitTillTimeoutDone);
  assertThat(timeoutEntityRepository.count(),is(1L));
  Iterable<TxTimeout> timeouts=timeoutEntityRepository.findAll();
  timeouts.forEach(timeout -> {
    assertThat(timeout.status(),is(DONE.name()));
    assertThat(timeout.globalTxId(),is(globalTxId));
    assertThat(timeout.localTxId(),is(localTxId));
  }
);
}

Fixed version (ground truth):
@Test public void abortTimeoutTxStartedEvent(){
  asyncStub.onConnected(serviceConfig,compensateResponseObserver);
  blockingStub.onTxEvent(someGrpcEvent(SagaStartedEvent,globalTxId,globalTxId,null));
  blockingStub.onTxEvent(someGrpcEventWithTimeout(TxStartedEvent,localTxId,globalTxId,1));
  await().atMost(2,SECONDS).until(() -> {
    List<TxEvent> events=eventRepo.findByGlobalTxId(globalTxId);
    return eventRepo.count() == 5 && events.get(events.size() - 1).type().equals(SagaEndedEvent.name());
  }
);
  List<TxEvent> events=eventRepo.findByGlobalTxId(globalTxId);
  assertThat(events.get(0).type(),is(SagaStartedEvent.name()));
  assertThat(events.get(1).type(),is(TxStartedEvent.name()));
  assertThat(events.get(2).type(),is(TxAbortedEvent.name()));
  if ("String_Node_Str".equals(events.get(3).type())) {
    assertThat(events.get(4).type(),is(SagaEndedEvent.name()));
  }
 else {
    assertThat(events.get(3).type(),is(SagaEndedEvent.name()));
    assertThat(events.get(4).type(),is(TxCompensatedEvent.name()));
  }
  await().atMost(2,SECONDS).until(this::waitTillTimeoutDone);
  assertThat(timeoutEntityRepository.count(),is(1L));
  Iterable<TxTimeout> timeouts=timeoutEntityRepository.findAll();
  timeouts.forEach(timeout -> {
    assertThat(timeout.status(),is(DONE.name()));
    assertThat(timeout.globalTxId(),is(globalTxId));
    assertThat(timeout.localTxId(),is(localTxId));
  }
);
}
Program: 170689
Project: 170689
Buggy source:
@Test(timeout=5000) public void compensateWhenRetryReachesMaximum() throws InterruptedException {
  ResponseEntity<String> entity=restTemplate.getForEntity("String_Node_Str",String.class,TRESPASSER,5);
  assertThat(entity.getStatusCode(),is(INTERNAL_SERVER_ERROR));
  await().atMost(3,SECONDS).until(() -> eventRepo.count() == 11);
  List<String> distinctGlobalTxIds=eventRepo.findDistinctGlobalTxId();
  assertThat(distinctGlobalTxIds.size(),is(1));
  String globalTxId=distinctGlobalTxIds.get(0);
  List<TxEvent> events=eventRepo.findByGlobalTxIdOrderByCreationTime(globalTxId);
  assertThat(events.size(),is(11));
  assertThat(events.get(0).type(),is("String_Node_Str"));
  assertThat(events.get(1).type(),is("String_Node_Str"));
  assertThat(events.get(2).type(),is("String_Node_Str"));
  assertThat(events.get(3).type(),is("String_Node_Str"));
  assertThat(events.get(4).type(),is("String_Node_Str"));
  assertThat(events.get(5).type(),is("String_Node_Str"));
  assertThat(events.get(6).type(),is("String_Node_Str"));
  assertThat(events.get(7).type(),is("String_Node_Str"));
  assertThat(events.get(8).type(),is("String_Node_Str"));
  assertThat(events.get(9).type(),is("String_Node_Str"));
  assertThat(events.get(10).type(),is("String_Node_Str"));
  System.out.println(compensatedMessages);
  assertThat(compensatedMessages,contains("String_Node_Str" + TRESPASSER));
}

Fixed version (ground truth):
@Test(timeout=5000) public void compensateWhenRetryReachesMaximum() throws InterruptedException {
  ResponseEntity<String> entity=restTemplate.getForEntity("String_Node_Str",String.class,TRESPASSER,5);
  assertThat(entity.getStatusCode(),is(INTERNAL_SERVER_ERROR));
  await().atMost(5,SECONDS).until(() -> eventRepo.count() == 11);
  List<String> distinctGlobalTxIds=eventRepo.findDistinctGlobalTxId();
  assertThat(distinctGlobalTxIds.size(),is(1));
  String globalTxId=distinctGlobalTxIds.get(0);
  List<TxEvent> events=eventRepo.findByGlobalTxIdOrderByCreationTime(globalTxId);
  assertThat(events.size(),is(11));
  assertThat(events.get(0).type(),is("String_Node_Str"));
  assertThat(events.get(1).type(),is("String_Node_Str"));
  assertThat(events.get(2).type(),is("String_Node_Str"));
  assertThat(events.get(3).type(),is("String_Node_Str"));
  assertThat(events.get(4).type(),is("String_Node_Str"));
  assertThat(events.get(5).type(),is("String_Node_Str"));
  assertThat(events.get(6).type(),is("String_Node_Str"));
  assertThat(events.get(7).type(),is("String_Node_Str"));
  assertThat(events.get(8).type(),is("String_Node_Str"));
  assertThat(events.get(9).type(),is("String_Node_Str"));
  assertThat(events.get(10).type(),is("String_Node_Str"));
  assertThat(compensatedMessages,contains("String_Node_Str" + TRESPASSER));
}
Program: 170690
Project: 170690
Buggy source:
private static void setUpLocalRegistry(){
  ClassLoader loader=Thread.currentThread().getContextClassLoader();
  URL resource=loader.getResource("String_Node_Str");
  System.setProperty(LOCAL_REGISTRY_FILE_KEY,resource.getPath());
}

Fixed version (ground truth):
private static void setUpLocalRegistry(){
  System.setProperty(LOCAL_REGISTRY_FILE_KEY,"String_Node_Str");
}
Program: 170691
Project: 170691
Buggy source:
public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  OmegaContext omegaContext=(OmegaContext)(new SpringExtensionFactory()).getExtension(OmegaContext.class,"String_Node_Str");
  if (omegaContext != null) {
    invocation.getAttachments().put(GLOBAL_TX_ID_KEY,omegaContext.globalTxId());
    invocation.getAttachments().put(LOCAL_TX_ID_KEY,omegaContext.localTxId());
  }
  if (omegaContext != null && omegaContext.globalTxId() != null) {
    LOG.info("String_Node_Str",new Object[]{GLOBAL_TX_ID_KEY,omegaContext.globalTxId(),LOCAL_TX_ID_KEY,omegaContext.localTxId()});
  }
  if (invoker != null) {
    return invoker.invoke(invocation);
  }
  return null;
}

Fixed version (ground truth):
public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  if (omegaContext != null) {
    invocation.getAttachments().put(GLOBAL_TX_ID_KEY,omegaContext.globalTxId());
    invocation.getAttachments().put(LOCAL_TX_ID_KEY,omegaContext.localTxId());
  }
  if (omegaContext != null && omegaContext.globalTxId() != null) {
    LOG.info("String_Node_Str",new Object[]{GLOBAL_TX_ID_KEY,omegaContext.globalTxId(),LOCAL_TX_ID_KEY,omegaContext.localTxId()});
  }
  if (invoker != null) {
    return invoker.invoke(invocation);
  }
  return null;
}
Program: 170692
Project: 170692
Buggy source:
@Override public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  OmegaContext omegaContext=new SpringExtensionFactory().getExtension(OmegaContext.class,"String_Node_Str");
  if (omegaContext != null) {
    String globalTxId=invocation.getAttachment(GLOBAL_TX_ID_KEY);
    if (globalTxId == null) {
      LOG.info("String_Node_Str",GLOBAL_TX_ID_KEY);
    }
 else {
      omegaContext.setGlobalTxId(globalTxId);
      omegaContext.setLocalTxId(invocation.getAttachment(LOCAL_TX_ID_KEY));
      LOG.info("String_Node_Str",new Object[]{GLOBAL_TX_ID_KEY,omegaContext.globalTxId(),LOCAL_TX_ID_KEY,omegaContext.localTxId()});
    }
    invocation.getAttachments().put(GLOBAL_TX_ID_KEY,null);
    invocation.getAttachments().put(LOCAL_TX_ID_KEY,null);
  }
  if (invoker != null) {
    return invoker.invoke(invocation);
  }
  return null;
}

Fixed version (ground truth):
@Override public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  if (omegaContext != null) {
    String globalTxId=invocation.getAttachment(GLOBAL_TX_ID_KEY);
    if (globalTxId == null) {
      LOG.info("String_Node_Str",GLOBAL_TX_ID_KEY);
    }
 else {
      omegaContext.setGlobalTxId(globalTxId);
      omegaContext.setLocalTxId(invocation.getAttachment(LOCAL_TX_ID_KEY));
      LOG.info("String_Node_Str",new Object[]{GLOBAL_TX_ID_KEY,omegaContext.globalTxId(),LOCAL_TX_ID_KEY,omegaContext.localTxId()});
    }
    invocation.getAttachments().put(GLOBAL_TX_ID_KEY,null);
    invocation.getAttachments().put(LOCAL_TX_ID_KEY,null);
  }
 else {
    LOG.debug("String_Node_Str");
  }
  if (invoker != null) {
    return invoker.invoke(invocation);
  }
  return null;
}
Program: 170693
Project: 170693
Buggy source:
@Before public void setUp(){
  omegaContext.clear();
  when(applicationContext.containsBean("String_Node_Str")).thenReturn(true);
  when(applicationContext.getBean("String_Node_Str")).thenReturn(omegaContext);
  SpringExtensionFactory.addApplicationContext(applicationContext);
}

Fixed version (ground truth):
@Before public void setUp(){
  omegaContext.clear();
  filter.setOmegaContext(omegaContext);
}
Program: 170694
Project: 170694
Buggy source:
@Test public void setUpOmegaContextInTransactionRequest() throws Exception {
  when(invocation.getAttachment(OmegaContext.GLOBAL_TX_ID_KEY)).thenReturn(globalTxId);
  when(invocation.getAttachment(OmegaContext.LOCAL_TX_ID_KEY)).thenReturn(localTxId);
  filter.invoke(null,invocation);
  assertThat(omegaContext.globalTxId(),is(globalTxId));
  assertThat(omegaContext.localTxId(),is(localTxId));
}

Fixed version (ground truth):
@Test public void setUpOmegaContextInTransactionRequest(){
  when(invocation.getAttachment(OmegaContext.GLOBAL_TX_ID_KEY)).thenReturn(globalTxId);
  when(invocation.getAttachment(OmegaContext.LOCAL_TX_ID_KEY)).thenReturn(localTxId);
  filter.invoke(null,invocation);
  assertThat(omegaContext.globalTxId(),is(globalTxId));
  assertThat(omegaContext.localTxId(),is(localTxId));
}
Program: 170695
Project: 170695
Buggy source:
@Before public void setUp(){
  omegaContext.clear();
  when(applicationContext.containsBean("String_Node_Str")).thenReturn(true);
  when(applicationContext.getBean("String_Node_Str")).thenReturn(omegaContext);
  SpringExtensionFactory.addApplicationContext(applicationContext);
}

Fixed version (ground truth):
@Before public void setUp(){
  omegaContext.clear();
  filter.setOmegaContext(omegaContext);
}
Program: 170696
Project: 170696
Buggy source:
@Test public void doNothingInNonTransactionRequest() throws Exception {
  when(invocation.getAttachment(OmegaContext.GLOBAL_TX_ID_KEY)).thenReturn(null);
  when(invocation.getAttachment(OmegaContext.LOCAL_TX_ID_KEY)).thenReturn(null);
  filter.invoke(null,invocation);
  assertThat(omegaContext.globalTxId(),is(nullValue()));
  assertThat(omegaContext.localTxId(),is(nullValue()));
}

Fixed version (ground truth):
@Test public void doNothingInNonTransactionRequest(){
  when(invocation.getAttachment(OmegaContext.GLOBAL_TX_ID_KEY)).thenReturn(null);
  when(invocation.getAttachment(OmegaContext.LOCAL_TX_ID_KEY)).thenReturn(null);
  filter.invoke(null,invocation);
  assertThat(omegaContext.globalTxId(),is(nullValue()));
  assertThat(omegaContext.localTxId(),is(nullValue()));
}
Program: 170697
Project: 170697
Buggy source:
@Before public void before(){
  eventRepo.deleteAll();
  receivedCommands.clear();
}

Fixed version (ground truth):
@Before public void before(){
  System.out.println("String_Node_Str" + globalTxId);
  eventRepo.deleteAll();
  receivedCommands.clear();
}
Program: 170698
Project: 170698
Buggy source:
@BeforeClass public static void setupClientChannel() throws Exception {
  clientChannel=NettyChannelBuilder.forAddress("String_Node_Str",port).usePlaintext().build();
}

Fixed version (ground truth):
@BeforeClass public static void setupClientChannel(){
  clientChannel=NettyChannelBuilder.forAddress("String_Node_Str",port).usePlaintext().build();
}
Program: 170699
Project: 170699
Buggy source:
@AfterClass public static void tearDown() throws Exception {
  clientChannel.shutdown();
}

Fixed version (ground truth):
@AfterClass public static void tearDown() throws Exception {
  clientChannel.shutdown();
  clientChannel=null;
}
Program: 170700
Project: 170700
Buggy source:
private void markSagaEnded(TxEvent event){
  if (commandRepository.findUncompletedCommands(event.globalTxId()).isEmpty()) {
    markGlobalTxEnd(event);
  }
}

Fixed version (ground truth):
private void markSagaEnded(TxEvent event){
  if (commandRepository.findUncompletedCommands(event.globalTxId()).isEmpty()) {
    markGlobalTxEntWithEvent(event);
  }
}
Program: 170701
Project: 170701
Buggy source:
private void updateTransactionStatus(){
  eventRepository.findFirstAbortedGlobalTransaction().ifPresent(this::markGlobalTxEnd);
}

Fixed version (ground truth):
private void updateTransactionStatus(){
  eventRepository.findFirstAbortedGlobalTransaction().ifPresent(this::markGlobalTxEndWithEvents);
}
Program: 170702
Project: 170702
Buggy source:
/** 
 * Find a   {@link TxEvent} which satisfies below requirements:<ol> <li> {@link TxEvent#type} is {@link EventType#TxAbortedEvent}</li> <li>There are no   {@link TxEvent} which has the same {@link TxEvent#globalTxId} and {@link TxEvent#type} is {@link EventType#TxEndedEvent} or {@link EventType#SagaEndedEvent}</li> </ol>
 * @return
 */
Optional<TxEvent> findFirstAbortedGlobalTransaction();

Fixed version (ground truth):
/** 
 * Find a   {@link TxEvent} which satisfies below requirements:<ol> <li> {@link TxEvent#type} is {@link EventType#TxAbortedEvent}</li> <li>There are no   {@link TxEvent} which has the same {@link TxEvent#globalTxId} and {@link TxEvent#type} is {@link EventType#TxEndedEvent} or {@link EventType#SagaEndedEvent}</li> </ol>
 * @return
 */
Optional<List<TxEvent>> findFirstAbortedGlobalTransaction();
Program: 170703
Project: 170703
Buggy source:
@Override public Optional<TxEvent> findFirstAbortedGlobalTransaction(){
  return Optional.empty();
}

Fixed version (ground truth):
@Override public Optional<List<TxEvent>> findFirstAbortedGlobalTransaction(){
  return Optional.empty();
}
Program: 170704
Project: 170704
Buggy source:
@Override public Optional<TxEvent> findFirstAbortedGlobalTransaction(){
  return eventRepo.findFirstAbortedGlobalTxByType();
}

Fixed version (ground truth):
@Override public Optional<List<TxEvent>> findFirstAbortedGlobalTransaction(){
  return eventRepo.findFirstAbortedGlobalTxByType();
}
Program: 170705
Project: 170705
Buggy source:
@Query("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") Optional<TxEvent> findFirstAbortedGlobalTxByType();

Fixed version (ground truth):
@Query("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") Optional<List<TxEvent>> findFirstAbortedGlobalTxByType();
Program: 170707
Project: 170707
Buggy source:
RetrySagaLog(PersistentStore persistentStore,int retryDelay){
  this.retryPersistentStore=persistentStore;
  this.retryDelay=retryDelay;
}

Fixed version (ground truth):
RetrySagaLog(PersistentStore persistentStore,int retryDelay){
  this.persistentStore1=persistentStore;
  this.retryDelay=retryDelay;
}
Program: 170708
Project: 170708
Buggy source:
@Override public void offer(SagaEvent sagaEvent){
  boolean success=false;
  do {
    try {
      retryPersistentStore.offer(sagaEvent);
      success=true;
    }
 catch (    Exception e) {
      e.printStackTrace();
      try {
        sleep(retryDelay);
      }
 catch (      InterruptedException e1) {
        e1.printStackTrace();
      }
    }
  }
 while (!success);
}

Fixed version (ground truth):
@Override public void offer(SagaEvent sagaEvent){
  boolean success=false;
  do {
    try {
      persistentStore1.offer(sagaEvent);
      success=true;
    }
 catch (    Exception e) {
      e.printStackTrace();
      sleep(retryDelay);
    }
  }
 while (!success && !isInterrupted());
}
Program: 170709
Project: 170709
Buggy source:
@Override public long size(){
  return retryPersistentStore.size();
}

Fixed version (ground truth):
@Override public long size(){
  return persistentStore1.size();
}
Program: 170710
Project: 170710
Buggy source:
@Override public Map<String,List<EventEnvelope>> findPendingSagaEvents(){
  return retryPersistentStore.findPendingSagaEvents();
}

Fixed version (ground truth):
@Override public Map<String,List<EventEnvelope>> findPendingSagaEvents(){
  return persistentStore1.findPendingSagaEvents();
}
Program: 170714
Project: 170714
Buggy source:
@Bean public WebExceptionHandler exceptionHandler(){
  return (  ServerWebExchange exchange,  Throwable ex) -> {
    if (ex instanceof PostNotFoundException) {
      exchange.getResponse().setStatusCode(HttpStatus.NOT_FOUND);
      return exchange.getResponse().setComplete();
    }
    return Mono.empty();
  }
;
}

Fixed version (ground truth):
@Bean public WebExceptionHandler exceptionHandler(){
  return (  ServerWebExchange exchange,  Throwable ex) -> {
    if (ex instanceof PostNotFoundException) {
      exchange.getResponse().setStatusCode(HttpStatus.NOT_FOUND);
      return exchange.getResponse().setComplete();
    }
    return Mono.error(ex);
  }
;
}
Program: 170715
Project: 170715
Buggy source:
@Bean public MapReactiveUserDetailsService userDetailsService(){
  UserDetails user=User.withUsername("String_Node_Str").password("String_Node_Str").roles("String_Node_Str").build();
  UserDetails admin=User.withUsername("String_Node_Str").password("String_Node_Str").roles("String_Node_Str","String_Node_Str").build();
  return new MapReactiveUserDetailsService(user,admin);
}

Fixed version (ground truth):
@Bean public MapReactiveUserDetailsService userDetailsService(){
  UserDetails user=User.withDefaultPasswordEncoder().username("String_Node_Str").password("String_Node_Str").roles("String_Node_Str").build();
  UserDetails admin=User.withDefaultPasswordEncoder().username("String_Node_Str").password("String_Node_Str").roles("String_Node_Str","String_Node_Str").build();
  return new MapReactiveUserDetailsService(user,admin);
}
Program: 170716
Project: 170716
Buggy source:
@Bean SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
  return http.authorizeExchange().pathMatchers(HttpMethod.GET,"String_Node_Str").permitAll().pathMatchers(HttpMethod.DELETE,"String_Node_Str").hasRole("String_Node_Str").anyExchange().authenticated().and().build();
}

Fixed version (ground truth):
@Bean SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
  return http.csrf().disable().authorizeExchange().pathMatchers(HttpMethod.GET,"String_Node_Str").permitAll().pathMatchers(HttpMethod.DELETE,"String_Node_Str").hasRole("String_Node_Str").anyExchange().authenticated().and().build();
}
Program: 170717
Project: 170717
Buggy source:
public ReflectiveOpcodeSheet(InsnListEditor list,AbstractInsnNode insn){
  this.list=list;
  refresh(insn);
  setSearchBoxVisible(false);
  setModeSwitcherVisible(false);
}

Fixed version (ground truth):
public ReflectiveOpcodeSheet(InsnListEditor list,AbstractInsnNode insn){
  this.list=list;
  add0Hook();
  refresh(insn);
  setSearchBoxVisible(false);
  setModeSwitcherVisible(false);
}
Program: 170718
Project: 170718
Buggy source:
/** 
 * Create a PropertySheet by parsing fields of a class.
 * @param instances Instances of classes to populate the property table.
 */
public ReflectivePropertySheet(Object... instances){
  for (  Object instance : instances)   setupItems(instance);
}

Fixed version (ground truth):
/** 
 * Create a PropertySheet by parsing fields of a class.
 * @param instances Instances of classes to populate the property table.
 */
public ReflectivePropertySheet(Object... instances){
  add0Hook();
  for (  Object instance : instances)   setupItems(instance);
}
Program: 170720
Project: 170720
Buggy source:
public void setExternal(){
  external=true;
  for (  MethodWrapper method : methods) {
    method.setLocked(true);
  }
}

Fixed version (ground truth):
public void setExternal(){
  external=true;
  for (  MethodWrapper method : getMethods()) {
    method.setLocked(true);
  }
}
Program: 170721
Project: 170721
Buggy source:
/** 
 * @param other Other method wrapper to check for match.
 * @return Matching method definition <i>(name + desc)</i>
 */
public boolean meatches(MethodWrapper other){
  if (getOwner().equals(other.getOwner())) {
    return false;
  }
  MethodNode mnOther=other.getValue();
  MethodNode mnThis=this.getValue();
  return mnThis.name.equals(mnOther.name) && mnThis.desc.equals(mnOther.desc);
}

Fixed version (ground truth):
/** 
 * @param other Other method wrapper to check for match.
 * @return Matching method definition <i>(name + desc)</i>
 */
public boolean meatches(MethodWrapper other){
  if (other == null || getOwner().equals(other.getOwner())) {
    return false;
  }
  MethodNode mnOther=other.getValue();
  MethodNode mnThis=this.getValue();
  return mnThis.name.equals(mnOther.name) && mnThis.desc.equals(mnOther.desc);
}
Program: 170722
Project: 170722
Buggy source:
private void linkMethods(ClassWrapper other,Set<ClassWrapper> existing){
  if (existing.contains(other)) {
    return;
  }
  for (  MethodWrapper method : other.getMethods()) {
    if (meatches(method)) {
      addChild(method);
      addParent(method);
    }
  }
  existing.add(other);
  for (  Node<ClassNode> node : other.getChildren()) {
    linkMethods((ClassWrapper)node,existing);
  }
  for (  Node<ClassNode> node : other.getParents()) {
    linkMethods((ClassWrapper)node,existing);
  }
}

Fixed version (ground truth):
private void linkMethods(ClassWrapper other,Set<ClassWrapper> existing){
  if (existing.contains(other) || isObjectClass(other)) {
    return;
  }
  MethodNode value=getValue();
  if (value != null) {
    MethodWrapper method=other.getMethodMap().get(value.name + value.desc);
    if (meatches(method)) {
      addChild(method);
      addParent(method);
    }
  }
  existing.add(other);
  for (  Node<ClassNode> node : other.getChildren()) {
    linkMethods((ClassWrapper)node,existing);
  }
  for (  Node<ClassNode> node : other.getParents()) {
    linkMethods((ClassWrapper)node,existing);
  }
}
Program: 170723
Project: 170723
Buggy source:
/** 
 * Add class to class-map.
 * @param name Class to add.
 * @param classes Map of ASM ClassNodes to pull values from.
 * @return ClassWrapper associated with name.
 */
private ClassWrapper addClass(String name,Map<String,ClassNode> classes){
  if (classMap.containsKey(name)) {
    return classMap.get(name);
  }
  ClassWrapper node=null;
  if (classes.containsKey(name)) {
    node=new ClassWrapper(classes.get(name));
  }
 else {
    node=new ClassWrapper(null);
    try {
      Class<?> cls=Class.forName(name,false,ClassLoader.getSystemClassLoader());
      for (      Method method : cls.getDeclaredMethods()) {
        String desc=Type.getMethodDescriptor(method).toString();
        MethodNode dummy=new MethodNode();
        dummy.name=method.getName();
        dummy.desc=desc;
        methodMap.put(name + "String_Node_Str" + method.getName()+ desc,node.addMethod(dummy));
      }
    }
 catch (    Exception e) {
    }
    node.setExternal();
  }
  classMap.put(name,node);
  ClassNode cn=node.getValue();
  if (cn != null) {
    node.addParent(addClass(cn.superName,classes));
    for (    String interfac : cn.interfaces) {
      node.addParent(addClass(interfac,classes));
    }
    for (    MethodNode mn : cn.methods) {
      methodMap.put(name + "String_Node_Str" + mn.name+ mn.desc,node.addMethod(mn));
    }
  }
  return node;
}

Fixed version (ground truth):
/** 
 * Add class to class-map.
 * @param name Class to add.
 * @param classes Map of ASM ClassNodes to pull values from.
 * @return ClassWrapper associated with name.
 */
private ClassWrapper addClass(String name,Map<String,ClassNode> classes){
  if (name == null) {
    return null;
  }
  if (classMap.containsKey(name)) {
    return classMap.get(name);
  }
  ClassWrapper node=null;
  if (classes.containsKey(name)) {
    node=new ClassWrapper(classes.get(name));
  }
 else {
    node=new ReflectiveClassWrapper(name);
    try {
      Class<?> cls=Class.forName(name,false,ClassLoader.getSystemClassLoader());
      for (      Method method : cls.getDeclaredMethods()) {
        String desc=Type.getMethodDescriptor(method).toString();
        MethodNode dummy=new MethodNode();
        dummy.name=method.getName();
        dummy.desc=desc;
        methodMap.put(name + "String_Node_Str" + method.getName()+ desc,node.addMethod(dummy));
      }
    }
 catch (    Exception e) {
    }
    node.setExternal();
  }
  classMap.put(name,node);
  ClassNode cn=node.getValue();
  if (cn != null) {
    if (cn.superName != null) {
      ClassWrapper c=addClass(cn.superName,classes);
      if (c != null) {
        node.addParent(c);
      }
    }
    for (    String interfac : cn.interfaces) {
      ClassWrapper i=addClass(interfac,classes);
      if (i != null) {
        node.addParent(i);
      }
    }
    for (    MethodNode mn : cn.methods) {
      methodMap.put(name + "String_Node_Str" + mn.name+ mn.desc,node.addMethod(mn));
    }
  }
  return node;
}
Program: 170724
Project: 170724
Buggy source:
public MethodWrapper addMethod(MethodNode mn){
  MethodWrapper node=new MethodWrapper(this,mn);
  getMethods().add(node);
  return node;
}

Fixed version (ground truth):
public MethodWrapper addMethod(MethodNode mn){
  MethodWrapper node=new MethodWrapper(this,mn);
  getMethodMap().put(mn.name + mn.desc,node);
  return node;
}
Program: 170725
Project: 170725
Buggy source:
/** 
 * Provides access to a map of class hierarchy of ClassNodes. Keys are internal names of classes such as <i>"my/class/Name"</i>
 * @return Map of node wrappers for ClassNodes.
 */
public static Map<String,MethodWrapper> getMethodMap(){
  return INSTANCE.methodMap;
}

Fixed version (ground truth):
public Map<String,MethodWrapper> getMethodMap(){
  return methods;
}
Program: 170726
Project: 170726
Buggy source:
public List<MethodWrapper> getMethods(){
  return methods;
}

Fixed version (ground truth):
public Collection<MethodWrapper> getMethods(){
  return getMethodMap().values();
}
Program: 170727
Project: 170727
Buggy source:
/** 
 * Print an exception.
 * @param exception Exception to print.
 * @param display Show error in UI.
 * @param terminate Stop program after printing.
 */
public static void error(Exception exception,boolean display,boolean terminate){
  String message=getErrorMessage(exception);
  Logging.error(message);
  if (display) {
    Notifications.create().title("String_Node_Str" + exception.getClass().getSimpleName()).text(message).hideAfter(Duration.seconds(5)).showError();
  }
  if (terminate) {
    System.exit(0);
  }
}

Fixed version (ground truth):
/** 
 * Print an exception.
 * @param exception Exception to print.
 * @param display Show error in UI.
 * @param terminate Stop program after printing.
 */
public static void error(Exception exception,boolean display,boolean terminate){
  String message=getErrorMessage(exception);
  Logging.error(message);
  if (display) {
    Threads.runLaterFx(0,() -> {
      Notifications.create().title("String_Node_Str" + exception.getClass().getSimpleName()).text(message).hideAfter(Duration.seconds(5)).showError();
    }
);
  }
  if (terminate) {
    System.exit(0);
  }
}
Program: 170730
Project: 170730
Buggy source:
/** 
 * Links two given insns together via their linked list's previous and next values.
 * @param insnStart
 * @param insnEnd
 */
private void link(AbstractInsnNode insnStart,AbstractInsnNode insnEnd){
  try {
    boolean first=method.instructions.getFirst().equals(insnStart);
    Field next=AbstractInsnNode.class.getDeclaredField("String_Node_Str");
    Field prev=AbstractInsnNode.class.getDeclaredField("String_Node_Str");
    next.setAccessible(true);
    prev.setAccessible(true);
    if (first) {
      Field listStart=InsnList.class.getDeclaredField("String_Node_Str");
      listStart.setAccessible(true);
      listStart.set(method.instructions,insnEnd.getNext());
      prev.set(insnEnd.getNext(),null);
    }
 else {
      next.set(insnStart.getPrevious(),insnEnd.getNext());
      prev.set(insnEnd.getNext(),insnStart.getPrevious());
    }
    if (method.instructions instanceof TInsnList) {
      ((TInsnList)method.instructions).setModified();
    }
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
/** 
 * Links two given insns together via their linked list's previous and next values.
 * @param insnStart
 * @param insnEnd
 */
private void link(AbstractInsnNode insnStart,AbstractInsnNode insnEnd){
  try {
    boolean first=method.instructions.getFirst().equals(insnStart);
    Field next=AbstractInsnNode.class.getDeclaredField("String_Node_Str");
    Field prev=AbstractInsnNode.class.getDeclaredField("String_Node_Str");
    next.setAccessible(true);
    prev.setAccessible(true);
    if (first) {
      Field listStart=InsnList.class.getDeclaredField("String_Node_Str");
      listStart.setAccessible(true);
      listStart.set(method.instructions,insnEnd.getNext());
      prev.set(insnEnd.getNext(),null);
    }
 else {
      next.set(insnStart.getPrevious(),insnEnd.getNext());
      prev.set(insnEnd.getNext(),insnStart.getPrevious());
    }
    Field listStart=InsnList.class.getDeclaredField("String_Node_Str");
    listStart.setAccessible(true);
    listStart.set(method.instructions,null);
    if (method.instructions instanceof TInsnList) {
      ((TInsnList)method.instructions).setModified();
    }
  }
 catch (  Exception e) {
  }
}
Program: 170731
Project: 170731
Buggy source:
/** 
 * Creates an array of modifable loaded classes.
 * @return
 */
@SuppressWarnings("String_Node_Str") private static Class[] getModifable(){
  Set<Class> set=new HashSet<>();
  for (  Class clazz : instrument.getAllLoadedClasses()) {
    if (valid(clazz.getName()) && instrument.isModifiableClass(clazz)) {
      set.add(clazz);
    }
  }
  return set.toArray(new Class[set.size()]);
}

Fixed version (ground truth):
/** 
 * Creates an array of modifable loaded classes.
 * @return
 */
@SuppressWarnings("String_Node_Str") private static Class[] getModifable(){
  Set<Class> set=new HashSet<>();
  for (  Class clazz : instrument.getAllLoadedClasses()) {
    if (clazz.isArray() || clazz.isPrimitive() || clazz.isSynthetic()) {
      continue;
    }
    if (valid(clazz.getName()) && instrument.isModifiableClass(clazz)) {
      set.add(clazz);
    }
  }
  return set.toArray(new Class[set.size()]);
}
Program: 170732
Project: 170732
Buggy source:
/** 
 * Get node via its internal class name.
 * @param name
 * @return
 * @throws IOException
 */
private static ClassNode getNode(String name) throws IOException {
  byte[] bytes=classes.get(name);
  if (bytes == null) {
    return null;
  }
  return Asm.getNode(bytes);
}

Fixed version (ground truth):
/** 
 * Get node via its class.
 * @param clazz
 * @return
 * @throws IOException
 */
public static ClassNode getNode(Class<?> clazz) throws IOException {
  String name=clazz.getName().replace("String_Node_Str","String_Node_Str");
  byte[] bytes=classes.get(name);
  if (bytes == null) {
    InputStream is=clazz.getResourceAsStream("String_Node_Str" + clazz.getName().replace('.','/') + "String_Node_Str");
    if (is == null) {
      return null;
    }
    bytes=Streams.from(is);
  }
  return Asm.getNode(bytes);
}
Program: 170733
Project: 170733
Buggy source:
/** 
 * Retrieve the map of ClassNodes using   {@link #instrument}.
 * @return Map of JVM classes.
 * @throws IOException Thrown if classes could not be read.
 */
@SuppressWarnings("String_Node_Str") public static Map<String,ClassNode> getNodesViaInst(){
  Map<String,ClassNode> map=new HashMap<>();
  for (  Class clazz : instrument.getAllLoadedClasses()) {
    try {
      ClassNode node=getNode(clazz.getName().replace("String_Node_Str","String_Node_Str"));
      if (node != null) {
        map.put(node.name,node);
        Recaf.INSTANCE.logging.fine("String_Node_Str" + node.name,1);
      }
    }
 catch (    Exception e) {
      Recaf.INSTANCE.logging.fine("String_Node_Str" + clazz.getName().replace("String_Node_Str","String_Node_Str"),1);
      Recaf.INSTANCE.logging.error(e,false);
    }
  }
  return map;
}

Fixed version (ground truth):
/** 
 * Retrieve the map of ClassNodes using   {@link #instrument}.
 * @return Map of JVM classes.
 * @throws IOException Thrown if classes could not be read.
 */
@SuppressWarnings("String_Node_Str") public static Map<String,ClassNode> getNodesViaInst(){
  Map<String,ClassNode> map=new HashMap<>();
  for (  Class clazz : instrument.getAllLoadedClasses()) {
    try {
      String name=clazz.getName().replace("String_Node_Str","String_Node_Str");
      if (!valid(name)) {
        continue;
      }
      ClassNode node=getNode(clazz);
      if (node != null) {
        map.put(node.name,node);
        Recaf.INSTANCE.logging.fine("String_Node_Str" + node.name,1);
      }
    }
 catch (    Exception e) {
      Recaf.INSTANCE.logging.fine("String_Node_Str" + clazz.getName().replace("String_Node_Str","String_Node_Str"));
      Recaf.INSTANCE.logging.error(e,false);
    }
  }
  return map;
}
Program: 170734
Project: 170734
Buggy source:
/** 
 * Add class to map and current class tree if recaf's UI is already open.
 * @param name
 * @param bytes
 */
public static void addClass(String name,byte[] bytes){
  classes.put(name,bytes);
  Recaf rc=Recaf.INSTANCE;
  if (rc.ui != null) {
    try {
      rc.jarData.classes.put(name,getNode(name));
      if (rc.configs.agent.autoRefresh) {
        rc.ui.refreshTree();
      }
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
/** 
 * Add class to map and current class tree if recaf's UI is already open.
 * @param name
 * @param bytes
 */
public static void addClass(String name,byte[] bytes){
  classes.put(name,bytes);
  Recaf rc=Recaf.INSTANCE;
  try {
    ClassNode cn=getNode(name.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str"));
    if (cn == null) {
      return;
    }
    if (rc.jarData == null) {
      rc.logging.info("String_Node_Str" + name);
    }
 else {
      rc.jarData.classes.put(name,cn);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (rc.ui != null && valid(name) && rc.configs.agent.autoRefresh) {
    rc.ui.refreshTree();
  }
}
Program: 170735
Project: 170735
Buggy source:
public TrackingClassNode(){
  super(Opcodes.ASM6);
}

Fixed version (ground truth):
public TrackingClassNode(){
  super(Opcodes.ASM5);
}
Program: 170736
Project: 170736
Buggy source:
public TrackingMethodNode(TrackingClassNode clazz,int access,String name,String desc,String signature,String[] exceptions){
  super(Opcodes.ASM6,access,name,desc,signature,exceptions);
  this.clazz=clazz;
  this.instructions=new TrackingInsnList(this);
}

Fixed version (ground truth):
public TrackingMethodNode(TrackingClassNode clazz,int access,String name,String desc,String signature,String[] exceptions){
  super(Opcodes.ASM5,access,name,desc,signature,exceptions);
  this.clazz=clazz;
  this.instructions=new TrackingInsnList(this);
}