nus-yam/ex-repair huggingface dataset:
Program: 53670
Project: 53670
Buggy source:
private AgentOption createAgentOption(String agentArgs,Instrumentation instrumentation,ProfilerConfig profilerConfig,URL[] pluginJars,String bootStrapJarPath,ServiceTypeRegistryService serviceTypeRegistryService,AnnotationKeyRegistryService annotationKeyRegistryService,String bootStrapCoreJar){
  return new DefaultAgentOption(agentArgs,instrumentation,profilerConfig,pluginJars,bootStrapJarPath,serviceTypeRegistryService,annotationKeyRegistryService);
}

Fixed version (ground truth):
private AgentOption createAgentOption(String agentArgs,Instrumentation instrumentation,ProfilerConfig profilerConfig,URL[] pluginJars,String bootStrapJarCorePath,ServiceTypeRegistryService serviceTypeRegistryService,AnnotationKeyRegistryService annotationKeyRegistryService){
  return new DefaultAgentOption(agentArgs,instrumentation,profilerConfig,pluginJars,bootStrapJarCorePath,serviceTypeRegistryService,annotationKeyRegistryService);
}
Program: 53672
Project: 53672
Buggy source:
@Override public Set<AgentInfo> getAgentsByApplicationName(String applicationName,long timestamp,long timeDiff){
  if (applicationName == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (timeDiff < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (timeDiff > timestamp) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long eventTimestampFloor=timestamp - timeDiff;
  List<String> agentIds=this.applicationIndexDao.selectAgentIds(applicationName);
  Set<AgentInfo> agentSet=new HashSet<>();
  for (  String agentId : agentIds) {
    AgentInfoBo agentInfoBo=this.agentInfoDao.getAgentInfo(agentId,timestamp);
    if (agentInfoBo != null) {
      AgentStatus agentStatus=this.getAgentStatus(agentId,timestamp);
      if (AgentLifeCycleState.UNKNOWN == agentStatus.getState() || eventTimestampFloor <= agentStatus.getEventTimestamp()) {
        AgentInfo agentInfo=new AgentInfo(agentInfoBo);
        agentInfo.setStatus(agentStatus);
        agentSet.add(agentInfo);
      }
    }
  }
  return agentSet;
}

Fixed version (ground truth):
@Override public Set<AgentInfo> getAgentsByApplicationName(String applicationName,long timestamp,long timeDiff){
  if (applicationName == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (timeDiff > timestamp) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final long eventTimestampFloor=timestamp - timeDiff;
  List<String> agentIds=this.applicationIndexDao.selectAgentIds(applicationName);
  Set<AgentInfo> agentSet=new HashSet<>();
  for (  String agentId : agentIds) {
    AgentInfoBo agentInfoBo=this.agentInfoDao.getAgentInfo(agentId,timestamp);
    if (agentInfoBo != null) {
      AgentStatus agentStatus=this.getAgentStatus(agentId,timestamp);
      if (AgentLifeCycleState.UNKNOWN == agentStatus.getState() || eventTimestampFloor <= agentStatus.getEventTimestamp()) {
        AgentInfo agentInfo=new AgentInfo(agentInfoBo);
        agentInfo.setStatus(agentStatus);
        agentSet.add(agentInfo);
      }
    }
  }
  return agentSet;
}
Program: 53673
Project: 53673
Buggy source:
private void addTNonblockingSocketEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(SocketFieldAccessor.class.getName());
      target.addField(SocketAddressFieldAccessor.class.getName());
      final InstrumentMethod constructor=target.getConstructor("String_Node_Str","String_Node_Str","String_Node_Str");
      if (constructor != null) {
        String interceptor="String_Node_Str";
        constructor.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}

Fixed version (ground truth):
private void addTNonblockingSocketEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET_ADDRESS);
      final InstrumentMethod constructor=target.getConstructor("String_Node_Str","String_Node_Str","String_Node_Str");
      if (constructor != null) {
        String interceptor="String_Node_Str";
        constructor.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}
Program: 53675
Project: 53675
Buggy source:
private void addProcessFunctionEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ServerMarkerFlagFieldAccessor.class.getName());
      final InstrumentMethod process=target.getDeclaredMethod("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
      if (process != null) {
        String interceptor="String_Node_Str";
        process.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}

Fixed version (ground truth):
private void addProcessFunctionEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SERVER_MARKER_FLAG);
      final InstrumentMethod process=target.getDeclaredMethod("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
      if (process != null) {
        String interceptor="String_Node_Str";
        process.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}
Program: 53677
Project: 53677
Buggy source:
private void addTTransportEditor(String tTransportClassName,final String tTransportInterceptorFqcn,final String[]... parameterTypeGroups){
  final String targetClassName=tTransportClassName;
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(SocketFieldAccessor.class.getName());
      for (      String[] parameterTypeGroup : parameterTypeGroups) {
        final InstrumentMethod constructor=target.getConstructor(parameterTypeGroup);
        if (constructor != null) {
          constructor.addInterceptor(tTransportInterceptorFqcn);
        }
      }
      return target.toBytecode();
    }
  }
);
}

