nus-yam/ex-repair huggingface dataset:
Program: 50599
Project: 50599
Buggy source:
public static Transaction getTransaction(){
  if (!inited)   init();
  ThreadContext threadContext=ThreadContext.get();
  Transaction txn=threadContext.txn;
  if (txn == null)   txn=threadContext.getTransaction();
  return txn;
}

Fixed version (ground truth):
public static Transaction getTransaction(){
  initialChecks();
  ThreadContext threadContext=ThreadContext.get();
  Transaction txn=threadContext.txn;
  if (txn == null)   txn=threadContext.getTransaction();
  return txn;
}
Program: 50600
Project: 50600
Buggy source:
public MapEntry getMapEntry(Object key){
  check(key);
  MGetMapEntry mgetMapEntry=ConcurrentMapManager.get().new MGetMapEntry();
  return mgetMapEntry.get(name,key);
}

Fixed version (ground truth):
public MapEntry getMapEntry(Object key){
  checkInputObject(key);
  MGetMapEntry mgetMapEntry=ConcurrentMapManager.get().new MGetMapEntry();
  return mgetMapEntry.get(name,key);
}
Program: 50601
Project: 50601
Buggy source:
public Object putIfAbsent(Object key,Object value){
  check(key);
  check(value);
  MPut mput=ThreadContext.get().getMPut();
  return mput.putIfAbsent(name,key,value,-1);
}

