nus-yam/ex-repair huggingface dataset:
Program: 50209
Project: 50209
Buggy source:
private void removeRecordIndex(long oldValue,long recordId){
  recordValues.remove(recordId);
  indexStore.removeRecordIndex(oldValue,recordId);
}

Fixed version (ground truth):
private void removeRecordIndex(Long oldValue,Long recordId){
  recordValues.remove(recordId);
  indexStore.removeRecordIndex(oldValue,recordId);
}
Program: 50210
Project: 50210
Buggy source:
private void newRecordIndex(long newValue,Record record){
  long recordId=record.getId();
  indexStore.newRecordIndex(newValue,record);
  recordValues.put(recordId,newValue);
}

Fixed version (ground truth):
private void newRecordIndex(Long newValue,Record record){
  Long recordId=record.getId();
  indexStore.newRecordIndex(newValue,record);
  recordValues.put(recordId,newValue);
}
Program: 50211
Project: 50211
Buggy source:
public void index(long newValue,Record record){
  if (expression != null && returnType == -1) {
    returnType=record.getIndexTypes()[attributeIndex];
  }
  final long recordId=record.getId();
  Long oldValue=recordValues.get(recordId);
  if (record.isActive()) {
    if (oldValue == null) {
      newRecordIndex(newValue,record);
    }
 else     if (!oldValue.equals(newValue)) {
      removeRecordIndex(oldValue,recordId);
      newRecordIndex(newValue,record);
    }
  }
 else {
    if (oldValue != null) {
      removeRecordIndex(oldValue,recordId);
    }
    recordValues.remove(recordId);
  }
}

Fixed version (ground truth):
public void index(Long newValue,Record record){
  if (expression != null && returnType == -1) {
    returnType=record.getIndexTypes()[attributeIndex];
  }
  final Long recordId=record.getId();
  Long oldValue=recordValues.get(recordId);
  if (record.isActive()) {
    if (oldValue == null) {
      newRecordIndex(newValue,record);
    }
 else     if (!oldValue.equals(newValue)) {
      removeRecordIndex(oldValue,recordId);
      newRecordIndex(newValue,record);
    }
  }
 else {
    if (oldValue != null) {
      removeRecordIndex(oldValue,recordId);
    }
    recordValues.remove(recordId);
  }
}
Program: 50212
Project: 50212
Buggy source:
public Set<MapEntry> getRecords(long value){
  return indexStore.getRecords(value);
}

Fixed version (ground truth):
public Set<MapEntry> getRecords(Long value){
  return indexStore.getRecords(value);
}
Program: 50213
Project: 50213
Buggy source:
public Set<MapEntry> getSubRecordsBetween(long from,long to){
  MultiResultSet results=new MultiResultSet(recordValues);
  indexStore.getSubRecordsBetween(results,from,to);
  return results;
}

Fixed version (ground truth):
public Set<MapEntry> getSubRecordsBetween(Long from,Long to){
  MultiResultSet results=new MultiResultSet(recordValues);
  indexStore.getSubRecordsBetween(results,from,to);
  return results;
}
Program: 50214
Project: 50214
Buggy source:
void getSubRecords(MultiResultSet results,boolean equal,boolean lessThan,long searchedValue);

Fixed version (ground truth):
void getSubRecords(MultiResultSet results,boolean equal,boolean lessThan,Long searchedValue);
Program: 50215
Project: 50215
Buggy source:
void removeRecordIndex(long oldValue,long recordId);

Fixed version (ground truth):
void removeRecordIndex(Long oldValue,Long recordId);
Program: 50216
Project: 50216
Buggy source:
void newRecordIndex(long newValue,Record record);

Fixed version (ground truth):
void newRecordIndex(Long newValue,Record record);
Program: 50217
Project: 50217
Buggy source:
void getRecords(MultiResultSet results,long[] values);

Fixed version (ground truth):
void getRecords(MultiResultSet results,Long[] values);
Program: 50218
Project: 50218
Buggy source:
void getSubRecordsBetween(MultiResultSet results,long from,long to);

Fixed version (ground truth):
void getSubRecordsBetween(MultiResultSet results,Long from,Long to);
Program: 50219
Project: 50219
Buggy source:
public long[] getIndexValues(Object value){
  if (hasIndexedAttributes) {
    int indexCount=mapIndexes.size();
    long[] newIndexes=new long[indexCount];
    if (value instanceof Data) {
      value=toObject((Data)value);
    }
    Collection<Index> indexes=mapIndexes.values();
    for (    Index index : indexes) {
      int attributedIndex=index.getAttributeIndex();
      newIndexes[attributedIndex]=index.extractLongValue(value);
    }
    if (indexTypes == null || indexTypes.length != indexCount) {
synchronized (indexTypesLock) {
        if (indexTypes == null || indexTypes.length != indexCount) {
          indexTypes=new byte[indexCount];
          for (          Index index : indexes) {
            int attributedIndex=index.getAttributeIndex();
            indexTypes[attributedIndex]=index.getIndexType();
          }
        }
      }
    }
    return newIndexes;
  }
  return null;
}

Fixed version (ground truth):
public Long[] getIndexValues(Object value){
  if (hasIndexedAttributes) {
    int indexCount=mapIndexes.size();
    Long[] newIndexes=new Long[indexCount];
    if (value instanceof Data) {
      value=toObject((Data)value);
    }
    Collection<Index> indexes=mapIndexes.values();
    for (    Index index : indexes) {
      int attributedIndex=index.getAttributeIndex();
      newIndexes[attributedIndex]=index.extractLongValue(value);
    }
    if (indexTypes == null || indexTypes.length != indexCount) {
synchronized (indexTypesLock) {
        if (indexTypes == null || indexTypes.length != indexCount) {
          indexTypes=new byte[indexCount];
          for (          Index index : indexes) {
            int attributedIndex=index.getAttributeIndex();
            indexTypes[attributedIndex]=index.getIndexType();
          }
        }
      }
    }
    return newIndexes;
  }
  return null;
}
Program: 50220
Project: 50220
Buggy source:
public void index(Record record){
  final long recordId=record.getId();
  if (record.isActive()) {
    final Record anotherRecord=records.putIfAbsent(recordId,record);
    if (anotherRecord != null) {
      record=anotherRecord;
    }
  }
 else {
    remove(record);
  }
  int newValueIndex=-1;
  if (record.isActive() && record.getValue() != null) {
    newValueIndex=record.getValue().hashCode();
  }
  if (indexValue != null) {
    indexValue.index(newValueIndex,record);
  }
  long[] indexValues=record.getIndexes();
  byte[] indexTypes=record.getIndexTypes();
  if (indexValues != null && hasIndexedAttributes) {
    if (indexTypes == null || indexValues.length != indexTypes.length) {
      throw new IllegalArgumentException("String_Node_Str" + Arrays.toString(indexTypes));
    }
    Collection<Index> indexes=mapIndexes.values();
    for (    Index index : indexes) {
      if (indexValues.length > index.getAttributeIndex()) {
        long newValue=indexValues[index.getAttributeIndex()];
        index.index(newValue,record);
      }
    }
  }
}