Fixed version (ground truth):
private void addTTransportEditor(String tTransportClassName,final String tTransportInterceptorFqcn,final String[]... parameterTypeGroups){
  final String targetClassName=tTransportClassName;
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET);
      for (      String[] parameterTypeGroup : parameterTypeGroups) {
        final InstrumentMethod constructor=target.getConstructor(parameterTypeGroup);
        if (constructor != null) {
          constructor.addInterceptor(tTransportInterceptorFqcn);
        }
      }
      return target.toBytecode();
    }
  }
);
}
Program: 53678
Project: 53678
Buggy source:
private void addFrameBufferEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(SocketFieldAccessor.class.getName());
      target.addGetter(TNonblockingTransportFieldGetter.class.getName(),ThriftConstants.FRAME_BUFFER_FIELD_TRANS_);
      if (target.hasField(ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_)) {
        target.addGetter(TTransportFieldGetter.class.getName(),ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_);
        final InstrumentMethod constructor=target.getConstructor("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
        if (constructor != null) {
          String interceptor="String_Node_Str";
          constructor.addInterceptor(interceptor);
        }
      }
      if (target.hasMethod("String_Node_Str","String_Node_Str")) {
        final InstrumentMethod getInputTransport=target.getDeclaredMethod("String_Node_Str","String_Node_Str");
        if (getInputTransport != null) {
          String interceptor="String_Node_Str";
          getInputTransport.addInterceptor(interceptor);
        }
      }
      return target.toBytecode();
    }
  }
);
}

Fixed version (ground truth):
private void addFrameBufferEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET);
      target.addGetter(ThriftConstants.FIELD_GETTER_T_NON_BLOCKING_TRANSPORT,ThriftConstants.FRAME_BUFFER_FIELD_TRANS_);
      if (target.hasField(ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_)) {
        target.addGetter(ThriftConstants.FIELD_GETTER_T_TRANSPORT,ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_);
        final InstrumentMethod constructor=target.getConstructor("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
        if (constructor != null) {
          String interceptor="String_Node_Str";
          constructor.addInterceptor(interceptor);
        }
      }
      if (target.hasMethod("String_Node_Str","String_Node_Str")) {
        final InstrumentMethod getInputTransport=target.getDeclaredMethod("String_Node_Str","String_Node_Str");
        if (getInputTransport != null) {
          String interceptor="String_Node_Str";
          getInputTransport.addInterceptor(interceptor);
        }
      }
      return target.toBytecode();
    }
  }
);
}
Program: 53680
Project: 53680
Buggy source:
private void addTBaseAsyncProcessorEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ServerMarkerFlagFieldAccessor.class.getName());
      target.addField(AsyncMarkerFlagFieldAccessor.class.getName());
      final InstrumentMethod process=target.getDeclaredMethod("String_Node_Str","String_Node_Str");
      if (process != null) {
        String interceptor="String_Node_Str";
        process.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}

Fixed version (ground truth):
private void addTBaseAsyncProcessorEditor(){
  final String targetClassName="String_Node_Str";
  transformTemplate.transform(targetClassName,new TransformCallback(){
    @Override public byte[] doInTransform(    Instrumentor instrumentor,    ClassLoader loader,    String className,    Class<?> classBeingRedefined,    ProtectionDomain protectionDomain,    byte[] classfileBuffer) throws InstrumentException {
      final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
      target.addField(ThriftConstants.FIELD_ACCESSOR_SERVER_MARKER_FLAG);
      target.addField(ThriftConstants.FIELD_ACCESSOR_ASYNC_MARKER_FLAG);
      final InstrumentMethod process=target.getDeclaredMethod("String_Node_Str","String_Node_Str");
      if (process != null) {
        String interceptor="String_Node_Str";
        process.addInterceptor(interceptor);
      }
      return target.toBytecode();
    }
  }
);
}
Program: 53681
Project: 53681
Buggy source:
@Override public void eventPerformed(PinpointServer pinpointServer,SocketStateCode stateCode){
  if (workerState.isStarted()) {
    logger.info("String_Node_Str",pinpointServer,stateCode);
    Map agentProperties=pinpointServer.getChannelProperties();
    if (skipAgent(agentProperties)) {
      return;
    }
    if (SocketStateCode.RUN_DUPLEX == stateCode) {
      UpdateJob job=new UpdateJob(pinpointServer,new byte[0]);
      worker.putJob(job);
      profileCluster.addClusterPoint(new PinpointServerClusterPoint(pinpointServer));
    }
 else     if (SocketStateCode.isClosed(stateCode)) {
      DeleteJob job=new DeleteJob(pinpointServer);
      worker.putJob(job);
      profileCluster.removeClusterPoint(new PinpointServerClusterPoint(pinpointServer));
    }
  }
 else {
    WorkerState state=this.workerState.getCurrentState();
    logger.info("String_Node_Str",this.getClass().getSimpleName(),state.toString());
    return;
  }
}

