Program: 172232
Project: 172232
Buggy source:
@Override public void afterCompletion(int status){
  String statusStr="String_Node_Str";
switch (status) {
case TransactionSynchronization.STATUS_COMMITTED:
    statusStr="String_Node_Str";
  break;
case TransactionSynchronization.STATUS_ROLLED_BACK:
statusStr="String_Node_Str";
break;
default :
}
if (logger.isDebugEnabled()) {
logger.debug("String_Node_Str" + statusStr + "String_Node_Str"+ this);
}
List<TransactionListener> iterableListeners=getListenersIterable();
if (status == TransactionSynchronization.STATUS_COMMITTED) {
for (TransactionListener listener : iterableListeners) {
try {
listener.afterCommit();
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str"+ "String_Node_Str"+ listener,e);
}
}
}
 else {
for (TransactionListener listener : iterableListeners) {
try {
listener.afterRollback();
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str"+ "String_Node_Str"+ listener,e);
}
}
}
for (LuceneIndexerAndSearcher lucene : lucenes) {
try {
if (status == TransactionSynchronization.STATUS_COMMITTED) {
lucene.commit();
}
 else {
lucene.rollback();
}
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str",e);
}
}
for (TransactionalCache<Serializable,Object> cache : transactionalCaches) {
try {
if (status == TransactionSynchronization.STATUS_COMMITTED) {
cache.afterCommit();
}
 else {
cache.afterRollback();
}
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str",e);
}
}
AlfrescoTransactionSupport.clearSynchronization();
}

Fixed version (ground truth):
@Override public void afterCompletion(int status){
  String statusStr="String_Node_Str";
switch (status) {
case TransactionSynchronization.STATUS_COMMITTED:
    statusStr="String_Node_Str";
  break;
case TransactionSynchronization.STATUS_ROLLED_BACK:
statusStr="String_Node_Str";
break;
default :
}
if (logger.isDebugEnabled()) {
logger.debug("String_Node_Str" + statusStr + "String_Node_Str"+ this);
}
for (TransactionalCache<Serializable,Object> cache : transactionalCaches) {
try {
if (status == TransactionSynchronization.STATUS_COMMITTED) {
cache.afterCommit();
}
 else {
cache.afterRollback();
}
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str",e);
}
}
List<TransactionListener> iterableListeners=getListenersIterable();
if (status == TransactionSynchronization.STATUS_COMMITTED) {
for (TransactionListener listener : iterableListeners) {
try {
listener.afterCommit();
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str"+ "String_Node_Str"+ listener,e);
}
}
}
 else {
for (TransactionListener listener : iterableListeners) {
try {
listener.afterRollback();
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str"+ "String_Node_Str"+ listener,e);
}
}
}
for (LuceneIndexerAndSearcher lucene : lucenes) {
try {
if (status == TransactionSynchronization.STATUS_COMMITTED) {
lucene.commit();
}
 else {
lucene.rollback();
}
}
 catch (RuntimeException e) {
logger.error("String_Node_Str" + statusStr + "String_Node_Str",e);
}
}
AlfrescoTransactionSupport.clearSynchronization();
}