nus-yam/ex-repair huggingface dataset:
Program: 34479
Project: 34479
Buggy source:
@Override protected void initChannel(Channel ch) throws Exception {
  ch.pipeline().addLast(SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build().newHandler(ch.alloc(),"String_Node_Str",443));
  ch.pipeline().addLast(new HttpClientCodec());
  ch.pipeline().addLast(new HttpObjectAggregator(81920000));
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      System.out.println(msg.toString());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void initChannel(Channel ch) throws Exception {
  ch.pipeline().addLast(new HttpClientCodec());
  ch.pipeline().addLast(new HttpObjectAggregator(81920000));
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelUnregistered(    ChannelHandlerContext ctx) throws Exception {
      System.out.println("String_Node_Str");
      super.channelUnregistered(ctx);
    }
    @Override public void exceptionCaught(    ChannelHandlerContext ctx,    Throwable cause) throws Exception {
      System.out.println("String_Node_Str");
      super.exceptionCaught(ctx,cause);
    }
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      System.out.println(msg.toString());
    }
  }
);
}
Program: 34480
Project: 34480
Buggy source:
public static void main(String[] args) throws InterruptedException {
  Bootstrap bootstrap=new Bootstrap();
  bootstrap.group(new NioEventLoopGroup()).channel(NioSocketChannel.class).resolver(NoopAddressResolverGroup.INSTANCE).handler(new ChannelInitializer(){
    @Override protected void initChannel(    Channel ch) throws Exception {
      System.out.println(1111);
      ch.pipeline().addLast(new HttpClientCodec());
      ch.pipeline().addLast(new HttpObjectAggregator(81920000));
      ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
        @Override public void channelRead(        ChannelHandlerContext ctx,        Object msg) throws Exception {
          System.out.println(msg.toString());
        }
      }
);
    }
  }
);
  ChannelFuture cf=bootstrap.connect("String_Node_Str",80).sync();
  HttpRequest httpRequest=new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.GET,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.HOST,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.USER_AGENT,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.CONTENT_LENGTH,0);
  System.out.println(httpRequest.toString());
  cf.channel().writeAndFlush(httpRequest);
}

