nus-yam/ex-repair huggingface dataset:
Program: 85033
Project: 85033
Buggy source:
public static int message(Player player,String[] args){
  if (args.length > 1) {
    String msg=etc.combineSplit(1,args,"String_Node_Str");
    Player toPlayer=etc.getServer().matchPlayer(args[0]);
    if (toPlayer != null && args.length > 0) {
      vMinecraftChat.sendMessage(player,toPlayer,Colors.LightGreen + "String_Node_Str" + vMinecraftChat.getName(player)+ Colors.LightGreen+ "String_Node_Str"+ msg);
      vMinecraftChat.sendMessage(player,player,Colors.LightGreen + "String_Node_Str" + vMinecraftChat.getName(toPlayer)+ Colors.LightGreen+ "String_Node_Str"+ msg);
      vMinecraftUsers.getProfile(player).setMessage(toPlayer);
      vMinecraftUsers.getProfile(toPlayer).setMessage(player);
      log.log(Level.INFO,player.getName() + "String_Node_Str" + toPlayer.getName()+ "String_Node_Str"+ msg);
    }
 else {
      vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str" + args[0]+ "String_Node_Str");
    }
  }
 else {
    vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str");
  }
  return EXIT_SUCCESS;
}

Fixed version (ground truth):
public static int message(Player player,String[] args){
  if (args.length > 1) {
    vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str");
    return EXIT_SUCCESS;
  }
  Player toPlayer=etc.getServer().matchPlayer(args[0]);
  if (toPlayer != null && args.length > 0) {
    vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str" + args[0]+ "String_Node_Str");
    return EXIT_SUCCESS;
  }
  String msg=etc.combineSplit(1,args,"String_Node_Str");
  vMinecraftChat.sendMessage(player,toPlayer,Colors.LightGreen + "String_Node_Str" + vMinecraftChat.getName(player)+ Colors.LightGreen+ "String_Node_Str"+ msg);
  vMinecraftChat.sendMessage(player,player,Colors.LightGreen + "String_Node_Str" + vMinecraftChat.getName(toPlayer)+ Colors.LightGreen+ "String_Node_Str"+ msg);
  vMinecraftUsers.getProfile(player).setMessage(toPlayer);
  vMinecraftUsers.getProfile(toPlayer).setMessage(player);
  log.log(Level.INFO,player.getName() + "String_Node_Str" + toPlayer.getName()+ "String_Node_Str"+ msg);
  return EXIT_SUCCESS;
}
Program: 85034
Project: 85034
Buggy source:
public static int masstp(Player player,String[] args){
  if (!player.canUseCommand("String_Node_Str")) {
    return EXIT_FAIL;
  }
  if (vMinecraftSettings.getInstance().cmdMasstp())   return EXIT_FAIL;
  for (  Player p : etc.getServer().getPlayerList()) {
    if (!p.hasControlOver(player)) {
      p.teleportTo(player);
    }
  }
  player.sendMessage(Colors.Blue + "String_Node_Str");
  return EXIT_SUCCESS;
}

Fixed version (ground truth):
public static int masstp(Player player,String[] args){
  if (!player.canUseCommand("String_Node_Str"))   return EXIT_FAIL;
  if (!vMinecraftSettings.getInstance().cmdMasstp())   return EXIT_FAIL;
  for (  Player p : etc.getServer().getPlayerList()) {
    if (!p.hasControlOver(player)) {
      p.teleportTo(player);
    }
  }
  player.sendMessage(Colors.Blue + "String_Node_Str");
  return EXIT_SUCCESS;
}
Program: 85035
Project: 85035
Buggy source:
public static int fabulous(Player player,String[] args){
  if (vMinecraftSettings.getInstance().cmdFabulous())   return EXIT_FAIL;
  if (args.length < 1) {
    return EXIT_SUCCESS;
  }
  String playerName=Colors.White + "String_Node_Str" + vMinecraftChat.getName(player)+ Colors.White+ "String_Node_Str";
  String str=etc.combineSplit(0,args,"String_Node_Str");
  log.log(Level.INFO,player.getName() + "String_Node_Str" + str+ "String_Node_Str");
  vMinecraftChat.gmsg(player,playerName + vMinecraftChat.rainbow(str));
  return EXIT_SUCCESS;
}

