nus-yam/ex-repair huggingface dataset:
Program: 48624
Project: 48624
Buggy source:
@Test(timeout=30000,expected=NullPointerException.class) public void testExceptionDistribution() throws Exception {
  Config config=buildConfig();
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance client=HazelcastClient.newHazelcastClient(null);
  IMap<Integer,Integer> m1=client.getMap(MAP_NAME);
  for (int i=0; i < 100; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=h1.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  ICompletableFuture<Map<String,List<Integer>>> future=job.mapper(new ExceptionThrowingMapper()).submit();
  try {
    Map<String,List<Integer>> result=future.get();
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw e;
  }
}

Fixed version (ground truth):
@Test(timeout=60000,expected=ExecutionException.class) public void testExceptionDistribution() throws Exception {
  Config config=buildConfig();
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance client=HazelcastClient.newHazelcastClient(null);
  IMap<Integer,Integer> m1=client.getMap(MAP_NAME);
  for (int i=0; i < 100; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=client.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  ICompletableFuture<Map<String,List<Integer>>> future=job.mapper(new ExceptionThrowingMapper()).submit();
  try {
    Map<String,List<Integer>> result=future.get();
  }
 catch (  Exception e) {
    e.printStackTrace();
    assertTrue(e.getCause() instanceof NullPointerException);
    throw e;
  }
}
Program: 48625
Project: 48625
Buggy source:
@Test(timeout=30000) public void testMapperReducerCollator() throws Exception {
  Config config=buildConfig();
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance client=HazelcastClient.newHazelcastClient(null);
  IMap<Integer,Integer> m1=client.getMap(MAP_NAME);
  for (int i=0; i < 100; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=client.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  ICompletableFuture<Integer> future=job.mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit(new TestCollator());
  int result=future.get();
  int expectedResult=0;
  for (int i=0; i < 100; i++) {
    expectedResult+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResult,result);
  }
}

Fixed version (ground truth):
@Test(timeout=60000) public void testMapperReducerCollator() throws Exception {
  Config config=buildConfig();
  HazelcastInstance h1=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h2=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance h3=Hazelcast.newHazelcastInstance(config);
  HazelcastInstance client=HazelcastClient.newHazelcastClient(null);
  IMap<Integer,Integer> m1=client.getMap(MAP_NAME);
  for (int i=0; i < 100; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=client.getJobTracker("String_Node_Str");
  Job<Integer,Integer> job=tracker.newJob(KeyValueSource.fromMap(m1));
  ICompletableFuture<Integer> future=job.mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit(new TestCollator());
  int result=future.get();
  int expectedResult=0;
  for (int i=0; i < 100; i++) {
    expectedResult+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResult,result);
  }
}
Program: 48627
Project: 48627
Buggy source:
public MultiMapKeyValueSource(String multiMapName){
  this.simpleEntry=null;
  this.multiMapName=multiMapName;
}

Fixed version (ground truth):
public MultiMapKeyValueSource(String multiMapName){
  this.multiMapName=multiMapName;
}
Program: 48628
Project: 48628
Buggy source:
NodeJobTracker(String name,JobTrackerConfig jobTrackerConfig,NodeEngine nodeEngine,MapReduceService mapReduceService){
  super(name,jobTrackerConfig,nodeEngine,mapReduceService);
  ExecutionService es=nodeEngine.getExecutionService();
  PartitionService ps=nodeEngine.getPartitionService();
  int maxThreadSize=jobTrackerConfig.getMaxThreadSize();
  if (maxThreadSize <= 0) {
    maxThreadSize=Runtime.getRuntime().availableProcessors();
  }
  int retryCount=jobTrackerConfig.getRetryCount();
  int queueSize=jobTrackerConfig.getQueueSize();
  if (queueSize <= 0) {
    queueSize=ps.getPartitionCount() * 2;
  }
  es.register(name,maxThreadSize,queueSize);
}

Fixed version (ground truth):
NodeJobTracker(String name,JobTrackerConfig jobTrackerConfig,NodeEngine nodeEngine,MapReduceService mapReduceService){
  super(name,jobTrackerConfig,nodeEngine,mapReduceService);
  ExecutionService es=nodeEngine.getExecutionService();
  PartitionService ps=nodeEngine.getPartitionService();
  int maxThreadSize=jobTrackerConfig.getMaxThreadSize();
  if (maxThreadSize <= 0) {
    maxThreadSize=Runtime.getRuntime().availableProcessors();
  }
  int retryCount=jobTrackerConfig.getRetryCount();
  int queueSize=jobTrackerConfig.getQueueSize();
  if (queueSize <= 0) {
    queueSize=ps.getPartitionCount() * 2;
  }
  try {
    String executorName=MapReduceUtil.buildExecutorName(name);
    es.register(executorName,maxThreadSize,queueSize);
  }
 catch (  Exception ignore) {
  }
}
Program: 48629
Project: 48629
Buggy source:
public JobSupervisor(JobTaskConfiguration configuration,AbstractJobTracker jobTracker,boolean ownerNode,MapReduceService mapReduceService){
  this.jobTracker=jobTracker;
  this.ownerNode=ownerNode;
  this.configuration=configuration;
  this.mapReduceService=mapReduceService;
  this.jobOwner=configuration.getJobOwner();
  this.executorService=mapReduceService.getExecutorService(configuration.getName());
  this.jobProcessInformation=new JobProcessInformationImpl(configuration.getNodeEngine().getPartitionService().getPartitionCount(),this);
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  jobTracker.registerReducerTask(new ReducerTask(name,jobId,this));
}

Fixed version (ground truth):
public JobSupervisor(JobTaskConfiguration configuration,AbstractJobTracker jobTracker,boolean ownerNode,MapReduceService mapReduceService){
  this.jobTracker=jobTracker;
  this.ownerNode=ownerNode;
  this.configuration=configuration;
  this.mapReduceService=mapReduceService;
  this.jobOwner=configuration.getJobOwner();
  this.executorService=mapReduceService.getExecutorService(configuration.getName());
  NodeEngine nodeEngine=configuration.getNodeEngine();
  if (configuration.getKeyValueSource() instanceof PartitionIdAware) {
    int partitionCount=nodeEngine.getPartitionService().getPartitionCount();
    this.jobProcessInformation=new JobProcessInformationImpl(partitionCount,this);
  }
 else {
    int partitionCount=nodeEngine.getClusterService().getMemberList().size();
    this.jobProcessInformation=new MemberAssigningJobProcessInformationImpl(partitionCount,this);
  }
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  jobTracker.registerReducerTask(new ReducerTask(name,jobId,this));
}
Program: 48630
Project: 48630
Buggy source:
public void process(){
  ExecutorService es=mapReduceService.getExecutorService(name);
  es.submit(new PartitionProcessor());
}

Fixed version (ground truth):
public void process(){
  ExecutorService es=mapReduceService.getExecutorService(name);
  if (keyValueSource instanceof PartitionIdAware) {
    es.submit(new PartitionProcessor());
  }
 else {
    es.submit(new SingleExecutionProcessor());
  }
}
Program: 48631
Project: 48631
Buggy source:
@Override public void run(){
  for (; ; ) {
    Integer partitionId=findNewPartitionProcessing();
    if (partitionId == null) {
      return;
    }
    if (partitionId == -1) {
      continue;
    }
    try {
      if (keyValueSource instanceof PartitionIdAware) {
        ((PartitionIdAware)keyValueSource).setPartitionId(partitionId);
      }
      keyValueSource.reset();
      keyValueSource.open(nodeEngine);
      processMapping(partitionId);
      keyValueSource.close();
    }
 catch (    IOException ignore) {
      ignore.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    RequestPartitionResult result=mapReduceService.processRequest(supervisor.getJobOwner(),new RequestMemberIdAssignment(name,jobId),name);
    if (result.getResultState() == NO_SUPERVISOR) {
      return;
    }
 else     if (result.getResultState() == NO_MORE_PARTITIONS) {
      return;
    }
    keyValueSource.reset();
    keyValueSource.open(nodeEngine);
    processMapping(result.getPartitionId());
    keyValueSource.close();
  }
 catch (  Exception ignore) {
    ignore.printStackTrace();
  }
}
Program: 48632
Project: 48632
Buggy source:
@Test public void testMapperReducerChunked() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(3);
  HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  HazelcastInstance h3=nodeFactory.newHazelcastInstance();
  IMap<Integer,Integer> m1=h1.getMap(MAP_NAME);
  for (int i=0; i < 10000; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=h1.getJobTracker("String_Node_Str");
  Job<Integer,Integer> task=tracker.newJob(KeyValueSource.fromMap(m1));
  CompletableFuture<Map<String,Integer>> future=task.chunkSize(10).mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit();
  Map<String,Integer> result=future.get();
  int[] expectedResults=new int[4];
  for (int i=0; i < 10000; i++) {
    int index=i % 4;
    expectedResults[index]+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResults[i],(int)result.get(String.valueOf(i)));
  }
}

Fixed version (ground truth):
@Test(timeout=60000) public void testMapperReducerChunked() throws Exception {
  TestHazelcastInstanceFactory nodeFactory=createHazelcastInstanceFactory(3);
  HazelcastInstance h1=nodeFactory.newHazelcastInstance();
  HazelcastInstance h2=nodeFactory.newHazelcastInstance();
  HazelcastInstance h3=nodeFactory.newHazelcastInstance();
  IMap<Integer,Integer> m1=h1.getMap(MAP_NAME);
  for (int i=0; i < 10000; i++) {
    m1.put(i,i);
  }
  JobTracker tracker=h1.getJobTracker("String_Node_Str");
  Job<Integer,Integer> task=tracker.newJob(KeyValueSource.fromMap(m1));
  CompletableFuture<Map<String,Integer>> future=task.chunkSize(10).mapper(new GroupingTestMapper()).reducer(new TestReducerFactory()).submit();
  Map<String,Integer> result=future.get();
  int[] expectedResults=new int[4];
  for (int i=0; i < 10000; i++) {
    int index=i % 4;
    expectedResults[index]+=i;
  }
  for (int i=0; i < 4; i++) {
    assertEquals(expectedResults[i],(int)result.get(String.valueOf(i)));
  }
}
Program: 48633
Project: 48633
Buggy source:
public boolean replaceIfSameInternal(Data key,Object oldValue,Data newValue){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  if (!getService().compare(name,oldValue,versionedValue.value))   return false;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,newValue,versionedValue.version),versionedValue.version));
  return true;
}