Fixed version (ground truth):
public static void main(String[] args) throws InterruptedException {
  Bootstrap bootstrap=new Bootstrap();
  bootstrap.group(new NioEventLoopGroup()).channel(NioSocketChannel.class).resolver(NoopAddressResolverGroup.INSTANCE).handler(new ChannelInitializer(){
    @Override protected void initChannel(    Channel ch) throws Exception {
      ch.pipeline().addLast(new HttpClientCodec());
      ch.pipeline().addLast(new HttpObjectAggregator(81920000));
      ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
        @Override public void channelRead(        ChannelHandlerContext ctx,        Object msg) throws Exception {
          System.out.println(msg.toString());
        }
      }
);
    }
  }
);
  ChannelFuture cf=bootstrap.connect("String_Node_Str",80).sync();
  HttpRequest httpRequest=new DefaultFullHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.GET,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.HOST,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.USER_AGENT,"String_Node_Str");
  httpRequest.headers().add(HttpHeaderNames.CONTENT_LENGTH,0);
  System.out.println(httpRequest.toString());
  cf.channel().writeAndFlush(httpRequest);
}
Program: 34481
Project: 34481
Buggy source:
@Override protected void initChannel(Channel ch) throws Exception {
  System.out.println(1111);
  ch.pipeline().addLast(new HttpClientCodec());
  ch.pipeline().addLast(new HttpObjectAggregator(81920000));
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      System.out.println(msg.toString());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void initChannel(Channel ch) throws Exception {
  ch.pipeline().addLast(new HttpClientCodec());
  ch.pipeline().addLast(new HttpObjectAggregator(81920000));
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      System.out.println(msg.toString());
    }
  }
);
}
Program: 34482
Project: 34482
Buggy source:
public static void main(String[] args){
  EventLoopGroup bossGroup=new NioEventLoopGroup();
  EventLoopGroup workerGroup=new NioEventLoopGroup();
  try {
    ServerBootstrap b=new ServerBootstrap();
    b.group(bossGroup,workerGroup).channel(NioServerSocketChannel.class).option(ChannelOption.TCP_NODELAY,true).childHandler(new ChannelInitializer<Channel>(){
      @Override protected void initChannel(      Channel ch) throws Exception {
        ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
          @Override public void channelRead(          ChannelHandlerContext ctx,          Object msg) throws Exception {
            ctx.channel().writeAndFlush(msg);
          }
        }
);
      }
    }
);
    ChannelFuture f=b.bind(80).sync();
    f.channel().closeFuture().sync();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    bossGroup.shutdownGracefully();
    workerGroup.shutdownGracefully();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  EventLoopGroup bossGroup=new NioEventLoopGroup();
  EventLoopGroup workerGroup=new NioEventLoopGroup();
  try {
    ServerBootstrap b=new ServerBootstrap();
    b.group(bossGroup,workerGroup).channel(NioServerSocketChannel.class).option(ChannelOption.TCP_NODELAY,true).childHandler(new ChannelInitializer<Channel>(){
      @Override protected void initChannel(      Channel ch) throws Exception {
        ch.pipeline().addLast(new HttpServerCodec());
        ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
          @Override public void channelRead(          ChannelHandlerContext ctx,          Object msg) throws Exception {
            ctx.channel().writeAndFlush(msg);
          }
        }
);
      }
      @Override public void exceptionCaught(      ChannelHandlerContext ctx,      Throwable cause) throws Exception {
        System.out.println("String_Node_Str");
        super.exceptionCaught(ctx,cause);
      }
      @Override public void channelUnregistered(      ChannelHandlerContext ctx) throws Exception {
        System.out.println("String_Node_Str");
        super.channelUnregistered(ctx);
      }
    }
);
    ChannelFuture f=b.bind(80).sync();
    f.channel().closeFuture().sync();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
    bossGroup.shutdownGracefully();
    workerGroup.shutdownGracefully();
  }
}
Program: 34483
Project: 34483
Buggy source:
@Override protected void initChannel(Channel ch) throws Exception {
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      ctx.channel().writeAndFlush(msg);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void initChannel(Channel ch) throws Exception {
  ch.pipeline().addLast(new HttpServerCodec());
  ch.pipeline().addLast(new ChannelInboundHandlerAdapter(){
    @Override public void channelRead(    ChannelHandlerContext ctx,    Object msg) throws Exception {
      ctx.channel().writeAndFlush(msg);
    }
  }
);
}
Program: 34485
Project: 34485
Buggy source:
/** 
 * @param clientTargetURI
 * @return
 */
private ProfileElementInstance getTargetURIInst(URI clientTargetURI,ProfileElement elem){
  String host=clientTargetURI.getHost();
  int port=clientTargetURI.getPort();
  String uri=clientTargetURI.getScheme() + "String_Node_Str" + host;
  if (port > 0) {
    uri+="String_Node_Str" + port;
  }
  ProfileElementInstance pei=elem.getInstance(uri);
  return pei;
}

Fixed version (ground truth):
/** 
 * @param clientTargetURI
 * @return
 */
private ProfileElementInstance getTargetURIInst(URI clientTargetURI,ProfileElement elem){
  String uri=clientTargetURI.getScheme() + "String_Node_Str";
  String host=clientTargetURI.getHost();
  if (host == null) {
    String authority=clientTargetURI.getAuthority();
    int index=authority.indexOf("String_Node_Str");
    if (index >= 0) {
      uri+=authority.substring(index + 1);
    }
 else {
      uri+=authority;
    }
  }
 else {
    uri+=host;
    int port=clientTargetURI.getPort();
    if (port > 0) {
      uri+="String_Node_Str" + port;
    }
  }
  ProfileElementInstance pei=elem.getInstance(uri);
  return pei;
}
Program: 34486
Project: 34486
Buggy source:
private boolean needDoCap(Method method,Object[] args){
  if (method.getExceptionTypes().length == 0 || !method.getExceptionTypes()[0].getName().equals(IOException.class.getName())) {
    return false;
  }
  String methodName=method.getName();
  if (queueNameIndex.containsKey(methodName) && args.length != 0) {
    if (isTempQueue((String)args[queueNameIndex.get(methodName)])) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean needDoCap(Method method,Object[] args){
  if (method.getExceptionTypes().length == 0 || !method.getExceptionTypes()[0].getName().equals(IOException.class.getName())) {
    return false;
  }
  String methodName=method.getName();
  if (queueNameIndex.containsKey(methodName) && (args != null && args.length != 0)) {
    if (isTempQueue((String)args[queueNameIndex.get(methodName)])) {
      return false;
    }
  }
  return true;
}
Program: 34487
Project: 34487
Buggy source:
@Override public BufferedReader getReader() throws IOException {
  return new BufferedReader(new InputStreamReader(rewriteInputStream));
}

Fixed version (ground truth):
@Override public BufferedReader getReader() throws IOException {
  return new BufferedReader(new InputStreamReader(wrapServletInputStream()));
}
Program: 34488
Project: 34488
Buggy source:
public StringBuilder getContent(){
  if (this.builder == null) {
    return this.rewriteInputStream.getContent();
  }
 else {
    return this.builder;
  }
}

Fixed version (ground truth):
public StringBuilder getContent(){
  if (builder != null) {
    return builder;
  }
  if (rewriteInputStream == null) {
    return new StringBuilder();
  }
  return rewriteInputStream.getContent();
}
Program: 34489
Project: 34489
Buggy source:
/** 
 * 清空池，方便回收
 */
public void clearBodyContent(){
  StringBuilder bodyContent;
  if (this.builder == null) {
    bodyContent=this.rewriteInputStream.getContent();
  }
 else {
    bodyContent=this.builder;
  }
  bodyContent.delete(0,bodyContent.length());
}

Fixed version (ground truth):
/** 
 * 清空池，方便回收， 虽然可能并没有什么卵用
 */
public void clearBodyContent(){
  if (builder != null || rewriteInputStream == null) {
    return;
  }
  StringBuilder bodyContent=rewriteInputStream.getContent();
  bodyContent.delete(0,bodyContent.length());
}
Program: 34490
Project: 34490
Buggy source:
@Override public ServletInputStream getInputStream() throws IOException {
  return this.rewriteInputStream;
}

Fixed version (ground truth):
@Override public ServletInputStream getInputStream() throws IOException {
  return wrapServletInputStream();
}
Program: 34491
Project: 34491
Buggy source:
public RewriteIvcRequestWrapper(HttpServletRequest request,String tag){
  super(request);
  this.tag=tag;
  try {
    this.inputStream=request.getInputStream();
  }
 catch (  IOException e) {
    this.builder=new StringBuilder(e.toString());
  }
  rewriteInputStream=new RewriteIvcInputStream(this.inputStream,request.getCharacterEncoding());
}

Fixed version (ground truth):
public RewriteIvcRequestWrapper(HttpServletRequest request,String tag){
  super(request);
  this.request=request;
  this.tag=tag;
}
Program: 34494
Project: 34494
Buggy source:
@Override public void afterPreCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getSpanFromContext(url);
    SlowOperContext slowOperContext=new SlowOperContext();
    HttpServletRequest request=(HttpServletRequest)args[0];
    String parameters=JSONHelper.toString(request.getParameterMap());
    if (parameters == null) {
      parameters="String_Node_Str";
    }
    slowOperContext.put(SlowOperConstants.PROTOCOL_HTTP_REQ_HEADER,getRequestHeaders(request) + parameters);
    Object params[]={span,slowOperContext};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.PRECAP,context,params);
  }
}

