Program: 85152
Project: 85152
Buggy source:
public <T>Invoker<T> refer(final Class<T> type,final URL url) throws RpcException {
  try {
    GenericObjectPool.Config config=new GenericObjectPool.Config();
    config.testOnBorrow=url.getParameter("String_Node_Str",true);
    config.testOnReturn=url.getParameter("String_Node_Str",false);
    config.testWhileIdle=url.getParameter("String_Node_Str",false);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxIdle=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.minIdle=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxActive=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxWait=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.numTestsPerEvictionRun=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.timeBetweenEvictionRunsMillis=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.minEvictableIdleTimeMillis=url.getParameter("String_Node_Str",0);
    final JedisPool jedisPool=new JedisPool(config,url.getHost(),url.getPort(DEFAULT_PORT),url.getParameter(Constants.TIMEOUT_KEY,Constants.DEFAULT_TIMEOUT));
    final int expiry=url.getParameter("String_Node_Str",0);
    final String get=url.getParameter("String_Node_Str","String_Node_Str");
    final String set=url.getParameter("String_Node_Str",Map.class.equals(type) ? "String_Node_Str" : "String_Node_Str");
    final String delete=url.getParameter("String_Node_Str",Map.class.equals(type) ? "String_Node_Str" : "String_Node_Str");
    return new AbstractInvoker<T>(type,url){
      protected Result doInvoke(      Invocation invocation) throws Throwable {
        try {
          if (get.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 1) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            byte[] value=jedisPool.getResource().get(String.valueOf(invocation.getArguments()[0]).getBytes());
            if (value == null) {
              return new RpcResult();
            }
            ObjectInput oin=getSerialization(url).deserialize(url,new ByteArrayInputStream(value));
            return new RpcResult(oin.readObject());
          }
 else           if (set.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 2) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            byte[] key=String.valueOf(invocation.getArguments()[0]).getBytes();
            ByteArrayOutputStream output=new ByteArrayOutputStream();
            ObjectOutput value=getSerialization(url).serialize(url,output);
            value.writeObject(invocation.getArguments()[1]);
            jedisPool.getResource().set(key,output.toByteArray());
            if (expiry > 1000) {
              jedisPool.getResource().expire(key,expiry / 1000);
            }
            return new RpcResult();
          }
 else           if (delete.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 1) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            jedisPool.getResource().del(String.valueOf(invocation.getArguments()[0]).getBytes());
            return new RpcResult();
          }
 else {
            throw new UnsupportedOperationException("String_Node_Str" + invocation.getMethodName() + "String_Node_Str");
          }
        }
 catch (        Throwable t) {
          RpcException re=new RpcException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url+ "String_Node_Str"+ t.getMessage(),t);
          if (t instanceof TimeoutException || t instanceof SocketTimeoutException) {
            re.setCode(RpcException.TIMEOUT_EXCEPTION);
          }
 else           if (t instanceof JedisConnectionException || t instanceof IOException) {
            re.setCode(RpcException.NETWORK_EXCEPTION);
          }
 else           if (t instanceof JedisDataException) {
            re.setCode(RpcException.SERIALIZATION_EXCEPTION);
          }
          throw re;
        }
      }
      public void destroy(){
        super.destroy();
        try {
          jedisPool.destroy();
        }
 catch (        Throwable e) {
          logger.warn(e.getMessage(),e);
        }
      }
    }
;
  }
 catch (  Throwable t) {
    throw new RpcException("String_Node_Str" + type.getName() + "String_Node_Str"+ url+ "String_Node_Str"+ t.getMessage(),t);
  }
}

Fixed version (ground truth):
public <T>Invoker<T> refer(final Class<T> type,final URL url) throws RpcException {
  try {
    GenericObjectPool.Config config=new GenericObjectPool.Config();
    config.testOnBorrow=url.getParameter("String_Node_Str",true);
    config.testOnReturn=url.getParameter("String_Node_Str",false);
    config.testWhileIdle=url.getParameter("String_Node_Str",false);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxIdle=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.minIdle=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxActive=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.maxWait=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.numTestsPerEvictionRun=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.timeBetweenEvictionRunsMillis=url.getParameter("String_Node_Str",0);
    if (url.getParameter("String_Node_Str",0) > 0)     config.minEvictableIdleTimeMillis=url.getParameter("String_Node_Str",0);
    final JedisPool jedisPool=new JedisPool(config,url.getHost(),url.getPort(DEFAULT_PORT),url.getParameter(Constants.TIMEOUT_KEY,Constants.DEFAULT_TIMEOUT));
    final int expiry=url.getParameter("String_Node_Str",0);
    final String get=url.getParameter("String_Node_Str","String_Node_Str");
    final String set=url.getParameter("String_Node_Str",Map.class.equals(type) ? "String_Node_Str" : "String_Node_Str");
    final String delete=url.getParameter("String_Node_Str",Map.class.equals(type) ? "String_Node_Str" : "String_Node_Str");
    return new AbstractInvoker<T>(type,url){
      protected Result doInvoke(      Invocation invocation) throws Throwable {
        Jedis resource=null;
        try {
          resource=jedisPool.getResource();
          if (get.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 1) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            byte[] value=resource.get(String.valueOf(invocation.getArguments()[0]).getBytes());
            if (value == null) {
              return new RpcResult();
            }
            ObjectInput oin=getSerialization(url).deserialize(url,new ByteArrayInputStream(value));
            return new RpcResult(oin.readObject());
          }
 else           if (set.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 2) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            byte[] key=String.valueOf(invocation.getArguments()[0]).getBytes();
            ByteArrayOutputStream output=new ByteArrayOutputStream();
            ObjectOutput value=getSerialization(url).serialize(url,output);
            value.writeObject(invocation.getArguments()[1]);
            resource.set(key,output.toByteArray());
            if (expiry > 1000) {
              resource.expire(key,expiry / 1000);
            }
            return new RpcResult();
          }
 else           if (delete.equals(invocation.getMethodName())) {
            if (invocation.getArguments().length != 1) {
              throw new IllegalArgumentException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url);
            }
            resource.del(String.valueOf(invocation.getArguments()[0]).getBytes());
            return new RpcResult();
          }
 else {
            throw new UnsupportedOperationException("String_Node_Str" + invocation.getMethodName() + "String_Node_Str");
          }
        }
 catch (        Throwable t) {
          RpcException re=new RpcException("String_Node_Str" + type.getName() + "String_Node_Str"+ invocation.getMethodName()+ "String_Node_Str"+ url+ "String_Node_Str"+ t.getMessage(),t);
          if (t instanceof TimeoutException || t instanceof SocketTimeoutException) {
            re.setCode(RpcException.TIMEOUT_EXCEPTION);
          }
 else           if (t instanceof JedisConnectionException || t instanceof IOException) {
            re.setCode(RpcException.NETWORK_EXCEPTION);
          }
 else           if (t instanceof JedisDataException) {
            re.setCode(RpcException.SERIALIZATION_EXCEPTION);
          }
          throw re;
        }
 finally {
          if (resource != null) {
            try {
              jedisPool.returnResource(resource);
            }
 catch (            Throwable t) {
              logger.warn("String_Node_Str" + t.getMessage(),t);
            }
          }
        }
      }
      public void destroy(){
        super.destroy();
        try {
          jedisPool.destroy();
        }
 catch (        Throwable e) {
          logger.warn(e.getMessage(),e);
        }
      }
    }
;
  }
 catch (  Throwable t) {
    throw new RpcException("String_Node_Str" + type.getName() + "String_Node_Str"+ url+ "String_Node_Str"+ t.getMessage(),t);
  }
}