Fixed version (ground truth):
public boolean replaceIfSameInternal(Data key,Object oldValue,Data newValue){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (!getService().compare(name,oldValue,versionedValue.value))   return false;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,newValue,versionedValue.version),versionedValue.version));
  return true;
}
Program: 48634
Project: 48634
Buggy source:
public boolean removeIfSameInternal(Data key,Object value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  if (!getService().compare(name,versionedValue.value,value)) {
    return false;
  }
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnDeleteOperation(name,key,versionedValue.version),versionedValue.version));
  return true;
}

Fixed version (ground truth):
public boolean removeIfSameInternal(Data key,Object value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (!getService().compare(name,versionedValue.value,value)) {
    return false;
  }
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnDeleteOperation(name,key,versionedValue.version),versionedValue.version));
  return true;
}
Program: 48635
Project: 48635
Buggy source:
public Data replaceInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  if (versionedValue.value == null)   return null;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}

Fixed version (ground truth):
public Data replaceInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue.value == null)   return null;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}
Program: 48636
Project: 48636
Buggy source:
private VersionedValue lockAndGet(Data key,long timeout){
  final NodeEngine nodeEngine=getNodeEngine();
  TxnLockAndGetOperation operation=new TxnLockAndGetOperation(name,key,timeout,timeout);
  operation.setThreadId(ThreadUtil.getThreadId());
  try {
    int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
    Future<VersionedValue> f=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    return f.get();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
private VersionedValue lockAndGet(Data key,long timeout){
  VersionedValue versionedValue=valueMap.get(key);
  if (versionedValue != null) {
    return versionedValue;
  }
  final NodeEngine nodeEngine=getNodeEngine();
  TxnLockAndGetOperation operation=new TxnLockAndGetOperation(name,key,timeout,timeout);
  operation.setThreadId(ThreadUtil.getThreadId());
  try {
    int partitionId=nodeEngine.getPartitionService().getPartitionId(key);
    Future<VersionedValue> f=nodeEngine.getOperationService().invokeOnPartition(MapService.SERVICE_NAME,operation,partitionId);
    versionedValue=f.get();
    if (versionedValue == null) {
      throw new TransactionException("String_Node_Str" + getService().toObject(key));
    }
    valueMap.put(key,versionedValue);
    return versionedValue;
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 48637
Project: 48637
Buggy source:
public Data putInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}

Fixed version (ground truth):
public Data putInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}
Program: 48638
Project: 48638
Buggy source:
public Data removeInternal(Data key){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnDeleteOperation(name,key,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}

Fixed version (ground truth):
public Data removeInternal(Data key){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnDeleteOperation(name,key,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}
Program: 48639
Project: 48639
Buggy source:
public Data putIfAbsentInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue == null) {
    throw new TransactionException("String_Node_Str" + getService().toObject(key));
  }
  if (versionedValue.value != null)   return versionedValue.value;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}

Fixed version (ground truth):
public Data putIfAbsentInternal(Data key,Data value){
  VersionedValue versionedValue=lockAndGet(key,tx.getTimeoutMillis());
  if (versionedValue.value != null)   return versionedValue.value;
  tx.addTransactionLog(new MapTransactionLog(name,key,new TxnSetOperation(name,key,value,versionedValue.version),versionedValue.version));
  return versionedValue.value;
}
Program: 48643
Project: 48643
Buggy source:
public <R>R processRequest(Address address,RequestPartitionProcessing requestPartitionProcessing) throws ExecutionException, InterruptedException {
  Future<R> future=nodeEngine.getOperationService().invokeOnTarget(MapReduceService.SERVICE_NAME,requestPartitionProcessing,address);
  return future.get();
}

Fixed version (ground truth):
public <R>R processRequest(Address address,ProcessingOperation processingOperation) throws ExecutionException, InterruptedException {
  Future<R> future=nodeEngine.getOperationService().invokeOnTarget(MapReduceService.SERVICE_NAME,processingOperation,address);
  return future.get();
}
Program: 48644
Project: 48644
Buggy source:
@Override public void readData(ObjectDataInput in) throws IOException {
  super.readData(in);
  int size=in.readInt();
  chunk=new HashMap<KeyOut,Value>();
  for (int i=0; i < size; i++) {
    KeyOut key=in.readObject();
    Value value=in.readObject();
    chunk.put(key,value);
  }
}

Fixed version (ground truth):
@Override public void readData(ObjectDataInput in) throws IOException {
  super.readData(in);
  int size=in.readInt();
  chunk=new HashMap<KeyOut,Value>();
  for (int i=0; i < size; i++) {
    KeyOut key=in.readObject();
    Value value=in.readObject();
    chunk.put(key,value);
  }
  partitionId=in.readInt();
}
Program: 48645
Project: 48645
Buggy source:
public LastChunkNotification(Address address,String name,String jobId,Map<KeyOut,Value> chunk){
  super(address,name,jobId);
  this.chunk=chunk;
}

Fixed version (ground truth):
public LastChunkNotification(Address address,String name,String jobId,int partitionId,Map<KeyOut,Value> chunk){
  super(address,name,jobId);
  this.partitionId=partitionId;
  this.chunk=chunk;
}
Program: 48646
Project: 48646
Buggy source:
@Override public void writeData(ObjectDataOutput out) throws IOException {
  super.writeData(out);
  out.writeInt(chunk.size());
  for (  Map.Entry<KeyOut,Value> entry : chunk.entrySet()) {
    out.writeObject(entry.getKey());
    out.writeObject(entry.getValue());
  }
}

Fixed version (ground truth):
@Override public void writeData(ObjectDataOutput out) throws IOException {
  super.writeData(out);
  out.writeInt(chunk.size());
  for (  Map.Entry<KeyOut,Value> entry : chunk.entrySet()) {
    out.writeObject(entry.getKey());
    out.writeObject(entry.getValue());
  }
  out.writeInt(partitionId);
}
Program: 48647
Project: 48647
Buggy source:
public RequestPartitionProcessing(String name,String jobId,int partitionId){
  this.name=name;
  this.jobId=jobId;
  this.partitionId=partitionId;
}

Fixed version (ground truth):
public RequestPartitionProcessing(String name,String jobId,int partitionId){
  super(name,jobId);
  this.partitionId=partitionId;
}
Program: 48648
Project: 48648
Buggy source:
@Override public void run() throws Exception {
  MapReduceService mapReduceService=getService();
  JobSupervisor supervisor=mapReduceService.getJobSupervisor(name,jobId);
  if (supervisor == null) {
    return;
  }
  JobProcessInformationImpl processInformation=supervisor.getJobProcessInformation();
  JobPartitionState newPartitonState=new JobPartitionStateImpl(getCallerAddress(),JobPartitionState.State.PROCESSING);
  if (checkState(processInformation)) {
    for (; ; ) {
      JobPartitionState[] oldPartitionStates=processInformation.getPartitionStates();
      JobPartitionState[] newPartitonStates=Arrays.copyOf(oldPartitionStates,oldPartitionStates.length);
      newPartitonStates[partitionId]=newPartitonState;
      if (!processInformation.updatePartitionState(oldPartitionStates,newPartitonStates)) {
        if (checkState(processInformation)) {
          continue;
        }
      }
 else {
        JobPartitionState[] partitionStates=processInformation.getPartitionStates();
        JobPartitionState partitionState=partitionStates[partitionId];
        if (partitionState.getState() == JobPartitionState.State.PROCESSING && partitionState.getOwner().equals(getCallerAddress())) {
          this.partitionStates=partitionStates;
          return;
        }
        this.partitionStates=partitionStates;
        return;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  MapReduceService mapReduceService=getService();
  JobSupervisor supervisor=mapReduceService.getJobSupervisor(getName(),getJobId());
  if (supervisor == null) {
    return;
  }
  JobProcessInformationImpl processInformation=supervisor.getJobProcessInformation();
  JobPartitionState newPartitonState=new JobPartitionStateImpl(getCallerAddress(),JobPartitionState.State.PROCESSING);
  if (checkState(processInformation)) {
    for (; ; ) {
      JobPartitionState[] oldPartitionStates=processInformation.getPartitionStates();
      JobPartitionState[] newPartitonStates=Arrays.copyOf(oldPartitionStates,oldPartitionStates.length);
      newPartitonStates[partitionId]=newPartitonState;
      if (!processInformation.updatePartitionState(oldPartitionStates,newPartitonStates)) {
        if (checkState(processInformation)) {
          continue;
        }
      }
 else {
        JobPartitionState[] partitionStates=processInformation.getPartitionStates();
        JobPartitionState partitionState=partitionStates[partitionId];
        if (partitionState.getState() == JobPartitionState.State.PROCESSING && partitionState.getOwner().equals(getCallerAddress())) {
          this.partitionStates=partitionStates;
          return;
        }
        this.partitionStates=partitionStates;
        return;
      }
    }
  }
}
Program: 48649
Project: 48649
Buggy source:
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  partitionId=in.readInt();
  name=in.readUTF();
  jobId=in.readUTF();
}

Fixed version (ground truth):
@Override protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  partitionId=in.readInt();
}
Program: 48650
Project: 48650
Buggy source:
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeInt(partitionId);
  out.writeUTF(name);
  out.writeUTF(jobId);
}

Fixed version (ground truth):
@Override protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeInt(partitionId);
}
Program: 48651
Project: 48651
Buggy source:
public void startTasks(MappingPhase mappingPhase){
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  jobTracker.registerReducerTask(new ReducerTask(name,jobId,this,new ConcurrentLinkedQueue()));
  jobTracker.registerMapCombineTask(new MapCombineTask(configuration,this,mappingPhase));
}

Fixed version (ground truth):
public void startTasks(MappingPhase mappingPhase){
  String name=configuration.getName();
  String jobId=configuration.getJobId();
  jobTracker.registerReducerTask(new ReducerTask(name,jobId,this));
  jobTracker.registerMapCombineTask(new MapCombineTask(configuration,this,mappingPhase));
}
Program: 48652
Project: 48652
Buggy source:
public void onNotification(MapReduceNotification notification){
  if (notification instanceof IntermediateChunkNotification) {
    IntermediateChunkNotification icn=(IntermediateChunkNotification)notification;
    ReducerTask reducerTask=jobTracker.getReducerTask(icn.getJobId());
    reducerTask.processChunk(icn.getChunk());
  }
 else   if (notification instanceof LastChunkNotification) {
    LastChunkNotification lcn=(LastChunkNotification)notification;
    ReducerTask reducerTask=jobTracker.getReducerTask(lcn.getJobId());
    reducerTask.processChunk(lcn.getChunk());
  }
}

Fixed version (ground truth):
public void onNotification(MapReduceNotification notification){
  if (notification instanceof IntermediateChunkNotification) {
    IntermediateChunkNotification icn=(IntermediateChunkNotification)notification;
    ReducerTask reducerTask=jobTracker.getReducerTask(icn.getJobId());
    reducerTask.processChunk(icn.getChunk());
  }
 else   if (notification instanceof LastChunkNotification) {
    LastChunkNotification lcn=(LastChunkNotification)notification;
    ReducerTask reducerTask=jobTracker.getReducerTask(lcn.getJobId());
    reducerTask.processChunk(lcn.getPartitionId(),lcn.getChunk());
  }
}
Program: 48653
Project: 48653
Buggy source:
AbstractJobTracker(String name,JobTrackerConfig jobTrackerConfig,NodeEngine nodeEngine){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.jobTrackerConfig=jobTrackerConfig;
  this.executorService=nodeEngine.getExecutionService().getExecutor(name);
}

Fixed version (ground truth):
AbstractJobTracker(String name,JobTrackerConfig jobTrackerConfig,NodeEngine nodeEngine,MapReduceService mapReduceService){
  this.name=name;
  this.nodeEngine=nodeEngine;
  this.jobTrackerConfig=jobTrackerConfig;
  this.mapReduceService=mapReduceService;
  this.executorService=nodeEngine.getExecutionService().getExecutor(name);
}
Program: 48655
Project: 48655
Buggy source:
public JobSupervisor createJobSupervisor(JobTaskConfiguration configuration){
  JobSupervisorKey key=new JobSupervisorKey(configuration.getName(),configuration.getJobId());
  JobTracker jobTracker=(JobTracker)createDistributedObject(configuration.getName());
  JobSupervisor jobSupervisor=new JobSupervisor(configuration,(AbstractJobTracker)jobTracker,this);
  JobSupervisor oldSupervisor=jobSupervisors.putIfAbsent(key,jobSupervisor);
  return oldSupervisor != null ? oldSupervisor : jobSupervisor;
}

Fixed version (ground truth):
public JobSupervisor createJobSupervisor(JobTaskConfiguration configuration){
  JobSupervisorKey key=new JobSupervisorKey(configuration.getName(),configuration.getJobId());
  AbstractJobTracker jobTracker=(AbstractJobTracker)createDistributedObject(configuration.getName());
  boolean ownerNode=nodeEngine.getThisAddress().equals(configuration.getJobOwner());
  JobSupervisor jobSupervisor=new JobSupervisor(configuration,jobTracker,ownerNode,this);
  JobSupervisor oldSupervisor=jobSupervisors.putIfAbsent(key,jobSupervisor);
  return oldSupervisor != null ? oldSupervisor : jobSupervisor;
}
Program: 48656
Project: 48656
Buggy source:
@Override public JobTracker createNew(String arg){
  JobTrackerConfig jobTrackerConfig=config.findJobTrackerConfig(arg);
  return new NodeJobTracker(arg,jobTrackerConfig.getAsReadOnly(),nodeEngine);
}

Fixed version (ground truth):
@Override public JobTracker createNew(String arg){
  JobTrackerConfig jobTrackerConfig=config.findJobTrackerConfig(arg);
  return new NodeJobTracker(arg,jobTrackerConfig.getAsReadOnly(),nodeEngine,MapReduceService.this);
}
Program: 48657
Project: 48657
Buggy source:
public MapReduceService(NodeEngine nodeEngine){
  this.config=nodeEngine.getConfig();
  this.nodeEngine=nodeEngine;
  this.eventService=nodeEngine.getEventService();
  this.hazelcastInstance=nodeEngine.getHazelcastInstance();
  this.partitionService=(PartitionServiceImpl)nodeEngine.getPartitionService();
  this.partitions=partitionService.getPartitions();
  this.eventService.registerListener(SERVICE_NAME,EVENT_TOPIC_NAME,new MapReduceNotificationListener());
}

Fixed version (ground truth):
public MapReduceService(NodeEngine nodeEngine){
  this.config=nodeEngine.getConfig();
  this.nodeEngine=nodeEngine;
  this.eventService=nodeEngine.getEventService();
  this.hazelcastInstance=nodeEngine.getHazelcastInstance();
  this.partitionService=(PartitionServiceImpl)nodeEngine.getPartitionService();
  this.partitions=partitionService.getPartitions();
  this.eventService.registerListener(SERVICE_NAME,EVENT_TOPIC_NAME,this);
}
Program: 48658
Project: 48658
Buggy source:
public FastStringCreator(Constructor<String> constructor){
  this.constructor=constructor;
}

Fixed version (ground truth):
public FastStringCreator(Constructor<String> constructor){
  this.constructor=constructor;
  this.useOldStringConstructor=constructor.getTypeParameters().length == 3;
}
Program: 48659
Project: 48659
Buggy source:
@Override public void onReplicationEvent(WanReplicationEvent replicationEvent){
  Object eventObject=replicationEvent.getEventObject();
  if (eventObject instanceof MapReplicationUpdate) {
    MapReplicationUpdate replicationUpdate=(MapReplicationUpdate)eventObject;
    EntryView entryView=replicationUpdate.getEntryView();
    MapMergePolicy mergePolicy=replicationUpdate.getMergePolicy();
    String mapName=replicationUpdate.getMapName();
    MapContainer mapContainer=getMapContainer(mapName);
    MergeOperation operation=new MergeOperation(mapName,toData(entryView.getKey(),mapContainer.getPartitioningStrategy()),entryView,mergePolicy);
    try {
      int partitionId=nodeEngine.getPartitionService().getPartitionId(entryView.getKey());
      Future f=nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME,operation,partitionId);
      f.get();
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
 else   if (eventObject instanceof MapReplicationRemove) {
    MapReplicationRemove replicationRemove=(MapReplicationRemove)eventObject;
    DeleteOperation operation=new DeleteOperation(replicationRemove.getMapName(),replicationRemove.getKey());
    try {
      int partitionId=nodeEngine.getPartitionService().getPartitionId(replicationRemove.getKey());
      Future f=nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME,operation,partitionId);
      f.get();
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}

Fixed version (ground truth):
@Override public void onReplicationEvent(WanReplicationEvent replicationEvent){
  Object eventObject=replicationEvent.getEventObject();
  if (eventObject instanceof MapReplicationUpdate) {
    MapReplicationUpdate replicationUpdate=(MapReplicationUpdate)eventObject;
    EntryView entryView=replicationUpdate.getEntryView();
    MapMergePolicy mergePolicy=replicationUpdate.getMergePolicy();
    String mapName=replicationUpdate.getMapName();
    MapContainer mapContainer=getMapContainer(mapName);
    MergeOperation operation=new MergeOperation(mapName,toData(entryView.getKey(),mapContainer.getPartitioningStrategy()),entryView,mergePolicy);
    try {
      int partitionId=nodeEngine.getPartitionService().getPartitionId(entryView.getKey());
      Future f=nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME,operation,partitionId);
      f.get();
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
 else   if (eventObject instanceof MapReplicationRemove) {
    MapReplicationRemove replicationRemove=(MapReplicationRemove)eventObject;
    WanOriginatedDeleteOperation operation=new WanOriginatedDeleteOperation(replicationRemove.getMapName(),replicationRemove.getKey());
    try {
      int partitionId=nodeEngine.getPartitionService().getPartitionId(replicationRemove.getKey());
      Future f=nodeEngine.getOperationService().invokeOnPartition(SERVICE_NAME,operation,partitionId);
      f.get();
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}
Program: 48660
Project: 48660
Buggy source:
public void setAttribute(String key,Object value){
  if (!localMember)   throw new UnsupportedOperationException("String_Node_Str");
  if (value != null) {
    attributes.put(key,value);
  }
 else {
    attributes.remove(key);
  }
  if (instance != null) {
    NodeEngineImpl nodeEngine=instance.node.nodeEngine;
    OperationService os=nodeEngine.getOperationService();
    MemberAttributeChangedOperation operation;
    if (value != null) {
      operation=new MemberAttributeChangedOperation(MapOperationType.PUT,key,value);
    }
 else {
      operation=new MemberAttributeChangedOperation(MapOperationType.REMOVE,key,null);
    }
    String uuid=nodeEngine.getLocalMember().getUuid();
    operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
    try {
      for (      Member m : nodeEngine.getClusterService().getMembers()) {
        MemberImpl member=(MemberImpl)m;
        InvocationBuilder inv=os.createInvocationBuilder(ClusterServiceImpl.SERVICE_NAME,operation,member.getAddress());
        inv.invoke();
      }
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}

Fixed version (ground truth):
public void setAttribute(String key,Object value){
  if (!localMember)   throw new UnsupportedOperationException("String_Node_Str");
  if (value == null)   throw new IllegalArgumentException("String_Node_Str");
  if (value != null) {
    Object oldValue=attributes.put(key,value);
    if (value.equals(oldValue)) {
      return;
    }
  }
 else {
    attributes.remove(key);
  }
  if (instance != null) {
    NodeEngineImpl nodeEngine=instance.node.nodeEngine;
    OperationService os=nodeEngine.getOperationService();
    MemberAttributeChangedOperation operation;
    if (value != null) {
      operation=new MemberAttributeChangedOperation(MapOperationType.PUT,key,value);
    }
 else {
      operation=new MemberAttributeChangedOperation(MapOperationType.REMOVE,key,null);
    }
    String uuid=nodeEngine.getLocalMember().getUuid();
    operation.setCallerUuid(uuid).setNodeEngine(nodeEngine);
    try {
      for (      MemberImpl member : nodeEngine.getClusterService().getMemberList()) {
        os.send(operation,member.getAddress());
      }
    }
 catch (    Throwable t) {
      throw ExceptionUtil.rethrow(t);
    }
  }
}
Program: 48663
Project: 48663
Buggy source:
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  Object output=f.apply(input);
  shouldBackup=!equals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
  response=output;
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  Object output=f.apply(input);
  shouldBackup=!isEquals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
  response=output;
}
Program: 48664
Project: 48664
Buggy source:
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  Object output=f.apply(input);
  shouldBackup=!equals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  Object output=f.apply(input);
  shouldBackup=!isEquals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
}
Program: 48665
Project: 48665
Buggy source:
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  response=input;
  Object output=f.apply(input);
  shouldBackup=!equals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
}

Fixed version (ground truth):
@Override public void run() throws Exception {
  NodeEngine nodeEngine=getNodeEngine();
  Function f=nodeEngine.toObject(function);
  AtomicReferenceWrapper reference=getReference();
  Object input=nodeEngine.toObject(reference.get());
  response=input;
  Object output=f.apply(input);
  shouldBackup=!isEquals(input,output);
  if (shouldBackup) {
    backup=nodeEngine.toData(output);
    reference.set(backup);
  }
}
Program: 48667
Project: 48667
Buggy source:
public static AddressMatcher getAddressMatcher(String address){
  final AddressMatcher matcher;
  final int indexColon=address.indexOf(':');
  final int lastIndexColon=address.lastIndexOf(':');
  final int indexDot=address.indexOf('.');
  final int lastIndexDot=address.lastIndexOf('.');
  if (indexColon > -1 && lastIndexColon > indexColon) {
    if (indexDot == -1) {
      matcher=new Ip6AddressMatcher();
      parseIpv6(matcher,address);
    }
 else {
      if (indexDot >= lastIndexDot) {
        throw new InvalidAddressException(address);
      }
      final int lastIndexColon2=address.lastIndexOf(':');
      final String host2=address.substring(lastIndexColon2 + 1);
      matcher=new Ip4AddressMatcher();
      parseIpv4(matcher,host2);
    }
  }
 else   if (indexDot > -1 && lastIndexDot > indexDot && indexColon == -1) {
    matcher=new Ip4AddressMatcher();
    parseIpv4(matcher,address);
  }
 else {
    throw new InvalidAddressException(address);
  }
  return matcher;
}

Fixed version (ground truth):
/** 
 * Gets an AddressMatcher for a given addresses.
 * @param address the address
 * @return the returned AddressMatcher. The returned value will never be null.
 * @throws com.hazelcast.util.AddressUtil.InvalidAddressException if the address is not valid.
 */
public static AddressMatcher getAddressMatcher(String address){
  final AddressMatcher matcher;
  final int indexColon=address.indexOf(':');
  final int lastIndexColon=address.lastIndexOf(':');
  final int indexDot=address.indexOf('.');
  final int lastIndexDot=address.lastIndexOf('.');
  if (indexColon > -1 && lastIndexColon > indexColon) {
    if (indexDot == -1) {
      matcher=new Ip6AddressMatcher();
      parseIpv6(matcher,address);
    }
 else {
      if (indexDot >= lastIndexDot) {
        throw new InvalidAddressException(address);
      }
      final int lastIndexColon2=address.lastIndexOf(':');
      final String host2=address.substring(lastIndexColon2 + 1);
      matcher=new Ip4AddressMatcher();
      parseIpv4(matcher,host2);
    }
  }
 else   if (indexDot > -1 && lastIndexDot > indexDot && indexColon == -1) {
    matcher=new Ip4AddressMatcher();
    parseIpv4(matcher,address);
  }
 else {
    throw new InvalidAddressException(address);
  }
  return matcher;
}
Program: 48668
Project: 48668
Buggy source:
public static boolean isIpAddress(String address){
  try {
    return getAddressMatcher(address) != null;
  }
 catch (  InvalidAddressException e) {
    return false;
  }
}

Fixed version (ground truth):
public static boolean isIpAddress(String address){
  try {
    getAddressMatcher(address);
    return true;
  }
 catch (  InvalidAddressException e) {
    return false;
  }
}
Program: 48669
Project: 48669
Buggy source:
public boolean equals(Object o){
  if (o != null && o instanceof SystemLogRecord) {
    return this.compareTo((SystemLogRecord)o) == 0;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (o != null && o instanceof SystemLogRecord) {
    return this.compareTo((SystemLogRecord)o) == 0;
  }
  return false;
}
Program: 48670
Project: 48670
Buggy source:
public boolean equals(Object o){
  if (o != null && o instanceof MonitoredThread) {
    return this.compareTo((MonitoredThread)o) == 0;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (o != null && o instanceof MonitoredThread) {
    return this.compareTo((MonitoredThread)o) == 0;
  }
  return false;
}
Program: 48671
Project: 48671
Buggy source:
public boolean equals(Object o){
  return this.compareTo(o) == 0;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  return this.compareTo(o) == 0;
}
Program: 48672
Project: 48672
Buggy source:
private ClientConnection getOrConnect(Address address,Authenticator authenticator) throws IOException {
  ClientConnection clientConnection=connections.get(address);
  if (clientConnection == null) {
synchronized (this) {
      clientConnection=connections.get(address);
      if (clientConnection == null) {
        clientConnection=connect(address);
        connections.put(address,clientConnection);
      }
    }
  }
  authenticator.auth(clientConnection);
  return clientConnection;
}

Fixed version (ground truth):
private ClientConnection getOrConnect(Address address,Authenticator authenticator) throws IOException {
  ClientConnection clientConnection=connections.get(address);
  if (clientConnection == null) {
synchronized (this) {
      clientConnection=connections.get(address);
      if (clientConnection == null) {
        clientConnection=connect(address);
        authenticator.auth(clientConnection);
        connections.put(clientConnection.getRemoteEndpoint(),clientConnection);
      }
    }
  }
  return clientConnection;
}
Program: 48673
Project: 48673
Buggy source:
private V resolveResponse(){
  return (V)response;
}

Fixed version (ground truth):
private V resolveResponse(){
  return (V)ErrorHandler.returnResultOrThrowException(response);
}
Program: 48674
Project: 48674
Buggy source:
public static boolean stopListening(ClientContext context,ClientRequest request,String registrationId){
  final Future<Boolean> future;
  try {
    future=context.getInvocationService().invokeOnRandomTarget(request);
    Boolean result=future.get();
    context.getClusterService().deRegisterListener(registrationId);
    return result;
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
public static boolean stopListening(ClientContext context,ClientRequest request,String registrationId){
  final Future<Boolean> future;
  try {
    future=context.getInvocationService().invokeOnRandomTarget(request);
    Boolean result=context.getSerializationService().toObject(future.get());
    context.getClusterService().deRegisterListener(registrationId);
    return result;
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48675
Project: 48675
Buggy source:
public static String listen(HazelcastClient client,ClientRequest request,Object key,EventHandler handler){
  final Future<String> future;
  try {
    if (key == null) {
      future=client.getInvocationService().invokeOnRandomTarget(request,handler);
    }
 else {
      future=client.getInvocationService().invokeOnKeyOwner(request,key,handler);
    }
    String registrationId=future.get();
    client.getClientClusterService().registerListener(registrationId,request.getCallId());
    return registrationId;
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}

Fixed version (ground truth):
public static String listen(HazelcastClient client,ClientRequest request,Object key,EventHandler handler){
  final Future future;
  try {
    if (key == null) {
      future=client.getInvocationService().invokeOnRandomTarget(request,handler);
    }
 else {
      future=client.getInvocationService().invokeOnKeyOwner(request,key,handler);
    }
    String registrationId=client.getSerializationService().toObject(future.get());
    client.getClientClusterService().registerListener(registrationId,request.getCallId());
    return registrationId;
  }
 catch (  Exception e) {
    throw ExceptionUtil.rethrow(e);
  }
}
Program: 48676
Project: 48676
Buggy source:
@Override public Object call(){
  final ClientEndpoint endpoint=getEndpoint();
  final ClientEngine clientEngine=getClientEngine();
  final MapService mapService=getService();
  EntryListener<Object,Object> listener=new EntryListener<Object,Object>(){
    private void handleEvent(    EntryEvent<Object,Object> event){
      if (endpoint.live()) {
        Data key=clientEngine.toData(event.getKey());
        Data value=clientEngine.toData(event.getValue());
        Data oldValue=clientEngine.toData(event.getOldValue());
        PortableEntryEvent portableEntryEvent=new PortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
    public void entryAdded(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryRemoved(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryUpdated(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryEvicted(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
  }
;
  EventFilter eventFilter;
  if (getPredicate() == null) {
    eventFilter=new EntryEventFilter(includeValue,key);
  }
 else {
    eventFilter=new QueryEventFilter(includeValue,key,getPredicate());
  }
  String registrationId=mapService.addEventListener(listener,eventFilter,name);
  endpoint.setListenerRegistration(MapService.SERVICE_NAME,name,registrationId);
  return true;
}

Fixed version (ground truth):
@Override public Object call(){
  final ClientEndpoint endpoint=getEndpoint();
  final ClientEngine clientEngine=getClientEngine();
  final MapService mapService=getService();
  EntryListener<Object,Object> listener=new EntryListener<Object,Object>(){
    private void handleEvent(    EntryEvent<Object,Object> event){
      if (endpoint.live()) {
        Data key=clientEngine.toData(event.getKey());
        Data value=clientEngine.toData(event.getValue());
        Data oldValue=clientEngine.toData(event.getOldValue());
        PortableEntryEvent portableEntryEvent=new PortableEntryEvent(key,value,oldValue,event.getEventType(),event.getMember().getUuid());
        endpoint.sendEvent(portableEntryEvent,getCallId());
      }
    }
    public void entryAdded(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryRemoved(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryUpdated(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
    public void entryEvicted(    EntryEvent<Object,Object> event){
      handleEvent(event);
    }
  }
;
  EventFilter eventFilter;
  if (getPredicate() == null) {
    eventFilter=new EntryEventFilter(includeValue,key);
  }
 else {
    eventFilter=new QueryEventFilter(includeValue,key,getPredicate());
  }
  String registrationId=mapService.addEventListener(listener,eventFilter,name);
  endpoint.setListenerRegistration(MapService.SERVICE_NAME,name,registrationId);
  return registrationId;
}
Program: 48677
Project: 48677
Buggy source:
public void read(PortableReader reader) throws IOException {
  name=reader.readUTF("String_Node_Str");
  super.readPortable(reader);
}

Fixed version (ground truth):
public void read(PortableReader reader) throws IOException {
  name=reader.readUTF("String_Node_Str");
  super.read(reader);
}