nus-yam/ex-repair huggingface dataset:
Program: 53943
Project: 53943
Buggy source:
private boolean isTarget(Class<?> clazz){
  if (rejected.getIfPresent(clazz) == Boolean.TRUE) {
    return false;
  }
  if (targetAnnotationNames != null) {
    List<Class<? extends Annotation>> targetAnnotations=getTargetAnnotations(clazz.getClassLoader());
    for (    Class<? extends Annotation> a : targetAnnotations) {
      if (clazz.isAnnotationPresent(a)) {
        return true;
      }
    }
    for (    Annotation a : clazz.getAnnotations()) {
      for (      Class<? extends Annotation> ac : targetAnnotations) {
        if (a.annotationType().isAnnotationPresent(ac)) {
          return true;
        }
      }
    }
  }
  if (targetClassPatterns != null) {
    String className=clazz.getName();
    for (    Pattern pattern : targetClassPatterns) {
      if (pattern.matcher(className).matches()) {
        return true;
      }
    }
  }
  rejected.put(clazz,Boolean.TRUE);
  return false;
}

Fixed version (ground truth):
private boolean isTarget(Class<?> clazz){
  if (Boolean.TRUE.equals(rejected.getIfPresent(clazz))) {
    return false;
  }
  if (targetAnnotationNames != null) {
    List<Class<? extends Annotation>> targetAnnotations=getTargetAnnotations(clazz.getClassLoader());
    for (    Class<? extends Annotation> a : targetAnnotations) {
      if (clazz.isAnnotationPresent(a)) {
        return true;
      }
    }
    for (    Annotation a : clazz.getAnnotations()) {
      for (      Class<? extends Annotation> ac : targetAnnotations) {
        if (a.annotationType().isAnnotationPresent(ac)) {
          return true;
        }
      }
    }
  }
  if (targetClassPatterns != null) {
    String className=clazz.getName();
    for (    Pattern pattern : targetClassPatterns) {
      if (pattern.matcher(className).matches()) {
        return true;
      }
    }
  }
  rejected.put(clazz,Boolean.TRUE);
  return false;
}
Program: 53944
Project: 53944
Buggy source:
private static List<String> split(String values){
  if (values == null) {
    return Collections.<String>emptyList();
  }
  String[] tokens=values.split("String_Node_Str");
  List<String> result=new ArrayList<String>(tokens.length);
  for (  String token : tokens) {
    String trimmed=token.trim();
    if (!trimmed.isEmpty()) {
      result.add(trimmed);
    }
  }
  return result;
}

Fixed version (ground truth):
private static List<String> split(String values){
  if (values == null) {
    return Collections.emptyList();
  }
  String[] tokens=values.split("String_Node_Str");
  List<String> result=new ArrayList<String>(tokens.length);
  for (  String token : tokens) {
    String trimmed=token.trim();
    if (!trimmed.isEmpty()) {
      result.add(trimmed);
    }
  }
  return result;
}
Program: 53945
Project: 53945
Buggy source:
private List<Class<? extends Annotation>> loadTargetAnnotations(ClassLoader loader){
  List<Class<? extends Annotation>> targetAnnotationClasses=null;
  if (!targetAnnotationNames.isEmpty()) {
    targetAnnotationClasses=new ArrayList<Class<? extends Annotation>>(targetAnnotationNames.size());
    for (    String s : targetAnnotationNames) {
      try {
        Class<?> c=loader.loadClass(s);
        Class<? extends Annotation> ac=c.asSubclass(Annotation.class);
        targetAnnotationClasses.add(ac);
      }
 catch (      ClassNotFoundException e) {
        logger.warn("String_Node_Str" + s + "String_Node_Str",e);
      }
catch (      ClassCastException e) {
        logger.warn("String_Node_Str" + s + "String_Node_Str",e);
      }
    }
  }
  return targetAnnotationClasses;
}

Fixed version (ground truth):
private List<Class<? extends Annotation>> loadTargetAnnotations(ClassLoader loader){
  List<Class<? extends Annotation>> targetAnnotationClasses=null;
  if (!targetAnnotationNames.isEmpty()) {
    targetAnnotationClasses=new ArrayList<Class<? extends Annotation>>(targetAnnotationNames.size());
    for (    String annotationName : targetAnnotationNames) {
      try {
        Class<?> clazz=loader.loadClass(annotationName);
        Class<? extends Annotation> ac=clazz.asSubclass(Annotation.class);
        targetAnnotationClasses.add(ac);
      }
 catch (      ClassNotFoundException ex) {
        logger.warn("String_Node_Str",annotationName,ex);
      }
catch (      ClassCastException ex) {
        logger.warn("String_Node_Str",annotationName,ex);
      }
    }
  }
  return targetAnnotationClasses;
}
Program: 53946
Project: 53946
Buggy source:
public static TargetBeanFilter of(ProfilerConfig config){
  List<String> targetNamePatternStrings=split(config.getSpringBeansNamePatterns());
  List<String> targetClassPatternStrings=split(config.getSpringBeansClassPatterns());
  List<String> targetAnnotationNames=split(config.getSpringBeansAnnotations());
  List<Pattern> beanNamePatterns=null;
  if (!targetNamePatternStrings.isEmpty()) {
    beanNamePatterns=new ArrayList<Pattern>(targetNamePatternStrings.size());
    for (    String s : targetNamePatternStrings) {
      Pattern p=Pattern.compile(s);
      beanNamePatterns.add(p);
    }
  }
  List<Pattern> beanClassPatterns=null;
  if (!targetClassPatternStrings.isEmpty()) {
    beanClassPatterns=new ArrayList<Pattern>(targetClassPatternStrings.size());
    for (    String s : targetClassPatternStrings) {
      Pattern p=Pattern.compile(s);
      beanClassPatterns.add(p);
    }
  }
  return new TargetBeanFilter(beanNamePatterns,beanClassPatterns,targetAnnotationNames);
}