Fixed version (ground truth):
@Override public void eventPerformed(PinpointServer pinpointServer,SocketStateCode stateCode){
  if (workerState.isStarted()) {
    logger.info("String_Node_Str",pinpointServer,stateCode);
    Map agentProperties=pinpointServer.getChannelProperties();
    if (skipAgent(agentProperties)) {
      return;
    }
    if (SocketStateCode.RUN_DUPLEX == stateCode) {
      UpdateJob job=new UpdateJob(pinpointServer,new byte[0]);
      profileCluster.addClusterPoint(new PinpointServerClusterPoint(pinpointServer));
      worker.putJob(job);
    }
 else     if (SocketStateCode.isClosed(stateCode)) {
      DeleteJob job=new DeleteJob(pinpointServer);
      worker.putJob(job);
      profileCluster.removeClusterPoint(new PinpointServerClusterPoint(pinpointServer));
    }
  }
 else {
    WorkerState state=this.workerState.getCurrentState();
    logger.info("String_Node_Str",this.getClass().getSimpleName(),state.toString());
    return;
  }
}
Program: 53682
Project: 53682
Buggy source:
public void stop(){
  logger.info("String_Node_Str",this.getClass().getSimpleName());
  this.isStarted=false;
  long startTimeMillis=System.currentTimeMillis();
  long maxWaitTimeMillis=3000;
  while (this.workerThread.isAlive()) {
    this.workerThread.interrupt();
    try {
      this.workerThread.join(100L);
      if (System.currentTimeMillis() - startTimeMillis > maxWaitTimeMillis) {
        break;
      }
    }
 catch (    InterruptedException ignored) {
    }
  }
  logger.info("String_Node_Str",this.getClass().getSimpleName());
}

Fixed version (ground truth):
public void stop(){
  logger.info("String_Node_Str");
  this.isStarted=false;
  long startTimeMillis=System.currentTimeMillis();
  long maxWaitTimeMillis=3000;
  while (workerThread != null && workerThread.isAlive()) {
    workerThread.interrupt();
    try {
      workerThread.join(100L);
      if (System.currentTimeMillis() - startTimeMillis > maxWaitTimeMillis) {
        break;
      }
    }
 catch (    InterruptedException ignored) {
    }
  }
  logger.info("String_Node_Str");
}
Program: 53683
Project: 53683
Buggy source:
public void start(){
  logger.info("String_Node_Str",this.getClass().getSimpleName());
  if (!workerThread.isAlive()) {
    this.isStarted=true;
    this.workerThread.start();
    logger.info("String_Node_Str",this.getClass().getSimpleName());
  }
 else {
    logger.info("String_Node_Str",this.getClass().getSimpleName());
  }
}

Fixed version (ground truth):
public void start(){
  final ThreadFactory threadFactory=new PinpointThreadFactory(this.getClass().getSimpleName(),true);
  this.workerThread=threadFactory.newThread(this);
  logger.info("String_Node_Str");
  if (!workerThread.isAlive()) {
    this.isStarted=true;
    this.workerThread.start();
    logger.info("String_Node_Str");
  }
 else {
    logger.info("String_Node_Str",this.getClass().getSimpleName());
  }
}
Program: 53684
Project: 53684
Buggy source:
public StandbySpanStreamDataSendWorker(StandbySpanStreamDataFlushHandler flushHandler,StandbySpanStreamDataStorage dataStorage,long blockTime){
  this.flushHandler=flushHandler;
  this.standbySpanStreamDataStorage=dataStorage;
  this.blockTime=blockTime;
  final ThreadFactory threadFactory=new PinpointThreadFactory(this.getClass().getSimpleName(),true);
  this.workerThread=threadFactory.newThread(this);
}