Fixed version (ground truth):
public void index(Record record){
  final Long recordId=record.getId();
  if (record.isActive()) {
    final Record anotherRecord=records.putIfAbsent(recordId,record);
    if (anotherRecord != null) {
      record=anotherRecord;
    }
  }
 else {
    remove(record);
  }
  Long newValueIndex=-1L;
  if (record.isActive() && record.getValue() != null) {
    newValueIndex=(long)record.getValue().hashCode();
  }
  if (indexValue != null) {
    indexValue.index(newValueIndex,record);
  }
  Long[] indexValues=record.getIndexes();
  byte[] indexTypes=record.getIndexTypes();
  if (indexValues != null && hasIndexedAttributes) {
    if (indexTypes == null || indexValues.length != indexTypes.length) {
      throw new IllegalArgumentException("String_Node_Str" + Arrays.toString(indexTypes));
    }
    Collection<Index> indexes=mapIndexes.values();
    for (    Index index : indexes) {
      if (indexValues.length > index.getAttributeIndex()) {
        Long newValue=indexValues[index.getAttributeIndex()];
        index.index(newValue,record);
      }
    }
  }
}
Program: 50221
Project: 50221
Buggy source:
public boolean containsValue(Data value){
  if (indexValue != null) {
    Set<MapEntry> results=indexValue.getRecords(value.hashCode());
    if (results == null || results.size() == 0)     return false;
    for (    MapEntry entry : results) {
      Record record=(Record)entry;
      if (record.containsValue(value)) {
        return true;
      }
    }
  }
 else {
    for (    Record record : records.values()) {
      if (record.containsValue(value)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean containsValue(Data value){
  if (indexValue != null) {
    Set<MapEntry> results=indexValue.getRecords((long)value.hashCode());
    if (results == null || results.size() == 0)     return false;
    for (    MapEntry entry : results) {
      Record record=(Record)entry;
      if (record.containsValue(value)) {
        return true;
      }
    }
  }
 else {
    for (    Record record : records.values()) {
      if (record.containsValue(value)) {
        return true;
      }
    }
  }
  return false;
}
Program: 50222
Project: 50222
Buggy source:
public void getSubRecords(MultiResultSet results,boolean equal,boolean lessThan,long searchedValue){
  Set<Long> values=(lessThan) ? sortedSet.headSet(searchedValue) : sortedSet.tailSet(searchedValue);
  for (  Long value : values) {
    if (lessThan || equal || !value.equals(searchedValue)) {
      ConcurrentMap<Long,Record> records=mapRecords.get(value);
      if (records != null) {
        results.addResultSet(value,records.values());
      }
    }
  }
  if (lessThan && equal) {
    ConcurrentMap<Long,Record> records=mapRecords.get(searchedValue);
    if (records != null) {
      results.addResultSet(searchedValue,records.values());
    }
  }
}

Fixed version (ground truth):
public void getSubRecords(MultiResultSet results,boolean equal,boolean lessThan,Long searchedValue){
  Set<Long> values=(lessThan) ? sortedSet.headSet(searchedValue) : sortedSet.tailSet(searchedValue);
  for (  Long value : values) {
    if (lessThan || equal || !value.equals(searchedValue)) {
      ConcurrentMap<Long,Record> records=mapRecords.get(value);
      if (records != null) {
        results.addResultSet(value,records.values());
      }
    }
  }
  if (lessThan && equal) {
    ConcurrentMap<Long,Record> records=mapRecords.get(searchedValue);
    if (records != null) {
      results.addResultSet(searchedValue,records.values());
    }
  }
}
Program: 50223
Project: 50223
Buggy source:
public void removeRecordIndex(long oldValue,long recordId){
  ConcurrentMap<Long,Record> records=mapRecords.get(oldValue);
  if (records != null) {
    records.remove(recordId);
    if (records.size() == 0) {
      mapRecords.remove(oldValue);
      sortedSet.remove(oldValue);
    }
  }
}

Fixed version (ground truth):
public void removeRecordIndex(Long oldValue,Long recordId){
  ConcurrentMap<Long,Record> records=mapRecords.get(oldValue);
  if (records != null) {
    records.remove(recordId);
    if (records.size() == 0) {
      mapRecords.remove(oldValue);
      sortedSet.remove(oldValue);
    }
  }
}
Program: 50224
Project: 50224
Buggy source:
public void newRecordIndex(long newValue,Record record){
  long recordId=record.getId();
  ConcurrentMap<Long,Record> records=mapRecords.get(newValue);
  if (records == null) {
    records=new ConcurrentHashMap<Long,Record>(1,0.75f,1);
    mapRecords.put(newValue,records);
    sortedSet.add(newValue);
  }
  records.put(recordId,record);
}

Fixed version (ground truth):
public void newRecordIndex(Long newValue,Record record){
  long recordId=record.getId();
  ConcurrentMap<Long,Record> records=mapRecords.get(newValue);
  if (records == null) {
    records=new ConcurrentHashMap<Long,Record>(1,0.75f,1);
    mapRecords.put(newValue,records);
    sortedSet.add(newValue);
  }
  records.put(recordId,record);
}
Program: 50225
Project: 50225
Buggy source:
public void getRecords(MultiResultSet results,long[] values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}

Fixed version (ground truth):
public void getRecords(MultiResultSet results,Long[] values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}
Program: 50226
Project: 50226
Buggy source:
public void getSubRecordsBetween(MultiResultSet results,long from,long to){
  Set<Long> values=sortedSet.subSet(from,to);
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
  ConcurrentMap<Long,Record> records=mapRecords.get(to);
  if (records != null) {
    results.addResultSet(to,records.values());
  }
}

Fixed version (ground truth):
public void getSubRecordsBetween(MultiResultSet results,Long from,Long to){
  Set<Long> values=sortedSet.subSet(from,to);
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
  ConcurrentMap<Long,Record> records=mapRecords.get(to);
  if (records != null) {
    results.addResultSet(to,records.values());
  }
}
Program: 50229
Project: 50229
Buggy source:
public int compare(MapEntry o1,MapEntry o2){
  int result=comparator.compare(o1,o2);
  if (result == 0) {
    Record r1=(Record)o1;
    Record r2=(Record)o2;
    return r1.getId().compareTo(r2.getId());
  }
 else {
    return result;
  }
}

Fixed version (ground truth):
public int compare(MapEntry o1,MapEntry o2){
  int result=comparator.compare(o1,o2);
  if (result == 0) {
    Record r1=(Record)o1;
    Record r2=(Record)o2;
    return (r1.getId() > r2.getId()) ? 1 : -1;
  }
 else {
    return result;
  }
}
Program: 50230
Project: 50230
Buggy source:
public void run(){
  long now=System.currentTimeMillis();
  if (now > nextMigrationMillis) {
    nextMigrationMillis=now + MIGRATION_INTERVAL_MILLIS;
    if (!concurrentMapManager.isMaster())     return;
    if (concurrentMapManager.getMembers().size() < 2)     return;
    if (now > timeToInitiateMigration) {
      initiateMigration();
    }
  }
}

Fixed version (ground truth):
public void run(){
  long now=System.currentTimeMillis();
  if (now > nextMigrationMillis) {
    if (migrationStartTime != 0) {
      logger.log(Level.WARNING,"String_Node_Str" + ((now - migrationStartTime) / 1000) + "String_Node_Str");
      for (      Block block : blocks) {
        logger.log(Level.WARNING,block == null ? "String_Node_Str" : block.toString());
      }
    }
    nextMigrationMillis=now + MIGRATION_INTERVAL_MILLIS;
    if (!concurrentMapManager.isMaster())     return;
    if (concurrentMapManager.getMembers().size() < 2)     return;
    if (now > timeToInitiateMigration) {
      initiateMigration();
    }
  }
}
Program: 50231
Project: 50231
Buggy source:
void fireMigrationEvent(final boolean started,Block block){
  final MemberImpl memberOwner=concurrentMapManager.getMember(block.getOwner());
  final MemberImpl memberMigration=concurrentMapManager.getMember(block.getMigrationAddress());
  final MigrationEvent migrationEvent=new MigrationEvent(concurrentMapManager.node,block.getBlockId(),memberOwner,memberMigration);
  partitionServiceImpl.doFireMigrationEvent(started,migrationEvent);
}

Fixed version (ground truth):
void fireMigrationEvent(final boolean started,Block block){
  if (node.isMaster()) {
    if (started) {
      migrationStartTime=System.currentTimeMillis();
    }
 else {
      migrationStartTime=0;
    }
  }
  final MemberImpl memberOwner=concurrentMapManager.getMember(block.getOwner());
  final MemberImpl memberMigration=concurrentMapManager.getMember(block.getMigrationAddress());
  final MigrationEvent migrationEvent=new MigrationEvent(concurrentMapManager.node,block.getBlockId(),memberOwner,memberMigration);
  partitionServiceImpl.doFireMigrationEvent(started,migrationEvent);
}
Program: 50232
Project: 50232
Buggy source:
void getRecords(MultiResultSet results,Long[] values);

Fixed version (ground truth):
void getRecords(MultiResultSet results,Set<Long> values);
Program: 50233
Project: 50233
Buggy source:
public static Object getRealObject(Object type,String value){
  Object result=null;
  if (type instanceof Boolean) {
    result="String_Node_Str".equalsIgnoreCase(value) ? true : false;
  }
 else   if (type instanceof Integer) {
    result=Integer.valueOf(value);
  }
 else   if (type instanceof Double) {
    result=Double.valueOf(value);
  }
 else   if (type instanceof Float) {
    result=Float.valueOf(value);
  }
 else   if (type instanceof Byte) {
    result=Byte.valueOf(value);
  }
 else   if (type instanceof Long) {
    result=Long.valueOf(value);
  }
 else {
    throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ value);
  }
  return result;
}

Fixed version (ground truth):
public static Object getRealObject(Object type,String value){
  Object result=null;
  if (type instanceof Boolean) {
    result="String_Node_Str".equalsIgnoreCase(value) ? true : false;
  }
 else   if (type instanceof Integer) {
    result=Integer.valueOf(value);
  }
 else   if (type instanceof Double) {
    result=Double.valueOf(value);
  }
 else   if (type instanceof Float) {
    result=Float.valueOf(value);
  }
 else   if (type instanceof Byte) {
    result=Byte.valueOf(value);
  }
 else   if (type instanceof Long) {
    result=Long.valueOf(value);
  }
 else {
    System.out.println("String_Node_Str");
    throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ value);
  }
  return result;
}
Program: 50234
Project: 50234
Buggy source:
public void getRecords(MultiResultSet results,Long[] values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}

Fixed version (ground truth):
public void getRecords(MultiResultSet results,Set<Long> values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}
Program: 50235
Project: 50235
Buggy source:
public void getRecords(MultiResultSet results,Long[] values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}

Fixed version (ground truth):
public void getRecords(MultiResultSet results,Set<Long> values){
  for (  Long value : values) {
    ConcurrentMap<Long,Record> records=mapRecords.get(value);
    if (records != null) {
      results.addResultSet(value,records.values());
    }
  }
}
Program: 50236
Project: 50236
Buggy source:
void handleJoinRequest(JoinRequest joinRequest){
  logger.log(Level.FINEST,joinInProgress + "String_Node_Str" + joinRequest);
  if (getMember(joinRequest.address) != null) {
    return;
  }
  Connection conn=joinRequest.getConnection();
  if (node.validateJoinRequest(joinRequest)) {
    if (!node.getConfig().getNetworkConfig().getJoin().getMulticastConfig().isEnabled()) {
      if (node.isActive() && node.joined() && node.getMasterAddress() != null && !isMaster()) {
        sendProcessableTo(new Master(node.getMasterAddress()),conn);
      }
    }
    if (isMaster() && node.joined() && node.isActive()) {
      if (joinRequest.to != null && !joinRequest.to.equals(thisAddress)) {
        sendProcessableTo(new Master(node.getMasterAddress()),conn);
        return;
      }
      if (!joinInProgress) {
        MemberInfo newMemberInfo=new MemberInfo(joinRequest.address,joinRequest.nodeType);
        if (setJoins.add(newMemberInfo)) {
          sendProcessableTo(new Master(node.getMasterAddress()),conn);
          timeToStartJoin=System.currentTimeMillis() + WAIT_MILLIS_BEFORE_JOIN;
        }
 else {
          if (System.currentTimeMillis() > timeToStartJoin) {
            startJoin();
          }
        }
      }
    }
  }
 else {
    conn.close();
  }
}

Fixed version (ground truth):
void handleJoinRequest(JoinRequest joinRequest){
  logger.log(Level.FINEST,joinInProgress + "String_Node_Str" + joinRequest);
  if (getMember(joinRequest.address) != null) {
    return;
  }
  Connection conn=joinRequest.getConnection();
  final boolean validateJoinRequest=node.validateJoinRequest(joinRequest);
  if (validateJoinRequest) {
    if (!node.getConfig().getNetworkConfig().getJoin().getMulticastConfig().isEnabled()) {
      if (node.isActive() && node.joined() && node.getMasterAddress() != null && !isMaster()) {
        sendProcessableTo(new Master(node.getMasterAddress()),conn);
      }
    }
    if (isMaster() && node.joined() && node.isActive()) {
      if (joinRequest.to != null && !joinRequest.to.equals(thisAddress)) {
        sendProcessableTo(new Master(node.getMasterAddress()),conn);
        return;
      }
      if (!joinInProgress) {
        MemberInfo newMemberInfo=new MemberInfo(joinRequest.address,joinRequest.nodeType);
        if (setJoins.add(newMemberInfo)) {
          sendProcessableTo(new Master(node.getMasterAddress()),conn);
          timeToStartJoin=System.currentTimeMillis() + WAIT_MILLIS_BEFORE_JOIN;
        }
 else {
          if (System.currentTimeMillis() > timeToStartJoin) {
            startJoin();
          }
        }
      }
    }
  }
 else {
    conn.close();
  }
}
Program: 50237
Project: 50237
Buggy source:
public JoinInfo(boolean request,Address address,String groupName,String groupPassword,NodeType type,byte packetVersion,int buildNumber,int memberCount){
  super(address,groupName,groupPassword,type,packetVersion,buildNumber);
  this.setRequest(request);
  this.memberCount=memberCount;
}

Fixed version (ground truth):
public JoinInfo(boolean request,Address address,Config config,NodeType type,byte packetVersion,int buildNumber,int memberCount){
  super(address,config,type,packetVersion,buildNumber);
  this.request=request;
  this.memberCount=memberCount;
}
Program: 50238
Project: 50238
Buggy source:
@Override public void readData(DataInput dis) throws IOException {
  super.readData(dis);
  setRequest(dis.readBoolean());
  memberCount=dis.readInt();
}

Fixed version (ground truth):
@Override public void readData(DataInput dis) throws IOException {
  super.readData(dis);
  this.request=dis.readBoolean();
  memberCount=dis.readInt();
}
Program: 50239
Project: 50239
Buggy source:
public void writeToPacket(DatagramPacket packet){
  ByteArrayOutputStream bos=new ByteArrayOutputStream();
  DataOutputStream dos=new DataOutputStream(bos);
  try {
    writeData(dos);
    packet.setData(bos.toByteArray());
    packet.setLength(bos.size());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void writeToPacket(DatagramPacket packet){
  ByteArrayOutputStream bos=new ByteArrayOutputStream();
  DataOutputStream dos=new DataOutputStream(bos);
  try {
    writeData(dos);
    dos.flush();
    packet.setData(bos.toByteArray());
    packet.setLength(bos.size());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 50240
Project: 50240
Buggy source:
public JoinInfo copy(boolean newRequest,Address newAddress){
  return new JoinInfo(newRequest,newAddress,groupName,groupPassword,nodeType,packetVersion,buildNumber,memberCount);
}

Fixed version (ground truth):
public JoinInfo copy(boolean newRequest,Address newAddress){
  return new JoinInfo(newRequest,newAddress,config,nodeType,packetVersion,buildNumber,memberCount);
}
Program: 50241
Project: 50241
Buggy source:
@Override public void readData(DataInput in) throws IOException {
  boolean hasTo=in.readBoolean();
  if (hasTo) {
    to=new Address();
    to.readData(in);
  }
  address=new Address();
  address.readData(in);
  nodeType=NodeType.create(in.readInt());
  groupName=in.readUTF();
  groupPassword=in.readUTF();
  packetVersion=in.readByte();
  buildNumber=in.readInt();
}

Fixed version (ground truth):
@Override public void readData(DataInput in) throws IOException {
  packetVersion=in.readByte();
  buildNumber=in.readInt();
  boolean hasTo=in.readBoolean();
  if (hasTo) {
    to=new Address();
    to.readData(in);
  }
  address=new Address();
  address.readData(in);
  nodeType=NodeType.create(in.readInt());
  config=new Config();
  config.readData(in);
}
Program: 50242
Project: 50242
Buggy source:
@Override public String toString(){
  return new StringBuilder(128).append("String_Node_Str").append("String_Node_Str").append(nodeType).append("String_Node_Str").append(address).append("String_Node_Str").append(groupName).append('\'').append("String_Node_Str").append(groupPassword).append('\'').append("String_Node_Str").append(buildNumber).append('\'').append("String_Node_Str").append(packetVersion).append('\'').append('}').toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return new StringBuilder(128).append("String_Node_Str").append("String_Node_Str").append(nodeType).append("String_Node_Str").append(address).append("String_Node_Str").append(buildNumber).append('\'').append("String_Node_Str").append(packetVersion).append('\'').append("String_Node_Str").append(config).append('\'').append('}').toString();
}
Program: 50243
Project: 50243
Buggy source:
public JoinRequest(Address to,Address address,String groupName,String groupPassword,NodeType type,byte packetVersion,int buildNumber){
  super();
  this.to=to;
  this.address=address;
  this.groupName=groupName;
  this.groupPassword=groupPassword;
  this.nodeType=type;
  this.packetVersion=packetVersion;
  this.buildNumber=buildNumber;
}

Fixed version (ground truth):
public JoinRequest(Address to,Address address,Config config,NodeType type,byte packetVersion,int buildNumber){
  super();
  this.to=to;
  this.address=address;
  this.config=config;
  this.nodeType=type;
  this.packetVersion=packetVersion;
  this.buildNumber=buildNumber;
}
Program: 50244
Project: 50244
Buggy source:
@Override public void writeData(DataOutput out) throws IOException {
  boolean hasTo=(to != null);
  out.writeBoolean(hasTo);
  if (hasTo) {
    to.writeData(out);
  }
  address.writeData(out);
  out.writeInt(nodeType.getValue());
  out.writeUTF(groupName);
  out.writeUTF(groupPassword);
  out.writeByte(packetVersion);
  out.writeInt(buildNumber);
}

Fixed version (ground truth):
@Override public void writeData(DataOutput out) throws IOException {
  out.writeByte(packetVersion);
  out.writeInt(buildNumber);
  boolean hasTo=(to != null);
  out.writeBoolean(hasTo);
  if (hasTo) {
    to.writeData(out);
  }
  address.writeData(out);
  out.writeInt(nodeType.getValue());
  config.writeData(out);
}
Program: 50245
Project: 50245
Buggy source:
public void addEntryListener(EntryListener<K,V> listener,K key,boolean includeValue){
  check(listener);
  if (proxyHelper.getHazelcastClient().getListenerManager().getEntryListenerManager().noEntryListenerRegistered(key,name)) {
    Packet request=proxyHelper.createRequestPacket(ClusterOperation.ADD_LISTENER,toByte(key),null);
    request.setLongValue(includeValue ? 1 : 0);
    Call c=proxyHelper.createCall(request);
    proxyHelper.getHazelcastClient().getListenerManager().addListenerCall(c);
    proxyHelper.doCall(c);
  }
  proxyHelper.getHazelcastClient().getListenerManager().getEntryListenerManager().registerEntryListener(name,key,listener);
}

Fixed version (ground truth):
public void addEntryListener(EntryListener<K,V> listener,K key,boolean includeValue){
  check(listener);
  Boolean noEntryListenerRegistered=proxyHelper.getHazelcastClient().getListenerManager().getEntryListenerManager().noEntryListenerRegistered(key,name,includeValue);
  if (noEntryListenerRegistered == null) {
    proxyHelper.doOp(ClusterOperation.REMOVE_LISTENER,key,null);
    noEntryListenerRegistered=Boolean.TRUE;
  }
  if (noEntryListenerRegistered) {
    Packet request=proxyHelper.createRequestPacket(ClusterOperation.ADD_LISTENER,toByte(key),null);
    request.setLongValue(includeValue ? 1 : 0);
    Call c=proxyHelper.createCall(request);
    proxyHelper.getHazelcastClient().getListenerManager().addListenerCall(c);
    proxyHelper.doCall(c);
  }
  proxyHelper.getHazelcastClient().getListenerManager().getEntryListenerManager().registerEntryListener(name,key,includeValue,listener);
}
Program: 50246
Project: 50246
Buggy source:
public void addEntryListener(EntryListener<K,V> listener,K key,boolean includeValue){
  check(listener);
  if (client.getListenerManager().getEntryListenerManager().noEntryListenerRegistered(key,name)) {
    Packet request=proxyHelper.createRequestPacket(ClusterOperation.ADD_LISTENER,toByte(key),null);
    request.setLongValue(includeValue ? 1 : 0);
    Call c=proxyHelper.createCall(request);
    client.getListenerManager().addListenerCall(c);
    proxyHelper.doCall(c);
  }
  client.getListenerManager().getEntryListenerManager().registerEntryListener(name,key,listener);
}

Fixed version (ground truth):
public void addEntryListener(EntryListener<K,V> listener,K key,boolean includeValue){
  check(listener);
  Boolean noEntryListenerRegistered=client.getListenerManager().getEntryListenerManager().noEntryListenerRegistered(key,name,includeValue);
  if (noEntryListenerRegistered == null) {
    proxyHelper.doOp(ClusterOperation.REMOVE_LISTENER,key,null);
    noEntryListenerRegistered=Boolean.TRUE;
  }
  if (noEntryListenerRegistered.booleanValue()) {
    Packet request=proxyHelper.createRequestPacket(ClusterOperation.ADD_LISTENER,toByte(key),null);
    request.setLongValue(includeValue ? 1 : 0);
    Call c=proxyHelper.createCall(request);
    client.getListenerManager().addListenerCall(c);
    proxyHelper.doCall(c);
  }
  client.getListenerManager().getEntryListenerManager().registerEntryListener(name,key,includeValue,listener);
}
Program: 50247
Project: 50247
Buggy source:
public synchronized void registerEntryListener(String name,Object key,EntryListener<?,?> entryListener){
  if (!entryListeners.containsKey(name)) {
    entryListeners.put(name,new HashMap<Object,List<EntryListener<?,?>>>());
  }
  if (!entryListeners.get(name).containsKey(key)) {
    entryListeners.get(name).put(key,new CopyOnWriteArrayList<EntryListener<?,?>>());
  }
  entryListeners.get(name).get(key).add(entryListener);
}

Fixed version (ground truth):
public synchronized void registerEntryListener(String name,Object key,boolean includeValue,EntryListener<?,?> entryListener){
  Map<Object,List<EntryListenerHolder>> map=entryListeners.get(name);
  if (map == null) {
    map=new HashMap<Object,List<EntryListenerHolder>>();
    final Map<Object,List<EntryListenerHolder>> map2=entryListeners.putIfAbsent(name,map);
    if (map2 != null) {
      map=map2;
    }
  }
  if (!map.containsKey(key)) {
    map.put(key,new CopyOnWriteArrayList<EntryListenerHolder>());
  }
  map.get(key).add(new EntryListenerHolder(entryListener,includeValue));
}
Program: 50248
Project: 50248
Buggy source:
private void notifyEntryListeners(EntryEvent event,Collection<EntryListener<?,?>> collection){
  if (collection == null) {
    return;
  }
switch (event.getEventType()) {
case ADDED:
    for (    EntryListener<?,?> entryListener : collection) {
      entryListener.entryAdded(event);
    }
  break;
case UPDATED:
for (EntryListener<?,?> entryListener : collection) {
  entryListener.entryUpdated(event);
}
break;
case REMOVED:
for (EntryListener<?,?> entryListener : collection) {
entryListener.entryRemoved(event);
}
break;
case EVICTED:
for (EntryListener<?,?> entryListener : collection) {
entryListener.entryEvicted(event);
}
break;
}
}

Fixed version (ground truth):
private void notifyEntryListeners(EntryEvent event,Collection<EntryListenerHolder> collection){
  if (collection == null) {
    return;
  }
  EntryEvent eventNoValue=event.getValue() != null ? new EntryEvent(event.getSource(),event.getMember(),event.getEventType().getType(),event.getKey(),null,null) : event;
switch (event.getEventType()) {
case ADDED:
    for (    EntryListenerHolder holder : collection) {
      holder.listener.entryAdded(holder.includeValue ? event : eventNoValue);
    }
  break;
case UPDATED:
for (EntryListenerHolder holder : collection) {
  holder.listener.entryUpdated(holder.includeValue ? event : eventNoValue);
}
break;
case REMOVED:
for (EntryListenerHolder holder : collection) {
holder.listener.entryRemoved(holder.includeValue ? event : eventNoValue);
}
break;
case EVICTED:
for (EntryListenerHolder holder : collection) {
holder.listener.entryEvicted(holder.includeValue ? event : eventNoValue);
}
break;
}
}
Program: 50249
Project: 50249
Buggy source:
public synchronized boolean noEntryListenerRegistered(Object key,String name){
  return !(entryListeners.get(name) != null && entryListeners.get(name).get(key) != null && entryListeners.get(name).get(key).size() > 0);
}

Fixed version (ground truth):
public synchronized Boolean noEntryListenerRegistered(Object key,String name,boolean includeValue){
  final Map<Object,List<EntryListenerHolder>> map=entryListeners.get(name);
  if (map == null || map.get(key) == null) {
    return Boolean.TRUE;
  }
  for (  final EntryListenerHolder holder : map.get(key)) {
    if (holder.includeValue == includeValue) {
      return Boolean.FALSE;
    }
 else     if (includeValue) {
      return null;
    }
  }
  return Boolean.TRUE;
}
Program: 50250
Project: 50250
Buggy source:
public synchronized void removeEntryListener(String name,Object key,EntryListener<?,?> entryListener){
  Map<Object,List<EntryListener<?,?>>> m=entryListeners.get(name);
  if (m != null) {
    List<EntryListener<?,?>> list=m.get(key);
    if (list != null) {
      list.remove(entryListener);
      if (m.get(key).size() == 0) {
        m.remove(key);
      }
    }
    if (m.size() == 0) {
      entryListeners.remove(name);
    }
  }
}

Fixed version (ground truth):
public synchronized void removeEntryListener(String name,Object key,EntryListener<?,?> entryListener){
  Map<Object,List<EntryListenerHolder>> m=entryListeners.get(name);
  if (m != null) {
    List<EntryListenerHolder> list=m.get(key);
    if (list != null) {
      for (final Iterator<EntryListenerHolder> it=list.iterator(); it.hasNext(); ) {
        final EntryListenerHolder entryListenerHolder=it.next();
        if (entryListenerHolder.listener.equals(entryListener)) {
          list.remove(entryListenerHolder);
        }
      }
      if (m.get(key).isEmpty()) {
        m.remove(key);
      }
    }
    if (m.isEmpty()) {
      entryListeners.remove(name);
    }
  }
}
Program: 50251
Project: 50251
Buggy source:
public <E,V>void registerItemListener(String name,final ItemListener<E> itemListener){
  EntryListener<E,V> e=new EntryListener<E,V>(){
    public void entryAdded(    EntryEvent<E,V> event){
      itemListener.itemAdded((E)event.getKey());
    }
    public void entryEvicted(    EntryEvent<E,V> event){
    }
    public void entryRemoved(    EntryEvent<E,V> event){
      itemListener.itemRemoved((E)event.getKey());
    }
    public void entryUpdated(    EntryEvent<E,V> event){
    }
  }
;
  entryListenerManager.registerEntryListener(name,null,e);
  itemListener2EntryListener.put(itemListener,e);
}

Fixed version (ground truth):
public <E,V>void registerItemListener(String name,final ItemListener<E> itemListener){
  EntryListener<E,V> e=new EntryListener<E,V>(){
    public void entryAdded(    EntryEvent<E,V> event){
      itemListener.itemAdded((E)event.getKey());
    }
    public void entryEvicted(    EntryEvent<E,V> event){
    }
    public void entryRemoved(    EntryEvent<E,V> event){
      itemListener.itemRemoved((E)event.getKey());
    }
    public void entryUpdated(    EntryEvent<E,V> event){
    }
  }
;
  entryListenerManager.registerEntryListener(name,null,false,e);
  itemListener2EntryListener.put(itemListener,e);
}
Program: 50252
Project: 50252
Buggy source:
public synchronized boolean shouldExecuteOnDisconnect(Connection connection){
  if (lastDisconnectedConnectionId >= connection.getVersion()) {
    return false;
  }
  lastDisconnectedConnectionId=connection.getVersion();
  return true;
}

Fixed version (ground truth):
public synchronized boolean shouldExecuteOnDisconnect(Connection connection){
  if (connection == null || lastDisconnectedConnectionId >= connection.getVersion()) {
    return false;
  }
  lastDisconnectedConnectionId=connection.getVersion();
  return true;
}
Program: 50253
Project: 50253
Buggy source:
public Connection getConnection() throws IOException {
  if (currentConnection == null) {
synchronized (this) {
      if (currentConnection == null) {
        Connection connection=searchForAvailableConnection();
        if (connection != null) {
          logger.log(Level.FINE,"String_Node_Str" + connection);
          bindConnection(connection);
          currentConnection=connection;
        }
      }
    }
  }
  return currentConnection;
}

Fixed version (ground truth):
public Connection getConnection() throws IOException {
  if (currentConnection == null) {
    boolean restored=false;
synchronized (this) {
      if (currentConnection == null) {
        Connection connection=searchForAvailableConnection();
        if (connection != null) {
          logger.log(Level.FINE,"String_Node_Str" + connection);
          bindConnection(connection);
          currentConnection=connection;
        }
        restored=currentConnection != null;
      }
    }
    if (restored) {
      notifyConnectionIsRestored();
    }
  }
  return currentConnection;
}
Program: 50254
Project: 50254
Buggy source:
public ConnectionManager(final HazelcastClient client,InetSocketAddress address){
  this.client=client;
  this.clusterMembers.add(address);
}

Fixed version (ground truth):
public ConnectionManager(final HazelcastClient client,LifecycleServiceClientImpl lifecycleService,InetSocketAddress address){
  this.client=client;
  this.lifecycleService=lifecycleService;
  this.clusterMembers.add(address);
}
Program: 50255
Project: 50255
Buggy source:
public Connection getAliveConnection(){
  if (currentConnection == null) {
synchronized (this) {
      int attempt=0;
      while (currentConnection == null) {
        Connection connection=searchForAvailableConnection();
        if (connection != null) {
          logger.log(Level.FINE,"String_Node_Str" + connection);
          currentConnection=connection;
        }
 else {
          if (attempt >= RECONNECTION_ATTEMPTS_LIMIT) {
            break;
          }
          attempt++;
          logger.log(Level.INFO,format("String_Node_Str" + "String_Node_Str",RECONNECTION_TIMEOUT,attempt,RECONNECTION_ATTEMPTS_LIMIT));
          try {
            Thread.sleep(RECONNECTION_TIMEOUT);
          }
 catch (          InterruptedException e) {
            break;
          }
        }
      }
    }
  }
  return currentConnection;
}

Fixed version (ground truth):
public Connection getAliveConnection(){
  if (currentConnection == null) {
synchronized (this) {
      currentConnection=lookForAliveConnection();
    }
  }
  return currentConnection;
}
Program: 50256
Project: 50256
Buggy source:
public synchronized void destroyConnection(Connection connection){
  if (currentConnection != null && currentConnection.getVersion() == connection.getVersion()) {
    logger.log(Level.WARNING,"String_Node_Str" + currentConnection + "String_Node_Str");
    currentConnection=null;
  }
}

Fixed version (ground truth):
public void destroyConnection(Connection connection){
  boolean lost=false;
synchronized (this) {
    if (currentConnection != null && currentConnection.getVersion() == connection.getVersion()) {
      logger.log(Level.WARNING,"String_Node_Str" + currentConnection + "String_Node_Str");
      currentConnection=null;
      lost=true;
    }
  }
  if (lost) {
    lifecycleService.fireLifecycleEvent(CLIENT_CONNECTION_LOST);
  }
}
Program: 50257
Project: 50257
Buggy source:
protected boolean restoredConnection(Connection oldConnection,Connection newConnection){
  final boolean isOldConnectionNull=oldConnection == null;
  final long oldConnectionId=oldConnection == null ? -1 : oldConnection.getVersion();
  return restoredConnection(newConnection,isOldConnectionNull,oldConnectionId);
}

Fixed version (ground truth):
protected boolean restoredConnection(Connection oldConnection,Connection newConnection){
  final long oldConnectionId=oldConnection == null ? -1 : oldConnection.getVersion();
  return restoredConnection(newConnection,oldConnectionId);
}
Program: 50258
Project: 50258
Buggy source:
public void interruptWaitingCalls(){
  Collection<Call> calls=callMap.values();
  for (  Call call : calls) {
    call.setResponse(new NoMemberAvailableException());
  }
  calls.clear();
  new Thread(new Runnable(){
    public void run(){
      client.shutdown();
    }
  }
).start();
}

Fixed version (ground truth):
public void interruptWaitingCalls(){
  final Collection<Call> values=callMap.values();
  for (Iterator<Call> it=values.iterator(); it.hasNext(); ) {
    Call call=it.next();
    call.setResponse(new NoMemberAvailableException());
    it.remove();
  }
}
Program: 50259
Project: 50259
Buggy source:
protected void customRun(){
  Packet packet;
  try {
    Connection oldConnection=connection;
    connection=client.connectionManager.getConnection();
    if (restoredConnection(oldConnection,connection)) {
      redoUnfinishedCalls(oldConnection);
    }
    if (connection == null) {
      interruptWaitingCalls();
      Thread.sleep(50);
    }
 else {
      packet=reader.readPacket(connection);
      logger.log(Level.FINEST,"String_Node_Str" + packet.getOperation() + "String_Node_Str"+ packet.getCallId());
      Call call=callMap.remove(packet.getCallId());
      if (call != null) {
        call.setResponse(packet);
      }
 else {
        if (packet.getOperation().equals(ClusterOperation.EVENT)) {
          client.getListenerManager().enqueue(packet);
        }
        if (packet.getCallId() != -1) {
          logger.log(Level.SEVERE,"String_Node_Str" + packet.getOperation() + "String_Node_Str"+ packet.getCallId());
        }
      }
    }
  }
 catch (  RuntimeException re) {
    throw re;
  }
catch (  Exception e) {
    logger.log(Level.FINE,"String_Node_Str" + e.toString());
    client.connectionManager.destroyConnection(connection);
  }
}

Fixed version (ground truth):
protected void customRun(){
  Packet packet;
  try {
    Connection oldConnection=connection;
    connection=client.connectionManager.getConnection();
    if (oldConnection != null && restoredConnection(oldConnection,connection)) {
      redoUnfinishedCalls(oldConnection);
    }
    if (connection == null) {
      interruptWaitingCalls();
      Thread.sleep(50);
    }
 else {
      packet=reader.readPacket(connection);
      logger.log(Level.FINEST,"String_Node_Str" + packet.getOperation() + "String_Node_Str"+ packet.getCallId());
      Call call=callMap.remove(packet.getCallId());
      if (call != null) {
        call.setResponse(packet);
      }
 else {
        if (packet.getOperation().equals(ClusterOperation.EVENT)) {
          client.getListenerManager().enqueue(packet);
        }
        if (packet.getCallId() != -1) {
          logger.log(Level.SEVERE,"String_Node_Str" + packet.getOperation() + "String_Node_Str"+ packet.getCallId());
        }
      }
    }
  }
 catch (  RuntimeException re) {
    throw re;
  }
catch (  Exception e) {
    logger.log(Level.FINE,"String_Node_Str" + e.toString());
    client.connectionManager.destroyConnection(connection);
  }
}
Program: 50260
Project: 50260
Buggy source:
public boolean resume(){
synchronized (lifecycleLock) {
    if (paused.get()) {
      fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.RESUMING));
    }
 else {
      return false;
    }
    paused.set(false);
    fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.RESUMED));
    return true;
  }
}

Fixed version (ground truth):
public boolean resume(){
synchronized (lifecycleLock) {
    if (paused.get()) {
      fireLifecycleEvent(RESUMING);
    }
 else {
      return false;
    }
    paused.set(false);
    fireLifecycleEvent(RESUMED);
    return true;
  }
}
Program: 50261
Project: 50261
Buggy source:
public void fireLifecycleEvent(LifecycleEvent lifecycleEvent){
  logger.log(Level.INFO,"String_Node_Str" + lifecycleEvent.getState());
  for (  LifecycleListener lifecycleListener : lsLifecycleListeners) {
    lifecycleListener.stateChanged(lifecycleEvent);
  }
}

Fixed version (ground truth):
public void fireLifecycleEvent(final LifecycleEvent event){
  logger.log(Level.INFO,"String_Node_Str" + event.getState());
  for (  LifecycleListener lifecycleListener : lsLifecycleListeners) {
    lifecycleListener.stateChanged(event);
  }
}
Program: 50262
Project: 50262
Buggy source:
public boolean pause(){
synchronized (lifecycleLock) {
    if (!paused.get()) {
      fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.PAUSING));
    }
 else {
      return false;
    }
    paused.set(true);
    fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.PAUSED));
    return true;
  }
}