Fixed version (ground truth):
public static TargetBeanFilter of(ProfilerConfig config){
  List<String> targetNamePatternStrings=split(config.getSpringBeansNamePatterns());
  List<String> targetClassPatternStrings=split(config.getSpringBeansClassPatterns());
  List<String> targetAnnotationNames=split(config.getSpringBeansAnnotations());
  List<Pattern> beanNamePatterns=null;
  if (!targetNamePatternStrings.isEmpty()) {
    beanNamePatterns=new ArrayList<Pattern>(targetNamePatternStrings.size());
    for (    String namePattern : targetNamePatternStrings) {
      Pattern pattern=Pattern.compile(namePattern);
      beanNamePatterns.add(pattern);
    }
  }
  List<Pattern> beanClassPatterns=null;
  if (!targetClassPatternStrings.isEmpty()) {
    beanClassPatterns=new ArrayList<Pattern>(targetClassPatternStrings.size());
    for (    String classPattern : targetClassPatternStrings) {
      Pattern pattern=Pattern.compile(classPattern);
      beanClassPatterns.add(pattern);
    }
  }
  return new TargetBeanFilter(beanNamePatterns,beanClassPatterns,targetAnnotationNames);
}
Program: 53947
Project: 53947
Buggy source:
private <T extends TAgentStat>void handleAgentStat(String agentId,long startTimestamp,T agentStat){
  try {
    agentStat.setAgentId(agentId);
    agentStat.setStartTimestamp(startTimestamp);
    agentStatDao.insert(agentStat);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage());
    ;
  }
}

Fixed version (ground truth):
private <T extends TAgentStat>void handleAgentStat(String agentId,long startTimestamp,T agentStat){
  try {
    agentStat.setAgentId(agentId);
    agentStat.setStartTimestamp(startTimestamp);
    agentStatDao.insert(agentStat);
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e.getMessage());
  }
}
Program: 53948
Project: 53948
Buggy source:
private boolean await0(long timeoutMillis){
  if (timeoutMillis < 0) {
    throw new IllegalArgumentException("String_Node_Str" + timeoutMillis);
  }
  boolean interrupted=false;
synchronized (this) {
    if (ready) {
      return true;
    }
    try {
      this.waiters++;
      wait(timeoutMillis);
    }
 catch (    InterruptedException e) {
      interrupted=true;
    }
 finally {
      this.waiters--;
    }
  }
  if (interrupted) {
    Thread.currentThread().interrupt();
  }
  return ready;
}

Fixed version (ground truth):
private boolean await0(long timeoutMillis){
  if (timeoutMillis < 0) {
    throw new IllegalArgumentException("String_Node_Str" + timeoutMillis);
  }
  boolean interrupted=false;
  try {
synchronized (this) {
      if (ready) {
        return true;
      }
      try {
        this.waiters++;
        wait(timeoutMillis);
      }
 catch (      InterruptedException e) {
        interrupted=true;
      }
 finally {
        this.waiters--;
      }
      return ready;
    }
  }
  finally {
    if (interrupted) {
      Thread.currentThread().interrupt();
    }
  }
}
Program: 53949
Project: 53949
Buggy source:
@Override public void start(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.INITIALIZING) {
      changeStatus(AgentStatus.RUNNING);
    }
 else {
      logger.warn("String_Node_Str");
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  ServerMetaData serverMetaData=this.traceContext.getServerMetaDataHolder().getServerMetaData();
  logger.debug(serverMetaData.toString());
  this.heartBitChecker.start();
  this.agentStatMonitor.start();
}

Fixed version (ground truth):
@Override public void start(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.INITIALIZING) {
      changeStatus(AgentStatus.RUNNING);
    }
 else {
      logger.warn("String_Node_Str");
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  ServerMetaData serverMetaData=this.traceContext.getServerMetaDataHolder().getServerMetaData();
  logger.debug(serverMetaData.toString());
  this.heartBeatChecker.start();
  this.agentStatMonitor.start();
}
Program: 53950
Project: 53950
Buggy source:
@Override public void stop(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.RUNNING) {
      changeStatus(AgentStatus.STOPPED);
    }
 else {
      logger.warn("String_Node_Str",this.agentStatus);
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  this.heartBitChecker.stop();
  tAgentInfo.setEndStatus(0);
  tAgentInfo.setEndTimestamp(System.currentTimeMillis());
  this.tcpDataSender.send(tAgentInfo);
  this.agentStatMonitor.stop();
  this.spanDataSender.stop();
  this.statDataSender.stop();
  this.tcpDataSender.stop();
  if (this.socket != null) {
    this.socket.close();
  }
  if (this.factory != null) {
    this.factory.release();
  }
}