Fixed version (ground truth):
@Override public void afterPreCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getSpanFromContext(url);
    SlowOperContext slowOperContext=new SlowOperContext();
    Object params[]={span,slowOperContext};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.PRECAP,context,params);
  }
}
Program: 34495
Project: 34495
Buggy source:
@Override public void buildSpanContent(SlowOperContext slowOperContext,SlowOperSpan slowOperSpan){
  if (slowOperContext.containsKey(SlowOperConstants.PROTOCOL_HTTP_REQ_HEADER)) {
    String reqHeader=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_REQ_HEADER);
    int length=DataConvertHelper.toInt(System.getProperty("String_Node_Str"),2000);
    slowOperSpan.appendContent(reqHeader,length,true);
  }
 else {
    String reqBody=((String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_REQ_BODY)).replace(System.getProperty("String_Node_Str","String_Node_Str"),"String_Node_Str").trim();
    String rspHeader=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_RSP_HEADER);
    String rspBody=((String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_RSP_BODY)).replace(System.getProperty("String_Node_Str","String_Node_Str"),"String_Node_Str").trim();
    int headerLength=DataConvertHelper.toInt(System.getProperty("String_Node_Str"),2000);
    int bodyLength=DataConvertHelper.toInt(System.getProperty("String_Node_Str"),2000);
    slowOperSpan.appendContent(reqBody,bodyLength,true);
    slowOperSpan.appendContent(rspHeader,headerLength,true);
    slowOperSpan.appendContent(rspBody,bodyLength,true);
  }
}

Fixed version (ground truth):
@Override public void buildSpanContent(SlowOperContext slowOperContext,SlowOperSpan slowOperSpan){
  if (!slowOperContext.containsKey(SlowOperConstants.PROTOCOL_HTTP_REQ_HEADER)) {
    return;
  }
  String reqHeader=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_REQ_HEADER);
  String reqBody=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_REQ_BODY);
  reqBody=reqBody.replace(lineSeparator,"String_Node_Str").trim();
  String respHeader=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_RSP_HEADER);
  String respBody=(String)slowOperContext.get(SlowOperConstants.PROTOCOL_HTTP_RSP_BODY);
  respBody=respBody.replace(lineSeparator,"String_Node_Str").trim();
  slowOperSpan.appendContent(reqHeader,headerLength,true);
  slowOperSpan.appendContent(reqBody,bodyLength,true);
  slowOperSpan.appendContent(respHeader,headerLength,true);
  slowOperSpan.appendContent(respBody,bodyLength,true);
}
Program: 34496
Project: 34496
Buggy source:
public TailFile(String serverid,String appid,String logid,File file,Map<String,String> headers,long inode,long pos,long lnumber,boolean unsplit) throws IOException {
  this.raf=new RandomAccessFile(file,"String_Node_Str");
  if (pos > 0)   raf.seek(pos);
  this.path=file.getAbsolutePath();
  this.inode=inode;
  this.pos=pos;
  this.lastUpdated=0L;
  this.needTail=true;
  this.headers=headers;
  this.serverid=serverid;
  this.appid=appid;
  this.logid=logid;
  this.id=serverid + "String_Node_Str" + appid+ "String_Node_Str"+ logid;
  this.lnumber=lnumber;
  this.unsplit=unsplit;
}