Fixed version (ground truth):
public StandbySpanStreamDataSendWorker(StandbySpanStreamDataFlushHandler flushHandler,StandbySpanStreamDataStorage dataStorage,long blockTime){
  this.flushHandler=flushHandler;
  this.standbySpanStreamDataStorage=dataStorage;
  this.blockTime=blockTime;
}
Program: 53685
Project: 53685
Buggy source:
synchronized boolean addStandbySpanStreamData(SpanStreamSendData standbySpanStreamData){
  SpanStreamSendDataMode flushMode=standbySpanStreamData.getFlushMode();
  if (flushMode == SpanStreamSendDataMode.FLUSH) {
    return false;
  }
  if (standbySpanStreamData.getAvailableBufferCapacity() > 0 && standbySpanStreamData.getAvailableBufferCapacity() > 0) {
    if (priorityQueue.size() >= capacity) {
      return false;
    }
    return priorityQueue.offer(standbySpanStreamData);
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
synchronized boolean addStandbySpanStreamData(SpanStreamSendData standbySpanStreamData){
  SpanStreamSendDataMode flushMode=standbySpanStreamData.getFlushMode();
  if (flushMode == SpanStreamSendDataMode.FLUSH) {
    return false;
  }
  if (standbySpanStreamData.getAvailableBufferCapacity() > 0 && standbySpanStreamData.getAvailableGatheringComponentsCount() > 0) {
    if (priorityQueue.size() >= capacity) {
      return false;
    }
    return priorityQueue.offer(standbySpanStreamData);
  }
 else {
    return false;
  }
}
Program: 53686
Project: 53686
Buggy source:
private boolean isFinished(int currentState){
  return this.state.get() == STATE_FINISHED;
}

Fixed version (ground truth):
private boolean isFinished(int currentState){
  return currentState == STATE_FINISHED;
}
Program: 53687
Project: 53687
Buggy source:
@Override public void after(Object target,Object[] args,Object result,Throwable throwable){
  if (isDebug) {
    logger.afterInterceptor(target,args,result,throwable);
  }
  Object iprot=args[1];
  if (validateInputProtocol(iprot)) {
    ((ServerMarkerFlagFieldAccessor)iprot)._$PINPOINT$_setServerMarkerFlag(false);
  }
}

Fixed version (ground truth):
@Override public void after(Object target,Object[] args,Object result,Throwable throwable){
  if (isDebug) {
    logger.afterInterceptor(target,args,result,throwable);
  }
  if (args.length != 4) {
    Object iprot=args[1];
    if (validateInputProtocol(iprot)) {
      ((ServerMarkerFlagFieldAccessor)iprot)._$PINPOINT$_setServerMarkerFlag(false);
    }
  }
}
Program: 53688
Project: 53688
Buggy source:
protected final Socket getRootSocket(Object target){
  TNonblockingTransport inTrans=((TNonblockingTransportFieldGetter)target)._$PINPOINT$_getTNonblockingTransport();
  if (inTrans != null) {
    if (inTrans instanceof SocketFieldAccessor) {
      return ((SocketFieldAccessor)inTrans)._$PINPOINT$_getSocket();
    }
 else {
      if (isDebug) {
        logger.debug("String_Node_Str",SocketFieldAccessor.class.getName());
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected final Socket getRootSocket(Object target){
  if (target instanceof TNonblockingTransportFieldGetter) {
    TNonblockingTransport inTrans=((TNonblockingTransportFieldGetter)target)._$PINPOINT$_getTNonblockingTransport();
    if (inTrans != null) {
      if (inTrans instanceof SocketFieldAccessor) {
        return ((SocketFieldAccessor)inTrans)._$PINPOINT$_getSocket();
      }
 else {
        if (isDebug) {
          logger.debug("String_Node_Str",SocketFieldAccessor.class.getName());
        }
      }
    }
  }
  return null;
}
Program: 53689
Project: 53689
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public Map<String,String> insertUserGroupMember(@RequestBody UserGroupMember userGroupMember){
  if (StringUtils.isEmpty(userGroupMember.getMemberId()) || StringUtils.isEmpty(userGroupMember.getMemberId())) {
    Map<String,String> result=new HashMap<>();
    result.put("String_Node_Str","String_Node_Str");
    result.put("String_Node_Str","String_Node_Str");
    return result;
  }
  userGroupService.insertMember(userGroupMember);
  Map<String,String> result=new HashMap<>();
  result.put("String_Node_Str","String_Node_Str");
  return result;
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public Map<String,String> insertUserGroupMember(@RequestBody UserGroupMember userGroupMember){
  if (StringUtils.isEmpty(userGroupMember.getMemberId()) || StringUtils.isEmpty(userGroupMember.getUserGroupId())) {
    Map<String,String> result=new HashMap<>();
    result.put("String_Node_Str","String_Node_Str");
    result.put("String_Node_Str","String_Node_Str");
    return result;
  }
  userGroupService.insertMember(userGroupMember);
  Map<String,String> result=new HashMap<>();
  result.put("String_Node_Str","String_Node_Str");
  return result;
}
Program: 53690
Project: 53690
Buggy source:
@Override public void setup(ProfilerPluginSetupContext context){
  final HttpClient4PluginConfig config=new HttpClient4PluginConfig(context.getConfig());
  addHttpRequestExecutorClass();
  addDefaultHttpRequestRetryHandlerClass();
  logger.debug("String_Node_Str");
  addAbstractHttpClient4Class();
  addAbstractPooledConnAdapterClass();
  addManagedClientConnectionImplClass();
  logger.debug("String_Node_Str");
  addCloseableHttpClientClass();
  addBasicHttpClientConnectionManagerClass();
  addPoolingHttpClientConnectionManagerClass();
  logger.debug("String_Node_Str");
  addClosableHttpAsyncClientClass();
  addDefaultClientExchangeHandlerImplClass();
  addBasicFutureClass();
}

Fixed version (ground truth):
@Override public void setup(ProfilerPluginSetupContext context){
  addHttpRequestExecutorClass();
  addDefaultHttpRequestRetryHandlerClass();
  logger.debug("String_Node_Str");
  addAbstractHttpClient4Class();
  addAbstractPooledConnAdapterClass();
  addManagedClientConnectionImplClass();
  logger.debug("String_Node_Str");
  addCloseableHttpClientClass();
  addBasicHttpClientConnectionManagerClass();
  addPoolingHttpClientConnectionManagerClass();
  logger.debug("String_Node_Str");
  addClosableHttpAsyncClientClass();
  addDefaultClientExchangeHandlerImplClass();
  addBasicFutureClass();
}
Program: 53691
Project: 53691
Buggy source:
private void addInterceptor(InstrumentMethod targetMethod) throws InstrumentException {
  int id=interceptorId.get();
  if (id != -1) {
    targetMethod.addInterceptor(id);
    return;
  }
synchronized (interceptorId) {
    id=interceptorId.get();
    if (id != -1) {
      targetMethod.addInterceptor(id);
      return;
    }
    id=targetMethod.addInterceptor("String_Node_Str");
    interceptorId.set(id);
  }
}

Fixed version (ground truth):
private void addInterceptor(InstrumentMethod targetMethod) throws InstrumentException {
  int id=interceptorId.get();
  if (id != -1) {
    targetMethod.addInterceptor(id);
    return;
  }
synchronized (lock) {
    id=interceptorId.get();
    if (id != -1) {
      targetMethod.addInterceptor(id);
      return;
    }
    id=targetMethod.addInterceptor("String_Node_Str");
    interceptorId.set(id);
  }
}
Program: 53692
Project: 53692
Buggy source:
@Override public byte[] doInTransform(Instrumentor instrumentor,ClassLoader loader,String className,Class<?> classBeingRedefined,ProtectionDomain protectionDomain,byte[] classfileBuffer) throws InstrumentException {
  if (logger.isInfoEnabled()) {
    logger.info("String_Node_Str",className);
  }
  try {
    InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
    if (!target.isInterceptable()) {
      return null;
    }
    List<InstrumentMethod> methodList=target.getDeclaredMethods(METHOD_FILTER);
    for (    InstrumentMethod method : methodList) {
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str",className,method.getName(),Arrays.toString(method.getParameterTypes()));
      }
      addInterceptor(method);
    }
    return target.toBytecode();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage(),e);
    return null;
  }
}

Fixed version (ground truth):
@Override public byte[] doInTransform(Instrumentor instrumentor,ClassLoader loader,String className,Class<?> classBeingRedefined,ProtectionDomain protectionDomain,byte[] classfileBuffer) throws InstrumentException {
  if (logger.isInfoEnabled()) {
    logger.info("String_Node_Str",className);
  }
  try {
    final InstrumentClass target=instrumentor.getInstrumentClass(loader,className,classfileBuffer);
    if (!target.isInterceptable()) {
      return null;
    }
    final List<InstrumentMethod> methodList=target.getDeclaredMethods(METHOD_FILTER);
    for (    InstrumentMethod method : methodList) {
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str",className,method.getName(),Arrays.toString(method.getParameterTypes()));
      }
      addInterceptor(method);
    }
    return target.toBytecode();
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage(),e);
    return null;
  }
}
Program: 53693
Project: 53693
Buggy source:
private void add(ClassLoader classLoader,String targetClassName,ClassFileTransformer transformer){
  ClassFileTransformer prev=transformerMap.putIfAbsent(new TransformerKey(classLoader,targetClassName.replace('.','/')),transformer);
  if (prev != null) {
    throw new ProfilerException("String_Node_Str" + classLoader + "String_Node_Str"+ targetClassName+ "String_Node_Str"+ prev);
  }
}

Fixed version (ground truth):
private void add(ClassLoader classLoader,String targetClassName,ClassFileTransformer transformer){
  final String jvmName=JavaAssistUtils.javaNameToJvmName(targetClassName);
  final TransformerKey key=new TransformerKey(classLoader,jvmName);
  final ClassFileTransformer prev=transformerMap.putIfAbsent(key,transformer);
  if (prev != null) {
    throw new ProfilerException("String_Node_Str" + classLoader + "String_Node_Str"+ targetClassName+ "String_Node_Str"+ prev);
  }
}
Program: 53694
Project: 53694
Buggy source:
@Override public ClassFileTransformer getTransformer(ClassLoader classLoader,String targetClassName){
  if (transformerMap.isEmpty()) {
    return null;
  }
  ClassFileTransformer transformer=transformerMap.remove(new TransformerKey(classLoader,targetClassName));
  if (logger.isDebugEnabled()) {
    logger.info("String_Node_Str",classLoader,targetClassName,transformerMap.size());
  }
  return transformer;
}

Fixed version (ground truth):
@Override public ClassFileTransformer getTransformer(ClassLoader classLoader,String targetClassName){
  if (transformerMap.isEmpty()) {
    return null;
  }
  final TransformerKey key=new TransformerKey(classLoader,targetClassName);
  final ClassFileTransformer transformer=transformerMap.remove(key);
  if (logger.isDebugEnabled()) {
    logger.info("String_Node_Str",classLoader,targetClassName,transformerMap.size());
  }
  return transformer;
}
Program: 53695
Project: 53695
Buggy source:
public TransformerKey(ClassLoader classLoader,String targetClassName){
  this.classLoader=classLoader;
  this.targetClassName=targetClassName;
}

Fixed version (ground truth):
public TransformerKey(ClassLoader classLoader,String targetClassName){
  if (targetClassName == null) {
    throw new NullPointerException("String_Node_Str");
  }
  this.classLoader=classLoader;
  this.targetClassName=targetClassName;
}
Program: 53696
Project: 53696
Buggy source:
@Override public int hashCode(){
  return classLoader.hashCode() * 31 + targetClassName.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=classLoader != null ? classLoader.hashCode() : 0;
  result=31 * result + targetClassName.hashCode();
  return result;
}
Program: 53697
Project: 53697
Buggy source:
@Override public boolean equals(Object obj){
  TransformerKey other=(TransformerKey)obj;
  return this.classLoader.equals(other.classLoader) && this.targetClassName.equals(other.targetClassName);
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  TransformerKey that=(TransformerKey)o;
  if (classLoader != null ? !classLoader.equals(that.classLoader) : that.classLoader != null)   return false;
  return targetClassName.equals(that.targetClassName);
}
Program: 53698
Project: 53698
Buggy source:
@Override public void testFinished(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
  out.flush();
}

Fixed version (ground truth):
@Override public void testFinished(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
}
Program: 53699
Project: 53699
Buggy source:
@Override public void testRunStarted(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str");
  out.flush();
}

Fixed version (ground truth):
@Override public void testRunStarted(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str");
}
Program: 53700
Project: 53700
Buggy source:
private String failureToString(Failure failure){
  StringBuilder builder=new StringBuilder();
  builder.append(failure.getTestHeader());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  builder.append(failure.getException().getClass().getName());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  builder.append(failure.getMessage());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  for (  StackTraceElement e : failure.getException().getStackTrace()) {
    builder.append(e.getClassName());
    builder.append(',');
    builder.append(e.getMethodName());
    builder.append(',');
    builder.append(e.getFileName());
    builder.append(',');
    builder.append(e.getLineNumber());
    builder.append(JUNIT_OUTPUT_DELIMITER);
  }
  return builder.toString();
}

Fixed version (ground truth):
private String failureToString(Failure failure){
  StringBuilder builder=new StringBuilder(64);
  builder.append(failure.getTestHeader());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  builder.append(failure.getException().getClass().getName());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  builder.append(failure.getMessage());
  builder.append(JUNIT_OUTPUT_DELIMITER);
  for (  StackTraceElement e : failure.getException().getStackTrace()) {
    builder.append(e.getClassName());
    builder.append(',');
    builder.append(e.getMethodName());
    builder.append(',');
    builder.append(e.getFileName());
    builder.append(',');
    builder.append(e.getLineNumber());
    builder.append(JUNIT_OUTPUT_DELIMITER);
  }
  return builder.toString();
}
Program: 53701
Project: 53701
Buggy source:
@Override public void testAssumptionFailure(Failure failure){
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ failureToString(failure));
  out.flush();
}

Fixed version (ground truth):
@Override public void testAssumptionFailure(Failure failure){
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ failureToString(failure));
}
Program: 53702
Project: 53702
Buggy source:
@Override public void testStarted(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
  out.flush();
}

Fixed version (ground truth):
@Override public void testStarted(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
}
Program: 53703
Project: 53703
Buggy source:
public PinpointPluginTestRunListener(PrintWriter out){
  this.out=out;
}

Fixed version (ground truth):
public PinpointPluginTestRunListener(OutputStream out,String encoding){
  try {
    this.out=new PrintStream(out,true,encoding);
  }
 catch (  UnsupportedEncodingException ex) {
    throw new RuntimeException("String_Node_Str" + ex.getMessage(),ex);
  }
}
Program: 53704
Project: 53704
Buggy source:
@Override public void testFailure(Failure failure) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ failureToString(failure));
  out.flush();
}

