Program: 48441
Project: 48441
Buggy source:
protected Object getInternal(Data key){
  final MapService mapService=getService();
  final boolean nearCacheEnabled=mapConfig.isNearCacheEnabled();
  if (nearCacheEnabled) {
    Object cached=mapService.getFromNearCache(name,key);
    if (cached != null) {
      if (cached.equals(NearCache.NULL_OBJECT)) {
        cached=null;
      }
      mapService.interceptAfterGet(name,cached);
      return cached;
    }
  }
  NodeEngine nodeEngine=getNodeEngine();
  if (mapConfig.isReadBackupData()) {
    int backupCount=mapConfig.getTotalBackupCount();
    InternalPartitionService partitionService=mapService.getNodeEngine().getPartitionService();
    for (int i=0; i <= backupCount; i++) {
      int partitionId=partitionService.getPartitionId(key);
      InternalPartition partition=partitionService.getPartition(partitionId);
      if (nodeEngine.getThisAddress().equals(partition.getReplicaAddress(i))) {
        Object val=mapService.getPartitionContainer(partitionId).getRecordStore(name).get(key);
        if (val != null) {
          mapService.interceptAfterGet(name,val);
          return mapService.toData(val);
        }
      }
    }
  }
  GetOperation operation=new GetOperation(name,key);
  Data result=(Data)invokeOperation(key,operation);
  if (nearCacheEnabled) {
    int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
    if (!nodeEngine.getPartitionService().getPartitionOwner(partitionId).equals(nodeEngine.getClusterService().getThisAddress()) || mapConfig.getNearCacheConfig().isCacheLocalEntries()) {
      mapService.putNearCache(name,key,result);
    }
  }
  return result;
}

Fixed version (ground truth):
protected Object getInternal(Data key){
  final MapService mapService=getService();
  final boolean nearCacheEnabled=mapConfig.isNearCacheEnabled();
  if (nearCacheEnabled) {
    Object cached=mapService.getFromNearCache(name,key);
    if (cached != null) {
      if (NearCache.NULL_OBJECT.equals(cached)) {
        cached=null;
      }
      mapService.interceptAfterGet(name,cached);
      return cached;
    }
  }
  NodeEngine nodeEngine=getNodeEngine();
  if (mapConfig.isReadBackupData()) {
    int backupCount=mapConfig.getTotalBackupCount();
    InternalPartitionService partitionService=mapService.getNodeEngine().getPartitionService();
    for (int i=0; i <= backupCount; i++) {
      int partitionId=partitionService.getPartitionId(key);
      InternalPartition partition=partitionService.getPartition(partitionId);
      if (nodeEngine.getThisAddress().equals(partition.getReplicaAddress(i))) {
        Object val=mapService.getPartitionContainer(partitionId).getRecordStore(name).get(key);
        if (val != null) {
          mapService.interceptAfterGet(name,val);
          return mapService.toData(val);
        }
      }
    }
  }
  GetOperation operation=new GetOperation(name,key);
  Data result=(Data)invokeOperation(key,operation);
  if (nearCacheEnabled) {
    int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
    if (!nodeEngine.getPartitionService().getPartitionOwner(partitionId).equals(nodeEngine.getClusterService().getThisAddress()) || mapConfig.getNearCacheConfig().isCacheLocalEntries()) {
      mapService.putNearCache(name,key,result);
    }
  }
  return result;
}