nus-yam/ex-repair huggingface dataset:
Program: 48922
Project: 48922
Buggy source:
protected Set<Data> localKeySetInternal(){
  final NodeEngine nodeEngine=getNodeEngine();
  try {
    Map<Integer,Object> results=nodeEngine.getOperationService().invokeOnTargetPartitions(SERVICE_NAME,new BinaryOperationFactory(new MapKeySetOperation(name),nodeEngine),nodeEngine.getThisAddress());
    Set<Data> keySet=new HashSet<Data>();
    for (    Object result : results.values()) {
      Set keys=((MapKeySet)getService().toObject(result)).getKeySet();
      keySet.addAll(keys);
    }
    return keySet;
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
protected Set<Data> localKeySetInternal(){
  final NodeEngine nodeEngine=getNodeEngine();
  final MapService mapService=getService();
  Set<Data> keySet=new HashSet<Data>();
  try {
    List<Integer> memberPartitions=nodeEngine.getPartitionService().getMemberPartitions(nodeEngine.getThisAddress());
    for (    Integer memberPartition : memberPartitions) {
      RecordStore recordStore=mapService.getRecordStore(memberPartition,name);
      keySet.addAll(recordStore.getRecords().keySet());
    }
    return keySet;
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 48923
Project: 48923
Buggy source:
public void memberAdded(MembershipEvent membershipEvent){
  try {
    Member member=membershipEvent.getMember();
    if (member != null && instance.node.isMaster() && urlChanged) {
      ManagementCenterConfigOperation operation=new ManagementCenterConfigOperation(webServerUrl);
      call(((MemberImpl)member).getAddress(),operation);
    }
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void memberAdded(MembershipEvent membershipEvent){
  try {
    Member member=membershipEvent.getMember();
    if (member != null && instance.node.isMaster() && urlChanged) {
      ManagementCenterConfigOperation operation=new ManagementCenterConfigOperation(webServerUrl);
      callOnMember(member,operation);
    }
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str",e);
  }
}
Program: 48924
Project: 48924
Buggy source:
public byte[] changeWebServerUrlOverCluster(String groupName,String groupPass,String newUrl){
  try {
    GroupConfig groupConfig=instance.getConfig().getGroupConfig();
    if (!(groupConfig.getName().equals(groupName) && groupConfig.getPassword().equals(groupPass)))     return HttpCommand.RES_403;
    ManagementCenterConfigOperation operation=new ManagementCenterConfigOperation(newUrl);
    sendToAllMembers(operation);
  }
 catch (  Throwable throwable) {
    logger.warning("String_Node_Str",throwable);
    return HttpCommand.RES_500;
  }
  return HttpCommand.RES_204;
}

Fixed version (ground truth):
public byte[] changeWebServerUrlOverCluster(String groupName,String groupPass,String newUrl){
  try {
    GroupConfig groupConfig=instance.getConfig().getGroupConfig();
    if (!(groupConfig.getName().equals(groupName) && groupConfig.getPassword().equals(groupPass)))     return HttpCommand.RES_403;
    final Collection<MemberImpl> memberList=instance.node.clusterService.getMemberList();
    for (    MemberImpl member : memberList) {
      send(member.getAddress(),new ManagementCenterConfigOperation(newUrl));
    }
  }
 catch (  Throwable throwable) {
    logger.warning("String_Node_Str",throwable);
    return HttpCommand.RES_500;
  }
  return HttpCommand.RES_204;
}
Program: 48925
Project: 48925
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Object result=null;
  ScriptExecutorOperation operation=new ScriptExecutorOperation(engine,script,bindings);
  if (targetAllMembers) {
    result=mcs.callOnAllMembers(operation);
  }
 else   if (targets.isEmpty()) {
    result=NULL;
  }
 else   if (targets.size() == 1) {
    result=mcs.call(targets.iterator().next(),operation);
  }
 else {
    result=mcs.callOnAddresses(targets,operation);
  }
  if (result != null) {
    if (result instanceof Map) {
      dos.writeByte(MAP);
      writeMap(dos,(Map)result);
    }
 else     if (result instanceof Collection) {
      dos.writeByte(COLLECTION);
      writeCollection(dos,(Collection)result);
    }
 else {
      dos.writeByte(OTHER);
      dos.writeObject(result);
    }
  }
 else {
    dos.writeByte(NULL);
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  Object result=null;
  if (targetAllMembers) {
    final Set<Member> members=mcs.getHazelcastInstance().getCluster().getMembers();
    final ArrayList list=new ArrayList(members.size());
    for (    Member member : members) {
      list.add(mcs.callOnMember(member,new ScriptExecutorOperation(engine,script,bindings)));
    }
    result=list;
  }
 else {
    final ArrayList list=new ArrayList(targets.size());
    for (    Address address : targets) {
      list.add(mcs.callOnAddress(address,new ScriptExecutorOperation(engine,script,bindings)));
    }
    result=list;
  }
  if (result != null) {
    if (result instanceof Map) {
      dos.writeByte(MAP);
      writeMap(dos,(Map)result);
    }
 else     if (result instanceof Collection) {
      dos.writeByte(COLLECTION);
      writeCollection(dos,(Collection)result);
    }
 else {
      dos.writeByte(OTHER);
      dos.writeObject(result);
    }
  }
 else {
    dos.writeByte(NULL);
  }
}
Program: 48926
Project: 48926
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  dos.writeBoolean(update);
  if (update) {
    mcs.callOnAllMembers(new UpdateMapConfigOperation(map,config));
    dos.writeUTF("String_Node_Str");
  }
 else {
    MapConfig cfg=(MapConfig)mcs.call(target,new GetMapConfigOperation(map));
    if (cfg != null) {
      dos.writeBoolean(true);
      new MapConfigAdapter(cfg).writeData(dos);
    }
 else {
      dos.writeBoolean(false);
    }
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  dos.writeBoolean(update);
  if (update) {
    final Set<Member> members=mcs.getHazelcastInstance().getCluster().getMembers();
    for (    Member member : members) {
      mcs.callOnMember(member,new UpdateMapConfigOperation(map,config));
    }
    dos.writeUTF("String_Node_Str");
  }
 else {
    MapConfig cfg=(MapConfig)mcs.callOnAddress(target,new GetMapConfigOperation(map));
    if (cfg != null) {
      dos.writeBoolean(true);
      new MapConfigAdapter(cfg).writeData(dos);
    }
 else {
      dos.writeBoolean(false);
    }
  }
}
Program: 48927
Project: 48927
Buggy source:
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  String threadDump=(String)mcs.call(target,new ThreadDumpOperation(isDeadlock));
  if (threadDump != null) {
    dos.writeBoolean(true);
    writeLongString(dos,threadDump);
  }
 else {
    dos.writeBoolean(false);
  }
}

Fixed version (ground truth):
public void writeResponse(ManagementCenterService mcs,ObjectDataOutput dos) throws Exception {
  String threadDump=(String)mcs.callOnAddress(target,new ThreadDumpOperation(isDeadlock));
  if (threadDump != null) {
    dos.writeBoolean(true);
    writeLongString(dos,threadDump);
  }
 else {
    dos.writeBoolean(false);
  }
}
Program: 48928
Project: 48928
Buggy source:
public Operation getBackupOperation(){
  return new CompareAndRemoveBackupOperation(proxyId,dataKey,idSet);
}

Fixed version (ground truth):
public Operation getBackupOperation(){
  return new CompareAndRemoveBackupOperation(proxyId,dataKey,idMap.keySet());
}
Program: 48929
Project: 48929
Buggy source:
public void run() throws Exception {
  CollectionWrapper wrapper=getCollectionWrapper();
  if (wrapper == null) {
    response=false;
    return;
  }
  idSet=new HashSet<Long>();
  List objList=dataList;
  if (!isBinary()) {
    objList=new ArrayList(dataList.size());
    for (    Data data : dataList) {
      objList.add(toObject(data));
    }
  }
  Iterator<CollectionRecord> iter=wrapper.getCollection().iterator();
  while (iter.hasNext()) {
    CollectionRecord record=iter.next();
    boolean contains=objList.contains(record.getObject());
    if ((contains && !retain) || (!contains && retain)) {
      idSet.add(record.getRecordId());
      iter.remove();
    }
  }
  response=!idSet.isEmpty();
  if (wrapper.getCollection().isEmpty()) {
    removeCollection();
  }
}

Fixed version (ground truth):
public void run() throws Exception {
  CollectionWrapper wrapper=getCollectionWrapper();
  if (wrapper == null) {
    response=false;
    return;
  }
  idMap=new HashMap<Long,CollectionRecord>();
  List objList=dataList;
  if (!isBinary()) {
    objList=new ArrayList(dataList.size());
    for (    Data data : dataList) {
      objList.add(toObject(data));
    }
  }
  Iterator<CollectionRecord> iter=wrapper.getCollection().iterator();
  while (iter.hasNext()) {
    CollectionRecord record=iter.next();
    boolean contains=objList.contains(record.getObject());
    if ((contains && !retain) || (!contains && retain)) {
      idMap.put(record.getRecordId(),record);
      iter.remove();
    }
  }
  response=!idMap.isEmpty();
  if (wrapper.getCollection().isEmpty()) {
    removeCollection();
  }
}
Program: 48930
Project: 48930
Buggy source:
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    final Connection connection=f.get(30,TimeUnit.SECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}

Fixed version (ground truth):
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=connectionAttempts * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}
Program: 48931
Project: 48931
Buggy source:
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=connectionAttempts * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}

Fixed version (ground truth):
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=((long)connectionAttempts) * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}
Program: 48932
Project: 48932
Buggy source:
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    final Connection connection=f.get(30,TimeUnit.SECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}

Fixed version (ground truth):
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=connectionAttempts * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}
Program: 48933
Project: 48933
Buggy source:
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=connectionAttempts * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}

