Program: 47746
Project: 47746
Buggy source:
public boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  Object[] currentInputRow=getRow();
  if (first) {
    first=false;
    m_data=(AvroInputData)sdi;
    m_meta=(AvroInputMeta)smi;
    if (Const.isEmpty(m_meta.getFilename()) && !m_meta.getAvroInField()) {
      throw new KettleException(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str"));
    }
    String readerSchema=m_meta.getSchemaFilename();
    readerSchema=environmentSubstitute(readerSchema);
    String avroFieldName=m_meta.getAvroFieldName();
    avroFieldName=environmentSubstitute(avroFieldName);
    RowMetaInterface outRowMeta=getInputRowMeta().clone();
    int newFieldOffset=outRowMeta.size();
    m_data.setOutputRowMeta(outRowMeta);
    m_meta.getFields(m_data.getOutputRowMeta(),getStepname(),null,null,this);
    if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      for (      AvroInputMeta.LookupField f : m_meta.getLookupFields()) {
        f.init(getInputRowMeta(),this);
      }
    }
    if (m_meta.getAvroInField()) {
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      }
      m_data.initializeFromFieldDecoding(avroFieldName,readerSchema,m_meta.getAvroFields(),m_meta.getAvroIsJsonEncoded(),newFieldOffset);
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      }
    }
 else {
      FileObject fileObject=KettleVFS.getFileObject(m_meta.getFilename(),getTransMeta());
      m_data.establishFileType(fileObject,readerSchema,m_meta.getAvroFields(),m_meta.getAvroIsJsonEncoded(),newFieldOffset);
    }
  }
  if (!m_meta.getAvroInField()) {
    currentInputRow=null;
  }
 else {
    if (currentInputRow != null) {
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
        for (        AvroInputMeta.LookupField f : m_meta.getLookupFields()) {
          f.setVariable(this,currentInputRow);
        }
      }
    }
  }
  Object[][] outputRow=m_data.avroObjectToKettle(currentInputRow,this);
  if (outputRow != null) {
    for (int i=0; i < outputRow.length; i++) {
      putRow(m_data.getOutputRowMeta(),outputRow[i]);
      if (log.isRowLevel()) {
        log.logRowlevel(toString(),"String_Node_Str" + getProcessed() + "String_Node_Str"+ outputRow);
      }
    }
  }
 else {
    if (!m_meta.getAvroInField()) {
      try {
        logBasic(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str"));
        m_data.close();
      }
 catch (      IOException ex) {
        throw new KettleException(ex.getMessage(),ex);
      }
    }
    setOutputDone();
    return false;
  }
  if (checkFeedback(getProcessed())) {
    logBasic(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str",getProcessed()));
  }
  return true;
}

Fixed version (ground truth):
public boolean processRow(StepMetaInterface smi,StepDataInterface sdi) throws KettleException {
  Object[] currentInputRow=getRow();
  if (first) {
    first=false;
    m_data=(AvroInputData)sdi;
    m_meta=(AvroInputMeta)smi;
    if (Const.isEmpty(m_meta.getFilename()) && !m_meta.getAvroInField()) {
      throw new KettleException(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str"));
    }
    String readerSchema=m_meta.getSchemaFilename();
    readerSchema=environmentSubstitute(readerSchema);
    String avroFieldName=m_meta.getAvroFieldName();
    avroFieldName=environmentSubstitute(avroFieldName);
    RowMetaInterface outRowMeta=null;
    outRowMeta=getInputRowMeta();
    if (outRowMeta != null) {
      outRowMeta=outRowMeta.clone();
    }
 else {
      outRowMeta=new RowMeta();
    }
    int newFieldOffset=outRowMeta.size();
    m_data.setOutputRowMeta(outRowMeta);
    m_meta.getFields(m_data.getOutputRowMeta(),getStepname(),null,null,this);
    if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      for (      AvroInputMeta.LookupField f : m_meta.getLookupFields()) {
        f.init(getInputRowMeta(),this);
      }
    }
    if (m_meta.getAvroInField()) {
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      }
      m_data.initializeFromFieldDecoding(avroFieldName,readerSchema,m_meta.getAvroFields(),m_meta.getAvroIsJsonEncoded(),newFieldOffset);
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
      }
    }
 else {
      FileObject fileObject=KettleVFS.getFileObject(m_meta.getFilename(),getTransMeta());
      m_data.establishFileType(fileObject,readerSchema,m_meta.getAvroFields(),m_meta.getAvroIsJsonEncoded(),newFieldOffset);
    }
  }
  if (!m_meta.getAvroInField()) {
    currentInputRow=null;
  }
 else {
    if (currentInputRow != null) {
      if (m_meta.getLookupFields() != null && m_meta.getLookupFields().size() > 0) {
        for (        AvroInputMeta.LookupField f : m_meta.getLookupFields()) {
          f.setVariable(this,currentInputRow);
        }
      }
    }
  }
  Object[][] outputRow=m_data.avroObjectToKettle(currentInputRow,this);
  if (outputRow != null) {
    for (int i=0; i < outputRow.length; i++) {
      putRow(m_data.getOutputRowMeta(),outputRow[i]);
      if (log.isRowLevel()) {
        log.logRowlevel(toString(),"String_Node_Str" + getProcessed() + "String_Node_Str"+ outputRow);
      }
    }
  }
 else {
    if (!m_meta.getAvroInField()) {
      try {
        logBasic(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str"));
        m_data.close();
      }
 catch (      IOException ex) {
        throw new KettleException(ex.getMessage(),ex);
      }
    }
    setOutputDone();
    return false;
  }
  if (checkFeedback(getProcessed())) {
    logBasic(BaseMessages.getString(AvroInputMeta.PKG,"String_Node_Str",getProcessed()));
  }
  return true;
}