Fixed version (ground truth):
@Override public void stop(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.RUNNING) {
      changeStatus(AgentStatus.STOPPED);
    }
 else {
      logger.warn("String_Node_Str",this.agentStatus);
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  this.heartBeatChecker.stop();
  tAgentInfo.setEndStatus(0);
  tAgentInfo.setEndTimestamp(System.currentTimeMillis());
  this.tcpDataSender.send(tAgentInfo);
  this.agentStatMonitor.stop();
  this.spanDataSender.stop();
  this.statDataSender.stop();
  this.tcpDataSender.stop();
  if (this.socket != null) {
    this.socket.close();
  }
  if (this.factory != null) {
    this.factory.release();
  }
}
Program: 53953
Project: 53953
Buggy source:
@Override public byte[] modify(ClassLoader classLoader,String javassistClassName,ProtectionDomain protectedDomain,byte[] classFileBuffer){
  logger.info("String_Node_Str",javassistClassName);
  try {
    InstrumentClass webappLoader=byteCodeInstrumentor.getClass(javassistClassName);
    Interceptor webappLoaderStartInterceptor=byteCodeInstrumentor.newInterceptor(classLoader,protectedDomain,"String_Node_Str",null,null);
    boolean isHooked=false;
    if (isHooked=webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
    }
 else     if (isHooked=webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
    }
    if (isHooked) {
      logger.info("String_Node_Str",javassistClassName);
    }
 else {
      logger.warn("String_Node_Str",javassistClassName);
    }
    return webappLoader.toBytecode();
  }
 catch (  Exception e) {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str" + e.getMessage(),e);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public byte[] modify(ClassLoader classLoader,String javassistClassName,ProtectionDomain protectedDomain,byte[] classFileBuffer){
  logger.info("String_Node_Str",javassistClassName);
  try {
    InstrumentClass webappLoader=byteCodeInstrumentor.getClass(javassistClassName);
    Interceptor webappLoaderStartInterceptor=byteCodeInstrumentor.newInterceptor(classLoader,protectedDomain,"String_Node_Str",null,null);
    boolean isHooked=false;
    if (webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
      isHooked=true;
    }
 else     if (webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
      isHooked=true;
    }
    if (isHooked) {
      logger.info("String_Node_Str",javassistClassName);
    }
 else {
      logger.warn("String_Node_Str",javassistClassName);
    }
    return webappLoader.toBytecode();
  }
 catch (  Exception e) {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str" + e.getMessage(),e);
    }
  }
  return null;
}
Program: 53954
Project: 53954
Buggy source:
public void stressTest() throws InterruptedException {
  AtomicInteger requestCount=new AtomicInteger();
  AtomicInteger successCount=new AtomicInteger();
  ResponseServerMessageListener serverListener=new ResponseServerMessageListener(requestCount,successCount);
  PinpointSocketFactory socketFactory=createPinpointSocketFactory();
  PinpointSocket socket=createPinpointSocket(HOST,PORT,socketFactory);
  TcpDataSender sender=new TcpDataSender(socket);
  HeartBitChecker checker=new HeartBitChecker(sender,1000L,getAgentInfo());
  long strarTime=System.currentTimeMillis();
  try {
    checker.start();
    Random random=new Random(System.currentTimeMillis());
    while (System.currentTimeMillis() < strarTime + STRESS_TEST_TIME) {
      createAndDeleteServer(serverListener,Math.abs(random.nextInt(RANDOM_MAX_TIME)));
      Thread.sleep(Math.abs(random.nextInt(1000)));
    }
  }
  finally {
    if (checker != null) {
      checker.stop();
    }
    if (socket != null) {
      socket.close();
    }
    if (socketFactory != null) {
      socketFactory.release();
    }
  }
}

Fixed version (ground truth):
public void stressTest() throws InterruptedException {
  AtomicInteger requestCount=new AtomicInteger();
  AtomicInteger successCount=new AtomicInteger();
  ResponseServerMessageListener serverListener=new ResponseServerMessageListener(requestCount,successCount);
  PinpointSocketFactory socketFactory=createPinpointSocketFactory();
  PinpointSocket socket=createPinpointSocket(HOST,PORT,socketFactory);
  TcpDataSender sender=new TcpDataSender(socket);
  HeartBeatChecker checker=new HeartBeatChecker(sender,1000L,getAgentInfo());
  long strarTime=System.currentTimeMillis();
  try {
    checker.start();
    Random random=new Random(System.currentTimeMillis());
    while (System.currentTimeMillis() < strarTime + STRESS_TEST_TIME) {
      createAndDeleteServer(serverListener,Math.abs(random.nextInt(RANDOM_MAX_TIME)));
      Thread.sleep(Math.abs(random.nextInt(1000)));
    }
  }
  finally {
    if (checker != null) {
      checker.stop();
    }
    if (socket != null) {
      socket.close();
    }
    if (socketFactory != null) {
      socketFactory.release();
    }
  }
}
Program: 53955
Project: 53955
Buggy source:
private void closeAll(PinpointServerSocket server,HeartBitChecker checker){
  if (server != null) {
    server.close();
  }
  if (checker != null) {
    checker.stop();
  }
}

Fixed version (ground truth):
private void closeAll(PinpointServerSocket server,HeartBeatChecker checker){
  if (server != null) {
    server.close();
  }
  if (checker != null) {
    checker.stop();
  }
}
Program: 53956
Project: 53956
Buggy source:
@Test public void loadBalancedUrlModify() throws Exception {
  Connection connection=connectDB(db.getProperty("String_Node_Str"));
  logger.info("String_Node_Str",connection.getClass().getName());
  logger.info("String_Node_Str",connection.getClass().getClassLoader());
  InvocationHandler invocationHandler=Proxy.getInvocationHandler(connection);
  Class<? extends InvocationHandler> aClass=invocationHandler.getClass();
  Field current=aClass.getDeclaredField("String_Node_Str");
  current.setAccessible(true);
  Object internalConnection=current.get(invocationHandler);
  DatabaseInfo url=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNotNull(url);
  statement(connection);
  preparedStatement(connection);
  preparedStatement2(connection);
  preparedStatement3(connection);
  preparedStatement4(connection);
  preparedStatement5(connection);
  preparedStatement6(connection);
  preparedStatement7(connection);
  preparedStatement8(connection);
  connection.close();
  DatabaseInfo clearUrl=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNull(clearUrl);
}