Fixed version (ground truth):
@Override public void testFailure(Failure failure) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ failureToString(failure));
}
Program: 53705
Project: 53705
Buggy source:
@Override public void testIgnored(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
  out.flush();
}

Fixed version (ground truth):
@Override public void testIgnored(Description description) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str" + JUNIT_OUTPUT_DELIMITER+ description.getDisplayName());
}
Program: 53706
Project: 53706
Buggy source:
@Override public void testRunFinished(Result result) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str");
  out.flush();
}

Fixed version (ground truth):
@Override public void testRunFinished(Result result) throws Exception {
  out.println(JUNIT_OUTPUT_DELIMITER + "String_Node_Str");
}
Program: 53707
Project: 53707
Buggy source:
public boolean contains(Class<?> clazz){
  Shard shard=getShard(clazz);
synchronized (shard) {
    return shard.containsKey(clazz);
  }
}

Fixed version (ground truth):
public boolean contains(Class<?> clazz){
  final Shard shard=getShard(clazz);
synchronized (shard) {
    return shard.containsKey(clazz);
  }
}
Program: 53708
Project: 53708
Buggy source:
public void put(Class<?> clazz){
  Shard shard=getShard(clazz);
synchronized (shard) {
    shard.put(clazz,Boolean.TRUE);
  }
}

