Instances result = insts;
if (m_adjustForTrends && !m_useArtificialTimeIndex
&& m_timeStampName != null && m_timeStampName.length() > 0) {
if (result.attribute(m_timeStampName).isDate()) {
int origIndex = result.attribute(m_timeStampName).index();
// find first non-missing date and set as base
GregorianCalendar c = new GregorianCalendar();
for (int i = 0; i < result.numInstances(); i++) {
if (!result.instance(i).isMissing(origIndex)) {