Fixed version (ground truth):
@Ignore @Test public void loadBalancedUrlModify() throws Exception {
  Connection connection=connectDB(db.getProperty("String_Node_Str"));
  logger.info("String_Node_Str",connection.getClass().getName());
  logger.info("String_Node_Str",connection.getClass().getClassLoader());
  InvocationHandler invocationHandler=Proxy.getInvocationHandler(connection);
  Class<? extends InvocationHandler> aClass=invocationHandler.getClass();
  Field current=aClass.getDeclaredField("String_Node_Str");
  current.setAccessible(true);
  Object internalConnection=current.get(invocationHandler);
  DatabaseInfo url=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNotNull(url);
  statement(connection);
  preparedStatement(connection);
  preparedStatement2(connection);
  preparedStatement3(connection);
  preparedStatement4(connection);
  preparedStatement5(connection);
  preparedStatement6(connection);
  preparedStatement7(connection);
  preparedStatement8(connection);
  connection.close();
  DatabaseInfo clearUrl=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNull(clearUrl);
}
Program: 53957
Project: 53957
Buggy source:
@Override public void start(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.INITIALIZING) {
      changeStatus(AgentStatus.RUNNING);
    }
 else {
      logger.warn("String_Node_Str");
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  ServerMetaData serverMetaData=this.traceContext.getServerMetaDataHolder().getServerMetaData();
  logger.debug(serverMetaData.toString());
  this.heartBitChecker.start();
  this.agentStatMonitor.start();
}

Fixed version (ground truth):
@Override public void start(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.INITIALIZING) {
      changeStatus(AgentStatus.RUNNING);
    }
 else {
      logger.warn("String_Node_Str");
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  ServerMetaData serverMetaData=this.traceContext.getServerMetaDataHolder().getServerMetaData();
  logger.debug(serverMetaData.toString());
  this.heartBeatChecker.start();
  this.agentStatMonitor.start();
}
Program: 53958
Project: 53958
Buggy source:
@Override public void stop(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.RUNNING) {
      changeStatus(AgentStatus.STOPPED);
    }
 else {
      logger.warn("String_Node_Str",this.agentStatus);
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  this.heartBitChecker.stop();
  tAgentInfo.setEndStatus(0);
  tAgentInfo.setEndTimestamp(System.currentTimeMillis());
  this.tcpDataSender.send(tAgentInfo);
  this.agentStatMonitor.stop();
  this.spanDataSender.stop();
  this.statDataSender.stop();
  this.tcpDataSender.stop();
  if (this.socket != null) {
    this.socket.close();
  }
  if (this.factory != null) {
    this.factory.release();
  }
}

Fixed version (ground truth):
@Override public void stop(){
synchronized (this) {
    if (this.agentStatus == AgentStatus.RUNNING) {
      changeStatus(AgentStatus.STOPPED);
    }
 else {
      logger.warn("String_Node_Str",this.agentStatus);
      return;
    }
  }
  logger.info("String_Node_Str",ProductInfo.CAMEL_NAME);
  this.heartBeatChecker.stop();
  tAgentInfo.setEndStatus(0);
  tAgentInfo.setEndTimestamp(System.currentTimeMillis());
  this.tcpDataSender.send(tAgentInfo);
  this.agentStatMonitor.stop();
  this.spanDataSender.stop();
  this.statDataSender.stop();
  this.tcpDataSender.stop();
  if (this.socket != null) {
    this.socket.close();
  }
  if (this.factory != null) {
    this.factory.release();
  }
}
Program: 53961
Project: 53961
Buggy source:
@Override public byte[] modify(ClassLoader classLoader,String javassistClassName,ProtectionDomain protectedDomain,byte[] classFileBuffer){
  logger.info("String_Node_Str",javassistClassName);
  try {
    InstrumentClass webappLoader=byteCodeInstrumentor.getClass(javassistClassName);
    Interceptor webappLoaderStartInterceptor=byteCodeInstrumentor.newInterceptor(classLoader,protectedDomain,"String_Node_Str",null,null);
    boolean isHooked=false;
    if (isHooked=webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
    }
 else     if (isHooked=webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
    }
    if (isHooked) {
      logger.info("String_Node_Str",javassistClassName);
    }
 else {
      logger.warn("String_Node_Str",javassistClassName);
    }
    return webappLoader.toBytecode();
  }
 catch (  Exception e) {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str" + e.getMessage(),e);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public byte[] modify(ClassLoader classLoader,String javassistClassName,ProtectionDomain protectedDomain,byte[] classFileBuffer){
  logger.info("String_Node_Str",javassistClassName);
  try {
    InstrumentClass webappLoader=byteCodeInstrumentor.getClass(javassistClassName);
    Interceptor webappLoaderStartInterceptor=byteCodeInstrumentor.newInterceptor(classLoader,protectedDomain,"String_Node_Str",null,null);
    boolean isHooked=false;
    if (webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
      isHooked=true;
    }
 else     if (webappLoader.hasDeclaredMethod("String_Node_Str",null)) {
      webappLoader.addInterceptor("String_Node_Str",null,webappLoaderStartInterceptor);
      isHooked=true;
    }
    if (isHooked) {
      logger.info("String_Node_Str",javassistClassName);
    }
 else {
      logger.warn("String_Node_Str",javassistClassName);
    }
    return webappLoader.toBytecode();
  }
 catch (  Exception e) {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str" + e.getMessage(),e);
    }
  }
  return null;
}
Program: 53962
Project: 53962
Buggy source:
public void stressTest() throws InterruptedException {
  AtomicInteger requestCount=new AtomicInteger();
  AtomicInteger successCount=new AtomicInteger();
  ResponseServerMessageListener serverListener=new ResponseServerMessageListener(requestCount,successCount);
  PinpointSocketFactory socketFactory=createPinpointSocketFactory();
  PinpointSocket socket=createPinpointSocket(HOST,PORT,socketFactory);
  TcpDataSender sender=new TcpDataSender(socket);
  HeartBitChecker checker=new HeartBitChecker(sender,1000L,getAgentInfo());
  long strarTime=System.currentTimeMillis();
  try {
    checker.start();
    Random random=new Random(System.currentTimeMillis());
    while (System.currentTimeMillis() < strarTime + STRESS_TEST_TIME) {
      createAndDeleteServer(serverListener,Math.abs(random.nextInt(RANDOM_MAX_TIME)));
      Thread.sleep(Math.abs(random.nextInt(1000)));
    }
  }
  finally {
    if (checker != null) {
      checker.stop();
    }
    if (socket != null) {
      socket.close();
    }
    if (socketFactory != null) {
      socketFactory.release();
    }
  }
}