Fixed version (ground truth):
public void start(){
  final Future<Connection> f=client.getClientExecutionService().submit(new InitialConnectionCall());
  try {
    int connectionAttemptPeriodMs=client.getClientConfig().getConnectionAttemptPeriod();
    int connectionAttempts=client.getClientConfig().getConnectionAttemptLimit();
    long timeoutMs=((long)connectionAttempts) * connectionAttemptPeriodMs + 1000;
    final Connection connection=f.get(timeoutMs,TimeUnit.MILLISECONDS);
    clusterThread.setInitialConn(connection);
  }
 catch (  Throwable e) {
    if (e instanceof ExecutionException && e.getCause() != null) {
      e=e.getCause();
      fixRemoteStackTrace(e,Thread.currentThread().getStackTrace());
    }
    if (e instanceof RuntimeException) {
      throw (RuntimeException)e;
    }
    throw new HazelcastException(e);
  }
  clusterThread.start();
  while (membersRef.get() == null) {
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e) {
      throw new HazelcastException(e);
    }
  }
  active=true;
}
Program: 48936
Project: 48936
Buggy source:
@Override public boolean contains(Object o){
  for (  Set<QueryableEntry> otherIndexedResult : lsIndexedResults) {
    if (otherIndexedResult.contains(o))     return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean contains(Object o){
  for (  Set<QueryableEntry> otherIndexedResult : indexedResults) {
    if (otherIndexedResult.contains(o))     return true;
  }
  return false;
}
Program: 48937
Project: 48937
Buggy source:
@Override public Iterator<QueryableEntry> iterator(){
  if (entries != null) {
    return entries.iterator();
  }
  entries=new HashSet<QueryableEntry>(lsIndexedResults.get(0));
  for (int i=1; i < lsIndexedResults.size(); i++) {
    entries.addAll(lsIndexedResults.get(i));
  }
  return entries.iterator();
}

Fixed version (ground truth):
@Override public Iterator<QueryableEntry> iterator(){
  if (entries == null) {
    if (!indexedResults.isEmpty()) {
      if (indexedResults.size() == 1) {
        entries=new HashSet<QueryableEntry>(indexedResults.get(0));
      }
 else {
        entries=new HashSet<QueryableEntry>();
        for (        Set<QueryableEntry> result : indexedResults) {
          entries.addAll(result);
        }
      }
    }
 else {
      entries=Collections.emptySet();
    }
  }
  return entries.iterator();
}
Program: 48938
Project: 48938
Buggy source:
@Override public int size(){
  return lsIndexedResults.get(0).size();
}

Fixed version (ground truth):
@Override public int size(){
  return indexedResults.isEmpty() ? 0 : indexedResults.get(0).size();
}
Program: 48939
Project: 48939
Buggy source:
public OrResultSet(List<Set<QueryableEntry>> lsIndexedResults){
  this.lsIndexedResults=lsIndexedResults;
}

Fixed version (ground truth):
public OrResultSet(List<Set<QueryableEntry>> indexedResults){
  this.indexedResults=indexedResults;
}
Program: 48940
Project: 48940
Buggy source:
public void run(){
  Record record=recordStore.getRecords().get(dataKey);
  if (record == null) {
    record=mapService.createRecord(name,dataKey,dataValue,ttl,false);
    updateSizeEstimator(calculateRecordSize(record));
    recordStore.getRecords().put(dataKey,record);
  }
 else {
    updateSizeEstimator(-calculateRecordSize(record));
    if (record instanceof DataRecord)     ((DataRecord)record).setValue(dataValue);
 else     if (record instanceof ObjectRecord)     ((ObjectRecord)record).setValue(mapService.toObject(dataValue));
    updateSizeEstimator(calculateRecordSize(record));
  }
  if (unlockKey)   recordStore.forceUnlock(dataKey);
}

Fixed version (ground truth):
public void run(){
  Record record=recordStore.getRecords().get(dataKey);
  if (record == null) {
    record=mapService.createRecord(name,dataKey,dataValue,ttl,false);
    updateSizeEstimator(calculateRecordSize(record));
    recordStore.getRecords().put(dataKey,record);
  }
 else {
    updateSizeEstimator(-calculateRecordSize(record));
    if (record instanceof DataRecord) {
      ((DataRecord)record).setValue(dataValue);
    }
 else     if (record instanceof ObjectRecord) {
      ((ObjectRecord)record).setValue(mapService.toObject(dataValue));
    }
    updateSizeEstimator(calculateRecordSize(record));
  }
  if (unlockKey)   recordStore.forceUnlock(dataKey);
}
Program: 48941
Project: 48941
Buggy source:
/** 
 * Cost of map & near cache todo in object mode object size is zero.
 */
public long getHeapCost();

Fixed version (ground truth):
/** 
 * Cost of map & near cache todo in object mode object size is zero.
 * @return heap cost
 */
public long getHeapCost();
Program: 48943
Project: 48943
Buggy source:
public CallTimeoutException(String message){
  super(message);
}

Fixed version (ground truth):
public CallTimeoutException(String opName,long invocationTime,long timeout){
  super("String_Node_Str" + opName + "String_Node_Str"+ invocationTime+ "String_Node_Str"+ timeout);
}
Program: 48944
Project: 48944
Buggy source:
public void notify(Object obj){
  final Object response;
  if (obj == null) {
    response=NULL_RESPONSE;
  }
 else   if (obj instanceof Throwable) {
    final Throwable error=(Throwable)obj;
    final ExceptionAction action=onException(error);
    final int localInvokeCount=invokeCount;
    if (action == ExceptionAction.RETRY_INVOCATION && localInvokeCount < tryCount) {
      response=RETRY_RESPONSE;
      if (localInvokeCount > 99 && localInvokeCount % 10 == 0) {
        logger.warning("String_Node_Str" + toString() + "String_Node_Str"+ error);
      }
    }
 else     if (action == ExceptionAction.CONTINUE_WAIT) {
      response=WAIT_RESPONSE;
    }
 else {
      response=obj;
    }
  }
 else {
    response=obj;
  }
  responseProcessor.process(response);
}

Fixed version (ground truth):
public void notify(Object obj){
  final Object response;
  if (obj == null) {
    response=NULL_RESPONSE;
  }
 else   if (obj instanceof CallTimeoutException) {
    response=RETRY_RESPONSE;
    if (logger.isFinestEnabled()) {
      logger.finest("String_Node_Str" + toString());
    }
    invokeCount--;
  }
 else   if (obj instanceof Throwable) {
    final Throwable error=(Throwable)obj;
    final ExceptionAction action=onException(error);
    final int localInvokeCount=invokeCount;
    if (action == ExceptionAction.RETRY_INVOCATION && localInvokeCount < tryCount) {
      response=RETRY_RESPONSE;
      if (localInvokeCount > 99 && localInvokeCount % 10 == 0) {
        logger.warning("String_Node_Str" + toString() + "String_Node_Str"+ error);
      }
    }
 else     if (action == ExceptionAction.CONTINUE_WAIT) {
      response=WAIT_RESPONSE;
    }
 else {
      response=obj;
    }
  }
 else {
    response=obj;
  }
  responseProcessor.process(response);
}
Program: 48946
Project: 48946
Buggy source:
public boolean isCallTimedOut(){
  final NodeEngineImpl nodeEngine=(NodeEngineImpl)getNodeEngine();
  if (nodeEngine.operationService.isCallTimedOut(op)) {
    cancel(new CallTimeoutException("String_Node_Str" + op.getClass().getName()));
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isCallTimedOut(){
  final NodeEngineImpl nodeEngine=(NodeEngineImpl)getNodeEngine();
  if (nodeEngine.operationService.isCallTimedOut(op)) {
    cancel(new CallTimeoutException(op.getClass().getName(),op.getInvocationTime(),op.getCallTimeout()));
    return true;
  }
  return false;
}
Program: 48947
Project: 48947
Buggy source:
@Override public boolean contains(Object o){
  for (  Set<QueryableEntry> otherIndexedResult : lsIndexedResults) {
    if (otherIndexedResult.contains(o))     return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean contains(Object o){
  for (  Set<QueryableEntry> otherIndexedResult : indexedResults) {
    if (otherIndexedResult.contains(o))     return true;
  }
  return false;
}
Program: 48948
Project: 48948
Buggy source:
@Override public Iterator<QueryableEntry> iterator(){
  if (entries != null) {
    return entries.iterator();
  }
  entries=new HashSet<QueryableEntry>(lsIndexedResults.get(0));
  for (int i=1; i < lsIndexedResults.size(); i++) {
    entries.addAll(lsIndexedResults.get(i));
  }
  return entries.iterator();
}

Fixed version (ground truth):
@Override public Iterator<QueryableEntry> iterator(){
  if (entries == null) {
    if (!indexedResults.isEmpty()) {
      if (indexedResults.size() == 1) {
        entries=new HashSet<QueryableEntry>(indexedResults.get(0));
      }
 else {
        entries=new HashSet<QueryableEntry>();
        for (        Set<QueryableEntry> result : indexedResults) {
          entries.addAll(result);
        }
      }
    }
 else {
      entries=Collections.emptySet();
    }
  }
  return entries.iterator();
}
Program: 48949
Project: 48949
Buggy source:
@Override public int size(){
  return lsIndexedResults.get(0).size();
}

Fixed version (ground truth):
@Override public int size(){
  return indexedResults.isEmpty() ? 0 : indexedResults.get(0).size();
}
Program: 48950
Project: 48950
Buggy source:
public OrResultSet(List<Set<QueryableEntry>> lsIndexedResults){
  this.lsIndexedResults=lsIndexedResults;
}

Fixed version (ground truth):
public OrResultSet(List<Set<QueryableEntry>> indexedResults){
  this.indexedResults=indexedResults;
}
Program: 48951
Project: 48951
Buggy source:
public CallTimeoutException(String message){
  super(message);
}

Fixed version (ground truth):
public CallTimeoutException(String opName,long invocationTime,long timeout){
  super("String_Node_Str" + opName + "String_Node_Str"+ invocationTime+ "String_Node_Str"+ timeout);
}
Program: 48952
Project: 48952
Buggy source:
public void notify(Object obj){
  final Object response;
  if (obj == null) {
    response=NULL_RESPONSE;
  }
 else   if (obj instanceof Throwable) {
    final Throwable error=(Throwable)obj;
    final ExceptionAction action=onException(error);
    final int localInvokeCount=invokeCount;
    if (action == ExceptionAction.RETRY_INVOCATION && localInvokeCount < tryCount) {
      response=RETRY_RESPONSE;
      if (localInvokeCount > 99 && localInvokeCount % 10 == 0) {
        logger.warning("String_Node_Str" + toString() + "String_Node_Str"+ error);
      }
    }
 else     if (action == ExceptionAction.CONTINUE_WAIT) {
      response=WAIT_RESPONSE;
    }
 else {
      response=obj;
    }
  }
 else {
    response=obj;
  }
  responseProcessor.process(response);
}

Fixed version (ground truth):
public void notify(Object obj){
  final Object response;
  if (obj == null) {
    response=NULL_RESPONSE;
  }
 else   if (obj instanceof CallTimeoutException) {
    response=RETRY_RESPONSE;
    if (logger.isFinestEnabled()) {
      logger.finest("String_Node_Str" + toString());
    }
    invokeCount--;
  }
 else   if (obj instanceof Throwable) {
    final Throwable error=(Throwable)obj;
    final ExceptionAction action=onException(error);
    final int localInvokeCount=invokeCount;
    if (action == ExceptionAction.RETRY_INVOCATION && localInvokeCount < tryCount) {
      response=RETRY_RESPONSE;
      if (localInvokeCount > 99 && localInvokeCount % 10 == 0) {
        logger.warning("String_Node_Str" + toString() + "String_Node_Str"+ error);
      }
    }
 else     if (action == ExceptionAction.CONTINUE_WAIT) {
      response=WAIT_RESPONSE;
    }
 else {
      response=obj;
    }
  }
 else {
    response=obj;
  }
  responseProcessor.process(response);
}
Program: 48954
Project: 48954
Buggy source:
public boolean isCallTimedOut(){
  final NodeEngineImpl nodeEngine=(NodeEngineImpl)getNodeEngine();
  if (nodeEngine.operationService.isCallTimedOut(op)) {
    cancel(new CallTimeoutException("String_Node_Str" + op.getClass().getName()));
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean isCallTimedOut(){
  final NodeEngineImpl nodeEngine=(NodeEngineImpl)getNodeEngine();
  if (nodeEngine.operationService.isCallTimedOut(op)) {
    cancel(new CallTimeoutException(op.getClass().getName(),op.getInvocationTime(),op.getCallTimeout()));
    return true;
  }
  return false;
}
Program: 48956
Project: 48956
Buggy source:
public void txnOfferBackupReserve(long itemId){
  QueueItem item=new QueueItem(this,itemId,null);
  Object o=txMap.put(itemId,item);
  if (o != null) {
    logger.severe("String_Node_Str" + itemId);
  }
}

Fixed version (ground truth):
public void txnOfferBackupReserve(long itemId,String transactionId){
  QueueItem item=new QueueItem(this,itemId,null);
  Object o=txMap.put(itemId,new TxQueueItem(item).setPollOperation(false).setTransactionId(transactionId));
  if (o != null) {
    logger.severe("String_Node_Str" + itemId);
  }
}
Program: 48957
Project: 48957
Buggy source:
public void rollbackTransaction(String transactionId){
  final Iterator<QueueItem> iterator=txMap.values().iterator();
  while (iterator.hasNext()) {
    final TxQueueItem item=(TxQueueItem)iterator.next();
    if (transactionId.equals(item.getTransactionId())) {
      iterator.remove();
      if (item.isPollOperation()) {
        getItemQueue().offerFirst(item);
      }
    }
  }
}

Fixed version (ground truth):
public void rollbackTransaction(String transactionId){
  final Iterator<TxQueueItem> iterator=txMap.values().iterator();
  while (iterator.hasNext()) {
    final TxQueueItem item=iterator.next();
    if (transactionId.equals(item.getTransactionId())) {
      iterator.remove();
      if (item.isPollOperation()) {
        getItemQueue().offerFirst(item);
      }
    }
  }
}
Program: 48958
Project: 48958
Buggy source:
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(getItemQueue().size());
  for (  QueueItem item : getItemQueue()) {
    item.writeData(out);
  }
  out.writeInt(txMap.size());
  for (  QueueItem item : txMap.values()) {
    item.writeData(out);
  }
}

Fixed version (ground truth):
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeInt(getItemQueue().size());
  for (  QueueItem item : getItemQueue()) {
    item.writeData(out);
  }
  out.writeInt(txMap.size());
  for (  TxQueueItem item : txMap.values()) {
    item.writeData(out);
  }
}
Program: 48959
Project: 48959
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  int size=in.readInt();
  for (int j=0; j < size; j++) {
    QueueItem item=new QueueItem(this,-1,null);
    item.readData(in);
    getItemQueue().offer(item);
    setId(item.getItemId());
  }
  int txSize=in.readInt();
  for (int j=0; j < txSize; j++) {
    QueueItem item=new QueueItem(this,-1,null);
    item.readData(in);
    txMap.put(item.getItemId(),item);
    setId(item.getItemId());
  }
}

Fixed version (ground truth):
public void readData(ObjectDataInput in) throws IOException {
  int size=in.readInt();
  for (int j=0; j < size; j++) {
    QueueItem item=new QueueItem(this,-1,null);
    item.readData(in);
    getItemQueue().offer(item);
    setId(item.getItemId());
  }
  int txSize=in.readInt();
  for (int j=0; j < txSize; j++) {
    TxQueueItem item=new TxQueueItem(this,-1,null);
    item.readData(in);
    txMap.put(item.getItemId(),item);
    setId(item.getItemId());
  }
}
Program: 48960
Project: 48960
Buggy source:
public boolean txnPollBackupReserve(long itemId){
  QueueItem item=getBackupMap().remove(itemId);
  if (item == null) {
    throw new TransactionException("String_Node_Str" + itemId);
  }
  txMap.put(itemId,item);
  return true;
}

Fixed version (ground truth):
public boolean txnPollBackupReserve(long itemId,String transactionId){
  QueueItem item=getBackupMap().remove(itemId);
  if (item == null) {
    throw new TransactionException("String_Node_Str" + itemId);
  }
  txMap.put(itemId,new TxQueueItem(item).setPollOperation(true).setTransactionId(transactionId));
  return true;
}
Program: 48961
Project: 48961
Buggy source:
public QueueItem txnPollReserve(long reservedOfferId,String transactionId){
  QueueItem item=getItemQueue().poll();
  if (item == null) {
    item=txMap.remove(reservedOfferId);
    return item;
  }
  if (store.isEnabled() && item.getData() == null) {
    try {
      load(item);
    }
 catch (    Exception e) {
      throw new HazelcastException(e);
    }
  }
  txMap.put(item.getItemId(),new TxQueueItem(item).setPollOperation(true).setTransactionId(transactionId));
  return item;
}

Fixed version (ground truth):
public QueueItem txnPollReserve(long reservedOfferId,String transactionId){
  QueueItem item=getItemQueue().poll();
  if (item == null) {
    TxQueueItem txItem=txMap.remove(reservedOfferId);
    if (txItem == null) {
      return null;
    }
    item=new QueueItem(this,txItem.getItemId(),txItem.getData());
    return item;
  }
  if (store.isEnabled() && item.getData() == null) {
    try {
      load(item);
    }
 catch (    Exception e) {
      throw new HazelcastException(e);
    }
  }
  txMap.put(item.getItemId(),new TxQueueItem(item).setPollOperation(true).setTransactionId(transactionId));
  return item;
}
Program: 48962
Project: 48962
Buggy source:
public Data txnCommitPollBackup(long itemId){
  QueueItem item=txMap.remove(itemId);
  if (item == null) {
    logger.warning("String_Node_Str" + itemId);
    return null;
  }
  if (store.isEnabled()) {
    try {
      store.delete(item.getItemId());
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return item.getData();
}

Fixed version (ground truth):
public Data txnCommitPollBackup(long itemId){
  TxQueueItem item=txMap.remove(itemId);
  if (item == null) {
    logger.warning("String_Node_Str" + itemId);
    return null;
  }
  if (store.isEnabled()) {
    try {
      store.delete(item.getItemId());
    }
 catch (    Exception ignored) {
      logger.severe("String_Node_Str" + item.getItemId(),ignored);
    }
  }
  return item.getData();
}
Program: 48964
Project: 48964
Buggy source:
public IdentifiedDataSerializable createNew(Integer arg){
  return new QueueTransactionRollbackOperation();
}

Fixed version (ground truth):
public IdentifiedDataSerializable createNew(Integer arg){
  return new TxQueueItem();
}
Program: 48965
Project: 48965
Buggy source:
public QueueTransactionLog(long itemId,String name,int partitionId,Operation op){
  this.itemId=itemId;
  this.name=name;
  this.partitionId=partitionId;
  this.op=op;
}

Fixed version (ground truth):
public QueueTransactionLog(String transactionId,long itemId,String name,int partitionId,Operation op){
  this.transactionId=transactionId;
  this.itemId=itemId;
  this.name=name;
  this.partitionId=partitionId;
  this.op=op;
}
Program: 48966
Project: 48966
Buggy source:
public Future prepare(NodeEngine nodeEngine){
  boolean pollOperation=op instanceof TxnPollOperation;
  TxnPrepareOperation operation=new TxnPrepareOperation(name,itemId,pollOperation);
  try {
    Invocation invocation=nodeEngine.getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    return invocation.invoke();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}

Fixed version (ground truth):
public Future prepare(NodeEngine nodeEngine){
  boolean pollOperation=op instanceof TxnPollOperation;
  TxnPrepareOperation operation=new TxnPrepareOperation(name,itemId,pollOperation,transactionId);
  try {
    Invocation invocation=nodeEngine.getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    return invocation.invoke();
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
}
Program: 48967
Project: 48967
Buggy source:
public void readData(ObjectDataInput in) throws IOException {
  itemId=in.readLong();
  name=in.readUTF();
  partitionId=in.readInt();
  op=in.readObject();
}

Fixed version (ground truth):
public void readData(ObjectDataInput in) throws IOException {
  transactionId=in.readUTF();
  itemId=in.readLong();
  name=in.readUTF();
  partitionId=in.readInt();
  op=in.readObject();
}
Program: 48968
Project: 48968
Buggy source:
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeLong(itemId);
  out.writeUTF(name);
  out.writeInt(partitionId);
  out.writeObject(op);
}

Fixed version (ground truth):
public void writeData(ObjectDataOutput out) throws IOException {
  out.writeUTF(transactionId);
  out.writeLong(itemId);
  out.writeUTF(name);
  out.writeInt(partitionId);
  out.writeObject(op);
}
Program: 48969
Project: 48969
Buggy source:
public Data pollInternal(long timeout){
  QueueItem reservedOffer=offeredQueue.peek();
  TxnReservePollOperation operation=new TxnReservePollOperation(name,timeout,reservedOffer == null ? -1 : reservedOffer.getItemId(),tx.getTxnId());
  try {
    Invocation invocation=getNodeEngine().getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    Future<QueueItem> f=invocation.invoke();
    QueueItem item=f.get();
    if (item != null) {
      if (reservedOffer != null && item.getItemId() == reservedOffer.getItemId()) {
        offeredQueue.poll();
        tx.removeTransactionLog(new TransactionLogKey(reservedOffer.getItemId(),name));
        return reservedOffer.getData();
      }
      if (!itemIdSet.add(item.getItemId())) {
        throw new TransactionException("String_Node_Str" + item.getItemId());
      }
      tx.addTransactionLog(new QueueTransactionLog(item.getItemId(),name,partitionId,new TxnPollOperation(name,item.getItemId())));
      return item.getData();
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
  return null;
}

Fixed version (ground truth):
public Data pollInternal(long timeout){
  QueueItem reservedOffer=offeredQueue.peek();
  TxnReservePollOperation operation=new TxnReservePollOperation(name,timeout,reservedOffer == null ? -1 : reservedOffer.getItemId(),tx.getTxnId());
  try {
    Invocation invocation=getNodeEngine().getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    Future<QueueItem> f=invocation.invoke();
    QueueItem item=f.get();
    if (item != null) {
      if (reservedOffer != null && item.getItemId() == reservedOffer.getItemId()) {
        offeredQueue.poll();
        tx.removeTransactionLog(new TransactionLogKey(reservedOffer.getItemId(),name));
        return reservedOffer.getData();
      }
      if (!itemIdSet.add(item.getItemId())) {
        throw new TransactionException("String_Node_Str" + item.getItemId());
      }
      tx.addTransactionLog(new QueueTransactionLog(tx.getTxnId(),item.getItemId(),name,partitionId,new TxnPollOperation(name,item.getItemId())));
      return item.getData();
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
  return null;
}
Program: 48970
Project: 48970
Buggy source:
public boolean offerInternal(Data data,long timeout){
  throwExceptionIfNull(data);
  TxnReserveOfferOperation operation=new TxnReserveOfferOperation(name,timeout,offeredQueue.size(),tx.getTxnId());
  try {
    Invocation invocation=getNodeEngine().getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    Future<Long> f=invocation.invoke();
    Long itemId=f.get();
    if (itemId != null) {
      if (!itemIdSet.add(itemId)) {
        throw new TransactionException("String_Node_Str" + itemId);
      }
      offeredQueue.offer(new QueueItem(null,itemId,data));
      tx.addTransactionLog(new QueueTransactionLog(itemId,name,partitionId,new TxnOfferOperation(name,itemId,data)));
      return true;
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
  return false;
}

Fixed version (ground truth):
public boolean offerInternal(Data data,long timeout){
  throwExceptionIfNull(data);
  TxnReserveOfferOperation operation=new TxnReserveOfferOperation(name,timeout,offeredQueue.size(),tx.getTxnId());
  try {
    Invocation invocation=getNodeEngine().getOperationService().createInvocationBuilder(QueueService.SERVICE_NAME,operation,partitionId).build();
    Future<Long> f=invocation.invoke();
    Long itemId=f.get();
    if (itemId != null) {
      if (!itemIdSet.add(itemId)) {
        throw new TransactionException("String_Node_Str" + itemId);
      }
      offeredQueue.offer(new QueueItem(null,itemId,data));
      tx.addTransactionLog(new QueueTransactionLog(tx.getTxnId(),itemId,name,partitionId,new TxnOfferOperation(name,itemId,data)));
      return true;
    }
  }
 catch (  Throwable t) {
    throw ExceptionUtil.rethrow(t);
  }
  return false;
}
Program: 48971
Project: 48971
Buggy source:
public TxnPrepareBackupOperation(String name,long itemId,boolean pollOperation){
  super(name);
  this.itemId=itemId;
  this.pollOperation=pollOperation;
}

Fixed version (ground truth):
public TxnPrepareBackupOperation(String name,long itemId,boolean pollOperation,String transactionId){
  super(name);
  this.itemId=itemId;
  this.pollOperation=pollOperation;
  this.transactionId=transactionId;
}
Program: 48972
Project: 48972
Buggy source:
public void run() throws Exception {
  if (pollOperation) {
    response=getOrCreateContainer().txnPollBackupReserve(itemId);
  }
 else {
    getOrCreateContainer().txnOfferBackupReserve(itemId);
    response=true;
  }
}

Fixed version (ground truth):
public void run() throws Exception {
  if (pollOperation) {
    response=getOrCreateContainer().txnPollBackupReserve(itemId,transactionId);
  }
 else {
    getOrCreateContainer().txnOfferBackupReserve(itemId,transactionId);
    response=true;
  }
}
Program: 48973
Project: 48973
Buggy source:
protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  itemId=in.readLong();
  pollOperation=in.readBoolean();
}

Fixed version (ground truth):
protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  itemId=in.readLong();
  pollOperation=in.readBoolean();
  transactionId=in.readUTF();
}
Program: 48974
Project: 48974
Buggy source:
protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeLong(itemId);
  out.writeBoolean(pollOperation);
}

Fixed version (ground truth):
protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeLong(itemId);
  out.writeBoolean(pollOperation);
  out.writeUTF(transactionId);
}
Program: 48975
Project: 48975
Buggy source:
public Operation getBackupOperation(){
  return new TxnPrepareBackupOperation(name,itemId,pollOperation);
}

Fixed version (ground truth):
public Operation getBackupOperation(){
  return new TxnPrepareBackupOperation(name,itemId,pollOperation,transactionId);
}
Program: 48976
Project: 48976
Buggy source:
public TxnPrepareOperation(String name,long itemId,boolean pollOperation){
  super(name);
  this.itemId=itemId;
  this.pollOperation=pollOperation;
}

Fixed version (ground truth):
public TxnPrepareOperation(String name,long itemId,boolean pollOperation,String transactionId){
  super(name);
  this.itemId=itemId;
  this.pollOperation=pollOperation;
  this.transactionId=transactionId;
}
Program: 48977
Project: 48977
Buggy source:
protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  itemId=in.readLong();
  pollOperation=in.readBoolean();
}

Fixed version (ground truth):
protected void readInternal(ObjectDataInput in) throws IOException {
  super.readInternal(in);
  itemId=in.readLong();
  pollOperation=in.readBoolean();
  transactionId=in.readUTF();
}
Program: 48978
Project: 48978
Buggy source:
protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeLong(itemId);
  out.writeBoolean(pollOperation);
}

Fixed version (ground truth):
protected void writeInternal(ObjectDataOutput out) throws IOException {
  super.writeInternal(out);
  out.writeLong(itemId);
  out.writeBoolean(pollOperation);
  out.writeUTF(transactionId);
}
Program: 48980
Project: 48980
Buggy source:
@Override public final void run() throws Exception {
  TransactionManagerServiceImpl txManagerService=getService();
  txManagerService.putTxBackupLog(txLogs,callerUuid,txnId,timeoutMillis,startTime);
}

Fixed version (ground truth):
@Override public final void run() throws Exception {
  TransactionManagerServiceImpl txManagerService=getService();
  txManagerService.prepareTxBackupLog(txLogs,callerUuid,txnId,timeoutMillis,startTime);
}
Program: 48981
Project: 48981
Buggy source:
public void begin() throws IllegalStateException {
  if (state == ACTIVE) {
    throw new IllegalStateException("String_Node_Str");
  }
  checkThread();
  if (threadFlag.get() != null) {
    throw new IllegalStateException("String_Node_Str");
  }
  setThreadFlag(Boolean.TRUE);
  startTime=Clock.currentTimeMillis();
  backupAddresses=transactionManagerService.pickBackupAddresses(durability);
  state=ACTIVE;
}

Fixed version (ground truth):
public void begin() throws IllegalStateException {
  if (state == ACTIVE) {
    throw new IllegalStateException("String_Node_Str");
  }
  checkThread();
  if (threadFlag.get() != null) {
    throw new IllegalStateException("String_Node_Str");
  }
  setThreadFlag(Boolean.TRUE);
  startTime=Clock.currentTimeMillis();
  backupAddresses=transactionManagerService.pickBackupAddresses(durability);
  if (durability > 0 && backupAddresses != null && transactionType == TransactionType.TWO_PHASE) {
    final OperationService operationService=nodeEngine.getOperationService();
    List<Future> futures=new ArrayList<Future>(backupAddresses.length);
    for (    Address backupAddress : backupAddresses) {
      if (nodeEngine.getClusterService().getMember(backupAddress) != null) {
        final Invocation inv=operationService.createInvocationBuilder(TransactionManagerServiceImpl.SERVICE_NAME,new BeginTxBackupOperation(txOwnerUuid,txnId),backupAddress).build();
        futures.add(inv.invoke());
      }
    }
    for (    Future future : futures) {
      try {
        future.get(timeoutMillis,TimeUnit.MILLISECONDS);
      }
 catch (      MemberLeftException e) {
        nodeEngine.getLogger(Transaction.class).finest("String_Node_Str",e);
      }
catch (      Exception e) {
        throw ExceptionUtil.rethrow(e,IllegalStateException.class);
      }
    }
  }
  state=ACTIVE;
}
Program: 48982
Project: 48982
Buggy source:
private void finalizeTransactionsOf(String uuid){
  if (!txBackupLogs.isEmpty()) {
    for (    TxBackupLog log : txBackupLogs.values()) {
      if (uuid.equals(log.callerUuid)) {
        TransactionImpl tx=new TransactionImpl(this,nodeEngine,log.txnId,log.txLogs,log.timeoutMillis,log.startTime,log.callerUuid);
        if (log.state == State.COMMITTING) {
          try {
            tx.commit();
          }
 catch (          Throwable e) {
            logger.warning("String_Node_Str",e);
          }
        }
 else {
          try {
            tx.rollback();
          }
 catch (          Throwable e) {
            logger.warning("String_Node_Str",e);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void finalizeTransactionsOf(String uuid){
  if (!txBackupLogs.isEmpty()) {
    for (    Map.Entry<String,TxBackupLog> entry : txBackupLogs.entrySet()) {
      TxBackupLog log=entry.getValue();
      if (uuid.equals(log.callerUuid)) {
        String txnId=entry.getKey();
        if (log.state == State.ACTIVE) {
          Collection<MemberImpl> memberList=nodeEngine.getClusterService().getMemberList();
          Collection<Future> futures=new ArrayList<Future>(memberList.size());
          for (          MemberImpl member : memberList) {
            Operation op=new BroadcastTxRollbackOperation(txnId);
            Invocation inv=nodeEngine.getOperationService().createInvocationBuilder(SERVICE_NAME,op,member.getAddress()).build();
            futures.add(inv.invoke());
          }
          for (          Future future : futures) {
            try {
              future.get(TransactionOptions.getDefault().getTimeoutMillis(),TimeUnit.MILLISECONDS);
            }
 catch (            Exception e) {
              logger.warning("String_Node_Str");
            }
          }
        }
 else {
          TransactionImpl tx=new TransactionImpl(this,nodeEngine,txnId,log.txLogs,log.timeoutMillis,log.startTime,log.callerUuid);
          if (log.state == State.COMMITTING) {
            try {
              tx.commit();
            }
 catch (            Throwable e) {
              logger.warning("String_Node_Str",e);
            }
          }
 else {
            try {
              tx.rollback();
            }
 catch (            Throwable e) {
              logger.warning("String_Node_Str",e);
            }
          }
        }
      }
    }
  }
}