Fixed version (ground truth):
public Object putIfAbsent(Object key,Object value){
  checkInputObject(key);
  checkInputObject(value);
  MPut mput=ThreadContext.get().getMPut();
  return mput.putIfAbsent(name,key,value,-1);
}
Program: 50602
Project: 50602
Buggy source:
public static void shutdown(){
  if (dataMonitor != null) {
    dataMonitor=null;
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  Set<ObjectName> entries;
  try {
    entries=mbs.queryNames(new ObjectName(MBeanBuilder.NAME_DOMAIN + "String_Node_Str"),null);
    for (    ObjectName name : entries) {
      mbs.unregisterMBean(name);
    }
  }
 catch (  Exception e) {
    logger.log(Level.FINE,"String_Node_Str",e);
  }
  if (statCollectors != null) {
    statCollectors.shutdownNow();
  }
}

Fixed version (ground truth):
public static void shutdown(){
  if (dataMonitor != null) {
    dataMonitor=null;
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  Set<ObjectName> entries;
  try {
    entries=mbs.queryNames(new ObjectName(MBeanBuilder.NAME_DOMAIN + "String_Node_Str"),null);
    for (    ObjectName name : entries) {
      if (mbs.isRegistered(name)) {
        mbs.unregisterMBean(name);
      }
    }
  }
 catch (  Exception e) {
    logger.log(Level.FINE,"String_Node_Str",e);
  }
  if (statCollectors != null) {
    statCollectors.shutdownNow();
    statCollectors=null;
  }
}
Program: 50603
Project: 50603
Buggy source:
/** 
 * Register all the MBeans.
 */
public static void register(Cluster cluster){
  if (!("String_Node_Str".equalsIgnoreCase(System.getProperty(ENABLE_JMX)) || System.getProperties().containsKey("String_Node_Str"))) {
    return;
  }
  logger.log(Level.INFO,"String_Node_Str");
  if (showDetails()) {
    if (statCollectors == null) {
      statCollectors=new ScheduledThreadPoolExecutor(4);
    }
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  try {
    ClusterMBean clusterMBean=new ClusterMBean(cluster);
    mbs.registerMBean(clusterMBean,clusterMBean.getObjectName());
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
    return;
  }
  try {
    if (dataMonitor == null) {
      dataMonitor=new DataMBean();
    }
    mbs.registerMBean(dataMonitor,null);
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Register all the MBeans.
 */
public static void register(Cluster cluster){
  if (!("String_Node_Str".equalsIgnoreCase(System.getProperty(ENABLE_JMX)) || System.getProperties().containsKey("String_Node_Str"))) {
    return;
  }
  logger.log(Level.INFO,"String_Node_Str");
  if (showDetails()) {
    if (statCollectors == null) {
      statCollectors=new ScheduledThreadPoolExecutor(2);
    }
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  try {
    ClusterMBean clusterMBean=new ClusterMBean(cluster);
    mbs.registerMBean(clusterMBean,clusterMBean.getObjectName());
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
    return;
  }
  try {
    if (dataMonitor == null) {
      dataMonitor=new DataMBean();
    }
    mbs.registerMBean(dataMonitor,null);
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
  }
}
Program: 50605
Project: 50605
Buggy source:
protected Address getTarget(){
  Address target=null;
  if (innerFutureTask.getKey() != null) {
    Data keyData=null;
    try {
      keyData=ThreadContext.get().toData(innerFutureTask.getKey());
    }
 catch (    final Exception e) {
      e.printStackTrace();
    }
    target=getKeyOwner(keyData);
  }
 else   if (innerFutureTask.getMember() != null) {
    final Object mem=innerFutureTask.getMember();
    if (mem instanceof ClusterMember) {
      final ClusterMember clusterMember=(ClusterMember)mem;
      target=clusterMember.getAddress();
    }
 else     if (mem instanceof MemberImpl) {
      target=((MemberImpl)mem).getAddress();
    }
    if (DEBUG)     log("String_Node_Str" + target);
  }
 else {
    Set<Member> members=Node.get().getClusterImpl().getMembers();
    final int random=(int)(Math.random() * 1000);
    final int randomIndex=random % members.size();
    ClusterMember randomClusterMember=(ClusterMember)members.toArray()[randomIndex];
    target=randomClusterMember.getAddress();
    randomTarget=target;
  }
  if (target == null)   return thisAddress;
 else   return target;
}

Fixed version (ground truth):
protected Address getTarget(){
  Address target=null;
  if (innerFutureTask.getKey() != null) {
    Data keyData=null;
    try {
      keyData=ThreadContext.get().toData(innerFutureTask.getKey());
    }
 catch (    final Exception e) {
      e.printStackTrace();
    }
    target=getKeyOwner(keyData);
  }
 else   if (innerFutureTask.getMember() != null) {
    final MemberImpl mem=(MemberImpl)innerFutureTask.getMember();
    target=mem.getAddress();
    if (DEBUG)     log("String_Node_Str" + target);
  }
 else {
    Set<Member> members=Node.get().getClusterImpl().getMembers();
    final int random=(int)(Math.random() * 1000);
    final int randomIndex=random % members.size();
    ClusterMember randomClusterMember=(ClusterMember)members.toArray()[randomIndex];
    target=randomClusterMember.getAddress();
    randomTarget=target;
  }
  if (target == null)   return thisAddress;
 else   return target;
}
Program: 50606
Project: 50606
Buggy source:
void handleMemberLeft(final Member member){
  boolean found=false;
  final ClusterMember clusterMember=(ClusterMember)member;
  if (innerFutureTask.getKey() != null) {
    final Data keyData=toData(innerFutureTask.getKey());
    final Address target=getKeyOwner(keyData);
    if (clusterMember.getAddress().equals(target)) {
      found=true;
    }
  }
 else   if (innerFutureTask.getMember() != null) {
    final Member target=innerFutureTask.getMember();
    if (target instanceof ClusterMember) {
      if (target.equals(member)) {
        found=true;
      }
    }
 else {
      if (((MemberImpl)target).getAddress().equals(clusterMember.getAddress())) {
        found=true;
      }
    }
  }
 else   if (innerFutureTask.getMembers() != null) {
    final Set<Member> members=innerFutureTask.getMembers();
    for (    final Member targetMember : members) {
      if (member.equals(targetMember)) {
        found=true;
      }
    }
  }
 else {
    if (clusterMember.getAddress().equals(randomTarget)) {
      found=true;
    }
  }
  if (!found)   return;
  innerFutureTask.innerSetMemberLeft(member);
  handleStreamResponse(OBJECT_DONE);
}

Fixed version (ground truth):
void handleMemberLeft(final Member dead){
  boolean found=false;
  final MemberImpl deadMember=(MemberImpl)dead;
  if (innerFutureTask.getKey() != null) {
    final Data keyData=toData(innerFutureTask.getKey());
    final Address target=getKeyOwner(keyData);
    found=(deadMember.getAddress().equals(target));
  }
 else   if (innerFutureTask.getMember() != null) {
    final MemberImpl targetMember=(MemberImpl)innerFutureTask.getMember();
    found=(targetMember.getAddress().equals(deadMember.getAddress()));
  }
 else   if (innerFutureTask.getMembers() != null) {
    final Set<Member> members=innerFutureTask.getMembers();
    for (    final Member m : members) {
      MemberImpl targetMember=(MemberImpl)m;
      if (targetMember.getAddress().equals(deadMember.getAddress())) {
        found=true;
        break;
      }
    }
  }
 else {
    found=(deadMember.getAddress().equals(randomTarget));
  }
  if (found) {
    logger.log(Level.FINEST,"String_Node_Str" + dead);
    innerFutureTask.innerSetMemberLeft(dead);
    handleStreamResponse(OBJECT_MEMBER_LEFT);
    finalizeTask();
  }
}
Program: 50607
Project: 50607
Buggy source:
/** 
 * !! Called by multiple threads.
 */
public void handleStreamResponse(Object response){
  if (response == null)   response=OBJECT_NULL;
  if (response == OBJECT_DONE || response == OBJECT_CANCELLED) {
    responseQueue.add(response);
    finalizeTask();
  }
 else {
    final int resultCountNow=resultCount.incrementAndGet();
    if (resultCountNow >= expectedResultCount) {
      try {
        if (response != null)         responseQueue.add(response);
        responseQueue.add(OBJECT_DONE);
      }
 catch (      final Exception e) {
        e.printStackTrace();
      }
      finalizeTask();
    }
 else {
      responseQueue.add(response);
    }
  }
}

Fixed version (ground truth):
/** 
 * !! Called by multiple threads.
 */
public void handleStreamResponse(Object response){
  if (executionId == null)   return;
  if (response == null)   response=OBJECT_NULL;
  if (response == OBJECT_DONE || response == OBJECT_CANCELLED) {
    responseQueue.add(response);
    finalizeTask();
  }
 else {
    final int resultCountNow=resultCount.incrementAndGet();
    if (resultCountNow >= expectedResultCount) {
      try {
        if (response != null)         responseQueue.add(response);
        responseQueue.add(OBJECT_DONE);
      }
 catch (      final Exception e) {
        e.printStackTrace();
      }
      finalizeTask();
    }
 else {
      responseQueue.add(response);
    }
  }
}
Program: 50608
Project: 50608
Buggy source:
public static void main(String[] args){
  SortedHashMap m=new SortedHashMap(100,SortedHashMap.OrderingType.LRU);
  for (int i=0; i < 10; i++) {
    m.put(i,"String_Node_Str" + i);
  }
  m.get(0);
  m.get(4);
  SortedHashMap.moveToTop(m,7);
  Object[] values=m.values().toArray();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
  m.clear();
  values=m.values().toArray();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  SortedHashMap m=new SortedHashMap(100,SortedHashMap.OrderingType.HASH);
  List l=new ArrayList();
  l.add(100);
  l.add(101);
  for (int i=0; i < 10; i++) {
    l.add(i);
  }
  l.add(102);
  l.add(103);
  for (  Object o : l) {
    System.out.println("String_Node_Str" + o);
    m.put(o,o);
    SortedHashMap.touch(m,o,SortedHashMap.OrderingType.HASH);
  }
  Object[] values=m.values().toArray();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
}
Program: 50609
Project: 50609
Buggy source:
void touch(SortedHashMap<K,V> lm,OrderingType orderingType){
  if (orderingType != OrderingType.NONE) {
    lastAccess=System.currentTimeMillis();
    accessCount++;
    lm.modCount++;
    if (orderingType == OrderingType.LFU) {
      moveLFU(lm);
    }
 else     if (orderingType == OrderingType.LRU) {
      moveLRU(lm);
    }
 else     throw new RuntimeException("String_Node_Str" + lm.orderingType);
  }
}

Fixed version (ground truth):
void touch(SortedHashMap<K,V> lm,OrderingType orderingType){
  if (orderingType != OrderingType.NONE) {
    lastAccess=System.currentTimeMillis();
    accessCount++;
    lm.modCount++;
    if (orderingType == OrderingType.LFU) {
      moveLFU(lm);
    }
 else     if (orderingType == OrderingType.LRU) {
      moveLRU(lm);
    }
 else     if (orderingType == OrderingType.HASH) {
      moveHash(lm);
    }
 else     throw new RuntimeException("String_Node_Str" + lm.orderingType);
  }
}
Program: 50610
Project: 50610
Buggy source:
@Override public void doLocalOp(){
  if (isMigrating()) {
    setResult(OBJECT_REDO);
  }
 else {
    doLocalCall();
    setResult(request.response);
  }
}

Fixed version (ground truth):
public void doLocalOp(){
  if (isMigrationAware() && isMigrating()) {
    setResult(OBJECT_REDO);
  }
 else {
    request.attachment=TargetAwareOp.this;
    request.local=true;
    ((RequestHandler)getPacketProcessor(request.operation)).handle(request);
  }
}
Program: 50611
Project: 50611
Buggy source:
void joinReset(){
  joinInProgress=false;
  setJoins.clear();
  timeToStartJoin=System.currentTimeMillis() + waitTimeBeforeJoin + 1000;
}

Fixed version (ground truth):
void joinReset(){
  joinInProgress=false;
  setJoins.clear();
  timeToStartJoin=System.currentTimeMillis() + WAIT_SECONDS_BEFORE_JOIN + 1000;
}
Program: 50613
Project: 50613
Buggy source:
void handleJoinRequest(JoinRequest joinRequest){
  logger.log(Level.FINEST,joinInProgress + "String_Node_Str" + joinRequest);
  if (getMember(joinRequest.address) != null)   return;
  if (DEBUG) {
  }
  Connection conn=joinRequest.getConnection();
  if (!Config.get().getNetworkConfig().getJoin().getMulticastConfig().isEnabled()) {
    if (Node.get().getMasterAddress() != null && !isMaster()) {
      sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
    }
  }
  if (isMaster()) {
    if (joinRequest.to != null && !joinRequest.to.equals(thisAddress)) {
      sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
      return;
    }
    Address newAddress=joinRequest.address;
    if (!joinInProgress) {
      MemberInfo newMemberInfo=new MemberInfo(newAddress,joinRequest.nodeType);
      if (setJoins.add(newMemberInfo)) {
        sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
        timeToStartJoin=System.currentTimeMillis() + waitTimeBeforeJoin;
      }
 else {
        if (System.currentTimeMillis() > timeToStartJoin) {
          startJoin();
        }
      }
    }
  }
}

Fixed version (ground truth):
void handleJoinRequest(JoinRequest joinRequest){
  logger.log(Level.FINEST,joinInProgress + "String_Node_Str" + joinRequest);
  if (getMember(joinRequest.address) != null)   return;
  if (DEBUG) {
  }
  Connection conn=joinRequest.getConnection();
  if (!Config.get().getNetworkConfig().getJoin().getMulticastConfig().isEnabled()) {
    if (Node.get().getMasterAddress() != null && !isMaster()) {
      sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
    }
  }
  if (isMaster()) {
    if (joinRequest.to != null && !joinRequest.to.equals(thisAddress)) {
      sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
      return;
    }
    Address newAddress=joinRequest.address;
    if (!joinInProgress) {
      MemberInfo newMemberInfo=new MemberInfo(newAddress,joinRequest.nodeType);
      if (setJoins.add(newMemberInfo)) {
        sendProcessableTo(new Master(Node.get().getMasterAddress()),conn);
        timeToStartJoin=System.currentTimeMillis() + (WAIT_SECONDS_BEFORE_JOIN * 1000L);
      }
 else {
        if (System.currentTimeMillis() > timeToStartJoin) {
          startJoin();
        }
      }
    }
  }
}
Program: 50614
Project: 50614
Buggy source:
public static void main(String[] args){
  SortedHashMap m=new SortedHashMap(100,SortedHashMap.OrderingType.LRU);
  for (int i=0; i < 10; i++) {
    m.put(i,"String_Node_Str" + i);
  }
  m.get(0);
  m.get(4);
  SortedHashMap.moveToTop(m,7);
  Collection values=m.values();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  SortedHashMap m=new SortedHashMap(100,SortedHashMap.OrderingType.LRU);
  for (int i=0; i < 10; i++) {
    m.put(i,"String_Node_Str" + i);
  }
  m.get(0);
  m.get(4);
  SortedHashMap.moveToTop(m,7);
  Object[] values=m.values().toArray();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
  m.clear();
  values=m.values().toArray();
  for (  Object o : values) {
    System.out.println("String_Node_Str" + o);
  }
}
Program: 50616
Project: 50616
Buggy source:
public boolean backup(Request req){
  Record record=getRecord(req.key);
  if (record != null) {
    if (req.version > record.version + 1) {
      Request reqCopy=new Request();
      reqCopy.setFromRequest(req,true);
      req.key=null;
      req.value=null;
      record.addBackupOp(new VersionedBackupOp(reqCopy));
      return true;
    }
 else     if (req.version <= record.version) {
      return false;
    }
  }
  doBackup(req);
  if (record != null) {
    record.version=req.version;
    record.runBackupOps();
  }
  return true;
}

Fixed version (ground truth):
public boolean backup(Request req){
  if (req.key == null || req.key.size() == 0) {
    throw new RuntimeException("String_Node_Str" + req.key);
  }
  Record record=getRecord(req.key);
  if (record != null) {
    if (req.version > record.version + 1) {
      Request reqCopy=new Request();
      reqCopy.setFromRequest(req,true);
      req.key=null;
      req.value=null;
      record.addBackupOp(new VersionedBackupOp(reqCopy));
      return true;
    }
 else     if (req.version <= record.version) {
      return false;
    }
  }
  doBackup(req);
  if (record != null) {
    record.version=req.version;
    record.runBackupOps();
  }
  return true;
}
Program: 50619
Project: 50619
Buggy source:
public boolean migrate(Record record){
  copyRecordToRequest(record,request,true);
  if (request.key == null)   throw new RuntimeException("String_Node_Str");
  request.operation=CONCURRENT_MAP_MIGRATE_RECORD;
  doOp();
  boolean result=getResultAsBoolean();
  backup(CONCURRENT_MAP_BACKUP_PUT);
  return result;
}

Fixed version (ground truth):
public boolean migrate(Record record){
  copyRecordToRequest(record,request,true);
  if (request.key == null)   throw new RuntimeException("String_Node_Str" + request.redoCount);
  request.operation=CONCURRENT_MAP_MIGRATE_RECORD;
  doOp();
  boolean result=getResultAsBoolean();
  backup(CONCURRENT_MAP_BACKUP_PUT);
  return result;
}
Program: 50621
Project: 50621
Buggy source:
Record createNewRecord(Data key,Data value){
  int blockId=getBlockId(key);
  Record rec=new Record(name,blockId,key,value,ttl);
  Block ownerBlock=getOrCreateBlock(blockId);
  if (thisAddress.equals(ownerBlock.getRealOwner())) {
    ownedEntryCount++;
  }
  rec.owner=ownerBlock.owner;
  mapRecords.put(key,rec);
  if (evictionPolicy != OrderingType.NONE) {
    if (maxSize != Integer.MAX_VALUE) {
      int limitSize=(maxSize / lsMembers.size());
      if (ownedEntryCount > limitSize) {
        startEviction();
      }
    }
  }
  return rec;
}

Fixed version (ground truth):
Record createNewRecord(Data key,Data value){
  if (key == null || key.size() == 0) {
    throw new RuntimeException("String_Node_Str" + key);
  }
  int blockId=getBlockId(key);
  Record rec=new Record(name,blockId,key,value,ttl);
  Block ownerBlock=getOrCreateBlock(blockId);
  if (thisAddress.equals(ownerBlock.getRealOwner())) {
    ownedEntryCount++;
  }
  rec.owner=ownerBlock.owner;
  mapRecords.put(key,rec);
  if (evictionPolicy != OrderingType.NONE) {
    if (maxSize != Integer.MAX_VALUE) {
      int limitSize=(maxSize / lsMembers.size());
      if (ownedEntryCount > limitSize) {
        startEviction();
      }
    }
  }
  return rec;
}
Program: 50622
Project: 50622
Buggy source:
public void returnResponse(Request request){
  if (request.local) {
    final TargetAwareOp targetAwareOp=(TargetAwareOp)request.attachment;
    targetAwareOp.setResult(request.response);
  }
 else {
    Packet packet=obtainPacket();
    request.setPacket(packet);
    packet.operation=ClusterOperation.RESPONSE;
    packet.responseType=RESPONSE_SUCCESS;
    System.out.println("String_Node_Str" + request.value);
    if (request.value != null) {
      doSet(request.value,packet.value);
    }
    if (request.response == OBJECT_REDO) {
      packet.responseType=RESPONSE_REDO;
    }
 else     if (request.response != null) {
      if (request.response instanceof Boolean) {
        if (request.response == Boolean.FALSE) {
          packet.responseType=RESPONSE_FAILURE;
        }
      }
 else {
        Data data=null;
        if (request.response instanceof Data) {
          data=(Data)request.response;
        }
 else {
          data=toData(request.response);
        }
        if (data != null && data.size() > 0) {
          doSet(data,packet.value);
        }
      }
    }
    sendResponse(packet,request.caller);
    request.reset();
  }
}

Fixed version (ground truth):
public void returnResponse(Request request){
  if (request.local) {
    final TargetAwareOp targetAwareOp=(TargetAwareOp)request.attachment;
    targetAwareOp.setResult(request.response);
  }
 else {
    Packet packet=obtainPacket();
    request.setPacket(packet);
    packet.operation=ClusterOperation.RESPONSE;
    packet.responseType=RESPONSE_SUCCESS;
    if (request.value != null) {
      doSet(request.value,packet.value);
    }
    if (request.response == OBJECT_REDO) {
      packet.responseType=RESPONSE_REDO;
    }
 else     if (request.response != null) {
      if (request.response instanceof Boolean) {
        if (request.response == Boolean.FALSE) {
          packet.responseType=RESPONSE_FAILURE;
        }
      }
 else {
        Data data=null;
        if (request.response instanceof Data) {
          data=(Data)request.response;
        }
 else {
          data=toData(request.response);
        }
        if (data != null && data.size() > 0) {
          doSet(data,packet.value);
        }
      }
    }
    sendResponse(packet,request.caller);
    request.reset();
  }
}
Program: 50623
Project: 50623
Buggy source:
public void handle(Request request){
  if (shouldSchedule(request)) {
    if (request.hasEnoughTimeToSchedule()) {
      Record record=ensureRecord(request);
      request.scheduled=true;
      record.addScheduledAction(new ScheduledAction(request){
        @Override public boolean consume(){
          handle(request);
          return true;
        }
      }
);
    }
 else {
      onNoTimeToSchedule(request);
    }
    return;
  }
  if (shouldExecuteStore(request)) {
    executeLoadStore(request);
    return;
  }
  doOperation(request);
  returnResponse(request);
}

Fixed version (ground truth):
public void handle(Request request){
  if (shouldSchedule(request)) {
    if (request.hasEnoughTimeToSchedule()) {
      schedule(request);
    }
 else {
      onNoTimeToSchedule(request);
    }
    return;
  }
  if (shouldExecuteStore(request)) {
    executeLoadStore(request);
    return;
  }
  doOperation(request);
  returnResponse(request);
}
Program: 50624
Project: 50624
Buggy source:
public void addScheduledAction(ScheduledAction scheduledAction){
  if (lsScheduledActions == null)   lsScheduledActions=new ArrayList<ScheduledAction>(1);
  lsScheduledActions.add(scheduledAction);
  ClusterManager.get().registerScheduledAction(scheduledAction);
  if (DEBUG) {
    log("String_Node_Str" + scheduledAction);
  }
}

Fixed version (ground truth):
public void addScheduledAction(ScheduledAction scheduledAction){
  if (lsScheduledActions == null) {
    lsScheduledActions=new ArrayList<ScheduledAction>(1);
  }
  lsScheduledActions.add(scheduledAction);
  ClusterManager.get().registerScheduledAction(scheduledAction);
  logger.log(Level.FINEST,scheduledAction.request.operation + "String_Node_Str" + scheduledAction);
}
Program: 50625
Project: 50625
Buggy source:
public void onExpire(){
  request.response=Boolean.FALSE;
  returnScheduledAsBoolean(request);
}

Fixed version (ground truth):
@Override public void onExpire(){
  onNoTimeToSchedule(request);
}
Program: 50627
Project: 50627
Buggy source:
public ResponseQueueCall(final boolean limited){
  if (limited) {
    responses=new ArrayBlockingQueue(1);
  }
 else {
    responses=new LinkedBlockingQueue();
  }
}

Fixed version (ground truth):
public ResponseQueueCall(){
}
Program: 50628
Project: 50628
Buggy source:
public void syncForDead(Address deadAddress){
  if (deadAddress.equals(thisAddress))   return;
  for (  Block block : blocks) {
    if (block != null) {
      if (deadAddress.equals(block.owner)) {
        MemberImpl member=getNextMemberBeforeSync(block.owner,true,1);
        block.owner=(member == null) ? thisAddress : member.getAddress();
      }
      if (block.migrationAddress != null) {
        if (deadAddress.equals(block.migrationAddress)) {
          MemberImpl member=getNextMemberBeforeSync(block.migrationAddress,true,1);
          block.migrationAddress=(member == null) ? thisAddress : member.getAddress();
        }
      }
    }
  }
  Collection<CMap> cmaps=maps.values();
  for (  CMap map : cmaps) {
    Collection<Record> records=map.mapRecords.values();
    for (    Record record : records) {
      record.onDisconnect(deadAddress);
    }
  }
  doResetRecords();
}

Fixed version (ground truth):
public void syncForDead(Address deadAddress){
  if (deadAddress.equals(thisAddress))   return;
  for (  Block block : blocks) {
    if (block != null) {
      if (deadAddress.equals(block.owner)) {
        MemberImpl member=getNextMemberBeforeSync(block.owner,true,1);
        if (member == null) {
          if (!isSuperClient()) {
            block.owner=thisAddress;
          }
 else {
            block.owner=null;
          }
        }
 else {
          if (!deadAddress.equals(member.getAddress())) {
            block.owner=member.getAddress();
          }
 else {
            block.owner=null;
          }
        }
      }
      if (block.migrationAddress != null) {
        if (deadAddress.equals(block.migrationAddress)) {
          MemberImpl member=getNextMemberBeforeSync(block.migrationAddress,true,1);
          if (member == null) {
            if (!isSuperClient()) {
              block.migrationAddress=thisAddress;
            }
 else {
              block.migrationAddress=null;
            }
          }
 else {
            if (!deadAddress.equals(member.getAddress())) {
              block.migrationAddress=member.getAddress();
            }
 else {
              block.migrationAddress=null;
            }
          }
        }
      }
    }
  }
  Collection<CMap> cmaps=maps.values();
  for (  CMap map : cmaps) {
    Collection<Record> records=map.mapRecords.values();
    for (    Record record : records) {
      record.onDisconnect(deadAddress);
    }
  }
  if (isMaster() && isSuperClient()) {
    syncForAdd();
  }
 else {
    doResetRecords();
  }
}
Program: 50629
Project: 50629
Buggy source:
void printBlocks(){
  if (true)   return;
  if (DEBUG)   log("String_Node_Str");
  for (int i=0; i < BLOCK_COUNT; i++) {
    if (DEBUG)     log(blocks[i]);
  }
  Collection<CMap> cmaps=maps.values();
  for (  CMap cmap : cmaps) {
    if (DEBUG)     log(cmap);
  }
  if (DEBUG)   log("String_Node_Str");
}

Fixed version (ground truth):
void printBlocks(){
  logger.log(Level.FINEST,"String_Node_Str");
  for (int i=0; i < BLOCK_COUNT; i++) {
    logger.log(Level.FINEST,String.valueOf(blocks[i]));
  }
  logger.log(Level.FINEST,"String_Node_Str");
}
Program: 50631
Project: 50631
Buggy source:
public static void shutdown(){
  if (dataMonitor != null) {
    dataMonitor=null;
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  Set<ObjectName> entries;
  try {
    entries=mbs.queryNames(new ObjectName(MBeanBuilder.NAME_DOMAIN + "String_Node_Str"),null);
    for (    ObjectName name : entries) {
      mbs.unregisterMBean(name);
    }
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,"String_Node_Str",e);
  }
  if (statCollectors != null) {
    statCollectors.shutdownNow();
  }
}

Fixed version (ground truth):
public static void shutdown(){
  if (dataMonitor != null) {
    dataMonitor=null;
  }
  MBeanServer mbs=ManagementFactory.getPlatformMBeanServer();
  Set<ObjectName> entries;
  try {
    entries=mbs.queryNames(new ObjectName(MBeanBuilder.NAME_DOMAIN + "String_Node_Str"),null);
    for (    ObjectName name : entries) {
      mbs.unregisterMBean(name);
    }
  }
 catch (  Exception e) {
    logger.log(Level.FINE,"String_Node_Str",e);
  }
  if (statCollectors != null) {
    statCollectors.shutdownNow();
  }
}
Program: 50632
Project: 50632
Buggy source:
public void sendProcessableTo(RemotelyProcessable rp,Connection conn){
  Data value=ThreadContext.get().toData(rp);
  Packet packet=obtainPacket();
  try {
    packet.set("String_Node_Str",ClusterOperation.REMOTELY_PROCESS,null,value);
    boolean sent=send(packet,conn);
    if (!sent) {
      packet.returnToContainer();
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void sendProcessableTo(RemotelyProcessable rp,Connection conn){
  Data value=ThreadContext.get().toData(rp);
  Packet packet=obtainPacket();
  packet.set("String_Node_Str",ClusterOperation.REMOTELY_PROCESS,null,value);
  boolean sent=send(packet,conn);
  if (!sent) {
    packet.returnToContainer();
  }
}
Program: 50633
Project: 50633
Buggy source:
public void sendFullMessage(Block block){
  try {
    Packet packet=ThreadContext.get().getPacketPool().obtain();
    packet.set(block.name,ClusterOperation.BLOCKING_QUEUE_FULL_BLOCK,null,null);
    packet.blockId=block.blockId;
    Address master=getMasterAddress();
    boolean sent=send(packet,master);
    if (!sent)     packet.returnToContainer();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void sendFullMessage(Block block){
  Packet packet=ThreadContext.get().getPacketPool().obtain();
  packet.set(block.name,ClusterOperation.BLOCKING_QUEUE_FULL_BLOCK,null,null);
  packet.blockId=block.blockId;
  Address master=getMasterAddress();
  boolean sent=send(packet,master);
  if (!sent)   packet.returnToContainer();
}
Program: 50634
Project: 50634
Buggy source:
public void process(){
  try {
    if (key != null) {
      Address owner=ConcurrentMapManager.get().getKeyOwner(key);
      if (owner.equals(thisAddress)) {
        handleListenerRegisterations(add,name,key,thisAddress,includeValue);
      }
 else {
        Packet packet=obtainPacket();
        packet.set(name,packetProcess,key,null);
        packet.longValue=(includeValue) ? 1 : 0;
        boolean sent=send(packet,owner);
        if (!sent) {
          packet.returnToContainer();
        }
      }
    }
 else {
      for (      MemberImpl member : lsMembers) {
        if (member.localMember()) {
          handleListenerRegisterations(add,name,key,thisAddress,includeValue);
        }
 else {
          sendAddRemoveListener(member.getAddress(),add,name,key,includeValue);
        }
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void process(){
  if (key != null) {
    Address owner=ConcurrentMapManager.get().getKeyOwner(key);
    if (owner.equals(thisAddress)) {
      handleListenerRegisterations(add,name,key,thisAddress,includeValue);
    }
 else {
      Packet packet=obtainPacket();
      packet.set(name,packetProcess,key,null);
      packet.longValue=(includeValue) ? 1 : 0;
      boolean sent=send(packet,owner);
      if (!sent) {
        packet.returnToContainer();
      }
    }
  }
 else {
    for (    MemberImpl member : lsMembers) {
      if (member.localMember()) {
        handleListenerRegisterations(add,name,key,thisAddress,includeValue);
      }
 else {
        sendAddRemoveListener(member.getAddress(),add,name,key,includeValue);
      }
    }
  }
}
Program: 50635
Project: 50635
Buggy source:
private void registerListener(String name,Object key,boolean add,boolean includeValue){
  Data dataKey=null;
  if (key != null) {
    try {
      dataKey=ThreadContext.get().toData(key);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  enqueueAndReturn(new ListenerRegistrationProcess(name,dataKey,add,includeValue));
}

Fixed version (ground truth):
private void registerListener(String name,Object key,boolean add,boolean includeValue){
  Data dataKey=null;
  if (key != null) {
    dataKey=ThreadContext.get().toData(key);
  }
  enqueueAndReturn(new ListenerRegistrationProcess(name,dataKey,add,includeValue));
}
Program: 50636
Project: 50636
Buggy source:
public void syncForAdd(Address newAddress){
  for (  ListenerItem listenerItem : listeners) {
    Data dataKey=null;
    if (listenerItem.key != null) {
      try {
        dataKey=ThreadContext.get().toData(listenerItem.key);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    sendAddRemoveListener(newAddress,true,listenerItem.name,dataKey,listenerItem.includeValue);
  }
}

Fixed version (ground truth):
public void syncForAdd(Address newAddress){
  for (  ListenerItem listenerItem : listeners) {
    Data dataKey=null;
    if (listenerItem.key != null) {
      dataKey=ThreadContext.get().toData(listenerItem.key);
    }
    sendAddRemoveListener(newAddress,true,listenerItem.name,dataKey,listenerItem.includeValue);
  }
}
Program: 50637
Project: 50637
Buggy source:
void sendAddRemoveListener(Address toAddress,boolean add,String name,Data key,boolean includeValue){
  Packet packet=obtainPacket();
  try {
    packet.set(name,(add) ? ClusterOperation.ADD_LISTENER : ClusterOperation.REMOVE_LISTENER,key,null);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  packet.longValue=(includeValue) ? 1 : 0;
  boolean sent=send(packet,toAddress);
  if (!sent) {
    packet.returnToContainer();
  }
}

Fixed version (ground truth):
void sendAddRemoveListener(Address toAddress,boolean add,String name,Data key,boolean includeValue){
  Packet packet=obtainPacket();
  packet.set(name,(add) ? ClusterOperation.ADD_LISTENER : ClusterOperation.REMOVE_LISTENER,key,null);
  packet.longValue=(includeValue) ? 1 : 0;
  boolean sent=send(packet,toAddress);
  if (!sent) {
    packet.returnToContainer();
  }
}
Program: 50638
Project: 50638
Buggy source:
public void set(String name,ClusterOperation operation,Object objKey,Object objValue) throws Exception {
  this.threadId=Thread.currentThread().hashCode();
  this.name=name;
  this.operation=operation;
  if (objKey != null) {
    key=ThreadContext.get().toData(objKey);
  }
  if (objValue != null) {
    value=ThreadContext.get().toData(objValue);
  }
}

Fixed version (ground truth):
public void set(String name,ClusterOperation operation,Object objKey,Object objValue){
  this.threadId=Thread.currentThread().hashCode();
  this.name=name;
  this.operation=operation;
  if (objKey != null) {
    key=ThreadContext.get().toData(objKey);
  }
  if (objValue != null) {
    value=ThreadContext.get().toData(objValue);
  }
}
Program: 50639
Project: 50639
Buggy source:
public void setFromConnection(Connection conn){
  this.conn=conn;
  if (lockAddress == null)   lockAddress=conn.getEndPoint();
}

Fixed version (ground truth):
public void setFromConnection(Connection conn){
  this.conn=conn;
  if (lockAddress == null) {
    lockAddress=conn.getEndPoint();
  }
}
Program: 50640
Project: 50640
Buggy source:
@JMXAttribute("String_Node_Str") @JMXDescription("String_Node_Str") public String getConfigFileURL(){
  return Config.get().getConfigurationUrl().toString();
}

Fixed version (ground truth):
@JMXAttribute("String_Node_Str") @JMXDescription("String_Node_Str") public String getConfigFileURL(){
  File configurationFile=Config.get().getConfigurationFile();
  if (configurationFile != null) {
    return configurationFile.getAbsolutePath();
  }
  URL configurationUrl=Config.get().getConfigurationUrl();
  if (configurationUrl != null) {
    return configurationUrl.toString();
  }
  return null;
}
Program: 50641
Project: 50641
Buggy source:
public EntryEvent(Object source,int eventType,Object key,Object value){
  this(source);
  this.key=key;
  this.value=value;
  if (eventType == TYPE_REMOVED) {
    entryEventType=EntryEventType.REMOVED;
  }
 else   if (eventType == TYPE_UPDATED) {
    entryEventType=EntryEventType.UPDATED;
  }
}

Fixed version (ground truth):
public EntryEvent(Object source,int eventType,Object key,Object value){
  this(source);
  this.key=key;
  this.value=value;
  if (eventType == TYPE_REMOVED) {
    entryEventType=EntryEventType.REMOVED;
  }
 else   if (eventType == TYPE_UPDATED) {
    entryEventType=EntryEventType.UPDATED;
  }
 else   if (eventType == TYPE_EVICTED) {
    entryEventType=EntryEventType.EVICTED;
  }
}
Program: 50642
Project: 50642
Buggy source:
final boolean evict(Request req){
  Record record=getRecord(req.key);
  if (record != null && record.isEvictable()) {
    if (ownerForSure(record)) {
      removeRecord(req.key);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
final boolean evict(Request req){
  Record record=getRecord(req.key);
  if (record != null && record.isEvictable()) {
    if (ownerForSure(record)) {
      fireMapEvent(mapListeners,name,EntryEvent.TYPE_EVICTED,record.key,record.value,record.mapListeners);
      removeRecord(req.key);
      return true;
    }
  }
  return false;
}
Program: 50643
Project: 50643
Buggy source:
public void getEntries(Request request){
  Collection<Record> colRecords=mapRecords.values();
  Pairs pairs=new Pairs();
  long now=System.currentTimeMillis();
  for (  Record record : colRecords) {
    if (record.isValid(now)) {
      Block block=blocks[record.blockId];
      if (thisAddress.equals(block.owner)) {
        if (record.value != null || request.operation == CONCURRENT_MAP_ITERATE_KEYS_ALL) {
          pairs.addKeyValue(new KeyValue(record.key,null));
        }
 else         if (record.copyCount > 0) {
          for (int i=0; i < record.copyCount; i++) {
            pairs.addKeyValue(new KeyValue(record.key,null));
          }
        }
 else         if (record.lsValues != null) {
          int size=record.lsValues.size();
          if (size > 0) {
            if (request.operation == CONCURRENT_MAP_ITERATE_KEYS) {
              pairs.addKeyValue(new KeyValue(record.key,null));
            }
 else {
              for (int i=0; i < size; i++) {
                Data value=record.lsValues.get(i);
                pairs.addKeyValue(new KeyValue(record.key,value));
              }
            }
          }
        }
      }
    }
 else {
      if (!record.isEvictable()) {
        scheduleForEviction(record);
      }
    }
  }
  Data dataEntries=toData(pairs);
  request.longValue=pairs.size();
  request.response=dataEntries;
}

Fixed version (ground truth):
public void getEntries(Request request){
  Collection<Record> colRecords=mapRecords.values();
  Pairs pairs=new Pairs();
  long now=System.currentTimeMillis();
  for (  Record record : colRecords) {
    if (record.isValid(now)) {
      if (record.key == null || record.key.size() == 0) {
        throw new RuntimeException("String_Node_Str" + record.key);
      }
      Block block=blocks[record.blockId];
      if (thisAddress.equals(block.owner)) {
        if (record.value != null || request.operation == CONCURRENT_MAP_ITERATE_KEYS_ALL) {
          pairs.addKeyValue(new KeyValue(record.key,null));
        }
 else         if (record.copyCount > 0) {
          for (int i=0; i < record.copyCount; i++) {
            pairs.addKeyValue(new KeyValue(record.key,null));
          }
        }
 else         if (record.lsValues != null) {
          int size=record.lsValues.size();
          if (size > 0) {
            if (request.operation == CONCURRENT_MAP_ITERATE_KEYS) {
              pairs.addKeyValue(new KeyValue(record.key,null));
            }
 else {
              for (int i=0; i < size; i++) {
                Data value=record.lsValues.get(i);
                pairs.addKeyValue(new KeyValue(record.key,value));
              }
            }
          }
        }
      }
    }
 else {
      if (!record.isEvictable()) {
        scheduleForEviction(record);
      }
    }
  }
  Data dataEntries=toData(pairs);
  request.longValue=pairs.size();
  request.response=dataEntries;
}
Program: 50645
Project: 50645
Buggy source:
@Override public void postRegister(Boolean registrationDone){
  super.postRegister(registrationDone);
  if (!registrationDone) {
    return;
  }
  if (ManagementService.showDetails()) {
    listener=new EntryListener(){
      public void entryAdded(      EntryEvent event){
        addEntry(event.getKey());
      }
      public void entryRemoved(      EntryEvent event){
        removeEntry(event.getKey());
      }
      public void entryUpdated(      EntryEvent event){
      }
    }
;
    getManagedObject().addEntryListener(listener,false);
    for (    Object key : getManagedObject().keySet()) {
      addEntry(key);
    }
  }
}

Fixed version (ground truth):
@Override public void postRegister(Boolean registrationDone){
  super.postRegister(registrationDone);
  if (!registrationDone) {
    return;
  }
  if (ManagementService.showDetails()) {
    listener=new EntryListener(){
      public void entryAdded(      EntryEvent event){
        addEntry(event.getKey());
      }
      public void entryRemoved(      EntryEvent event){
        removeEntry(event.getKey());
      }
      public void entryUpdated(      EntryEvent event){
      }
      public void entryEvicted(      EntryEvent event){
        entryRemoved(event);
      }
    }
;
    getManagedObject().addEntryListener(listener,false);
    for (    Object key : getManagedObject().keySet()) {
      addEntry(key);
    }
  }
}
Program: 50646
Project: 50646
Buggy source:
@Test public void testMapEntryListener(){
  IMap<String,String> map=Hazelcast.getMap("String_Node_Str");
  map.addEntryListener(new EntryListener(){
    public void entryAdded(    EntryEvent event){
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
    }
    public void entryRemoved(    EntryEvent event){
      assertEquals("String_Node_Str",event.getKey());
      assertEquals("String_Node_Str",event.getValue());
    }
    public void entryUpdated(    EntryEvent event){
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
    }
  }
,true);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.remove("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testMapEntryListener(){
  IMap<String,String> map=Hazelcast.getMap("String_Node_Str");
  map.addEntryListener(new EntryListener(){
    public void entryAdded(    EntryEvent event){
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
    }
    public void entryRemoved(    EntryEvent event){
      assertEquals("String_Node_Str",event.getKey());
      assertEquals("String_Node_Str",event.getValue());
    }
    public void entryUpdated(    EntryEvent event){
      assertEquals("String_Node_Str",event.getValue());
      assertEquals("String_Node_Str",event.getKey());
    }
    public void entryEvicted(    EntryEvent event){
      entryRemoved(event);
    }
  }
,true);
  map.put("String_Node_Str","String_Node_Str");
  map.put("String_Node_Str","String_Node_Str");
  map.remove("String_Node_Str");
}
Program: 50647
Project: 50647
Buggy source:
public void connectionRemoved(Connection connection){
}

Fixed version (ground truth):
public void connectionRemoved(Connection connection){
  logger.log(Level.FINEST,"String_Node_Str" + connection.getEndPoint());
  if (!Node.get().joined()) {
    if (getMasterAddress() != null) {
      if (getMasterAddress().equals(connection.getEndPoint())) {
        Node.get().setMasterAddress(null);
      }
    }
  }
}
Program: 50648
Project: 50648
Buggy source:
public int getEventType(){
  return eventType;
}

Fixed version (ground truth):
public EntryEventType getEventType(){
  return entryEventType;
}
Program: 50649
Project: 50649
Buggy source:
@Override public Object getSource(){
  if (name.startsWith("String_Node_Str")) {
    return FactoryImpl.getProxy(name.substring(2));
  }
  return FactoryImpl.getProxy(name);
}

Fixed version (ground truth):
@Override public Object getSource(){
  return FactoryImpl.getProxyByName(name);
}
Program: 50650
Project: 50650
Buggy source:
public EntryEvent(Object source,int eventType,Object key,Object value){
  this(source);
  this.eventType=eventType;
  this.key=key;
  this.value=value;
}

Fixed version (ground truth):
public EntryEvent(Object source,int eventType,Object key,Object value){
  this(source);
  this.key=key;
  this.value=value;
  if (eventType == TYPE_REMOVED) {
    entryEventType=EntryEventType.REMOVED;
  }
 else   if (eventType == TYPE_UPDATED) {
    entryEventType=EntryEventType.UPDATED;
  }
}
Program: 50651
Project: 50651
Buggy source:
@Override public String toString(){
  String event=ADDED;
  if (eventType == TYPE_REMOVED) {
    event=REMOVED;
  }
 else   if (eventType == TYPE_UPDATED) {
    event=UPDATED;
  }
  return "String_Node_Str" + getSource() + "String_Node_Str"+ key+ "String_Node_Str"+ value+ "String_Node_Str"+ event;
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + getSource() + "String_Node_Str"+ key+ "String_Node_Str"+ value+ "String_Node_Str"+ entryEventType;
}
Program: 50652
Project: 50652
Buggy source:
public EventTask(final int eventType,final String name,final Data dataKey,final Data dataValue){
  super(name);
  this.eventType=eventType;
  this.dataKey=dataKey;
  this.dataValue=dataValue;
}

Fixed version (ground truth):
public EventTask(final int eventType,final String name,final Data dataKey,final Data dataValue){
  super(name,eventType,null,null);
  this.dataKey=dataKey;
  this.dataValue=dataValue;
}
Program: 50653
Project: 50653
Buggy source:
public static Map.Entry createSimpleEntry(final String name,final Object key,final Object value){
  return new Map.Entry(){
    public Object getKey(){
      return key;
    }
    public Object getValue(){
      return value;
    }
    public Object setValue(    Object newValue){
      return ((FactoryImpl.MProxy)FactoryImpl.getProxy(name)).put(key,newValue);
    }
    @Override public String toString(){
      return "String_Node_Str" + getKey() + "String_Node_Str"+ getValue();
    }
  }
;
}

Fixed version (ground truth):
public static Map.Entry createSimpleEntry(final String name,final Object key,final Object value){
  return new Map.Entry(){
    public Object getKey(){
      return key;
    }
    public Object getValue(){
      return value;
    }
    public Object setValue(    Object newValue){
      return ((FactoryImpl.MProxy)FactoryImpl.getProxyByName(name)).put(key,newValue);
    }
    @Override public String toString(){
      return "String_Node_Str" + getKey() + "String_Node_Str"+ getValue();
    }
  }
;
}
Program: 50654
Project: 50654
Buggy source:
public Object getValue(){
  if (objValue == null) {
    if (value != null) {
      objValue=toObject(value);
    }
 else {
      objValue=((FactoryImpl.IGetAwareProxy)FactoryImpl.getProxy(name)).get((key == null) ? getKey() : key);
    }
  }
  return objValue;
}

Fixed version (ground truth):
public Object getValue(){
  if (objValue == null) {
    if (value != null) {
      objValue=toObject(value);
    }
 else {
      objValue=((FactoryImpl.IGetAwareProxy)FactoryImpl.getProxyByName(name)).get((key == null) ? getKey() : key);
    }
  }
  return objValue;
}
Program: 50655
Project: 50655
Buggy source:
public Object setValue(Object newValue){
  if (name == null)   throw new UnsupportedOperationException();
  this.objValue=value;
  return ((FactoryImpl.MProxy)FactoryImpl.getProxy(name)).put(getKey(),newValue);
}

Fixed version (ground truth):
public Object setValue(Object newValue){
  if (name == null)   throw new UnsupportedOperationException();
  this.objValue=value;
  return ((FactoryImpl.MProxy)FactoryImpl.getProxyByName(name)).put(getKey(),newValue);
}