Fixed version (ground truth):
public TailFile(String serverid,String appid,String logid,File file,Map<String,String> headers,long inode,long pos,long lnumber,boolean unsplit) throws IOException {
  this.raf=new RandomAccessFile(file,"String_Node_Str");
  if (pos > 0)   raf.seek(pos);
  this.path=file.getAbsolutePath();
  this.inode=inode;
  this.pos=pos;
  this.lastUpdated=0L;
  this.needTail=true;
  this.headers=headers;
  this.serverid=serverid;
  this.appid=appid;
  this.logid=logid;
  this.id=serverid + "String_Node_Str" + appid+ "String_Node_Str"+ logid;
  this.lnumber=lnumber;
  this.unsplit=unsplit;
  if (this.unsplit) {
    this.lastUpdated=System.currentTimeMillis();
  }
}
Program: 34498
Project: 34498
Buggy source:
private void initHookFactory(){
  String config=System.getProperty("String_Node_Str");
  hookConfig=JSONHelper.toObjectArray(config,Map.class);
  String hookFactoryClassStr=System.getProperty("String_Node_Str" + vendor.toString().toLowerCase() + "String_Node_Str");
  if (hookFactoryClassStr == null) {
    hookfactory=new HookFactory();
    return;
  }
  Class<?> hookFactoryClass=null;
  try {
    hookFactoryClass=this.getClass().getClassLoader().loadClass(hookFactoryClassStr);
    this.logger.info("String_Node_Str" + hookFactoryClassStr + "String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
  }
  try {
    hookfactory=(HookFactory)hookFactoryClass.newInstance();
  }
 catch (  InstantiationException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
catch (  IllegalAccessException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void initHookFactory(){
  String config=System.getProperty("String_Node_Str");
  hookConfig=JSONHelper.toObject(config,List.class,true);
  String hookFactoryClassStr=System.getProperty("String_Node_Str" + vendor.toString().toLowerCase() + "String_Node_Str");
  if (hookFactoryClassStr == null) {
    hookfactory=new HookFactory();
    return;
  }
  Class<?> hookFactoryClass=null;
  try {
    hookFactoryClass=this.getClass().getClassLoader().loadClass(hookFactoryClassStr);
    this.logger.info("String_Node_Str" + hookFactoryClassStr + "String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
  }
  try {
    hookfactory=(HookFactory)hookFactoryClass.newInstance();
  }
 catch (  InstantiationException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
catch (  IllegalAccessException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
}
Program: 34499
Project: 34499
Buggy source:
private void initHookFactory(){
  String config=System.getProperty("String_Node_Str");
  hookConfig=JSONHelper.toObject(config,List.class,true);
  String hookFactoryClassStr=System.getProperty("String_Node_Str" + vendor.toString().toLowerCase() + "String_Node_Str");
  if (hookFactoryClassStr == null) {
    hookfactory=new HookFactory();
    return;
  }
  Class<?> hookFactoryClass=null;
  try {
    hookFactoryClass=this.getClass().getClassLoader().loadClass(hookFactoryClassStr);
    this.logger.info("String_Node_Str" + hookFactoryClassStr + "String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
  }
  try {
    hookfactory=(HookFactory)hookFactoryClass.newInstance();
  }
 catch (  InstantiationException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
catch (  IllegalAccessException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void initHookFactory(){
  String config=System.getProperty("String_Node_Str");
  hookConfig=JSONHelper.toObject(config,List.class,true);
  String hookFactoryClassStr=System.getProperty("String_Node_Str" + vendor.toString().toLowerCase() + "String_Node_Str");
  if (hookFactoryClassStr == null) {
    hookfactory=new HookFactory();
    return;
  }
  Class<?> hookFactoryClass=null;
  try {
    hookFactoryClass=this.getClass().getClassLoader().loadClass(hookFactoryClassStr);
    this.logger.info("String_Node_Str" + hookFactoryClassStr + "String_Node_Str");
  }
 catch (  ClassNotFoundException e) {
  }
  try {
    hookfactory=(HookFactory)hookFactoryClass.newInstance();
  }
 catch (  InstantiationException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
catch (  IllegalAccessException e) {
    this.logger.error("String_Node_Str" + hookFactoryClassStr + "String_Node_Str",e);
  }
}
Program: 34500
Project: 34500
Buggy source:
/** 
 * 解析入参
 * @param args
 * @return
 */
private String parseParams(Object[] args){
  if (args == null) {
    return "String_Node_Str";
  }
  StringBuilder stringBuilder=new StringBuilder();
  for (  Object temp : args) {
    if (temp == null) {
      temp="String_Node_Str";
    }
    String tempStr=temp.toString();
    int methodParamsLength=DataConvertHelper.toInt(System.getProperty("String_Node_Str"),2000);
    if (tempStr.toString().length() > methodParamsLength && methodParamsLength > 0) {
      tempStr=tempStr.substring(0,methodParamsLength);
    }
 else     if (methodParamsLength == 0) {
      tempStr="String_Node_Str";
    }
    tempStr=EncodeHelper.urlEncode(tempStr);
    stringBuilder.append(tempStr.length() + "String_Node_Str" + tempStr.toString()+ "String_Node_Str");
  }
  return stringBuilder.substring(0,stringBuilder.length() - 1);
}

Fixed version (ground truth):
/** 
 * 解析入参
 * @param args
 * @return
 */
private String parseParams(Object[] args){
  if (args == null || args.length == 0) {
    return "String_Node_Str";
  }
  StringBuilder stringBuilder=new StringBuilder();
  for (  Object temp : args) {
    if (temp == null) {
      temp="String_Node_Str";
    }
    String tempStr=temp.toString();
    int methodParamsLength=DataConvertHelper.toInt(System.getProperty("String_Node_Str"),2000);
    if (tempStr.toString().length() > methodParamsLength && methodParamsLength > 0) {
      tempStr=tempStr.substring(0,methodParamsLength);
    }
 else     if (methodParamsLength == 0) {
      tempStr="String_Node_Str";
    }
    tempStr=EncodeHelper.urlEncode(tempStr);
    stringBuilder.append(tempStr.length() + "String_Node_Str" + tempStr.toString()+ "String_Node_Str");
  }
  return stringBuilder.substring(0,stringBuilder.length() - 1);
}
Program: 34501
Project: 34501
Buggy source:
@Override public void afterDoCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getRemoveSpanFromContext(url);
    Object params[]={span};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.DOCAP,context,params);
  }
}

Fixed version (ground truth):
@Override public void afterDoCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getRemoveSpanFromContext(url);
    if (span == null || span.getEndpointInfo() == null) {
      if (logger.isDebugable()) {
        logger.debug("String_Node_Str" + url,null);
      }
      return;
    }
    Object params[]={span};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.DOCAP,context,params);
  }
}
Program: 34502
Project: 34502
Buggy source:
@Override public void afterPreCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    AMQP.BasicProperties props=(BasicProperties)args[2];
    byte[] body=(byte[])args[3];
    SlowOperContext slowOperContext=new SlowOperContext();
    if (props == null || StringHelper.isEmpty(props.getContentEncoding())) {
      String content="String_Node_Str";
      try {
        content=new String(body,"String_Node_Str");
      }
 catch (      UnsupportedEncodingException e) {
        content="String_Node_Str";
      }
      slowOperContext.put(SlowOperConstants.PROTOCOL_MQ_RABBIT_BODY,content);
    }
 else {
      String encoding=props.getContentEncoding();
      String content="String_Node_Str";
      try {
        content=new String(body,encoding);
      }
 catch (      UnsupportedEncodingException e) {
        content="String_Node_Str" + encoding + "String_Node_Str";
      }
      slowOperContext.put(SlowOperConstants.PROTOCOL_MQ_RABBIT_BODY,content);
    }
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getSpanFromContext(url);
    Object params[]={span,slowOperContext};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.PRECAP,context,params);
  }
}

Fixed version (ground truth):
@Override public void afterPreCap(InvokeChainContext context,Object[] args){
  if (UAVServer.instance().isExistSupportor("String_Node_Str")) {
    AMQP.BasicProperties props=(BasicProperties)args[2];
    byte[] body=(byte[])args[3];
    SlowOperContext slowOperContext=new SlowOperContext();
    if (props == null || StringHelper.isEmpty(props.getContentEncoding())) {
      String content="String_Node_Str";
      try {
        content=new String(body,"String_Node_Str");
      }
 catch (      UnsupportedEncodingException e) {
        content="String_Node_Str";
      }
      slowOperContext.put(SlowOperConstants.PROTOCOL_MQ_RABBIT_BODY,content);
    }
 else {
      String encoding=props.getContentEncoding();
      String content="String_Node_Str";
      try {
        content=new String(body,encoding);
      }
 catch (      UnsupportedEncodingException e) {
        content="String_Node_Str" + encoding + "String_Node_Str";
      }
      slowOperContext.put(SlowOperConstants.PROTOCOL_MQ_RABBIT_BODY,content);
    }
    String url=(String)context.get(CaptureConstants.INFO_APPSERVER_CONNECTOR_REQUEST_URL);
    Span span=this.spanFactory.getSpanFromContext(url);
    if (span == null || span.getEndpointInfo() == null) {
      if (logger.isDebugable()) {
        logger.debug("String_Node_Str" + url,null);
      }
      return;
    }
    Object params[]={span,slowOperContext};
    UAVServer.instance().runSupporter("String_Node_Str","String_Node_Str",span.getEndpointInfo().split("String_Node_Str")[0],InvokeChainConstants.CapturePhase.PRECAP,context,params);
  }
}
Program: 34504
Project: 34504
Buggy source:
/** 
 * 支持普通Http Post调用和智能的带FailOver的调用
 * @param postUrl
 * @param data
 * @param contentType
 * @param encoding
 * @param callBack
 */
public void doHttpPost(String serverAddress,String subPath,byte[] data,String contentType,String encoding,HttpClientCallback callBack){
  ConnectionFailoverMgr cfm=httpConnInvokeMgr.get(serverAddress);
  if (cfm == null) {
    final String postURL=(subPath != null) ? (serverAddress + subPath) : serverAddress;
    httpAsyncClient.doAsyncHttpPost(postURL,data,contentType,encoding,callBack);
    return;
  }
  String url=cfm.getConnection();
  if (url == null) {
    String msg="String_Node_Str" + serverAddress + "String_Node_Str";
    this.getLogger().warn(this,msg);
    if (callBack != null) {
      HttpClientCallbackResult result=new HttpClientCallbackResult(null,null);
      result.setException(new HttpAsyncException(ExceptionEvent.REPLY_ERROR,new ConnectException(msg)));
      callBack.failed(result);
    }
    return;
  }
  String postURL=(subPath != null) ? (url + subPath) : url;
  getLogger().info(this,"String_Node_Str" + postURL);
  PostHttpCallback postHttpCb=new PostHttpCallback();
  postHttpCb.setCallBack(callBack);
  postHttpCb.setCfm(cfm);
  postHttpCb.setContentType(contentType);
  postHttpCb.setData(data);
  postHttpCb.setEncoding(encoding);
  postHttpCb.setPostURL(postURL);
  postHttpCb.setServerAddress(serverAddress);
  postHttpCb.setSubPath(subPath);
  postHttpCb.setUrl(url);
  httpAsyncClient.doAsyncHttpPost(postURL,data,contentType,encoding,postHttpCb);
}

Fixed version (ground truth):
/** 
 * 支持普通Http Post调用和智能的带FailOver的调用
 * @param postUrl
 * @param subPath
 * @param data
 * @param contentType
 * @param encoding
 * @param callBack
 */
public void doHttpPost(String serverAddress,String subPath,byte[] data,String contentType,String encoding,HttpClientCallback callBack){
  ConnectionFailoverMgr cfm=httpConnInvokeMgr.get(serverAddress);
  if (cfm == null) {
    final String postURL=(subPath != null) ? (serverAddress + subPath) : serverAddress;
    httpAsyncClient.doAsyncHttpPost(postURL,data,contentType,encoding,callBack);
    return;
  }
  String url=cfm.getConnection();
  if (url == null) {
    String msg="String_Node_Str" + serverAddress + "String_Node_Str";
    this.getLogger().warn(this,msg);
    if (callBack != null) {
      HttpClientCallbackResult result=new HttpClientCallbackResult(null,null);
      result.setException(new HttpAsyncException(ExceptionEvent.REPLY_ERROR,new ConnectException(msg)));
      callBack.failed(result);
    }
    return;
  }
  String postURL=(subPath != null) ? (url + subPath) : url;
  getLogger().info(this,"String_Node_Str" + postURL);
  PostHttpCallback postHttpCb=new PostHttpCallback();
  postHttpCb.setCallBack(callBack);
  postHttpCb.setCfm(cfm);
  postHttpCb.setContentType(contentType);
  postHttpCb.setData(data);
  postHttpCb.setEncoding(encoding);
  postHttpCb.setPostURL(postURL);
  postHttpCb.setServerAddress(serverAddress);
  postHttpCb.setSubPath(subPath);
  postHttpCb.setUrl(url);
  httpAsyncClient.doAsyncHttpPost(postURL,data,contentType,encoding,postHttpCb);
}
Program: 34505
Project: 34505
Buggy source:
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryIVCData(String data,@Suspended AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",JSONHelper.toString(msg).getBytes(),"String_Node_Str","String_Node_Str",new IVCCallback(response));
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryIVCData(String data,@Suspended AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",msg,new IVCCallback(response));
}
Program: 34506
Project: 34506
Buggy source:
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryIVC(String data,@Suspended AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",JSONHelper.toString(msg).getBytes(),"String_Node_Str","String_Node_Str",new IVCCallback(response));
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryIVC(String data,@Suspended AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",msg,new IVCCallback(response));
}
Program: 34507
Project: 34507
Buggy source:
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryJavaThreadAnalysis(String data,@Suspended final AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",JSONHelper.toString(msg).getBytes(),"String_Node_Str","String_Node_Str",new HttpClientCallback(){
    @Override public void completed(    HttpClientCallbackResult result){
      response.resume(result.getReplyData());
    }
    @Override public void failed(    HttpClientCallbackResult result){
      String reStr=result.getReplyDataAsString();
      response.resume(reStr);
      logger.err(this,"String_Node_Str" + result.getRetCode() + "String_Node_Str"+ reStr,result.getException());
    }
  }
);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public void queryJavaThreadAnalysis(String data,@Suspended final AsyncResponse response){
  UAVHttpMessage msg=new UAVHttpMessage(data);
  this.doHttpPost("String_Node_Str","String_Node_Str",msg,new HttpClientCallback(){
    @Override public void completed(    HttpClientCallbackResult result){
      response.resume(result.getReplyData());
    }
    @Override public void failed(    HttpClientCallbackResult result){
      String reStr=result.getReplyDataAsString();
      response.resume(reStr);
      logger.err(this,"String_Node_Str" + result.getRetCode() + "String_Node_Str"+ reStr,result.getException());
    }
  }
);
}
Program: 34509
Project: 34509
Buggy source:
private String getDubboURL(String group,String version,String method,Integer localPort,String protocol,String path){
  StringBuilder requestURL=new StringBuilder();
  requestURL.append(protocol).append("String_Node_Str").append(NetworkHelper.getLocalIP()).append("String_Node_Str").append(localPort);
  if (group != null) {
    requestURL.append("String_Node_Str").append(group);
  }
  requestURL.append("String_Node_Str").append(path);
  if (version != null) {
    requestURL.append("String_Node_Str").append(version);
  }
  requestURL.append("String_Node_Str").append(method);
  return requestURL.toString();
}

Fixed version (ground truth):
private String getDubboURL(String ip,String group,String version,String method,Integer localPort,String protocol,String path){
  StringBuilder requestURL=new StringBuilder();
  requestURL.append(protocol).append("String_Node_Str").append(ip).append("String_Node_Str").append(localPort);
  if (group != null) {
    requestURL.append("String_Node_Str").append(group);
  }
  requestURL.append("String_Node_Str").append(path);
  if (version != null) {
    requestURL.append("String_Node_Str").append(version);
  }
  requestURL.append("String_Node_Str").append(method);
  return requestURL.toString();
}
Program: 34510
Project: 34510
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  while (true) {
    new Object();
  }
}
Program: 34511
Project: 34511
Buggy source:
public static void main(String[] args){
  new FairyServer("String_Node_Str").start();
}

Fixed version (ground truth):
public static void main(String[] args){
  Looper.prepareMainLooper();
  new FairyServer("String_Node_Str").start();
  Looper.loop();
}
Program: 34512
Project: 34512
Buggy source:
public void enqueue(Request request,LogcatCall.ResponseCallback callback){
  String body=request.getBody().readUtf8();
  ZLog.d("String_Node_Str" + body);
  PostBody postBody=PostBody.parse(body);
  executor.execute(new LogcatCall(postBody,callback));
}

Fixed version (ground truth):
public void enqueue(Request request,LogcatCall.ResponseCallback callback){
  String body=request.getBody().readUtf8();
  PostBody postBody=PostBody.parse(body);
  executor.execute(new LogcatCall(postBody,callback));
}
Program: 34513
Project: 34513
Buggy source:
public String getValue(String key){
  String value=map.get(key);
  return value != null ? value : "String_Node_Str";
}

Fixed version (ground truth):
public String getValue(String key){
  return map.get(key);
}
Program: 34514
Project: 34514
Buggy source:
public static PostBody parse(String body){
  HashMap<String,String> fieldMap=new HashMap<>();
  String[] fields=body.split("String_Node_Str");
  for (  String field : fields) {
    String[] keyValue=field.split("String_Node_Str");
    fieldMap.put(keyValue[0],keyValue[1]);
  }
  return new PostBody(fieldMap);
}

Fixed version (ground truth):
public static PostBody parse(String rawBody){
  ZLog.i("String_Node_Str" + rawBody);
  String body=formatBody(rawBody);
  ZLog.i("String_Node_Str" + body);
  HashMap<String,String> fieldMap=new HashMap<>();
  String[] fields=body.split("String_Node_Str");
  for (  String field : fields) {
    String[] keyValue=field.split("String_Node_Str");
    if (keyValue.length == 1) {
      fieldMap.put(keyValue[0],"String_Node_Str");
    }
 else     if (keyValue.length == 3) {
      fieldMap.put(keyValue[0],keyValue[1] + "String_Node_Str" + keyValue[2]);
    }
 else     if (keyValue.length == 2) {
      fieldMap.put(keyValue[0],keyValue[1]);
    }
  }
  return new PostBody(fieldMap);
}
Program: 34515
Project: 34515
Buggy source:
@Override public Date getNextTimeout(Date lastExecution,Date timerCreationTime){
  if (parsedSchedule == null) {
    if (lastExecution == null) {
      return new Date(expiration);
    }
    if (interval < 0) {
      return null;
    }
    return new Date(lastExecution.getTime() + interval);
  }
  long nextTimeout;
  if (lastExecution != null) {
    nextTimeout=parsedSchedule.getNextTimeout(lastExecution.getTime());
  }
 else {
    nextTimeout=parsedSchedule.getFirstTimeout();
  }
  if (nextTimeout == -1) {
    return null;
  }
  return new Date(nextTimeout);
}

Fixed version (ground truth):
@Override public Date getNextTimeout(Date lastExecution,Date timerCreationTime){
  if (parsedSchedule == null) {
    if (lastExecution == null) {
      return new Date(expiration);
    }
    if (interval < 0) {
      return null;
    }
    return new Date(lastExecution.getTime() + interval);
  }
  long nextTimeout;
  if (lastExecution != null) {
    nextTimeout=parsedSchedule.getNextTimeout(lastExecution.getTime());
  }
 else {
    nextTimeout=parsedSchedule.getFirstTimeout();
    if (nextTimeout == -1) {
      return timerCreationTime;
    }
  }
  if (nextTimeout == -1) {
    return null;
  }
  return new Date(nextTimeout);
}
Program: 34516
Project: 34516
Buggy source:
private static String jsonifyGCEvent(String wlpUserDir,String serverName,String hostName,Object event,String[] tags){
  GCData gcData=(GCData)event;
  StringBuilder sb=CollectorJsonHelpers.startGCJson(hostName,wlpUserDir,serverName);
  CollectorJsonHelpers.addToJSON(sb,gcData.getHeapKey(),Long.toString(gcData.getHeap()),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getUsedHeapKey(),Long.toString(gcData.getUsedHeap()),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getMaxHeapKey(),Long.toString(gcData.getMaxHeap()),false,false,false,false,false);
  long duration=gcData.getDuration() * 1000;
  CollectorJsonHelpers.addToJSON(sb,gcData.getDurationKey(),Long.toString(duration),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getGcTypeKey(),gcData.getGcType(),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getReasonKey(),gcData.getReason(),false,false,false,false,true);
  String datetime=CollectorJsonHelpers.dateFormatTL.get().format(gcData.getDatetime());
  CollectorJsonHelpers.addToJSON(sb,gcData.getDatetimeKey(),datetime,false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getSequenceKey(),gcData.getSequence(),false,false,false,false,true);
  if (tags != null) {
    addTagNameForVersion(sb).append(CollectorJsonHelpers.jsonifyTags(tags));
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private static String jsonifyGCEvent(String wlpUserDir,String serverName,String hostName,Object event,String[] tags){
  GCData gcData=(GCData)event;
  StringBuilder sb=CollectorJsonHelpers.startGCJson(hostName,wlpUserDir,serverName);
  CollectorJsonHelpers.addToJSON(sb,gcData.getHeapKey(),Long.toString(gcData.getHeap()),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getUsedHeapKey(),Long.toString(gcData.getUsedHeap()),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getMaxHeapKey(),Long.toString(gcData.getMaxHeap()),false,false,false,false,true);
  long duration=gcData.getDuration() * 1000;
  CollectorJsonHelpers.addToJSON(sb,gcData.getDurationKey(),Long.toString(duration),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getGcTypeKey(),gcData.getGcType(),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getReasonKey(),gcData.getReason(),false,false,false,false,false);
  String datetime=CollectorJsonHelpers.dateFormatTL.get().format(gcData.getDatetime());
  CollectorJsonHelpers.addToJSON(sb,gcData.getDatetimeKey(),datetime,false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getSequenceKey(),gcData.getSequence(),false,false,false,false,false);
  if (tags != null) {
    addTagNameForVersion(sb).append(CollectorJsonHelpers.jsonifyTags(tags));
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 34517
Project: 34517
Buggy source:
private static String jsonifyGCEvent(String wlpUserDir,String serverName,String hostName,Object event,String[] tags){
  GCData gcData=(GCData)event;
  StringBuilder sb=CollectorJsonHelpers.startGCJson1_1(hostName,wlpUserDir,serverName);
  CollectorJsonHelpers.addToJSON(sb,gcData.getHeapKey1_1(),Long.toString(gcData.getHeap()),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getUsedHeapKey1_1(),Long.toString(gcData.getUsedHeap()),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getMaxHeapKey1_1(),Long.toString(gcData.getMaxHeap()),false,false,false,false,false);
  long duration=gcData.getDuration() * 1000;
  CollectorJsonHelpers.addToJSON(sb,gcData.getDurationKey1_1(),Long.toString(duration),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getGcTypeKey1_1(),gcData.getGcType(),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getReasonKey1_1(),gcData.getReason(),false,false,false,false,true);
  String datetime=CollectorJsonHelpers.dateFormatTL.get().format(gcData.getDatetime());
  CollectorJsonHelpers.addToJSON(sb,gcData.getDatetimeKey1_1(),datetime,false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getSequenceKey1_1(),gcData.getSequence(),false,false,false,false,true);
  if (tags != null) {
    addTagNameForVersion(sb).append(CollectorJsonHelpers.jsonifyTags(tags));
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private static String jsonifyGCEvent(String wlpUserDir,String serverName,String hostName,Object event,String[] tags){
  GCData gcData=(GCData)event;
  StringBuilder sb=CollectorJsonHelpers.startGCJson1_1(hostName,wlpUserDir,serverName);
  CollectorJsonHelpers.addToJSON(sb,gcData.getHeapKey1_1(),Long.toString(gcData.getHeap()),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getUsedHeapKey1_1(),Long.toString(gcData.getUsedHeap()),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getMaxHeapKey1_1(),Long.toString(gcData.getMaxHeap()),false,false,false,false,true);
  long duration=gcData.getDuration() * 1000;
  CollectorJsonHelpers.addToJSON(sb,gcData.getDurationKey1_1(),Long.toString(duration),false,false,false,false,true);
  CollectorJsonHelpers.addToJSON(sb,gcData.getGcTypeKey1_1(),gcData.getGcType(),false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getReasonKey1_1(),gcData.getReason(),false,false,false,false,false);
  String datetime=CollectorJsonHelpers.dateFormatTL.get().format(gcData.getDatetime());
  CollectorJsonHelpers.addToJSON(sb,gcData.getDatetimeKey1_1(),datetime,false,false,false,false,false);
  CollectorJsonHelpers.addToJSON(sb,gcData.getSequenceKey1_1(),gcData.getSequence(),false,false,false,false,false);
  if (tags != null) {
    addTagNameForVersion(sb).append(CollectorJsonHelpers.jsonifyTags(tags));
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 34519
Project: 34519
Buggy source:
private void handleConfigUpdateException(ConfigUpdateException e){
  Tr.error(tc,"String_Node_Str",e.getMessage());
  if (getOnError(variableRegistryService).equals(OnError.FAIL)) {
    quit(e);
  }
}

Fixed version (ground truth):
private void handleConfigUpdateException(ConfigUpdateException e){
  Tr.error(tc,"String_Node_Str",e.getMessage());
  if (ErrorHandler.INSTANCE.getOnError().equals(OnError.FAIL)) {
    quit(e);
  }
}
Program: 34520
Project: 34520
Buggy source:
private void buildRefElement(TypeBuilder.OCDType ocdType,List<TypeMember> xmlElements,ExtendedAttributeDefinition attributeDef,boolean requiredForThisAttribute,String baseId,OCDType ocdReference,boolean topLevel){
  if (generateNested(attributeDef) && !!!ocdReference.isInternal() && ocdType.getHasIBMFinalWithDefault()&& (topLevel || (ocdReference.getExtendsAlias() != null))&& !(topLevel && !shouldAddAttribute(attributeDef))) {
    TypeMember refElement=new TypeMember(attributeDef);
    if (topLevel) {
      refElement.setID(baseId);
    }
 else {
      String extendsAlias=ocdReference.getExtendsAlias();
      if (extendsAlias.startsWith("String_Node_Str")) {
        refElement.setID(extendsAlias.substring(1));
      }
 else {
        refElement.setID(baseId + "String_Node_Str" + extendsAlias);
      }
    }
    refElement.setType((Type)null);
    refElement.setCardinality(attributeDef.getCardinality() == 0 ? 1 : attributeDef.getCardinality());
    String typeName=refElement.getCardinality() == 1 ? ocdReference.getTypeName() : ocdReference.getTypeName() + "String_Node_Str";
    refElement.setType(typeName);
    refElement.setRequired(requiredForThisAttribute);
    xmlElements.add(refElement);
    processExtensions(ocdType,refElement,attributeDef);
  }
  for (  OCDType extender : ocdReference.getExtensions()) {
    buildRefElement(ocdType,xmlElements,attributeDef,requiredForThisAttribute,baseId,extender,false);
  }
}

Fixed version (ground truth):
private void buildRefElement(TypeBuilder.OCDType ocdType,List<TypeMember> xmlElements,ExtendedAttributeDefinition attributeDef,boolean requiredForThisAttribute,String baseId,OCDType ocdReference,boolean topLevel){
  if (generateNested(attributeDef) && !!!ocdReference.isInternal() && (topLevel || (ocdReference.getExtendsAlias() != null))&& !(topLevel && !shouldAddAttribute(attributeDef))) {
    TypeMember refElement=new TypeMember(attributeDef);
    if (topLevel) {
      refElement.setID(baseId);
    }
 else {
      String extendsAlias=ocdReference.getExtendsAlias();
      if (extendsAlias.startsWith("String_Node_Str")) {
        refElement.setID(extendsAlias.substring(1));
      }
 else {
        refElement.setID(baseId + "String_Node_Str" + extendsAlias);
      }
    }
    refElement.setType((Type)null);
    refElement.setCardinality(attributeDef.getCardinality() == 0 ? 1 : attributeDef.getCardinality());
    String typeName=null;
    if (ocdReference.getHasIBMFinalWithDefault() == false) {
      typeName=refElement.getCardinality() == 1 ? ocdReference.getTypeName() : ocdReference.getTypeName() + "String_Node_Str";
    }
 else {
      typeName=refElement.getCardinality() == 1 ? ocdReference.getTypeName() : ocdReference.getTypeName();
    }
    refElement.setType(typeName);
    refElement.setRequired(requiredForThisAttribute);
    xmlElements.add(refElement);
    processExtensions(ocdType,refElement,attributeDef);
  }
  for (  OCDType extender : ocdReference.getExtensions()) {
    buildRefElement(ocdType,xmlElements,attributeDef,requiredForThisAttribute,baseId,extender,false);
  }
}