nus-yam/ex-repair huggingface dataset:
Program: 50167
Project: 50167
Buggy source:
private Tree addTreeItems(ClusterView cv){
  Tree tree=new Tree();
  memberTreeItem=addTreeItem(tree,"String_Node_Str",cv.getMembers(),clusterId,null);
  itemMap.put(InstanceType.MAP,new InstanceWidgets(InstanceType.MAP,addTreeItem(tree,"String_Node_Str",cv.getMaps(),clusterId,InstanceType.MAP)));
  itemMap.put(InstanceType.QUEUE,new InstanceWidgets(InstanceType.QUEUE,addTreeItem(tree,"String_Node_Str",cv.getQs(),clusterId,InstanceType.QUEUE)));
  itemMap.put(InstanceType.LIST,new InstanceWidgets(InstanceType.LIST,addTreeItem(tree,"String_Node_Str",cv.getLists(),clusterId,InstanceType.LIST)));
  itemMap.put(InstanceType.SET,new InstanceWidgets(InstanceType.SET,addTreeItem(tree,"String_Node_Str",cv.getSets(),clusterId,InstanceType.SET)));
  itemMap.put(InstanceType.TOPIC,new InstanceWidgets(InstanceType.TOPIC,addTreeItem(tree,"String_Node_Str",cv.getTopics(),clusterId,InstanceType.TOPIC)));
  itemMap.put(InstanceType.MULTIMAP,new InstanceWidgets(InstanceType.MULTIMAP,addTreeItem(tree,"String_Node_Str",cv.getMultiMaps(),clusterId,InstanceType.MULTIMAP)));
  itemMap.put(InstanceType.LOCK,new InstanceWidgets(InstanceType.LOCK,addTreeItem(tree,"String_Node_Str",cv.getLocks(),clusterId,InstanceType.LOCK)));
  TreeItem treeItem=new TreeItem("String_Node_Str");
  Anchor anchor=createLink("String_Node_Str","String_Node_Str" + clusterId + "String_Node_Str");
  treeItem.addItem(anchor);
  tree.addItem(treeItem);
  return tree;
}

Fixed version (ground truth):
private Tree addTreeItems(ClusterView cv){
  Tree tree=new Tree();
  memberTreeItem=addTreeItem(tree,"String_Node_Str",cv.getMembers(),clusterId,null);
  itemMap.put(InstanceType.MAP,new InstanceWidgets(InstanceType.MAP,addTreeItem(tree,"String_Node_Str",cv.getMaps(),clusterId,InstanceType.MAP)));
  itemMap.put(InstanceType.QUEUE,new InstanceWidgets(InstanceType.QUEUE,addTreeItem(tree,"String_Node_Str",cv.getQs(),clusterId,InstanceType.QUEUE)));
  itemMap.put(InstanceType.LIST,new InstanceWidgets(InstanceType.LIST,addTreeItem(tree,"String_Node_Str",cv.getLists(),clusterId,InstanceType.LIST)));
  itemMap.put(InstanceType.SET,new InstanceWidgets(InstanceType.SET,addTreeItem(tree,"String_Node_Str",cv.getSets(),clusterId,InstanceType.SET)));
  itemMap.put(InstanceType.TOPIC,new InstanceWidgets(InstanceType.TOPIC,addTreeItem(tree,"String_Node_Str",cv.getTopics(),clusterId,InstanceType.TOPIC)));
  itemMap.put(InstanceType.MULTIMAP,new InstanceWidgets(InstanceType.MULTIMAP,addTreeItem(tree,"String_Node_Str",cv.getMultiMaps(),clusterId,InstanceType.MULTIMAP)));
  itemMap.put(InstanceType.LOCK,new InstanceWidgets(InstanceType.LOCK,addTreeItem(tree,"String_Node_Str",cv.getLocks(),clusterId,InstanceType.LOCK)));
  TreeItem treeItem=new TreeItem("String_Node_Str");
  ConfigLink config=new ConfigLink();
  config.setClusterId(clusterId);
  config.setType("String_Node_Str");
  Anchor anchor=createLink("String_Node_Str",config);
  treeItem.addItem(anchor);
  tree.addItem(treeItem);
  return tree;
}
Program: 50168
Project: 50168
Buggy source:
public void onValueChange(final ValueChangeEvent event){
  String token=event.getValue().toString();
  onValueChangeHandler.handle(token);
}

Fixed version (ground truth):
public void onValueChange(final ValueChangeEvent event){
  ConfigLink config=(ConfigLink)event.getValue();
  onValueChangeHandler.handle(config);
}
Program: 50169
Project: 50169
Buggy source:
public void handle(ChangeEvent e){
  InstanceStatistics event=(InstanceStatistics)e;
  if (super.name == null || !super.name.equals(event.getName())) {
    return;
  }
  VerticalPanel vPanel=(VerticalPanel)disclosurePanel.getContent();
  Label label=(Label)vPanel.getWidget(0);
  label.setText("String_Node_Str" + event.getSize() + "String_Node_Str"+ event.getTotalOPS());
  if (vPanel.getWidgetCount() < 2) {
    HorizontalPanel horizontalPanel=new HorizontalPanel();
    horizontalPanel.add(createAbsPanelWithImage());
    horizontalPanel.add(createAbsPanelWithImage());
    horizontalPanel.setBorderWidth(0);
    vPanel.add(horizontalPanel);
  }
  HorizontalPanel horizontalPanel=(HorizontalPanel)vPanel.getWidget(1);
  Image sizeChart=(Image)((AbsolutePanel)horizontalPanel.getWidget(0)).getWidget(0);
  sizeChart.setUrl(getServletName() + "String_Node_Str" + name+ "String_Node_Str"+ Math.random() * 10);
  Image opsChart=(Image)((AbsolutePanel)horizontalPanel.getWidget(1)).getWidget(0);
  opsChart.setUrl(getServletName() + "String_Node_Str" + name+ "String_Node_Str"+ Math.random() * 10);
}