Fixed version (ground truth):
public boolean pause(){
synchronized (lifecycleLock) {
    if (!paused.get()) {
      fireLifecycleEvent(PAUSING);
    }
 else {
      return false;
    }
    paused.set(true);
    fireLifecycleEvent(PAUSED);
    return true;
  }
}
Program: 50263
Project: 50263
Buggy source:
public void shutdown(){
synchronized (lifecycleLock) {
    long begin=System.currentTimeMillis();
    fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.SHUTTING_DOWN));
    hazelcastClient.doShutdown();
    running.set(false);
    long time=System.currentTimeMillis() - begin;
    logger.log(Level.FINE,"String_Node_Str" + time + "String_Node_Str");
    fireLifecycleEvent(new LifecycleEvent(LifecycleEvent.LifecycleState.SHUTDOWN));
  }
}

Fixed version (ground truth):
public void shutdown(){
synchronized (lifecycleLock) {
    long begin=System.currentTimeMillis();
    fireLifecycleEvent(SHUTTING_DOWN);
    hazelcastClient.doShutdown();
    running.set(false);
    long time=System.currentTimeMillis() - begin;
    logger.log(Level.FINE,"String_Node_Str" + time + "String_Node_Str");
    fireLifecycleEvent(SHUTDOWN);
  }
}
Program: 50264
Project: 50264
Buggy source:
public Connection lookForAliveConnection(){
  final int attemptsLimit=client.getProperties().getInteger(ClientPropertyName.RECONNECTION_ATTEMPTS_LIMIT);
  final int reconnectionTimeout=client.getProperties().getInteger(ClientPropertyName.RECONNECTION_TIMEOUT);
  boolean restored=false;
  int attempt=0;
  while (currentConnection == null) {
synchronized (this) {
      if (currentConnection == null) {
        currentConnection=searchForAvailableConnection();
        restored=currentConnection != null;
      }
    }
    if (currentConnection != null) {
      logger.log(Level.FINE,"String_Node_Str" + currentConnection);
      break;
    }
    if (attempt >= attemptsLimit) {
      break;
    }
    attempt++;
    logger.log(Level.INFO,format("String_Node_Str" + "String_Node_Str",reconnectionTimeout,attempt,attemptsLimit));
    try {
      Thread.sleep(reconnectionTimeout);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
  if (restored) {
    notifyConnectionIsRestored();
  }
  return currentConnection;
}

Fixed version (ground truth):
private Connection lookForAliveConnection(final int attemptsLimit,final int reconnectionTimeout){
  boolean restored=false;
  int attempt=0;
  while (currentConnection == null) {
synchronized (this) {
      if (currentConnection == null) {
        currentConnection=searchForAvailableConnection();
        restored=currentConnection != null;
      }
    }
    if (currentConnection != null) {
      logger.log(Level.FINE,"String_Node_Str" + currentConnection);
      break;
    }
    if (attempt >= attemptsLimit) {
      break;
    }
    attempt++;
    logger.log(Level.INFO,format("String_Node_Str" + "String_Node_Str",reconnectionTimeout,attempt,attemptsLimit));
    try {
      Thread.sleep(reconnectionTimeout);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
  if (restored) {
    notifyConnectionIsRestored();
  }
  return currentConnection;
}
Program: 50265
Project: 50265
Buggy source:
public InRunnable(HazelcastClient client,Map<Long,Call> calls,PacketReader reader){
  super(client,calls);
  this.reader=reader;
}

Fixed version (ground truth):
public InRunnable(HazelcastClient client,OutRunnable outRunnable,Map<Long,Call> calls,PacketReader reader){
  super(client,calls);
  this.outRunnable=outRunnable;
  this.reader=reader;
}