Fixed version (ground truth):
public void put(Class<?> clazz){
  final Shard shard=getShard(clazz);
synchronized (shard) {
    shard.put(clazz,Boolean.TRUE);
  }
}
Program: 53710
Project: 53710
Buggy source:
private Class<?> injectToPlainClassLoader(ClassPool pool,ClassLoader classLoader,String className) throws NotFoundException, IOException, CannotCompileException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  Class<?> c=null;
  try {
    c=classLoader.loadClass(className);
  }
 catch (  ClassNotFoundException ignore) {
  }
  if (c != null) {
    return c;
  }
  CtClass ct=pool.get(className);
  if (ct == null) {
    throw new NotFoundException(className);
  }
  CtClass superClass=ct.getSuperclass();
  if (superClass != null) {
    injectToPlainClassLoader(pool,classLoader,superClass.getName());
  }
  CtClass[] interfaces=ct.getInterfaces();
  for (  CtClass i : interfaces) {
    injectToPlainClassLoader(pool,classLoader,i.getName());
  }
  Collection<String> refs=ct.getRefClasses();
  for (  String ref : refs) {
    try {
      injectToPlainClassLoader(pool,classLoader,ref);
    }
 catch (    NotFoundException e) {
      logger.warn("String_Node_Str",e);
    }
  }
  byte[] bytes=ct.toBytecode();
  return (Class<?>)DEFINE_CLASS.invoke(classLoader,ct.getName(),bytes,0,bytes.length);
}