Fixed version (ground truth):
public void stressTest() throws InterruptedException {
  AtomicInteger requestCount=new AtomicInteger();
  AtomicInteger successCount=new AtomicInteger();
  ResponseServerMessageListener serverListener=new ResponseServerMessageListener(requestCount,successCount);
  PinpointSocketFactory socketFactory=createPinpointSocketFactory();
  PinpointSocket socket=createPinpointSocket(HOST,PORT,socketFactory);
  TcpDataSender sender=new TcpDataSender(socket);
  HeartBeatChecker checker=new HeartBeatChecker(sender,1000L,getAgentInfo());
  long strarTime=System.currentTimeMillis();
  try {
    checker.start();
    Random random=new Random(System.currentTimeMillis());
    while (System.currentTimeMillis() < strarTime + STRESS_TEST_TIME) {
      createAndDeleteServer(serverListener,Math.abs(random.nextInt(RANDOM_MAX_TIME)));
      Thread.sleep(Math.abs(random.nextInt(1000)));
    }
  }
  finally {
    if (checker != null) {
      checker.stop();
    }
    if (socket != null) {
      socket.close();
    }
    if (socketFactory != null) {
      socketFactory.release();
    }
  }
}
Program: 53963
Project: 53963
Buggy source:
private void closeAll(PinpointServerSocket server,HeartBitChecker checker){
  if (server != null) {
    server.close();
  }
  if (checker != null) {
    checker.stop();
  }
}

Fixed version (ground truth):
private void closeAll(PinpointServerSocket server,HeartBeatChecker checker){
  if (server != null) {
    server.close();
  }
  if (checker != null) {
    checker.stop();
  }
}
Program: 53964
Project: 53964
Buggy source:
@Test public void loadBalancedUrlModify() throws Exception {
  Connection connection=connectDB(db.getProperty("String_Node_Str"));
  logger.info("String_Node_Str",connection.getClass().getName());
  logger.info("String_Node_Str",connection.getClass().getClassLoader());
  InvocationHandler invocationHandler=Proxy.getInvocationHandler(connection);
  Class<? extends InvocationHandler> aClass=invocationHandler.getClass();
  Field current=aClass.getDeclaredField("String_Node_Str");
  current.setAccessible(true);
  Object internalConnection=current.get(invocationHandler);
  DatabaseInfo url=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNotNull(url);
  statement(connection);
  preparedStatement(connection);
  preparedStatement2(connection);
  preparedStatement3(connection);
  preparedStatement4(connection);
  preparedStatement5(connection);
  preparedStatement6(connection);
  preparedStatement7(connection);
  preparedStatement8(connection);
  connection.close();
  DatabaseInfo clearUrl=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNull(clearUrl);
}

Fixed version (ground truth):
@Ignore @Test public void loadBalancedUrlModify() throws Exception {
  Connection connection=connectDB(db.getProperty("String_Node_Str"));
  logger.info("String_Node_Str",connection.getClass().getName());
  logger.info("String_Node_Str",connection.getClass().getClassLoader());
  InvocationHandler invocationHandler=Proxy.getInvocationHandler(connection);
  Class<? extends InvocationHandler> aClass=invocationHandler.getClass();
  Field current=aClass.getDeclaredField("String_Node_Str");
  current.setAccessible(true);
  Object internalConnection=current.get(invocationHandler);
  DatabaseInfo url=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNotNull(url);
  statement(connection);
  preparedStatement(connection);
  preparedStatement2(connection);
  preparedStatement3(connection);
  preparedStatement4(connection);
  preparedStatement5(connection);
  preparedStatement6(connection);
  preparedStatement7(connection);
  preparedStatement8(connection);
  connection.close();
  DatabaseInfo clearUrl=((DatabaseInfoTraceValue)internalConnection).__getTraceDatabaseInfo();
  Assert.assertNull(clearUrl);
}
Program: 53965
Project: 53965
Buggy source:
@Test public void afterCatch() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
  ClassPool pool=ClassPool.getDefault();
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  System.out.println(ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  System.out.println(callA);
  final String before="String_Node_Str";
  final String after="String_Node_Str";
  callA.instrument(new ExprEditor(){
    @Override public void edit(    MethodCall m) throws CannotCompileException {
      System.out.println(m.getClassName());
      try {
        System.out.println(m.getMethod().toString());
      }
 catch (      NotFoundException e) {
        e.printStackTrace();
      }
      System.out.println(m.getMethodName());
      m.replace(before + "String_Node_Str" + after);
    }
  }
);
  Class aClass=ctClass.toClass();
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  Object result=callA1.invoke(target);
  System.out.println(result);
}

