Program: 5465
Project: 5465
Buggy source:
public static void main(String args[]){
  HibernateUtil.connectEntityManagers();
  Transaction tx=HibernateUtil.getInstance().getSession().beginTransaction();
  try {
    final String sourceId="String_Node_Str";
    final String targetId="String_Node_Str";
    final String capabilityName="String_Node_Str";
    LOGGER.debug("String_Node_Str" + sourceId);
    LOGGER.debug("String_Node_Str" + targetId);
    LOGGER.debug("String_Node_Str" + capabilityName);
    final int beforeLinks=LinkController.getInstance().list().size();
    final int beforeCaps=CapabilityController.getInstance().list().size();
    final int beforeReadings=LinkReadingController.getInstance().list().size();
    LinkReadingController.getInstance().insertReading(sourceId,targetId,capabilityName,10.0,new Date());
    final int afterLinks=LinkController.getInstance().list().size();
    final int afterCaps=CapabilityController.getInstance().list().size();
    final int afterReadings=LinkReadingController.getInstance().list().size();
    LOGGER.debug("String_Node_Str" + beforeLinks);
    LOGGER.debug("String_Node_Str" + beforeCaps);
    LOGGER.debug("String_Node_Str" + afterLinks);
    LOGGER.debug("String_Node_Str" + afterCaps);
    LOGGER.debug("String_Node_Str" + beforeReadings);
    LOGGER.debug("String_Node_Str" + afterReadings);
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    LOGGER.fatal(e.getMessage());
    System.exit(-1);
  }
 finally {
    HibernateUtil.getInstance().closeSession();
  }
}

Fixed version (ground truth):
public static void main(String args[]){
  HibernateUtil.connectEntityManagers();
  Transaction tx=HibernateUtil.getInstance().getSession().beginTransaction();
  try {
    Iterator<Node> nodeIt=NodeController.getInstance().list().iterator();
    Node source=nodeIt.next();
    final String sourceId=source.getId();
    Node target=nodeIt.next();
    final String targetId=target.getId();
    final String capabilityName="String_Node_Str";
    LOGGER.debug("String_Node_Str" + sourceId);
    LOGGER.debug("String_Node_Str" + targetId);
    LOGGER.debug("String_Node_Str" + capabilityName);
    final int beforeLinks=LinkController.getInstance().list().size();
    final int beforeCaps=CapabilityController.getInstance().list().size();
    final int beforeReadings=LinkReadingController.getInstance().list().size();
    LinkReadingController.getInstance().insertReading(sourceId,targetId,capabilityName,10.0,new Date());
    final int afterLinks=LinkController.getInstance().list().size();
    final int afterCaps=CapabilityController.getInstance().list().size();
    final int afterReadings=LinkReadingController.getInstance().list().size();
    LOGGER.debug("String_Node_Str" + beforeLinks);
    LOGGER.debug("String_Node_Str" + beforeCaps);
    LOGGER.debug("String_Node_Str" + afterLinks);
    LOGGER.debug("String_Node_Str" + afterCaps);
    LOGGER.debug("String_Node_Str" + beforeReadings);
    LOGGER.debug("String_Node_Str" + afterReadings);
    tx.commit();
  }
 catch (  Exception e) {
    tx.rollback();
    LOGGER.fatal(e.getMessage());
    System.exit(-1);
  }
 finally {
    HibernateUtil.getInstance().closeSession();
  }
}