Fixed version (ground truth):
public static int fabulous(Player player,String[] args){
  if (!vMinecraftSettings.getInstance().cmdFabulous())   return EXIT_FAIL;
  if (args.length < 1) {
    player.sendMessage(Colors.Rose + "String_Node_Str");
    return EXIT_SUCCESS;
  }
  String playerName=Colors.White + "String_Node_Str" + vMinecraftChat.getName(player)+ Colors.White+ "String_Node_Str";
  String str=etc.combineSplit(0,args,"String_Node_Str");
  log.log(Level.INFO,player.getName() + "String_Node_Str" + str+ "String_Node_Str");
  vMinecraftChat.gmsg(player,playerName + vMinecraftChat.rainbow(str));
  return EXIT_SUCCESS;
}
Program: 85036
Project: 85036
Buggy source:
public static int who(Player player,String[] args){
  if (vMinecraftSettings.getInstance().cmdWho())   return EXIT_FAIL;
  int count=0;
  String tempList="String_Node_Str";
  for (  Player p : etc.getServer().getPlayerList()) {
    if (p != null) {
      if (count == 0)       tempList+=vMinecraftChat.getName(p);
 else       tempList+=Colors.White + "String_Node_Str" + vMinecraftChat.getName(p);
      count++;
    }
  }
  PropertiesFile server=new PropertiesFile("String_Node_Str");
  try {
    server.load();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  int maxPlayers=server.getInt("String_Node_Str");
  vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str" + count+ "String_Node_Str"+ maxPlayers+ "String_Node_Str"+ tempList);
  return EXIT_SUCCESS;
}

Fixed version (ground truth):
public static int who(Player player,String[] args){
  if (!vMinecraftSettings.getInstance().cmdWho())   return EXIT_FAIL;
  int count=0;
  String tempList="String_Node_Str";
  for (  Player p : etc.getServer().getPlayerList()) {
    if (p != null) {
      if (count == 0)       tempList+=vMinecraftChat.getName(p);
 else       tempList+=Colors.White + "String_Node_Str" + vMinecraftChat.getName(p);
      count++;
    }
  }
  PropertiesFile server=new PropertiesFile("String_Node_Str");
  try {
    server.load();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  int maxPlayers=server.getInt("String_Node_Str");
  vMinecraftChat.sendMessage(player,player,Colors.Rose + "String_Node_Str" + count+ "String_Node_Str"+ maxPlayers+ "String_Node_Str"+ tempList);
  return EXIT_SUCCESS;
}
Program: 85038
Project: 85038
Buggy source:
public static boolean adminChat(Player player,String message){
  if (player.isAdmin() || player.canUseCommand("String_Node_Str")) {
    String adminchat=Colors.DarkPurple + "String_Node_Str" + player.getColor()+ player.getName()+ Colors.DarkPurple+ "String_Node_Str"+ Colors.White+ "String_Node_Str";
    for (    Player p : etc.getServer().getPlayerList()) {
      if (p != null) {
        if (p.isAdmin() || (p.canUseCommand("String_Node_Str"))) {
          p.sendMessage(adminchat + message.substring(1,message.length()));
        }
      }
    }
    log.log(Level.INFO,"String_Node_Str" + "String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str"+ message);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean adminChat(Player player,String message){
  if (player.isAdmin() || player.canUseCommand("String_Node_Str")) {
    String adminchat=Colors.DarkPurple + "String_Node_Str" + nameColor(player)+ Colors.DarkPurple+ "String_Node_Str"+ Colors.White+ "String_Node_Str";
    String[] msg=wordWrap(player,message.substring(1,message.length()));
    for (    Player p : etc.getServer().getPlayerList()) {
      if (p != null) {
        if (p.isAdmin() || (p.canUseCommand("String_Node_Str"))) {
          p.sendMessage(adminchat + msg[0]);
          String[] tempOut=new String[msg.length - 1];
          System.arraycopy(msg,1,tempOut,0,tempOut.length);
          for (          String str : tempOut)           p.sendMessage(str);
        }
      }
    }
    log.log(Level.INFO,"String_Node_Str" + "String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str"+ message);
    return true;
  }
  return false;
}
Program: 85039
Project: 85039
Buggy source:
public static boolean quote(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().greentext()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    gmsg(playerName + Colors.LightGreen + message);
  }
  return false;
}

Fixed version (ground truth):
public static boolean quote(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().greentext()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    String[] msg=wordWrap(player,message);
    gmsg(playerName + Colors.LightGreen + msg[0]);
    String[] tempOut=new String[msg.length - 1];
    System.arraycopy(msg,1,tempOut,0,tempOut.length);
    for (    String str : tempOut)     gmsg(Colors.LightGreen + str);
    return true;
  }
  return false;
}
Program: 85040
Project: 85040
Buggy source:
public static boolean rage(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().FFF()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    gmsg(playerName + Colors.Red + message);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean rage(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().FFF()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    String[] msg=wordWrap(player,message);
    gmsg(playerName + Colors.Red + msg[0]);
    String[] tempOut=new String[msg.length - 1];
    System.arraycopy(msg,1,tempOut,0,tempOut.length);
    for (    String str : tempOut)     gmsg(Colors.Red + str);
    return true;
  }
  return false;
}
Program: 85041
Project: 85041
Buggy source:
public static boolean quakeColors(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().quakeColors() && message.length() > 2 && vminecraftChat.lengthCheck(playerName + message)) {
    String temp="String_Node_Str";
    for (int x=0; x < message.length(); x++) {
      if (message.charAt(x) == '^' && x != message.length() - 1) {
        temp+=vminecraftChat.colorChange(message.charAt(x + 1));
        x++;
      }
 else {
        temp+=message.charAt(x);
      }
    }
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    gmsg(playerName + temp + "String_Node_Str");
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean quakeColors(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().quakeColors() && message.length() > 2) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    String[] msg=wordWrap(player,message);
    applyColors(msg);
    gmsg(playerName + msg[0]);
    String[] tempOut=new String[msg.length - 1];
    System.arraycopy(msg,1,tempOut,0,tempOut.length);
    for (    String str : tempOut)     gmsg(str);
    return true;
  }
  return false;
}
Program: 85043
Project: 85043
Buggy source:
public void disable(){
  id.a.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public void disable(){
  log.log(Level.INFO,"String_Node_Str");
}
Program: 85044
Project: 85044
Buggy source:
public void enable(){
  settings.getInstance().loadSettings();
  id.a.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public void enable(){
  settings.getInstance().loadSettings();
  log.log(Level.INFO,"String_Node_Str");
}
Program: 85049
Project: 85049
Buggy source:
@Before public void setUp() throws Exception {
  int redisPort=NetUtils.getAvailablePort();
  this.redisServer=new RedisServer(redisPort);
  this.redisServer.start();
  this.registryUrl=URL.valueOf("String_Node_Str" + redisPort);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  int redisPort=NetUtils.getAvailablePort();
  if (name.getMethodName().equals("String_Node_Str") || name.getMethodName().equals("String_Node_Str")) {
    String password="String_Node_Str";
    this.redisServer=RedisServer.builder().port(redisPort).setting("String_Node_Str" + password).build();
    this.registryUrl=URL.valueOf("String_Node_Str" + password + "String_Node_Str"+ redisPort+ "String_Node_Str");
  }
 else {
    this.redisServer=RedisServer.builder().port(redisPort).build();
    this.registryUrl=URL.valueOf("String_Node_Str" + redisPort);
  }
  this.redisServer.start();
}
Program: 85051
Project: 85051
Buggy source:
@Override public void reconnect() throws RemotingException {
  disconnect();
  connect();
}

Fixed version (ground truth):
@Override public void reconnect() throws RemotingException {
  if (!isConnected()) {
    connectLock.lock();
    try {
      if (!isConnected()) {
        disconnect();
        connect();
      }
    }
  finally {
      connectLock.unlock();
    }
  }
}
Program: 85052
Project: 85052
Buggy source:
@Override public boolean isDone(){
  return this.isDone();
}

Fixed version (ground truth):
@Override public boolean isDone(){
  return super.isDone();
}
Program: 85053
Project: 85053
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public <T>T getExtension(Class<T> type,String name){
  for (  ApplicationContext context : contexts) {
    if (context.containsBean(name)) {
      Object bean=context.getBean(name);
      if (type.isInstance(bean)) {
        return (T)bean;
      }
    }
  }
  logger.warn("String_Node_Str" + name + "String_Node_Str"+ type.getName());
  for (  ApplicationContext context : contexts) {
    try {
      return context.getBean(type);
    }
 catch (    NoUniqueBeanDefinitionException multiBeanExe) {
      throw multiBeanExe;
    }
catch (    NoSuchBeanDefinitionException noBeanExe) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + type.getName(),noBeanExe);
      }
    }
  }
  logger.warn("String_Node_Str" + name + "String_Node_Str"+ type.getName()+ "String_Node_Str");
  return null;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public <T>T getExtension(Class<T> type,String name){
  if (type.isInterface() && type.isAnnotationPresent(SPI.class)) {
    return null;
  }
  for (  ApplicationContext context : contexts) {
    if (context.containsBean(name)) {
      Object bean=context.getBean(name);
      if (type.isInstance(bean)) {
        return (T)bean;
      }
    }
  }
  logger.warn("String_Node_Str" + name + "String_Node_Str"+ type.getName());
  for (  ApplicationContext context : contexts) {
    try {
      return context.getBean(type);
    }
 catch (    NoUniqueBeanDefinitionException multiBeanExe) {
      throw multiBeanExe;
    }
catch (    NoSuchBeanDefinitionException noBeanExe) {
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str" + type.getName(),noBeanExe);
      }
    }
  }
  logger.warn("String_Node_Str" + name + "String_Node_Str"+ type.getName()+ "String_Node_Str");
  return null;
}
Program: 85054
Project: 85054
Buggy source:
boolean stop();

