Program: 134890
Project: 134890
Buggy source:
/** 
 * Add value to the history.
 * @param value		value to be added to the history.
 * @param timestamp	value timestamp (OMG) to be added to the history.
 */
protected void addValueToHistory(Object value,long timestamp){
  if (historySize == 0)   return;
synchronized (historyValue) {
    historyTime[historyPosition]=timestamp;
    if (propertyType.isPrimitive()) {
      if (propertyType.isAssignableFrom(double.class))       Array.setDouble(historyValue,historyPosition,((Double)value).doubleValue());
 else       if (propertyType.isAssignableFrom(int.class))       Array.setInt(historyValue,historyPosition,((Integer)value).intValue());
 else       if (propertyType.isAssignableFrom(long.class))       Array.setLong(historyValue,historyPosition,((Long)value).longValue());
 else       if (propertyType.isAssignableFrom(short.class))       Array.setShort(historyValue,historyPosition,((Short)value).shortValue());
 else       if (propertyType.isAssignableFrom(boolean.class))       Array.setBoolean(historyValue,historyPosition,((Boolean)value).booleanValue());
 else       if (propertyType.isAssignableFrom(byte.class))       Array.setByte(historyValue,historyPosition,((Byte)value).byteValue());
 else       if (propertyType.isAssignableFrom(float.class))       Array.setFloat(historyValue,historyPosition,((Float)value).floatValue());
 else       if (propertyType.isAssignableFrom(char.class))       Array.setChar(historyValue,historyPosition,((Character)value).charValue());
 else       m_logger.log(Level.WARNING,"String_Node_Str");
      throw new NO_RESOURCES("String_Node_Str");
    }
 else     Array.set(historyValue,historyPosition,value);
    historyPosition=++historyPosition % historySize;
    if (!historyTurnaround && historyPosition == 0)     historyTurnaround=true;
  }
}

Fixed version (ground truth):
/** 
 * Add value to the history.
 * @param value		value to be added to the history.
 * @param timestamp	value timestamp (OMG) to be added to the history.
 */
protected void addValueToHistory(Object value,long timestamp){
  if (historySize == 0)   return;
synchronized (historyValue) {
    historyTime[historyPosition]=timestamp;
    if (propertyType.isPrimitive()) {
      System.out.println(propertyType.toString());
      System.out.println(double.class.toString());
      if (propertyType.isAssignableFrom(double.class))       Array.setDouble(historyValue,historyPosition,((Double)value).doubleValue());
 else       if (propertyType.isAssignableFrom(int.class))       Array.setInt(historyValue,historyPosition,((Integer)value).intValue());
 else       if (propertyType.isAssignableFrom(long.class))       Array.setLong(historyValue,historyPosition,((Long)value).longValue());
 else       if (propertyType.isAssignableFrom(short.class))       Array.setShort(historyValue,historyPosition,((Short)value).shortValue());
 else       if (propertyType.isAssignableFrom(boolean.class))       Array.setBoolean(historyValue,historyPosition,((Boolean)value).booleanValue());
 else       if (propertyType.isAssignableFrom(byte.class))       Array.setByte(historyValue,historyPosition,((Byte)value).byteValue());
 else       if (propertyType.isAssignableFrom(float.class))       Array.setFloat(historyValue,historyPosition,((Float)value).floatValue());
 else       if (propertyType.isAssignableFrom(char.class))       Array.setChar(historyValue,historyPosition,((Character)value).charValue());
 else {
        m_logger.log(Level.WARNING,"String_Node_Str");
        throw new NO_RESOURCES("String_Node_Str");
      }
    }
 else     Array.set(historyValue,historyPosition,value);
    historyPosition=++historyPosition % historySize;
    if (!historyTurnaround && historyPosition == 0)     historyTurnaround=true;
  }
}