Fixed version (ground truth):
private Class<?> injectToPlainClassLoader(ClassPool pool,ClassLoader classLoader,String className) throws NotFoundException, IOException, CannotCompileException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  Class<?> c=null;
  try {
    c=classLoader.loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (logger.isTraceEnabled()) {
      logger.trace("String_Node_Str",ex.getMessage(),ex);
    }
  }
  if (c != null) {
    return c;
  }
  final CtClass ct=pool.get(className);
  if (ct == null) {
    throw new NotFoundException(className);
  }
  final CtClass superClass=ct.getSuperclass();
  if (superClass != null) {
    injectToPlainClassLoader(pool,classLoader,superClass.getName());
  }
  final CtClass[] interfaces=ct.getInterfaces();
  for (  CtClass ctInterface : interfaces) {
    injectToPlainClassLoader(pool,classLoader,ctInterface.getName());
  }
  final Collection<String> refs=ct.getRefClasses();
  for (  String ref : refs) {
    try {
      injectToPlainClassLoader(pool,classLoader,ref);
    }
 catch (    NotFoundException e) {
      logger.warn("String_Node_Str",e);
    }
  }
  final byte[] bytes=ct.toBytecode();
  return (Class<?>)DEFINE_CLASS.invoke(classLoader,ct.getName(),bytes,0,bytes.length);
}
Program: 53711
Project: 53711
Buggy source:
private Class<?> injectToBootstrapClassLoader(String className) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
  if (injectedToRoot.compareAndSet(false,true)) {
    instrumentation.appendToBootstrapClassLoaderSearch(pluginJar);
    classPool.appendToBootstrapClassPath(pluginJar.getName());
  }
  return Class.forName(className,false,null);
}

Fixed version (ground truth):
private Class<?> injectToBootstrapClassLoader(String className) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
synchronized (lock) {
    if (this.injectedToRoot == false) {
      this.injectedToRoot=true;
      instrumentation.appendToBootstrapClassLoaderSearch(pluginJar);
      classPool.appendToBootstrapClassPath(pluginJar.getName());
    }
  }
  return Class.forName(className,false,null);
}
Program: 53712
Project: 53712
Buggy source:
private String getHost(HttpMethod httpMethod){
  try {
    return httpMethod.getURI().getHost();
  }
 catch (  URIException e) {
    logger.error("String_Node_Str",e);
  }
  return null;
}

Fixed version (ground truth):
private String getHost(HttpMethod httpMethod){
  try {
    URI url=httpMethod.getURI();
    return getEndpoint(url.getHost(),url.getPort());
  }
 catch (  URIException e) {
    logger.error("String_Node_Str",e);
  }
  return null;
}
Program: 53717
Project: 53717
Buggy source:
private boolean notCollected(double cpuLoad){
  return cpuLoad < 0;
}

Fixed version (ground truth):
private boolean notCollected(double cpuLoad){
  return cpuLoad < 0 || Double.isNaN(cpuLoad);
}
Program: 53719
Project: 53719
Buggy source:
private AsyncEchoTestClient(TNonblockingTransport transport) throws IOException {
  this.transport=transport;
  this.asyncClient=new EchoService.AsyncClient(PROTOCOL_FACTORY,this.asyncClientManager,this.transport);
}

Fixed version (ground truth):
private AsyncEchoTestClient(TestEnvironment environment) throws IOException {
  this.environment=environment;
  this.transport=new TNonblockingSocket(this.environment.getServerIp(),this.environment.getPort());
  this.asyncClient=new EchoService.AsyncClient(this.environment.getProtocolFactory(),this.asyncClientManager,this.transport);
}
Program: 53720
Project: 53720
Buggy source:
public Client() throws IOException {
  super(new TNonblockingSocket(SERVER_IP,SERVER_PORT));
}

Fixed version (ground truth):
public Client(TestEnvironment environment) throws IOException {
  super(environment);
}
Program: 53721
Project: 53721
Buggy source:
@Override public void verifyTraces(PluginTestVerifier verifier,String expectedMessage) throws Exception {
  Method sendBase=TServiceClient.class.getDeclaredMethod("String_Node_Str",String.class,TBase.class);
  ExpectedAnnotation thriftUrl=Expectations.annotation("String_Node_Str",SERVER_ADDRESS.getHostName() + "String_Node_Str" + SERVER_ADDRESS.getPort()+ "String_Node_Str");
  ExpectedAnnotation thriftArgs=Expectations.annotation("String_Node_Str","String_Node_Str" + expectedMessage + "String_Node_Str");
  Method receiveBase=TServiceClient.class.getDeclaredMethod("String_Node_Str",TBase.class,String.class);
  ExpectedAnnotation thriftResult=Expectations.annotation("String_Node_Str","String_Node_Str" + expectedMessage + "String_Node_Str");
  verifier.verifyDiscreteTrace(event("String_Node_Str",sendBase,null,null,SERVER_ADDRESS.getHostName() + "String_Node_Str" + SERVER_ADDRESS.getPort(),thriftUrl,thriftArgs),event("String_Node_Str",receiveBase,thriftResult));
}

Fixed version (ground truth):
@Override public void verifyTraces(PluginTestVerifier verifier,String expectedMessage) throws Exception {
  final InetSocketAddress actualServerAddress=this.environment.getServerAddress();
  Method sendBase=TServiceClient.class.getDeclaredMethod("String_Node_Str",String.class,TBase.class);
  ExpectedAnnotation thriftUrl=Expectations.annotation("String_Node_Str",actualServerAddress.getHostName() + "String_Node_Str" + actualServerAddress.getPort()+ "String_Node_Str");
  ExpectedAnnotation thriftArgs=Expectations.annotation("String_Node_Str","String_Node_Str" + expectedMessage + "String_Node_Str");
  Method receiveBase=TServiceClient.class.getDeclaredMethod("String_Node_Str",TBase.class,String.class);
  ExpectedAnnotation thriftResult=Expectations.annotation("String_Node_Str","String_Node_Str" + expectedMessage + "String_Node_Str");
  verifier.verifyDiscreteTrace(event("String_Node_Str",sendBase,null,null,actualServerAddress.getHostName() + "String_Node_Str" + actualServerAddress.getPort(),thriftUrl,thriftArgs),event("String_Node_Str",receiveBase,thriftResult));
}
Program: 53722
Project: 53722
Buggy source:
public ClientForNonblockingServer() throws TTransportException {
  super(new TFramedTransport(new TSocket(SERVER_IP,SERVER_PORT)));
}