Fixed version (ground truth):
/** 
 * change the context state to stop
 */
boolean stop();
Program: 85055
Project: 85055
Buggy source:
void start();

Fixed version (ground truth):
/** 
 * change the context state to stop
 */
void start();
Program: 85056
Project: 85056
Buggy source:
void write(Object value);

Fixed version (ground truth):
/** 
 * write value and complete the async context.
 * @param value invoke result
 */
void write(Object value);
Program: 85057
Project: 85057
Buggy source:
boolean isAsyncStarted();

Fixed version (ground truth):
/** 
 * @return true if the aysnc context is started
 */
boolean isAsyncStarted();
Program: 85058
Project: 85058
Buggy source:
@Override public boolean stop(){
  if (started.compareAndSet(true,false)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean stop(){
  return started.compareAndSet(true,false);
}
Program: 85059
Project: 85059
Buggy source:
@Override public void write(Object value){
  if (stop()) {
    if (value instanceof Throwable) {
      Throwable bizExe=(Throwable)value;
      future.complete(new RpcResult(bizExe));
    }
    future.complete(new RpcResult(value));
  }
 else {
    throw new IllegalStateException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void write(Object value){
  if (stop()) {
    if (value instanceof Throwable) {
      Throwable bizExe=(Throwable)value;
      future.complete(new RpcResult(bizExe));
    }
 else {
      future.complete(new RpcResult(value));
    }
  }
 else {
    throw new IllegalStateException("String_Node_Str");
  }
}
Program: 85060
Project: 85060
Buggy source:
@Override protected void doUnsubscribe(URL url,NotifyListener listener){
  ConcurrentMap<NotifyListener,ChildListener> listeners=zkListeners.get(url);
  if (listeners != null) {
    ChildListener zkListener=listeners.get(listener);
    if (zkListener != null) {
      zkClient.removeChildListener(toUrlPath(url),zkListener);
    }
  }
}

Fixed version (ground truth):
@Override protected void doUnsubscribe(URL url,NotifyListener listener){
  ConcurrentMap<NotifyListener,ChildListener> listeners=zkListeners.get(url);
  if (listeners != null) {
    ChildListener zkListener=listeners.get(listener);
    if (zkListener != null) {
      if (Constants.ANY_VALUE.equals(url.getServiceInterface())) {
        String root=toRootPath();
        zkClient.removeChildListener(root,zkListener);
      }
 else {
        for (        String path : toCategoriesPath(url)) {
          zkClient.removeChildListener(path,zkListener);
        }
      }
    }
  }
}
Program: 85062
Project: 85062
Buggy source:
/** 
 * Removes all   {@link InternalThreadLocal} variables bound to the current thread.  This operation is useful when youare in a container environment, and you don't want to leave the thread local variables in the threads you do not manage.
 */
@SuppressWarnings("String_Node_Str") public static void removeAll(){
  InternalThreadLocalMap threadLocalMap=InternalThreadLocalMap.getIfSet();
  if (threadLocalMap == null) {
    return;
  }
  try {
    Object v=threadLocalMap.indexedVariable(variablesToRemoveIndex);
    if (v != null && v != InternalThreadLocalMap.UNSET) {
      Set<InternalThreadLocal<?>> variablesToRemove=(Set<InternalThreadLocal<?>>)v;
      for (      InternalThreadLocal<?> tlv : variablesToRemove) {
        tlv.remove(threadLocalMap);
      }
    }
  }
  finally {
    InternalThreadLocalMap.remove();
  }
}

Fixed version (ground truth):
/** 
 * Removes all   {@link InternalThreadLocal} variables bound to the current thread.  This operation is useful when youare in a container environment, and you don't want to leave the thread local variables in the threads you do not manage.
 */
@SuppressWarnings("String_Node_Str") public static void removeAll(){
  InternalThreadLocalMap threadLocalMap=InternalThreadLocalMap.getIfSet();
  if (threadLocalMap == null) {
    return;
  }
  try {
    Object v=threadLocalMap.indexedVariable(variablesToRemoveIndex);
    if (v != null && v != InternalThreadLocalMap.UNSET) {
      Set<InternalThreadLocal<?>> variablesToRemove=(Set<InternalThreadLocal<?>>)v;
      InternalThreadLocal<?>[] variablesToRemoveArray=variablesToRemove.toArray(new InternalThreadLocal[variablesToRemove.size()]);
      for (      InternalThreadLocal<?> tlv : variablesToRemoveArray) {
        tlv.remove(threadLocalMap);
      }
    }
  }
  finally {
    InternalThreadLocalMap.remove();
  }
}
Program: 85063
Project: 85063
Buggy source:
public HeaderExchangeClient(Client client,boolean needHeartbeat){
  if (client == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.client=client;
  this.channel=new HeaderExchangeChannel(client);
  String dubbo=client.getUrl().getParameter(Constants.DUBBO_VERSION_KEY);
  this.heartbeat=client.getUrl().getParameter(Constants.HEARTBEAT_KEY,dubbo != null && dubbo.startsWith("String_Node_Str") ? Constants.DEFAULT_HEARTBEAT : 0);
  this.heartbeatTimeout=client.getUrl().getParameter(Constants.HEARTBEAT_TIMEOUT_KEY,heartbeat * 3);
  if (heartbeatTimeout < heartbeat * 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (needHeartbeat) {
    startHeatbeatTimer();
  }
}

Fixed version (ground truth):
public HeaderExchangeClient(Client client,boolean needHeartbeat){
  if (client == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.client=client;
  this.channel=new HeaderExchangeChannel(client);
  String dubbo=client.getUrl().getParameter(Constants.DUBBO_VERSION_KEY);
  this.heartbeat=client.getUrl().getParameter(Constants.HEARTBEAT_KEY,dubbo != null && dubbo.startsWith("String_Node_Str") ? Constants.DEFAULT_HEARTBEAT : 0);
  this.heartbeatTimeout=client.getUrl().getParameter(Constants.HEARTBEAT_TIMEOUT_KEY,heartbeat * 3);
  if (heartbeatTimeout < heartbeat * 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (needHeartbeat) {
    startHeartbeatTimer();
  }
}
Program: 85064
Project: 85064
Buggy source:
@Test(expected=RuntimeException.class) public void test_Async_Future_Ex() throws Exception {
  try {
    initOrResetUrl(true);
    destroyService();
    exportExService();
    referService();
    int requestId=2;
    Person ret=demoProxy.get(requestId);
    Assert.assertEquals(null,ret);
    Future<Person> pFuture=RpcContext.getContext().getFuture();
    ret=pFuture.get(1000,TimeUnit.MICROSECONDS);
    Assert.assertEquals(requestId,ret.getId());
  }
  finally {
    destroyService();
  }
}

Fixed version (ground truth):
@Test(expected=RuntimeException.class) public void test_Async_Future_Ex() throws Exception {
  try {
    initOrResetUrl(true);
    destroyService();
    exportExService();
    referService();
    int requestId=2;
    Person ret=demoProxy.get(requestId);
    Assert.assertEquals(null,ret);
    Future<Person> pFuture=RpcContext.getContext().getFuture();
    ret=pFuture.get(1000 * 1000,TimeUnit.MICROSECONDS);
    Assert.assertEquals(requestId,ret.getId());
  }
  finally {
    destroyService();
  }
}
Program: 85065
Project: 85065
Buggy source:
@Test public void serialize_string_short_map_then_deserialize() throws Exception {
  Hessian2StringShortType stringShort=new Hessian2StringShortType();
  Map<String,Short> stringShortMap=new HashMap<String,Short>();
  stringShortMap.put("String_Node_Str",(short)0);
  stringShortMap.put("String_Node_Str",(short)60);
  stringShort.stringShortMap=stringShortMap;
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(stringShort);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  Hessian2StringShortType deserialize=(Hessian2StringShortType)input.readObject();
  assertTrue(deserialize.stringShortMap != null);
  assertTrue(deserialize.stringShortMap.size() == 2);
  assertTrue(deserialize.stringShortMap.get("String_Node_Str") instanceof Short);
  assertEquals(Short.valueOf((short)0),deserialize.stringShortMap.get("String_Node_Str"));
  assertEquals(Short.valueOf((short)60),deserialize.stringShortMap.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void serialize_string_short_map_then_deserialize() throws Exception {
  Hessian2StringShortType stringShort=new Hessian2StringShortType();
  Map<String,Short> stringShortMap=new HashMap<String,Short>();
  stringShortMap.put("String_Node_Str",(short)0);
  stringShortMap.put("String_Node_Str",(short)60);
  stringShort.stringShortMap=stringShortMap;
  Hessian2StringShortType deserialize=baseHession2Serialize(stringShort);
  assertTrue(deserialize.stringShortMap != null);
  assertTrue(deserialize.stringShortMap.size() == 2);
  assertTrue(deserialize.stringShortMap.get("String_Node_Str") instanceof Short);
  assertEquals(Short.valueOf((short)0),deserialize.stringShortMap.get("String_Node_Str"));
  assertEquals(Short.valueOf((short)60),deserialize.stringShortMap.get("String_Node_Str"));
}
Program: 85066
Project: 85066
Buggy source:
@Test public void serialize_list_then_deserialize() throws Exception {
  List<Short> shortList=new ArrayList<Short>();
  shortList.add((short)0);
  shortList.add((short)60);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(shortList);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  List deserialize=(List)input.readObject(ArrayList.class,Short.class);
  assertTrue(deserialize != null);
  assertTrue(deserialize.size() == 2);
  assertTrue(deserialize.get(1) instanceof Short);
  assertEquals(Short.valueOf((short)0),deserialize.get(0));
  assertEquals(Short.valueOf((short)60),deserialize.get(1));
}

Fixed version (ground truth):
@Test public void serialize_list_then_deserialize() throws Exception {
  List<Short> shortList=new ArrayList<Short>();
  shortList.add((short)0);
  shortList.add((short)60);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(shortList);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  List<Short> deserialize=(List)input.readObject(ArrayList.class,Short.class);
  assertTrue(deserialize != null);
  assertTrue(deserialize.size() == 2);
  assertTrue(deserialize.get(1) instanceof Short);
  assertEquals(Short.valueOf((short)0),deserialize.get(0));
  assertEquals(Short.valueOf((short)60),deserialize.get(1));
}
Program: 85067
Project: 85067
Buggy source:
@Test public void serialize_string_byte_map_then_deserialize() throws Exception {
  Hessian2StringShortType stringShort=new Hessian2StringShortType();
  Map<String,Byte> stringByteMap=new HashMap<String,Byte>();
  stringByteMap.put("String_Node_Str",(byte)0);
  stringByteMap.put("String_Node_Str",(byte)60);
  stringShort.stringByteMap=stringByteMap;
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(stringShort);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  Hessian2StringShortType deserialize=(Hessian2StringShortType)input.readObject();
  assertTrue(deserialize.stringByteMap != null);
  assertTrue(deserialize.stringByteMap.size() == 2);
  assertTrue(deserialize.stringByteMap.get("String_Node_Str") instanceof Byte);
  assertEquals(Byte.valueOf((byte)0),deserialize.stringByteMap.get("String_Node_Str"));
  assertEquals(Byte.valueOf((byte)60),deserialize.stringByteMap.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void serialize_string_byte_map_then_deserialize() throws Exception {
  Hessian2StringShortType stringShort=new Hessian2StringShortType();
  Map<String,Byte> stringByteMap=new HashMap<String,Byte>();
  stringByteMap.put("String_Node_Str",(byte)0);
  stringByteMap.put("String_Node_Str",(byte)60);
  stringShort.stringByteMap=stringByteMap;
  Hessian2StringShortType deserialize=baseHession2Serialize(stringShort);
  assertTrue(deserialize.stringByteMap != null);
  assertTrue(deserialize.stringByteMap.size() == 2);
  assertTrue(deserialize.stringByteMap.get("String_Node_Str") instanceof Byte);
  assertEquals(Byte.valueOf((byte)0),deserialize.stringByteMap.get("String_Node_Str"));
  assertEquals(Byte.valueOf((byte)60),deserialize.stringByteMap.get("String_Node_Str"));
}
Program: 85068
Project: 85068
Buggy source:
@Test public void test_Async_Future_Multi() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId1=1;
  Person ret=demoProxy.get(requestId1);
  Assert.assertEquals(null,ret);
  Future<Person> p1Future=RpcContext.getContext().getFuture();
  int requestId2=1;
  Person ret2=demoProxy.get(requestId2);
  Assert.assertEquals(null,ret2);
  Future<Person> p2Future=RpcContext.getContext().getFuture();
  ret=p1Future.get(1000,TimeUnit.MICROSECONDS);
  ret2=p2Future.get(1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId1,ret.getId());
  Assert.assertEquals(requestId2,ret.getId());
  destroyService();
}

Fixed version (ground truth):
@Test public void test_Async_Future_Multi() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId1=1;
  Person ret=demoProxy.get(requestId1);
  Assert.assertEquals(null,ret);
  Future<Person> p1Future=RpcContext.getContext().getFuture();
  int requestId2=1;
  Person ret2=demoProxy.get(requestId2);
  Assert.assertEquals(null,ret2);
  Future<Person> p2Future=RpcContext.getContext().getFuture();
  ret=p1Future.get(1000 * 1000,TimeUnit.MICROSECONDS);
  ret2=p2Future.get(1000 * 1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId1,ret.getId());
  Assert.assertEquals(requestId2,ret.getId());
  destroyService();
}
Program: 85069
Project: 85069
Buggy source:
@Test public void test_Async_Future() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId=2;
  Person ret=demoProxy.get(requestId);
  Assert.assertEquals(null,ret);
  Future<Person> pFuture=RpcContext.getContext().getFuture();
  ret=pFuture.get(1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId,ret.getId());
  destroyService();
}

Fixed version (ground truth):
@Test public void test_Async_Future() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId=2;
  Person ret=demoProxy.get(requestId);
  Assert.assertEquals(null,ret);
  Future<Person> pFuture=RpcContext.getContext().getFuture();
  ret=pFuture.get(1000 * 1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId,ret.getId());
  destroyService();
}
Program: 85070
Project: 85070
Buggy source:
public Object reply(ExchangeChannel channel,Object message) throws RemotingException {
  if (message instanceof Invocation) {
    Invocation inv=(Invocation)message;
    Invoker<?> invoker=getInvoker(channel,inv);
    if (Boolean.TRUE.toString().equals(inv.getAttachments().get(IS_CALLBACK_SERVICE_INVOKE))) {
      String methodsStr=invoker.getUrl().getParameters().get("String_Node_Str");
      boolean hasMethod=false;
      if (methodsStr == null || methodsStr.indexOf("String_Node_Str") == -1) {
        hasMethod=inv.getMethodName().equals(methodsStr);
      }
 else {
        String[] methods=methodsStr.split("String_Node_Str");
        for (        String method : methods) {
          if (inv.getMethodName().equals(method)) {
            hasMethod=true;
            break;
          }
        }
      }
      if (!hasMethod) {
        logger.warn(new IllegalStateException("String_Node_Str" + inv.getMethodName() + "String_Node_Str"+ invoker.getUrl()) + "String_Node_Str" + inv);
        return null;
      }
    }
    RpcContext.getContext().setRemoteAddress(channel.getRemoteAddress());
    return invoker.invoke(inv);
  }
  throw new RemotingException(channel,"String_Node_Str" + message == null ? null : (message.getClass().getName() + "String_Node_Str" + message) + "String_Node_Str" + channel.getRemoteAddress()+ "String_Node_Str"+ channel.getLocalAddress());
}

Fixed version (ground truth):
public Object reply(ExchangeChannel channel,Object message) throws RemotingException {
  if (message instanceof Invocation) {
    Invocation inv=(Invocation)message;
    Invoker<?> invoker=getInvoker(channel,inv);
    if (Boolean.TRUE.toString().equals(inv.getAttachments().get(IS_CALLBACK_SERVICE_INVOKE))) {
      String methodsStr=invoker.getUrl().getParameters().get("String_Node_Str");
      boolean hasMethod=false;
      if (methodsStr == null || methodsStr.indexOf("String_Node_Str") == -1) {
        hasMethod=inv.getMethodName().equals(methodsStr);
      }
 else {
        String[] methods=methodsStr.split("String_Node_Str");
        for (        String method : methods) {
          if (inv.getMethodName().equals(method)) {
            hasMethod=true;
            break;
          }
        }
      }
      if (!hasMethod) {
        logger.warn(new IllegalStateException("String_Node_Str" + inv.getMethodName() + "String_Node_Str"+ "String_Node_Str"+ invoker.getUrl()) + "String_Node_Str" + inv);
        return null;
      }
    }
    RpcContext.getContext().setRemoteAddress(channel.getRemoteAddress());
    return invoker.invoke(inv);
  }
  throw new RemotingException(channel,"String_Node_Str" + (message == null ? null : (message.getClass().getName() + "String_Node_Str" + message)) + "String_Node_Str"+ channel.getRemoteAddress()+ "String_Node_Str"+ channel.getLocalAddress());
}
Program: 85071
Project: 85071
Buggy source:
@Test public void test_Async_Future_Multi() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId1=1;
  Person ret=demoProxy.get(requestId1);
  Assert.assertEquals(null,ret);
  Future<Person> p1Future=RpcContext.getContext().getFuture();
  int requestId2=1;
  Person ret2=demoProxy.get(requestId2);
  Assert.assertEquals(null,ret2);
  Future<Person> p2Future=RpcContext.getContext().getFuture();
  ret=p1Future.get(1000,TimeUnit.MICROSECONDS);
  ret2=p2Future.get(1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId1,ret.getId());
  Assert.assertEquals(requestId2,ret.getId());
  destroyService();
}

Fixed version (ground truth):
@Test public void test_Async_Future_Multi() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId1=1;
  Person ret=demoProxy.get(requestId1);
  Assert.assertEquals(null,ret);
  Future<Person> p1Future=RpcContext.getContext().getFuture();
  int requestId2=1;
  Person ret2=demoProxy.get(requestId2);
  Assert.assertEquals(null,ret2);
  Future<Person> p2Future=RpcContext.getContext().getFuture();
  ret=p1Future.get(1000 * 1000,TimeUnit.MICROSECONDS);
  ret2=p2Future.get(1000 * 1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId1,ret.getId());
  Assert.assertEquals(requestId2,ret.getId());
  destroyService();
}
Program: 85072
Project: 85072
Buggy source:
@Test(expected=RuntimeException.class) public void test_Async_Future_Ex() throws Exception {
  try {
    initOrResetUrl(true);
    destroyService();
    exportExService();
    referService();
    int requestId=2;
    Person ret=demoProxy.get(requestId);
    Assert.assertEquals(null,ret);
    Future<Person> pFuture=RpcContext.getContext().getFuture();
    ret=pFuture.get(1000,TimeUnit.MICROSECONDS);
    Assert.assertEquals(requestId,ret.getId());
  }
  finally {
    destroyService();
  }
}

Fixed version (ground truth):
@Test(expected=RuntimeException.class) public void test_Async_Future_Ex() throws Exception {
  try {
    initOrResetUrl(true);
    destroyService();
    exportExService();
    referService();
    int requestId=2;
    Person ret=demoProxy.get(requestId);
    Assert.assertEquals(null,ret);
    Future<Person> pFuture=RpcContext.getContext().getFuture();
    ret=pFuture.get(1000 * 1000,TimeUnit.MICROSECONDS);
    Assert.assertEquals(requestId,ret.getId());
  }
  finally {
    destroyService();
  }
}
Program: 85073
Project: 85073
Buggy source:
@Test public void test_Async_Future() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId=2;
  Person ret=demoProxy.get(requestId);
  Assert.assertEquals(null,ret);
  Future<Person> pFuture=RpcContext.getContext().getFuture();
  ret=pFuture.get(1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId,ret.getId());
  destroyService();
}

Fixed version (ground truth):
@Test public void test_Async_Future() throws Exception {
  initOrResetUrl(true);
  destroyService();
  exportService();
  referService();
  int requestId=2;
  Person ret=demoProxy.get(requestId);
  Assert.assertEquals(null,ret);
  Future<Person> pFuture=RpcContext.getContext().getFuture();
  ret=pFuture.get(1000 * 1000,TimeUnit.MICROSECONDS);
  Assert.assertEquals(requestId,ret.getId());
  destroyService();
}
Program: 85074
Project: 85074
Buggy source:
public Object readLengthList(AbstractHessianInput in,int length) throws IOException {
  throw new UnsupportedOperationException(String.valueOf(this));
}

Fixed version (ground truth):
@Override public Object readLengthList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException {
  if (expectType == null) {
    return readLengthList(in,length);
  }
  throw new UnsupportedOperationException(String.valueOf(this));
}
Program: 85075
Project: 85075
Buggy source:
public Object readList(AbstractHessianInput in,int length) throws IOException {
  throw new UnsupportedOperationException(String.valueOf(this));
}

Fixed version (ground truth):
@Override public Object readList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException {
  if (expectType == null) {
    return readList(in,length);
  }
  throw new UnsupportedOperationException(String.valueOf(this));
}
Program: 85076
Project: 85076
Buggy source:
public Object readMap(AbstractHessianInput in) throws IOException {
  Object obj=in.readObject();
  String className=getClass().getName();
  if (obj != null)   throw error(className + "String_Node_Str" + obj.getClass().getName()+ "String_Node_Str"+ obj+ "String_Node_Str");
 else   throw error(className + "String_Node_Str");
}

Fixed version (ground truth):
@Override public Object readMap(AbstractHessianInput in,Class<?> expectKeyType,Class<?> expectValueType) throws IOException {
  if (expectKeyType == null && expectValueType == null) {
    return readMap(in);
  }
  throw new UnsupportedOperationException(String.valueOf(this));
}
Program: 85077
Project: 85077
Buggy source:
/** 
 * Reads an arbitrary object from the input stream.
 */
abstract public Object readObject() throws IOException ;

Fixed version (ground truth):
/** 
 * Reads an arbitrary object from the input stream.
 * @param expectedTypes the runtime type hints, eg: expectedTypes canequals String.class, Short.class for HashMap
 */
public Object readObject(List<Class<?>> expectedTypes) throws IOException {
  throw new UnsupportedOperationException(String.valueOf(this));
}
Program: 85078
Project: 85078
Buggy source:
public Object readLengthList(AbstractHessianInput in,int length) throws IOException {
  Collection list=createList();
  in.addRef(list);
  for (; length > 0; length--)   list.add(in.readObject());
  return list;
}

Fixed version (ground truth):
@Override public Object readLengthList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException {
  Collection list=createList();
  in.addRef(list);
  Deserializer deserializer=null;
  SerializerFactory factory=findSerializerFactory(in);
  if (expectType != null) {
    deserializer=factory.getDeserializer(expectType.getName());
  }
  for (; length > 0; length--)   list.add(deserializer != null ? deserializer.readObject(in) : in.readObject());
  return list;
}
Program: 85079
Project: 85079
Buggy source:
public Object readList(AbstractHessianInput in,int length) throws IOException {
  Collection list=createList();
  in.addRef(list);
  while (!in.isEnd())   list.add(in.readObject());
  in.readEnd();
  return list;
}

Fixed version (ground truth):
@Override public Object readList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException {
  Collection list=createList();
  in.addRef(list);
  Deserializer deserializer=null;
  SerializerFactory factory=findSerializerFactory(in);
  if (expectType != null) {
    deserializer=factory.getDeserializer(expectType.getName());
  }
  while (!in.isEnd())   list.add(deserializer != null ? deserializer.readObject(in) : in.readObject());
  in.readEnd();
  return list;
}
Program: 85080
Project: 85080
Buggy source:
public Object readLengthList(AbstractHessianInput in,int length) throws IOException ;

Fixed version (ground truth):
/** 
 * deserialize list object from expect type.
 * @param in
 * @param length
 * @param expectType
 * @return
 * @throws IOException
 */
public Object readLengthList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException ;
Program: 85081
Project: 85081
Buggy source:
public Object readList(AbstractHessianInput in,int length) throws IOException ;

Fixed version (ground truth):
/** 
 * deserialize list object from expect type.
 * @param in
 * @param length
 * @param expectType
 * @return
 * @throws IOException
 */
public Object readList(AbstractHessianInput in,int length,Class<?> expectType) throws IOException ;
Program: 85082
Project: 85082
Buggy source:
public Object readMap(AbstractHessianInput in) throws IOException ;

Fixed version (ground truth):
/** 
 * deserialize map object from expect key and value type.
 * @param in
 * @param expectKeyType
 * @param expectValueType
 * @return
 * @throws IOException
 */
public Object readMap(AbstractHessianInput in,Class<?> expectKeyType,Class<?> expectValueType) throws IOException ;
Program: 85083
Project: 85083
Buggy source:
public JavaSerializer(Class cl,ClassLoader loader){
  introspectWriteReplace(cl,loader);
  if (_writeReplace != null)   _writeReplace.setAccessible(true);
  ArrayList primitiveFields=new ArrayList();
  ArrayList compoundFields=new ArrayList();
  for (; cl != null; cl=cl.getSuperclass()) {
    Field[] fields=cl.getDeclaredFields();
    for (int i=0; i < fields.length; i++) {
      Field field=fields[i];
      if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))       continue;
      field.setAccessible(true);
      if (field.getType().isPrimitive() || (field.getType().getName().startsWith("String_Node_Str") && !field.getType().equals(Object.class)))       primitiveFields.add(field);
 else       compoundFields.add(field);
    }
  }
  ArrayList fields=new ArrayList();
  fields.addAll(primitiveFields);
  fields.addAll(compoundFields);
  _fields=new Field[fields.size()];
  fields.toArray(_fields);
  _fieldSerializers=new FieldSerializer[_fields.length];
  for (int i=0; i < _fields.length; i++) {
    _fieldSerializers[i]=getFieldSerializer(_fields[i].getType());
  }
}

Fixed version (ground truth):
public JavaSerializer(Class cl,ClassLoader loader){
  introspectWriteReplace(cl,loader);
  if (_writeReplace != null)   _writeReplace.setAccessible(true);
  List primitiveFields=new ArrayList();
  List compoundFields=new ArrayList();
  for (; cl != null; cl=cl.getSuperclass()) {
    Field[] fields=cl.getDeclaredFields();
    for (int i=0; i < fields.length; i++) {
      Field field=fields[i];
      if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))       continue;
      field.setAccessible(true);
      if (field.getType().isPrimitive() || (field.getType().getName().startsWith("String_Node_Str") && !field.getType().equals(Object.class)))       primitiveFields.add(field);
 else       compoundFields.add(field);
    }
  }
  List fields=new ArrayList();
  fields.addAll(primitiveFields);
  fields.addAll(compoundFields);
  Collections.reverse(fields);
  _fields=new Field[fields.size()];
  fields.toArray(_fields);
  _fieldSerializers=new FieldSerializer[_fields.length];
  for (int i=0; i < _fields.length; i++) {
    _fieldSerializers[i]=getFieldSerializer(_fields[i].getType());
  }
}
Program: 85084
Project: 85084
Buggy source:
@Test public void singleton() throws Exception {
  EnumSet h=EnumSet.of(Type.High);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(h);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  EnumSet set=(EnumSet)input.readObject();
  assertTrue(Arrays.asList(set.toArray()).contains(Type.High));
  assertFalse(Arrays.asList(set.toArray()).contains(Type.Lower));
}

Fixed version (ground truth):
@Test public void singleton() throws Exception {
  EnumSet h=EnumSet.of(Type.High);
  EnumSet set=baseHession2Serialize(h);
  assertTrue(Arrays.asList(set.toArray()).contains(Type.High));
  assertFalse(Arrays.asList(set.toArray()).contains(Type.Lower));
}
Program: 85085
Project: 85085
Buggy source:
@Test public void set() throws Exception {
  EnumSet<Type> types=EnumSet.of(Type.High,Type.Lower);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(types);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  EnumSet set=(EnumSet)input.readObject();
  assertTrue(set.contains(Type.High));
  assertFalse(set.contains(Type.Normal));
}

Fixed version (ground truth):
@Test public void set() throws Exception {
  EnumSet<Type> types=EnumSet.of(Type.High,Type.Lower);
  EnumSet set=baseHession2Serialize(types);
  assertTrue(set.contains(Type.High));
  assertFalse(set.contains(Type.Normal));
}
Program: 85086
Project: 85086
Buggy source:
@Test public void none() throws Exception {
  EnumSet<Type> types=EnumSet.noneOf(Type.class);
  ByteArrayOutputStream bout=new ByteArrayOutputStream();
  Hessian2Output out=new Hessian2Output(bout);
  out.writeObject(types);
  out.flush();
  ByteArrayInputStream bin=new ByteArrayInputStream(bout.toByteArray());
  Hessian2Input input=new Hessian2Input(bin);
  EnumSet set=(EnumSet)input.readObject();
  TestCase.assertEquals(set,EnumSet.noneOf(Type.class));
}

Fixed version (ground truth):
@Test public void none() throws Exception {
  EnumSet<Type> types=EnumSet.noneOf(Type.class);
  EnumSet set=baseHession2Serialize(types);
  TestCase.assertEquals(set,EnumSet.noneOf(Type.class));
}
Program: 85087
Project: 85087
Buggy source:
void deserialize(AbstractHessianInput in,Object obj) throws IOException {
  java.sql.Time value=null;
  try {
    java.util.Date date=(java.util.Date)in.readObject();
    value=new java.sql.Time(date.getTime());
    _field.set(obj,value);
  }
 catch (  Exception e) {
    logDeserializeError(_field,obj,value,e);
  }
}

Fixed version (ground truth):
void deserialize(AbstractHessianInput in,Object obj) throws IOException {
  java.sql.Time value=null;
  try {
    java.util.Date date=(java.util.Date)in.readObject();
    if (date != null)     value=new java.sql.Time(date.getTime());
    _field.set(obj,value);
  }
 catch (  Exception e) {
    logDeserializeError(_field,obj,value,e);
  }
}