Fixed version (ground truth):
@Test public void afterCatch() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, ClassNotFoundException {
  ClassPool pool=new ClassPool(true);
  Loader loader=getLoader(pool);
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  logger.debug("String_Node_Str",ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  logger.debug("String_Node_Str",callA);
  final String before="String_Node_Str";
  final String after="String_Node_Str";
  callA.instrument(new ExprEditor(){
    @Override public void edit(    MethodCall m) throws CannotCompileException {
      System.out.println(m.getClassName());
      try {
        System.out.println(m.getMethod().toString());
      }
 catch (      NotFoundException e) {
        e.printStackTrace();
      }
      System.out.println(m.getMethodName());
      m.replace(before + "String_Node_Str" + after);
    }
  }
);
  Class aClass=loader.loadClass(ctClass.getName());
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  Object result=callA1.invoke(target);
  logger.debug("String_Node_Str",result);
}
Program: 53966
Project: 53966
Buggy source:
@Test public void around() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
  ClassPool pool=ClassPool.getDefault();
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  System.out.println(ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  System.out.println(callA);
  callA.addLocalVariable("String_Node_Str",object);
  String inti="String_Node_Str";
  callA.insertBefore("String_Node_Str");
  callA.insertAfter("String_Node_Str");
  callA.addCatch("String_Node_Str",pool.get("String_Node_Str"));
  Class aClass=ctClass.toClass();
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  try {
    Object result=callA1.invoke(target);
    System.out.println(result);
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  IllegalArgumentException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  ctClass.debugWriteFile("String_Node_Str");
}

Fixed version (ground truth):
@Test public void around() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, ClassNotFoundException {
  ClassPool pool=new ClassPool(true);
  Loader loader=getLoader(pool);
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  logger.debug("String_Node_Str",ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  logger.debug("String_Node_Str",callA);
  callA.addLocalVariable("String_Node_Str",object);
  String inti="String_Node_Str";
  callA.insertBefore("String_Node_Str");
  callA.insertAfter("String_Node_Str");
  callA.addCatch("String_Node_Str",pool.get("String_Node_Str"));
  Class aClass=loader.loadClass(ctClass.getName());
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  try {
    Object result=callA1.invoke(target);
    logger.debug("String_Node_Str",result);
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  IllegalArgumentException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
}
Program: 53967
Project: 53967
Buggy source:
@Test public void afterCatch2() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
  ClassPool pool=ClassPool.getDefault();
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  System.out.println(ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  System.out.println(callA);
  callA.insertBefore("String_Node_Str");
  callA.insertAfter("String_Node_Str");
  callA.addCatch("String_Node_Str",pool.get("String_Node_Str"));
  Class aClass=ctClass.toClass();
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  Object result=callA1.invoke(target);
  System.out.println(result);
}

Fixed version (ground truth):
@Test public void afterCatch2() throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException, ClassNotFoundException {
  ClassPool pool=new ClassPool(true);
  Loader loader=getLoader(pool);
  CtClass ctClass=pool.get("String_Node_Str");
  CtClass object=pool.get("String_Node_Str");
  logger.debug("String_Node_Str",ctClass);
  CtMethod callA=ctClass.getDeclaredMethod("String_Node_Str",null);
  logger.debug("String_Node_Str",callA);
  callA.addLocalVariable("String_Node_Str",object);
  callA.insertBefore("String_Node_Str");
  callA.insertAfter("String_Node_Str");
  callA.addCatch("String_Node_Str",pool.get("String_Node_Str"));
  Class aClass=loader.loadClass(ctClass.getName());
  java.lang.reflect.Method callA1=aClass.getMethod("String_Node_Str");
  Object target=aClass.newInstance();
  Object result=callA1.invoke(target);
  logger.debug("String_Node_Str",result);
}
Program: 53968
Project: 53968
Buggy source:
public void addArcusModifier(){
  final boolean arcus=profilerConfig.isArucs();
  boolean memcached;
  if (arcus) {
    memcached=true;
  }
 else {
    memcached=profilerConfig.isMemcached();
  }
  if (memcached) {
    BaseOperationModifier baseOperationModifier=new BaseOperationModifier(byteCodeInstrumentor,agent);
    addModifier(baseOperationModifier);
    MemcachedClientModifier memcachedClientModifier=new MemcachedClientModifier(byteCodeInstrumentor,agent);
    addModifier(memcachedClientModifier);
    FrontCacheMemcachedClientModifier frontCacheMemcachedClientModifier=new FrontCacheMemcachedClientModifier(byteCodeInstrumentor,agent);
    if (arcus) {
      ArcusClientModifier arcusClientModifier=new ArcusClientModifier(byteCodeInstrumentor,agent);
      addModifier(arcusClientModifier);
      CollectionFutureModifier collectionFutureModifier=new CollectionFutureModifier(byteCodeInstrumentor,agent);
      addModifier(collectionFutureModifier);
    }
    GetFutureModifier getFutureModifier=new GetFutureModifier(byteCodeInstrumentor,agent);
    addModifier(getFutureModifier);
    ImmediateFutureModifier immediateFutureModifier=new ImmediateFutureModifier(byteCodeInstrumentor,agent);
    addModifier(immediateFutureModifier);
    OperationFutureModifier operationFutureModifier=new OperationFutureModifier(byteCodeInstrumentor,agent);
    addModifier(operationFutureModifier);
    FrontCacheGetFutureModifier frontCacheGetFutureModifier=new FrontCacheGetFutureModifier(byteCodeInstrumentor,agent);
    CacheManagerModifier cacheManagerModifier=new CacheManagerModifier(byteCodeInstrumentor,agent);
    addModifier(cacheManagerModifier);
  }
}

Fixed version (ground truth):
public void addArcusModifier(){
  final boolean arcus=profilerConfig.isArucs();
  boolean memcached;
  if (arcus) {
    memcached=true;
  }
 else {
    memcached=profilerConfig.isMemcached();
  }
  if (memcached) {
    BaseOperationModifier baseOperationModifier=new BaseOperationModifier(byteCodeInstrumentor,agent);
    addModifier(baseOperationModifier);
    MemcachedClientModifier memcachedClientModifier=new MemcachedClientModifier(byteCodeInstrumentor,agent);
    addModifier(memcachedClientModifier);
    if (arcus) {
      ArcusClientModifier arcusClientModifier=new ArcusClientModifier(byteCodeInstrumentor,agent);
      addModifier(arcusClientModifier);
      CollectionFutureModifier collectionFutureModifier=new CollectionFutureModifier(byteCodeInstrumentor,agent);
      addModifier(collectionFutureModifier);
    }
    GetFutureModifier getFutureModifier=new GetFutureModifier(byteCodeInstrumentor,agent);
    addModifier(getFutureModifier);
    ImmediateFutureModifier immediateFutureModifier=new ImmediateFutureModifier(byteCodeInstrumentor,agent);
    addModifier(immediateFutureModifier);
    OperationFutureModifier operationFutureModifier=new OperationFutureModifier(byteCodeInstrumentor,agent);
    addModifier(operationFutureModifier);
    CacheManagerModifier cacheManagerModifier=new CacheManagerModifier(byteCodeInstrumentor,agent);
    addModifier(cacheManagerModifier);
  }
}
Program: 53969
Project: 53969
Buggy source:
public void addArcusModifier(){
  final boolean arcus=profilerConfig.isArucs();
  boolean memcached;
  if (arcus) {
    memcached=true;
  }
 else {
    memcached=profilerConfig.isMemcached();
  }
  if (memcached) {
    BaseOperationModifier baseOperationModifier=new BaseOperationModifier(byteCodeInstrumentor,agent);
    addModifier(baseOperationModifier);
    MemcachedClientModifier memcachedClientModifier=new MemcachedClientModifier(byteCodeInstrumentor,agent);
    addModifier(memcachedClientModifier);
    FrontCacheMemcachedClientModifier frontCacheMemcachedClientModifier=new FrontCacheMemcachedClientModifier(byteCodeInstrumentor,agent);
    if (arcus) {
      ArcusClientModifier arcusClientModifier=new ArcusClientModifier(byteCodeInstrumentor,agent);
      addModifier(arcusClientModifier);
      CollectionFutureModifier collectionFutureModifier=new CollectionFutureModifier(byteCodeInstrumentor,agent);
      addModifier(collectionFutureModifier);
    }
    GetFutureModifier getFutureModifier=new GetFutureModifier(byteCodeInstrumentor,agent);
    addModifier(getFutureModifier);
    ImmediateFutureModifier immediateFutureModifier=new ImmediateFutureModifier(byteCodeInstrumentor,agent);
    addModifier(immediateFutureModifier);
    OperationFutureModifier operationFutureModifier=new OperationFutureModifier(byteCodeInstrumentor,agent);
    addModifier(operationFutureModifier);
    FrontCacheGetFutureModifier frontCacheGetFutureModifier=new FrontCacheGetFutureModifier(byteCodeInstrumentor,agent);
    CacheManagerModifier cacheManagerModifier=new CacheManagerModifier(byteCodeInstrumentor,agent);
    addModifier(cacheManagerModifier);
  }
}

Fixed version (ground truth):
public void addArcusModifier(){
  final boolean arcus=profilerConfig.isArucs();
  boolean memcached;
  if (arcus) {
    memcached=true;
  }
 else {
    memcached=profilerConfig.isMemcached();
  }
  if (memcached) {
    BaseOperationModifier baseOperationModifier=new BaseOperationModifier(byteCodeInstrumentor,agent);
    addModifier(baseOperationModifier);
    MemcachedClientModifier memcachedClientModifier=new MemcachedClientModifier(byteCodeInstrumentor,agent);
    addModifier(memcachedClientModifier);
    if (arcus) {
      ArcusClientModifier arcusClientModifier=new ArcusClientModifier(byteCodeInstrumentor,agent);
      addModifier(arcusClientModifier);
      CollectionFutureModifier collectionFutureModifier=new CollectionFutureModifier(byteCodeInstrumentor,agent);
      addModifier(collectionFutureModifier);
    }
    GetFutureModifier getFutureModifier=new GetFutureModifier(byteCodeInstrumentor,agent);
    addModifier(getFutureModifier);
    ImmediateFutureModifier immediateFutureModifier=new ImmediateFutureModifier(byteCodeInstrumentor,agent);
    addModifier(immediateFutureModifier);
    OperationFutureModifier operationFutureModifier=new OperationFutureModifier(byteCodeInstrumentor,agent);
    addModifier(operationFutureModifier);
    CacheManagerModifier cacheManagerModifier=new CacheManagerModifier(byteCodeInstrumentor,agent);
    addModifier(cacheManagerModifier);
  }
}
Program: 53970
Project: 53970
Buggy source:
public AgentClassLoader(URL[] urls){
  if (urls == null) {
    throw new NullPointerException("String_Node_Str");
  }
  ClassLoader bootStrapClassLoader=AgentClassLoader.class.getClassLoader();
  this.classLoader=new PinpointURLClassLoader(urls,bootStrapClassLoader);
  this.executeTemplate=new ContextClassLoaderExecuteTemplate(classLoader);
}

Fixed version (ground truth):
public AgentClassLoader(URL[] urls){
  if (urls == null) {
    throw new NullPointerException("String_Node_Str");
  }
  ClassLoader bootStrapClassLoader=AgentClassLoader.class.getClassLoader();
  this.classLoader=createClassLoader(urls,bootStrapClassLoader);
  this.executeTemplate=new ContextClassLoaderExecuteTemplate(classLoader);
}
Program: 53971
Project: 53971
Buggy source:
private void insertHostVer2(String host,String bindApplicationName,short bindServiceType,long statisticsRowSlot,String parentApplicationName,short parentServiceType){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",host,bindApplicationName,bindServiceType,parentApplicationName,parentServiceType);
  }
  String parentAgentId=null;
  final byte[] rowKey=createRowKey(parentApplicationName,parentServiceType,statisticsRowSlot,parentAgentId);
  byte[] columnName=createColumnName(host,bindApplicationName,bindServiceType);
  try {
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
 catch (  Exception ex) {
    logger.warn("String_Node_Str",ex.getCause(),ex);
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
}

Fixed version (ground truth):
private void insertHostVer2(String host,String bindApplicationName,short bindServiceType,long statisticsRowSlot,String parentApplicationName,short parentServiceType){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",host,bindApplicationName,bindServiceType,parentApplicationName,parentServiceType);
  }
  final byte[] rowKey=createRowKey(parentApplicationName,parentServiceType,statisticsRowSlot,null);
  byte[] columnName=createColumnName(host,bindApplicationName,bindServiceType);
  try {
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
 catch (  Exception ex) {
    logger.warn("String_Node_Str",ex.getCause(),ex);
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
}
Program: 53972
Project: 53972
Buggy source:
@Override public void init(String storedParams){
  this.mod=Integer.valueOf(storedParams);
}

Fixed version (ground truth):
@Override public void init(String storedParams){
  this.mod=Integer.parseInt(storedParams);
}
Program: 53973
Project: 53973
Buggy source:
private void validateId(String id,String idName,int maxlen){
  byte[] bytes=BytesUtils.toBytes(id);
  if (bytes.length > maxlen) {
    logger.warn("String_Node_Str",idName,id);
  }
}

Fixed version (ground truth):
private void validateId(String id,String idName,int maxlen){
  if (id == null) {
    throw new NullPointerException("String_Node_Str");
  }
  final byte[] bytes=BytesUtils.toBytes(id);
  if (bytes.length > maxlen) {
    logger.warn("String_Node_Str",idName,id);
  }
}
Program: 53975
Project: 53975
Buggy source:
private void insertHostVer2(String host,String bindApplicationName,short bindServiceType,long statisticsRowSlot,String parentApplicationName,short parentServiceType){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",host,bindApplicationName,bindServiceType,parentApplicationName,parentServiceType);
  }
  String parentAgentId=null;
  final byte[] rowKey=createRowKey(parentApplicationName,parentServiceType,statisticsRowSlot,parentAgentId);
  byte[] columnName=createColumnName(host,bindApplicationName,bindServiceType);
  try {
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
 catch (  Exception ex) {
    logger.warn("String_Node_Str",ex.getCause(),ex);
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
}

Fixed version (ground truth):
private void insertHostVer2(String host,String bindApplicationName,short bindServiceType,long statisticsRowSlot,String parentApplicationName,short parentServiceType){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",host,bindApplicationName,bindServiceType,parentApplicationName,parentServiceType);
  }
  final byte[] rowKey=createRowKey(parentApplicationName,parentServiceType,statisticsRowSlot,null);
  byte[] columnName=createColumnName(host,bindApplicationName,bindServiceType);
  try {
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
 catch (  Exception ex) {
    logger.warn("String_Node_Str",ex.getCause(),ex);
    hbaseTemplate.put(HBaseTables.HOST_APPLICATION_MAP_VER2,rowKey,HBaseTables.HOST_APPLICATION_MAP_VER2_CF_MAP,columnName,null);
  }
}
Program: 53976
Project: 53976
Buggy source:
public AgentClassLoader(URL[] urls){
  if (urls == null) {
    throw new NullPointerException("String_Node_Str");
  }
  ClassLoader bootStrapClassLoader=AgentClassLoader.class.getClassLoader();
  this.classLoader=new PinpointURLClassLoader(urls,bootStrapClassLoader);
  this.executeTemplate=new ContextClassLoaderExecuteTemplate(classLoader);
}

Fixed version (ground truth):
public AgentClassLoader(URL[] urls){
  if (urls == null) {
    throw new NullPointerException("String_Node_Str");
  }
  ClassLoader bootStrapClassLoader=AgentClassLoader.class.getClassLoader();
  this.classLoader=createClassLoader(urls,bootStrapClassLoader);
  this.executeTemplate=new ContextClassLoaderExecuteTemplate(classLoader);
}
Program: 53977
Project: 53977
Buggy source:
/** 
 * Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
 * @param size the initial size.
 * @throws IllegalArgumentException if size is negative.
 */
public UnsafeByteArrayOutputStream(int size){
  if (size < 0) {
    throw new IllegalArgumentException("String_Node_Str" + size);
  }
  buf=new byte[size];
}

Fixed version (ground truth):
/** 
 * Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
 * @param size the initial size.
 * @throws IllegalArgumentException if size is negative.
 */
public UnsafeByteArrayOutputStream(int size){
  super(size);
}