Fixed version (ground truth):
public ClientForNonblockingServer(TestEnvironment environment) throws TTransportException {
  super(environment,new TFramedTransport(new TSocket(environment.getServerIp(),environment.getPort())));
}
Program: 53723
Project: 53723
Buggy source:
@Override public final String echo(String message) throws TException {
  TProtocol protocol=PROTOCOL_FACTORY.getProtocol(transport);
  EchoService.Client client=new EchoService.Client(protocol);
  return client.echo(message);
}

Fixed version (ground truth):
@Override public final String echo(String message) throws TException {
  TProtocol protocol=this.environment.getProtocolFactory().getProtocol(transport);
  EchoService.Client client=new EchoService.Client(protocol);
  return client.echo(message);
}
Program: 53724
Project: 53724
Buggy source:
public Client() throws TTransportException {
  super(new TSocket(SERVER_IP,SERVER_PORT));
}

Fixed version (ground truth):
public Client(TestEnvironment environment) throws TTransportException {
  super(environment,new TSocket(environment.getServerIp(),environment.getPort()));
}
Program: 53725
Project: 53725
Buggy source:
private SyncEchoTestClient(TTransport transport) throws TTransportException {
  this.transport=transport;
  this.transport.open();
}

Fixed version (ground truth):
private SyncEchoTestClient(TestEnvironment environment,TTransport transport) throws TTransportException {
  this.environment=environment;
  this.transport=transport;
  this.transport.open();
}
Program: 53726
Project: 53726
Buggy source:
@Override public void before(Object target,Object[] args){
  if (isDebug) {
    logger.beforeInterceptor(target,args);
  }
  Trace trace=traceContext.currentTraceObject();
  if (trace == null) {
    trace=traceContext.newTraceObject();
    if (!trace.canSampled()) {
      if (isDebug) {
        logger.debug("String_Node_Str",trace);
      }
      return;
    }
    if (isDebug) {
      logger.debug("String_Node_Str",trace);
    }
    SpanRecorder recorder=trace.getSpanRecorder();
    recordRootSpan(recorder);
  }
  trace.traceBlockBegin();
}

Fixed version (ground truth):
@Override public void before(Object target,Object[] args){
  if (isDebug) {
    logger.beforeInterceptor(target,args);
  }
  Trace trace=traceContext.currentTraceObject();
  if (trace == null) {
    trace=traceContext.newTraceObject(TraceType.USER);
    if (!trace.canSampled()) {
      if (isDebug) {
        logger.debug("String_Node_Str",trace);
      }
      return;
    }
    if (isDebug) {
      logger.debug("String_Node_Str",trace);
    }
    SpanRecorder recorder=trace.getSpanRecorder();
    recordRootSpan(recorder);
  }
  trace.traceBlockBegin();
}
Program: 53727
Project: 53727
Buggy source:
@Override public void after(Object target,Object[] args,Object result,Throwable throwable){
  if (isDebug) {
    logger.afterInterceptor(target,args);
  }
  final Trace trace=traceContext.currentTraceObject();
  if (trace == null) {
    return;
  }
  try {
    SpanEventRecorder recorder=trace.currentSpanEventRecorder();
    recorder.recordApi(descriptor);
    recorder.recordServiceType(ServiceType.USER_INCLUDE);
    recorder.recordException(throwable);
  }
  finally {
    trace.traceBlockEnd();
    if (trace.getTraceType() == TraceType.USER && trace.isRootStack()) {
      trace.close();
      traceContext.removeTraceObject();
    }
  }
}

Fixed version (ground truth):
@Override public void after(Object target,Object[] args,Object result,Throwable throwable){
  if (isDebug) {
    logger.afterInterceptor(target,args);
  }
  final Trace trace=traceContext.currentTraceObject();
  if (trace == null) {
    return;
  }
  try {
    SpanEventRecorder recorder=trace.currentSpanEventRecorder();
    recorder.recordApi(descriptor);
    recorder.recordServiceType(ServiceType.USER_INCLUDE);
    recorder.recordException(throwable);
  }
  finally {
    trace.traceBlockEnd();
    if (isDebug) {
      logger.debug("String_Node_Str",trace.getCallStackFrameId());
    }
    if (trace.getTraceType() == TraceType.USER && trace.isRootStack()) {
      if (isDebug) {
        logger.debug("String_Node_Str",trace);
      }
      trace.close();
      traceContext.removeTraceObject();
    }
  }
}
Program: 53728
Project: 53728
Buggy source:
@Override public void setup(ProfilerPluginContext context){
  context.addApplicationTypeDetector(new JettyDetector());
  JettyConfiguration config=new JettyConfiguration(context.getConfig());
  addServerInterceptor(context,config);
}

Fixed version (ground truth):
@Override public void setup(ProfilerPluginContext context){
  context.addApplicationTypeDetector(new JettyDetector());
  JettyConfiguration config=new JettyConfiguration(context.getConfig());
  addServerInterceptor(context,config);
  addRequestEditor(context);
}