Fixed version (ground truth):
public void handle(ChangeEvent e){
  InstanceStatistics event=(InstanceStatistics)e;
  if (super.name == null || !super.name.equals(event.getName())) {
    return;
  }
  VerticalPanel vPanel=(VerticalPanel)disclosurePanel.getContent();
  Label label=(Label)vPanel.getWidget(0);
  label.setText("String_Node_Str" + event.getSize() + "String_Node_Str"+ event.getTotalOPS());
  if (vPanel.getWidgetCount() < 2) {
    HorizontalPanel horizontalPanel=new HorizontalPanel();
    horizontalPanel.add(createAbsPanelWithImage());
    horizontalPanel.add(createAbsPanelWithImage());
    horizontalPanel.setBorderWidth(0);
    vPanel.add(horizontalPanel);
  }
  HorizontalPanel horizontalPanel=(HorizontalPanel)vPanel.getWidget(1);
  Image sizeChart=(Image)((AbsolutePanel)horizontalPanel.getWidget(0)).getWidget(0);
  String encodeName=URL.encodeComponent(name);
  sizeChart.setUrl(getServletName() + "String_Node_Str" + encodeName+ "String_Node_Str"+ Math.random() * 10);
  Image opsChart=(Image)((AbsolutePanel)horizontalPanel.getWidget(1)).getWidget(0);
  opsChart.setUrl(getServletName() + "String_Node_Str" + encodeName+ "String_Node_Str"+ Math.random() * 10);
}
Program: 50170
Project: 50170
Buggy source:
public void handle(String token){
  Map<String,String> map=parseParamString(token);
  String name=map.get("String_Node_Str");
  int clusterId=Integer.valueOf(map.get("String_Node_Str"));
  String type=map.get("String_Node_Str");
  hazelcastMonitor.closeClusterAddPanel();
  deRegisterAllActivePanels();
  ClusterWidgets clusterWidgets=hazelcastMonitor.getMapClusterWidgets().get(clusterId);
  PageBuilder pageBuilder=mapPageBuilders.get(type);
  pageBuilder.buildPage(clusterWidgets,name,new RegisterEventCallBack(hazelcastMonitor),servicesFactory);
}

Fixed version (ground truth):
public void handle(ConfigLink intanceLink){
  hazelcastMonitor.closeClusterAddPanel();
  deRegisterAllActivePanels();
  ClusterWidgets clusterWidgets=hazelcastMonitor.getMapClusterWidgets().get(intanceLink.getClusterId());
  PageBuilder pageBuilder=mapPageBuilders.get(intanceLink.getType());
  pageBuilder.buildPage(clusterWidgets,intanceLink.getName(),new RegisterEventCallBack(hazelcastMonitor),servicesFactory);
}
Program: 50171
Project: 50171
Buggy source:
@Test public void testMapPage() throws Exception {
  HazelcastServiceAsync hazelcastService=mock(HazelcastServiceAsync.class);
  ServicesFactory servicesFactory=mock(ServicesFactory.class);
  when(servicesFactory.getHazelcastService()).thenReturn(hazelcastService);
  HazelcastMonitor hazelcastMonitor=mock(HazelcastMonitor.class);
  Map<Integer,ClusterWidgets> mapOfCLusterWidgets=new HashMap<Integer,ClusterWidgets>();
  ClusterWidgets clusterWidgets=mock(ClusterWidgets.class);
  mapOfCLusterWidgets.put(0,clusterWidgets);
  when(hazelcastMonitor.getMapClusterWidgets()).thenReturn(mapOfCLusterWidgets);
  OnValueChangeHandler handler=new OnValueChangeHandler(servicesFactory,hazelcastMonitor);
  String token="String_Node_Str";
  handler.mapPageBuilders.clear();
  PageBuilder pageBuilder=mock(PageBuilder.class);
  handler.mapPageBuilders.put("String_Node_Str",pageBuilder);
  handler.handle(token);
  verify(pageBuilder,times(1)).buildPage(eq(clusterWidgets),eq("String_Node_Str"),any(AsyncCallback.class),eq(servicesFactory));
  verify(clusterWidgets,times(1)).deRegisterAll();
}

Fixed version (ground truth):
@Test public void testMapPage() throws Exception {
  HazelcastServiceAsync hazelcastService=mock(HazelcastServiceAsync.class);
  ServicesFactory servicesFactory=mock(ServicesFactory.class);
  when(servicesFactory.getHazelcastService()).thenReturn(hazelcastService);
  HazelcastMonitor hazelcastMonitor=mock(HazelcastMonitor.class);
  Map<Integer,ClusterWidgets> mapOfCLusterWidgets=new HashMap<Integer,ClusterWidgets>();
  ClusterWidgets clusterWidgets=mock(ClusterWidgets.class);
  mapOfCLusterWidgets.put(0,clusterWidgets);
  when(hazelcastMonitor.getMapClusterWidgets()).thenReturn(mapOfCLusterWidgets);
  OnValueChangeHandler handler=new OnValueChangeHandler(servicesFactory,hazelcastMonitor);
  ConfigLink configLink=new ConfigLink();
  configLink.setClusterId(0);
  configLink.setType("String_Node_Str");
  configLink.setName("String_Node_Str");
  handler.mapPageBuilders.clear();
  PageBuilder pageBuilder=mock(PageBuilder.class);
  handler.mapPageBuilders.put("String_Node_Str",pageBuilder);
  handler.handle(configLink);
  verify(pageBuilder,times(1)).buildPage(eq(clusterWidgets),eq("String_Node_Str"),any(AsyncCallback.class),eq(servicesFactory));
  verify(clusterWidgets,times(1)).deRegisterAll();
}
Program: 50172
Project: 50172
Buggy source:
void destroyInstanceClusterWide(String name,Object key){
  final ProxyKey proxyKey=new ProxyKey(name,key);
  if (proxies.containsKey(proxyKey)) {
    if (name.equals("String_Node_Str")) {
      locksMapProxy.remove(key);
    }
 else     if (name.startsWith(Prefix.IDGEN)) {
      idGeneratorMapProxy.remove(name);
    }
    globalProxies.remove(proxyKey);
    final BlockingQueue<Object> result=ResponseQueueFactory.newResponseQueue();
    node.clusterService.enqueueAndReturn(new Processable(){
      public void process(){
        try {
          destroyProxy(proxyKey);
          result.put(Boolean.TRUE);
        }
 catch (        Exception e) {
        }
      }
    }
);
    try {
      result.take();
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
void destroyInstanceClusterWide(String name,Object key){
  final ProxyKey proxyKey=new ProxyKey(name,key);
  if (proxies.containsKey(proxyKey)) {
    if (name.equals("String_Node_Str")) {
      locksMapProxy.remove(key);
    }
 else     if (name.startsWith(Prefix.IDGEN)) {
      idGeneratorMapProxy.remove(name);
    }
    globalProxies.remove(proxyKey);
    node.clusterService.enqueueAndWait(new Processable(){
      public void process(){
        try {
          destroyProxy(proxyKey);
        }
 catch (        Exception e) {
        }
      }
    }
,5);
  }
 else {
    logger.log(Level.WARNING,"String_Node_Str" + name);
  }
}
Program: 50173
Project: 50173
Buggy source:
/** 
 * Detaches this member from the cluster first and then restarts it as a new member.
 * @see #getLifecycleService()
 * @deprecated as of version 1.9
 */
public static void restart(){
synchronized (initLock) {
    if (defaultInstance != null) {
    }
 else {
      getDefaultInstance();
    }
  }
}

Fixed version (ground truth):
/** 
 * Detaches this member from the cluster first and then restarts it as a new member.
 * @see #getLifecycleService()
 * @deprecated as of version 1.9
 */
public static void restart(){
synchronized (initLock) {
    if (defaultInstance.get() != null) {
      getLifecycleService().restart();
    }
 else {
      getDefaultInstance();
    }
  }
}
Program: 50174
Project: 50174
Buggy source:
/** 
 * Detaches this member from the cluster. It doesn't shutdown the entire cluster, it shuts down this local member only.
 * @see #getLifecycleService()
 * @deprecated as of version 1.9
 */
public static void shutdown(){
synchronized (initLock) {
    if (defaultInstance != null) {
      getDefaultInstance().shutdown();
      defaultInstance.set(null);
    }
  }
}

Fixed version (ground truth):
/** 
 * Detaches this member from the cluster. It doesn't shutdown the entire cluster, it shuts down this local member only.
 * @see #getLifecycleService()
 * @deprecated as of version 1.9
 */
public static void shutdown(){
synchronized (initLock) {
    if (defaultInstance.get() != null) {
      getDefaultInstance().shutdown();
      defaultInstance.set(null);
    }
  }
}
Program: 50175
Project: 50175
Buggy source:
long doLongAtomic(){
  setLocal(op,"String_Node_Str",nameAsKey,null,0,0);
  request.longValue=value;
  doOp();
  Object returnObject=getResultAsObject();
  if (returnObject instanceof AddressAwareException) {
    rethrowException(op,(AddressAwareException)returnObject);
  }
  return (Long)returnObject;
}

Fixed version (ground truth):
long doLongAtomic(){
  setLocal(op,"String_Node_Str",nameAsKey,null,0,0);
  request.longValue=value;
  doOp();
  Object returnObject=getResultAsObject();
  return (Long)returnObject;
}
Program: 50177
Project: 50177
Buggy source:
public Q(String name){
  QueueConfig qconfig=node.getConfig().getQueueConfig(name.substring(Prefix.QUEUE.length()));
  maxSizePerJVM=(qconfig.getMaxSizePerJVM() == 0) ? QueueConfig.DEFAULT_MAX_SIZE_PER_JVM : qconfig.getMaxSizePerJVM();
  maxAge=(qconfig.getTimeToLiveSeconds() == 0) ? QueueConfig.DEFAULT_TTL_SECONDS : TimeUnit.SECONDS.toMillis(qconfig.getTimeToLiveSeconds());
  logger.log(Level.FINEST,name + "String_Node_Str" + maxSizePerJVM);
  logger.log(Level.FINEST,name + "String_Node_Str" + maxAge);
  this.name=name;
  final int blocksLimit=10;
  lsBlocks=new ArrayList<Block>(blocksLimit);
  Address master=getMasterAddress();
  if (master == null) {
    throw new IllegalStateException("String_Node_Str" + master);
  }
  if (master.isThisAddress()) {
    Block block=createBlock(master,0);
    addBlock(block);
    sendAddBlockMessageToOthers(block,-1,null,true);
    for (int i=1; i < blocksLimit; i++) {
      int blockId=i;
      Address target=nextTarget();
      block=createBlock(target,blockId);
      addBlock(block);
      sendAddBlockMessageToOthers(block,-1,null,true);
    }
  }
}

Fixed version (ground truth):
public Q(String name){
  QueueConfig qconfig=node.getConfig().getQueueConfig(name.substring(Prefix.QUEUE.length()));
  maxSizePerJVM=(qconfig.getMaxSizePerJVM() == 0) ? Integer.MAX_VALUE : qconfig.getMaxSizePerJVM();
  maxAge=(qconfig.getTimeToLiveSeconds() == 0) ? QueueConfig.DEFAULT_TTL_SECONDS : TimeUnit.SECONDS.toMillis(qconfig.getTimeToLiveSeconds());
  logger.log(Level.FINEST,name + "String_Node_Str" + maxSizePerJVM);
  logger.log(Level.FINEST,name + "String_Node_Str" + maxAge);
  this.name=name;
  final int blocksLimit=10;
  lsBlocks=new ArrayList<Block>(blocksLimit);
  Address master=getMasterAddress();
  if (master == null) {
    throw new IllegalStateException("String_Node_Str" + master);
  }
  if (master.isThisAddress()) {
    Block block=createBlock(master,0);
    addBlock(block);
    sendAddBlockMessageToOthers(block,-1,null,true);
    for (int i=1; i < blocksLimit; i++) {
      int blockId=i;
      Address target=nextTarget();
      block=createBlock(target,blockId);
      addBlock(block);
      sendAddBlockMessageToOthers(block,-1,null,true);
    }
  }
}
Program: 50178
Project: 50178
Buggy source:
public Q(String name){
  QueueConfig qconfig=node.getConfig().getQueueConfig(name.substring(Prefix.QUEUE.length()));
  maxSizePerJVM=(qconfig.getMaxSizePerJVM() == 0) ? Integer.MAX_VALUE : qconfig.getMaxSizePerJVM();
  maxAge=(qconfig.getTimeToLiveSeconds() == 0) ? QueueConfig.DEFAULT_TTL_SECONDS : TimeUnit.SECONDS.toMillis(qconfig.getTimeToLiveSeconds());
  logger.log(Level.FINEST,name + "String_Node_Str" + maxSizePerJVM);
  logger.log(Level.FINEST,name + "String_Node_Str" + maxAge);
  this.name=name;
  final int blocksLimit=10;
  lsBlocks=new ArrayList<Block>(blocksLimit);
  Address master=getMasterAddress();
  if (master == null) {
    throw new IllegalStateException("String_Node_Str" + master);
  }
  if (master.isThisAddress()) {
    Block block=createBlock(master,0);
    addBlock(block);
    sendAddBlockMessageToOthers(block,-1,null,true);
    for (int i=1; i < blocksLimit; i++) {
      int blockId=i;
      Address target=nextTarget();
      block=createBlock(target,blockId);
      addBlock(block);
      sendAddBlockMessageToOthers(block,-1,null,true);
    }
  }
}

Fixed version (ground truth):
public Q(String name){
  QueueConfig qconfig=node.getConfig().getQueueConfig(name.substring(Prefix.QUEUE.length()));
  maxSizePerJVM=(qconfig.getMaxSizePerJVM() == 0) ? Integer.MAX_VALUE : qconfig.getMaxSizePerJVM();
  maxAge=(qconfig.getTimeToLiveSeconds() == 0) ? Integer.MAX_VALUE : TimeUnit.SECONDS.toMillis(qconfig.getTimeToLiveSeconds());
  logger.log(Level.FINEST,name + "String_Node_Str" + maxSizePerJVM);
  logger.log(Level.FINEST,name + "String_Node_Str" + maxAge);
  this.name=name;
  final int blocksLimit=10;
  lsBlocks=new ArrayList<Block>(blocksLimit);
  Address master=getMasterAddress();
  if (master == null) {
    throw new IllegalStateException("String_Node_Str" + master);
  }
  if (master.isThisAddress()) {
    Block block=createBlock(master,0);
    addBlock(block);
    sendAddBlockMessageToOthers(block,-1,null,true);
    for (int i=1; i < blocksLimit; i++) {
      int blockId=i;
      Address target=nextTarget();
      block=createBlock(target,blockId);
      addBlock(block);
      sendAddBlockMessageToOthers(block,-1,null,true);
    }
  }
}
Program: 50179
Project: 50179
Buggy source:
void reset(){
  if (locallyOwnedMap != null) {
    locallyOwnedMap.reset();
  }
  mapRecords.clear();
  mapIndexService.clear();
}

Fixed version (ground truth):
void reset(){
  if (locallyOwnedMap != null) {
    locallyOwnedMap.reset();
  }
  if (mapNearCache != null) {
    mapNearCache.reset();
  }
  mapRecords.clear();
  mapIndexService.clear();
}
Program: 50180
Project: 50180
Buggy source:
public Object get(String name,Object key,long timeout){
  this.key=key;
  final ThreadContext tc=ThreadContext.get();
  TransactionImpl txn=tc.getCallContext().getTransaction();
  if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
    if (txn.has(name,key)) {
      return txn.get(name,key);
    }
  }
  nearCache=mapCaches.get(name);
  if (nearCache != null) {
    Object value=nearCache.get(key);
    if (value != null) {
      return value;
    }
  }
  LocallyOwnedMap locallyOwnedMap=mapLocallyOwnedMaps.get(name);
  if (locallyOwnedMap != null) {
    Object value=locallyOwnedMap.get(key);
    if (value != OBJECT_REDO) {
      return value;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null && cMap.useBackupData) {
    final Data dataKey=toData(key);
    final Record record=cMap.mapRecords.get(dataKey);
    if (record != null && record.isActive() && record.isValid()) {
      final Data valueData=record.getValue();
      if (valueData != null) {
        return toObject(valueData);
      }
    }
  }
  Object value=objectCall(CONCURRENT_MAP_GET,name,key,null,timeout,-1);
  if (value instanceof AddressAwareException) {
    rethrowException(request.operation,(AddressAwareException)value);
  }
  return value;
}

Fixed version (ground truth):
public Object get(String name,Object key,long timeout){
  this.keyObject=key;
  final ThreadContext tc=ThreadContext.get();
  TransactionImpl txn=tc.getCallContext().getTransaction();
  if (txn != null && txn.getStatus() == Transaction.TXN_STATUS_ACTIVE) {
    if (txn.has(name,key)) {
      return txn.get(name,key);
    }
  }
  nearCache=mapCaches.get(name);
  if (nearCache != null) {
    Object value=nearCache.get(key);
    if (value != null) {
      return value;
    }
  }
  LocallyOwnedMap locallyOwnedMap=mapLocallyOwnedMaps.get(name);
  if (locallyOwnedMap != null) {
    Object value=locallyOwnedMap.get(key);
    if (value != OBJECT_REDO) {
      return value;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null && cMap.useBackupData) {
    final Data dataKey=toData(key);
    final Record record=cMap.mapRecords.get(dataKey);
    if (record != null && record.isActive() && record.isValid()) {
      final Data valueData=record.getValue();
      if (valueData != null) {
        return toObject(valueData);
      }
    }
  }
  Object value=objectCall(CONCURRENT_MAP_GET,name,key,null,timeout,-1);
  if (value instanceof AddressAwareException) {
    rethrowException(request.operation,(AddressAwareException)value);
  }
  return value;
}
Program: 50181
Project: 50181
Buggy source:
@Override protected void setResult(Object obj){
  if (obj != null && obj == Boolean.TRUE) {
    if (nearCache != null) {
      nearCache.setContainsKey(key,request.key);
    }
  }
  super.setResult(obj);
}

Fixed version (ground truth):
@Override protected void setResult(Object obj){
  if (obj != null && obj == Boolean.TRUE) {
    if (nearCache != null) {
      nearCache.setContainsKey(keyObject,request.key);
    }
  }
  super.setResult(obj);
}
Program: 50182
Project: 50182
Buggy source:
public boolean containsKey(String name,Object key){
  this.key=key;
  this.nearCache=mapCaches.get(name);
  Data dataKey=toData(key);
  if (nearCache != null) {
    if (nearCache.containsKey(key)) {
      return true;
    }
 else     if (nearCache.getMaxSize() == Integer.MAX_VALUE) {
      return false;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null && cMap.useBackupData) {
    final Record record=cMap.mapRecords.get(dataKey);
    if (record != null && record.isActive() && record.isValid() && record.getValue() != null) {
      return true;
    }
  }
  return booleanCall(CONCURRENT_MAP_CONTAINS,name,dataKey,null,0,-1);
}

Fixed version (ground truth):
public boolean containsKey(String name,Object key){
  this.keyObject=key;
  this.nearCache=mapCaches.get(name);
  Data dataKey=toData(key);
  if (nearCache != null) {
    if (nearCache.containsKey(key)) {
      return true;
    }
 else     if (nearCache.getMaxSize() == Integer.MAX_VALUE) {
      return false;
    }
  }
  final CMap cMap=maps.get(name);
  if (cMap != null && cMap.useBackupData) {
    final Record record=cMap.mapRecords.get(dataKey);
    if (record != null && record.isActive() && record.isValid() && record.getValue() != null) {
      return true;
    }
  }
  return booleanCall(CONCURRENT_MAP_CONTAINS,name,dataKey,null,0,-1);
}
Program: 50183
Project: 50183
Buggy source:
private CacheEntry(Object key,Data keyData,Data valueData){
  if (key == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (keyData == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (valueData == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.key=key;
  this.keyData=keyData;
  this.valueData=valueData;
  this.createTime=System.currentTimeMillis();
  touch(createTime);
}

Fixed version (ground truth):
private CacheEntry(Object key,Data keyData,Data valueData){
  if (key == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (keyData == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.key=key;
  this.keyData=keyData;
  this.valueData=valueData;
  this.createTime=System.currentTimeMillis();
  touch(createTime);
}
Program: 50184
Project: 50184
Buggy source:
public void put(Object key,Data keyData,Data value){
  checkThread();
  if (cache.size() != sortedMap.size()) {
    throw new IllegalStateException("String_Node_Str" + cache.size() + "String_Node_Str"+ sortedMap.size());
  }
  if (cache.size() + 1 >= maxSize) {
    startEviction();
  }
  if (cache.size() + 1 >= maxSize) {
    return;
  }
  if (!sortedMap.containsKey(keyData)) {
    sortedMap.put(keyData,key);
    cache.put(key,new CacheEntry(key,keyData,value));
  }
}

Fixed version (ground truth):
public void put(Object key,Data keyData,Data value){
  checkThread();
  if (cache.size() != sortedMap.size()) {
    throw new IllegalStateException("String_Node_Str" + cache.size() + "String_Node_Str"+ sortedMap.size());
  }
  if (cache.size() + 1 >= maxSize) {
    startEviction();
  }
  if (cache.size() + 1 >= maxSize) {
    return;
  }
  if (!sortedMap.containsKey(keyData)) {
    sortedMap.put(keyData,key);
  }
  CacheEntry cacheEntry=cache.get(key);
  if (cacheEntry == null) {
    cacheEntry=new CacheEntry(key,keyData,value);
  }
 else {
    cacheEntry.setValue(value);
  }
  cache.put(key,cacheEntry);
}
Program: 50185
Project: 50185
Buggy source:
private void postJoin(){
  if (!isMaster()) {
    Set<Member> members=null;
    boolean allConnected=false;
    int checkCount=0;
    while (checkCount++ < 10 && !allConnected) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignored) {
      }
      members=clusterImpl.getMembers();
      allConnected=true;
      for (      Member member : members) {
        MemberImpl memberImpl=(MemberImpl)member;
        if (!memberImpl.localMember() && connectionManager.getConnection(memberImpl.getAddress()) == null) {
          allConnected=false;
        }
      }
    }
    if (!allConnected) {
      logger.log(Level.WARNING,"String_Node_Str" + checkCount + "String_Node_Str");
      logger.log(Level.WARNING,"String_Node_Str");
      try {
        Thread.sleep(10000);
      }
 catch (      InterruptedException e) {
        shutdown();
      }
      rejoin();
    }
 else {
      clusterManager.finalizeJoin();
      clusterManager.enqueueAndWait(new Processable(){
        public void process(){
          if (baseVariables.lsMembers.size() == 1) {
            final StringBuilder sb=new StringBuilder();
            sb.append("String_Node_Str");
            sb.append(clusterManager);
            logger.log(Level.INFO,sb.toString());
          }
        }
      }
,5);
    }
  }
}

Fixed version (ground truth):
private void postJoin(){
  if (!isMaster()) {
    Set<Member> members=null;
    boolean allConnected=false;
    int checkCount=0;
    while (checkCount++ < 10 && !allConnected) {
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException ignored) {
      }
      members=clusterImpl.getMembers();
      allConnected=true;
      for (      Member member : members) {
        MemberImpl memberImpl=(MemberImpl)member;
        if (!memberImpl.localMember() && connectionManager.getConnection(memberImpl.getAddress()) == null) {
          allConnected=false;
        }
      }
    }
    if (!allConnected) {
      logger.log(Level.WARNING,"String_Node_Str" + checkCount + "String_Node_Str");
      logger.log(Level.WARNING,"String_Node_Str");
      try {
        Thread.sleep(10000);
      }
 catch (      InterruptedException e) {
        shutdown();
      }
      rejoin();
      return;
    }
 else {
      clusterManager.finalizeJoin();
    }
  }
  clusterManager.enqueueAndWait(new Processable(){
    public void process(){
      if (baseVariables.lsMembers.size() == 1) {
        final StringBuilder sb=new StringBuilder();
        sb.append("String_Node_Str");
        sb.append(clusterManager);
        logger.log(Level.INFO,sb.toString());
      }
    }
  }
,5);
}
Program: 50186
Project: 50186
Buggy source:
@Test public void testIdle() throws Exception {
  Config config=new XmlConfigBuilder().build();
  MapConfig mapConfig=config.getMapConfig("String_Node_Str");
  mapConfig.setMaxIdleSeconds(3);
  mapConfig.setEvictionDelaySeconds(10);
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  Map map=h1.getMap("String_Node_Str");
  map.put(1,1);
  assertEquals(1,map.get(1));
  sleep(2000);
  assertEquals(1,map.get(1));
  sleep(2000);
  assertEquals(1,map.get(1));
  sleep(4000);
  assertNull(map.get(1));
  assertEquals(0,map.size());
}

Fixed version (ground truth):
@Test public void testIdle() throws Exception {
  Config config=new Config();
  MapConfig mapConfig=config.getMapConfig("String_Node_Str");
  mapConfig.setMaxIdleSeconds(3);
  mapConfig.setEvictionDelaySeconds(10);
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  Map map=h1.getMap("String_Node_Str");
  map.put(1,1);
  assertEquals(1,map.get(1));
  sleep(2000);
  assertEquals(1,map.get(1));
  sleep(2000);
  assertEquals(1,map.get(1));
  sleep(4000);
  assertNull(map.get(1));
  assertEquals(0,map.size());
}
Program: 50187
Project: 50187
Buggy source:
@Test(timeout=60000) public void testTcpIpWithDifferentBuildNumber() throws Exception {
  System.setProperty("String_Node_Str","String_Node_Str");
  Config c=new XmlConfigBuilder().build();
  c.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
  c.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
  c.getNetworkConfig().getInterfaces().setEnabled(true);
  c.getNetworkConfig().getJoin().getTcpIpConfig().addAddress(new Address("String_Node_Str",5701));
  c.getNetworkConfig().getInterfaces().addInterface("String_Node_Str");
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(c);
  assertEquals(1,h1.getCluster().getMembers().size());
  h1.getMap("String_Node_Str").put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",h1.getMap("String_Node_Str").put("String_Node_Str","String_Node_Str"));
  System.setProperty("String_Node_Str","String_Node_Str");
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(c);
  assertEquals(1,h1.getCluster().getMembers().size());
  assertEquals(1,h2.getCluster().getMembers().size());
  System.setProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test(timeout=60000) public void testTcpIpWithDifferentBuildNumber() throws Exception {
  System.setProperty("String_Node_Str","String_Node_Str");
  Config c=new Config();
  c.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
  c.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
  c.getNetworkConfig().getInterfaces().setEnabled(true);
  c.getNetworkConfig().getJoin().getTcpIpConfig().addAddress(new Address("String_Node_Str",5701));
  c.getNetworkConfig().getInterfaces().addInterface("String_Node_Str");
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(c);
  assertEquals(1,h1.getCluster().getMembers().size());
  h1.getMap("String_Node_Str").put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",h1.getMap("String_Node_Str").put("String_Node_Str","String_Node_Str"));
  System.setProperty("String_Node_Str","String_Node_Str");
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(c);
  assertEquals(1,h1.getCluster().getMembers().size());
  assertEquals(1,h2.getCluster().getMembers().size());
  System.setProperty("String_Node_Str","String_Node_Str");
}
Program: 50188
Project: 50188
Buggy source:
@Test public void testSuperBeingMaster() throws Exception {
  Config config=new XmlConfigBuilder().build();
  config.setSuperClient(true);
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance hSuper2=Hazelcast.newHazelcastInstance(config);
  sleep(11000);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(null);
  Map map=hSuper.getMap("String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  sleep(10000);
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  assertEquals("String_Node_Str",map.get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testSuperBeingMaster() throws Exception {
  Config config=new Config();
  config.setSuperClient(true);
  final HazelcastInstance hSuper=Hazelcast.newHazelcastInstance(config);
  final HazelcastInstance hSuper2=Hazelcast.newHazelcastInstance(config);
  sleep(11000);
  HazelcastInstance hNormal=Hazelcast.newHazelcastInstance(null);
  Map map=hSuper.getMap("String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  sleep(10000);
  assertEquals("String_Node_Str",hNormal.getMap("String_Node_Str").get("String_Node_Str"));
  assertEquals("String_Node_Str",map.get("String_Node_Str"));
}
Program: 50189
Project: 50189
Buggy source:
public Partition getPartition(Object key){
  return null;
}

Fixed version (ground truth):
public Partition getPartition(Object key){
  return (Partition)proxyHelper.doOp(ClusterOperation.CLIENT_GET_PARTITIONS,key,null);
}
Program: 50190
Project: 50190
Buggy source:
@Override protected void doParse(Element element,ParserContext parserContext,BeanDefinitionBuilder builder){
  super.doParse(element,parserContext,builder);
  XmlConfigBuilder util=new XmlConfigBuilder();
  Config config=util.build();
  try {
    for (    org.w3c.dom.Node node : new IterableNodeList(element.getChildNodes())) {
      final String nodeName=util.cleanNodeName(node.getNodeName());
      if ("String_Node_Str".equals(nodeName)) {
        util.handleNetwork(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleGroup(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleProperties(node,config.getProperties());
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleExecutor(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleQueue(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleMap(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleTopic(node);
      }
 else       if ("String_Node_Str".equals(nodeName)) {
        util.handleMergePolicies(node);
      }
    }
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str" + e.getMessage(),e);
  }
  builder.addPropertyValue("String_Node_Str",config.getNetworkConfig());
  builder.addPropertyValue("String_Node_Str",config.getGroupConfig());
  builder.addPropertyValue("String_Node_Str",config.getProperties());
  builder.addPropertyValue("String_Node_Str",config.getExecutorConfigMap());
  builder.addPropertyValue("String_Node_Str",config.getMapConfigs());
  builder.addPropertyValue("String_Node_Str",config.getQConfigs());
}

Fixed version (ground truth):
@Override protected void doParse(Element element,ParserContext parserContext,BeanDefinitionBuilder builder){
  super.doParse(element,parserContext,builder);
  XmlConfigBuilder util=new XmlConfigBuilder();
  Config config=util.build(element);
  builder.addPropertyValue("String_Node_Str",config.getPort());
  builder.addPropertyValue("String_Node_Str",config.isPortAutoIncrement());
  builder.addPropertyValue("String_Node_Str",config.isReuseAddress());
  builder.addPropertyValue("String_Node_Str",config.isSuperClient());
  builder.addPropertyValue("String_Node_Str",config.getNetworkConfig());
  builder.addPropertyValue("String_Node_Str",config.getGroupConfig());
  builder.addPropertyValue("String_Node_Str",config.getProperties());
  builder.addPropertyValue("String_Node_Str",config.getExecutorConfigMap());
  builder.addPropertyValue("String_Node_Str",config.getMapConfigs());
  builder.addPropertyValue("String_Node_Str",config.getQConfigs());
}
Program: 50191
Project: 50191
Buggy source:
@Test public void testNetworkConfig(){
  NetworkConfig networkConfig=config.getNetworkConfig();
  assertNotNull(networkConfig);
  assertFalse(networkConfig.getJoin().getMulticastConfig().isEnabled());
  TcpIpConfig tcp=networkConfig.getJoin().getTcpIpConfig();
  assertNotNull(tcp);
  assertTrue(tcp.isEnabled());
  assertTrue(networkConfig.getSymmetricEncryptionConfig().isEnabled());
}

Fixed version (ground truth):
@Test public void testNetworkConfig(){
  NetworkConfig networkConfig=config.getNetworkConfig();
  assertNotNull(networkConfig);
  assertEquals(5800,config.getPort());
  assertFalse(config.isPortAutoIncrement());
  assertFalse(networkConfig.getJoin().getMulticastConfig().isEnabled());
  TcpIpConfig tcp=networkConfig.getJoin().getTcpIpConfig();
  assertNotNull(tcp);
  assertTrue(tcp.isEnabled());
  assertTrue(networkConfig.getSymmetricEncryptionConfig().isEnabled());
  final List<String> members=tcp.getMembers();
  assertEquals(members.toString(),2,members.size());
  assertEquals("String_Node_Str",members.get(0));
  assertEquals("String_Node_Str",members.get(1));
}
Program: 50192
Project: 50192
Buggy source:
private static long getLongValueByType(Object value){
  if (value == null)   return Long.MAX_VALUE;
  if (value instanceof Double) {
    return Double.doubleToLongBits((Double)value);
  }
 else   if (value instanceof Float) {
    return Float.floatToIntBits((Float)value);
  }
 else   if (value instanceof Number) {
    return ((Number)value).longValue();
  }
 else   if (value instanceof Boolean) {
    return (Boolean.TRUE.equals(value)) ? 1 : -1;
  }
 else   if (value instanceof String) {
    String str=(String)value;
    if (str.length() == 0) {
      return 0;
    }
 else {
      return str.charAt(0);
    }
  }
 else {
    return value.hashCode();
  }
}

Fixed version (ground truth):
private static long getLongValueByType(Object value){
  if (value == null)   return Long.MAX_VALUE;
  if (value instanceof Double) {
    return Double.doubleToLongBits((Double)value);
  }
 else   if (value instanceof Float) {
    return Float.floatToIntBits((Float)value);
  }
 else   if (value instanceof Number) {
    return ((Number)value).longValue();
  }
 else   if (value instanceof Boolean) {
    return (Boolean.TRUE.equals(value)) ? 1 : -1;
  }
 else   if (value instanceof String) {
    return value.hashCode();
  }
 else {
    return value.hashCode();
  }
}
Program: 50193
Project: 50193
Buggy source:
long getLongValue(Object value){
  if (value == null)   return Long.MIN_VALUE;
  int valueType=getIndexType(value.getClass());
  if (valueType != returnType) {
    if (value instanceof String) {
      String str=(String)value;
      if (returnType == TYPE_INT) {
        value=Integer.valueOf(str);
      }
 else       if (returnType == TYPE_LONG) {
        value=Long.valueOf(str);
      }
 else       if (returnType == TYPE_BOOLEAN) {
        value=Boolean.valueOf(str);
      }
 else       if (returnType == TYPE_DOUBLE) {
        value=Double.valueOf(str);
      }
 else       if (returnType == TYPE_FLOAT) {
        value=Float.valueOf(str);
      }
 else       if (returnType == TYPE_BYTE) {
        value=Byte.valueOf(str);
      }
 else       if (returnType == TYPE_CLASS) {
        value=Character.valueOf(str.charAt(0));
      }
    }
  }
  return getLongValueByType(value);
}

Fixed version (ground truth):
long getLongValue(Object value){
  if (value == null)   return Long.MIN_VALUE;
  int valueType=getIndexType(value.getClass());
  if (valueType != returnType) {
    if (value instanceof String) {
      String str=(String)value;
      if (returnType == TYPE_INT) {
        value=Integer.valueOf(str);
      }
 else       if (returnType == TYPE_LONG) {
        value=Long.valueOf(str);
      }
 else       if (returnType == TYPE_BOOLEAN) {
        value=Boolean.valueOf(str);
      }
 else       if (returnType == TYPE_DOUBLE) {
        value=Double.valueOf(str);
      }
 else       if (returnType == TYPE_FLOAT) {
        value=Float.valueOf(str);
      }
 else       if (returnType == TYPE_BYTE) {
        value=Byte.valueOf(str);
      }
 else       if (returnType == TYPE_CLASS) {
        value=str.hashCode();
      }
    }
  }
  return getLongValueByType(value);
}
Program: 50194
Project: 50194
Buggy source:
public InPredicate(Expression first,Object... second){
  this.first=first;
  this.values=second;
}

Fixed version (ground truth):
public InPredicate(Expression first,Object... second){
  this.first=first;
  this.inValues=new HashSet(second.length);
  for (  Object o : second) {
    inValues.add(o);
  }
  this.inValueArray=second;
}
Program: 50195
Project: 50195
Buggy source:
public static Object getRealObject(Object type,String value){
  Object result=null;
  if (type instanceof Boolean) {
    result="String_Node_Str".equalsIgnoreCase(value) ? true : false;
  }
 else   if (type instanceof Integer) {
    result=Integer.valueOf(value);
  }
 else   if (type instanceof Double) {
    result=Double.valueOf(value);
  }
 else   if (type instanceof Float) {
    result=Float.valueOf(value);
  }
 else   if (type instanceof Byte) {
    result=Byte.valueOf(value);
  }
 else   if (type instanceof Long) {
    result=Long.valueOf(value);
  }
 else {
    System.out.println("String_Node_Str");
    throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ value);
  }
  return result;
}

Fixed version (ground truth):
public static Object getRealObject(Object type,String value){
  Object result=null;
  if (type instanceof Boolean) {
    result="String_Node_Str".equalsIgnoreCase(value) ? true : false;
  }
 else   if (type instanceof Integer) {
    result=Integer.valueOf(value);
  }
 else   if (type instanceof Double) {
    result=Double.valueOf(value);
  }
 else   if (type instanceof Float) {
    result=Float.valueOf(value);
  }
 else   if (type instanceof Byte) {
    result=Byte.valueOf(value);
  }
 else   if (type instanceof Long) {
    result=Long.valueOf(value);
  }
 else {
    throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ value);
  }
  return result;
}
Program: 50196
Project: 50196
Buggy source:
public Object objectCall(final ClusterOperation operation,final String name,final Object key,final Object value,final long timeout,final long ttl){
  setLocal(operation,name,key,value,timeout,ttl);
  request.setObjectRequest();
  return objectCall();
}

Fixed version (ground truth):
public Object objectCall(final ClusterOperation operation,final String name,final Object key,final Object value,final long timeout,final long ttl){
  setLocal(operation,name,key,value,timeout,ttl);
  return objectCall();
}
Program: 50197
Project: 50197
Buggy source:
public int compare(MapEntry o1,MapEntry o2){
  int result=comparator.compare(o1,o2);
  if (result == 0) {
    Record r1=(Record)o1;
    Record r2=(Record)o2;
    return (r1.getId() > r2.getId()) ? 1 : -1;
  }
 else {
    return result;
  }
}

Fixed version (ground truth):
public int compare(MapEntry o1,MapEntry o2){
  int result=comparator.compare(o1,o2);
  if (result == 0) {
    Record r1=(Record)o1;
    Record r2=(Record)o2;
    return r1.getId().compareTo(r2.getId());
  }
 else {
    return result;
  }
}
Program: 50198
Project: 50198
Buggy source:
void setIndexValues(Request request,Object value){
  CMap cmap=getMap(request.name);
  if (cmap != null) {
    long[] indexes=cmap.getMapIndexService().getIndexValues(value);
    if (indexes != null) {
      byte[] indexTypes=cmap.getMapIndexService().getIndexTypes();
      request.setIndexes(indexes,indexTypes);
      for (      byte b : indexTypes) {
        if (b == -1) {
          throw new RuntimeException("String_Node_Str" + b);
        }
      }
    }
  }
}

Fixed version (ground truth):
void setIndexValues(Request request,Object value){
  CMap cmap=getMap(request.name);
  if (cmap != null) {
    Long[] indexes=cmap.getMapIndexService().getIndexValues(value);
    if (indexes != null) {
      byte[] indexTypes=cmap.getMapIndexService().getIndexTypes();
      request.setIndexes(indexes,indexTypes);
      for (      byte b : indexTypes) {
        if (b == -1) {
          throw new RuntimeException("String_Node_Str" + b);
        }
      }
    }
  }
}
Program: 50199
Project: 50199
Buggy source:
public void setIndexes(long[] indexes,byte[] indexTypes){
  if (indexes != null) {
    this.getOptionalInfo().indexes=indexes;
    this.getOptionalInfo().indexTypes=indexTypes;
  }
}

Fixed version (ground truth):
public void setIndexes(Long[] indexes,byte[] indexTypes){
  if (indexes != null) {
    this.getOptionalInfo().indexes=indexes;
    this.getOptionalInfo().indexTypes=indexTypes;
  }
}
Program: 50200
Project: 50200
Buggy source:
public long getId(){
  return id;
}

Fixed version (ground truth):
public Long getId(){
  return id;
}
Program: 50201
Project: 50201
Buggy source:
@Override public int hashCode(){
  return (int)(id ^ (id >>> 32));
}

Fixed version (ground truth):
@Override public int hashCode(){
  return id.hashCode();
}
Program: 50202
Project: 50202
Buggy source:
public Record(CMap cmap,int blockId,Data key,Data value,long ttl,long maxIdleMillis,long id){
  super();
  this.id=id;
  this.cmap=cmap;
  this.blockId=(short)blockId;
  this.key=key;
  this.value=value;
  this.setCreationTime(System.currentTimeMillis());
  this.setExpirationTime(ttl);
  this.maxIdleMillis=(maxIdleMillis == 0) ? Long.MAX_VALUE : maxIdleMillis;
  this.setVersion(0);
}

Fixed version (ground truth):
public Record(CMap cmap,int blockId,Data key,Data value,long ttl,long maxIdleMillis,Long id){
  super();
  this.id=id;
  this.cmap=cmap;
  this.blockId=(short)blockId;
  this.key=key;
  this.value=value;
  this.setCreationTime(System.currentTimeMillis());
  this.setExpirationTime(ttl);
  this.maxIdleMillis=(maxIdleMillis == 0) ? Long.MAX_VALUE : maxIdleMillis;
  this.setVersion(0);
}
Program: 50203
Project: 50203
Buggy source:
public long[] getIndexes(){
  if (optionalInfo == null)   return null;
  return getOptionalInfo().indexes;
}

Fixed version (ground truth):
public Long[] getIndexes(){
  if (optionalInfo == null)   return null;
  return getOptionalInfo().indexes;
}
Program: 50204
Project: 50204
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  Record record=(Record)o;
  return (record.getId() == getId());
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if ((o instanceof Record))   return false;
  Record record=(Record)o;
  return record.getId().equals(getId());
}
Program: 50205
Project: 50205
Buggy source:
public void setIndexes(long[] newIndexes,byte[] indexTypes){
  this.indexes=newIndexes;
  this.indexTypes=indexTypes;
  if (indexes.length != indexTypes.length) {
    throw new RuntimeException("String_Node_Str" + indexes.length + "String_Node_Str"+ indexTypes.length);
  }
}

Fixed version (ground truth):
public void setIndexes(Long[] newIndexes,byte[] indexTypes){
  this.indexes=newIndexes;
  this.indexTypes=indexTypes;
  if (indexes.length != indexTypes.length) {
    throw new RuntimeException("String_Node_Str" + indexes.length + "String_Node_Str"+ indexTypes.length);
  }
}
Program: 50206
Project: 50206
Buggy source:
public void readData(DataInput in) throws IOException {
  long now=System.currentTimeMillis();
  cost=in.readLong();
  expirationTime=in.readLong() + now;
  lastAccessTime=in.readLong() + now;
  lastUpdateTime=in.readLong() + now;
  creationTime=in.readLong() + now;
  version=in.readLong();
  hits=in.readInt();
  name=in.readUTF();
  keyData=new Data();
  keyData.readData(in);
  valueData=new Data();
  valueData.readData(in);
  byte indexCount=in.readByte();
  if (indexCount > 0) {
    indexes=new long[indexCount];
    indexTypes=new byte[indexCount];
    for (byte i=0; i < indexCount; i++) {
      indexes[i]=in.readLong();
      indexTypes[i]=in.readByte();
    }
  }
}

Fixed version (ground truth):
public void readData(DataInput in) throws IOException {
  long now=System.currentTimeMillis();
  cost=in.readLong();
  expirationTime=in.readLong() + now;
  lastAccessTime=in.readLong() + now;
  lastUpdateTime=in.readLong() + now;
  creationTime=in.readLong() + now;
  version=in.readLong();
  hits=in.readInt();
  name=in.readUTF();
  keyData=new Data();
  keyData.readData(in);
  valueData=new Data();
  valueData.readData(in);
  byte indexCount=in.readByte();
  if (indexCount > 0) {
    indexes=new Long[indexCount];
    indexTypes=new byte[indexCount];
    for (byte i=0; i < indexCount; i++) {
      indexes[i]=in.readLong();
      indexTypes[i]=in.readByte();
    }
  }
}
Program: 50207
Project: 50207
Buggy source:
public long extractLongValue(Object value){
  Object extractedValue=expression.getValue(value);
  if (extractedValue == null) {
    return Long.MAX_VALUE;
  }
 else {
    if (!checkedStrength) {
      if (extractedValue instanceof Boolean || extractedValue instanceof Number) {
        strong=true;
      }
      checkedStrength=true;
    }
    return getLongValueByType(extractedValue);
  }
}

Fixed version (ground truth):
public Long extractLongValue(Object value){
  Object extractedValue=expression.getValue(value);
  if (extractedValue == null) {
    return Long.MAX_VALUE;
  }
 else {
    if (!checkedStrength) {
      if (extractedValue instanceof Boolean || extractedValue instanceof Number) {
        strong=true;
      }
      checkedStrength=true;
    }
    return getLongValueByType(extractedValue);
  }
}
Program: 50208
Project: 50208
Buggy source:
public Set<MapEntry> getSubRecords(boolean equal,boolean lessThan,long searchedValue){
  MultiResultSet results=new MultiResultSet(recordValues);
  indexStore.getSubRecords(results,equal,lessThan,searchedValue);
  return results;
}

Fixed version (ground truth):
public Set<MapEntry> getSubRecords(boolean equal,boolean lessThan,Long searchedValue){
  MultiResultSet results=new MultiResultSet(recordValues);
  indexStore.getSubRecords(results,equal,lessThan,searchedValue);
  return results;
}