Program: 111930
Project: 111930
Buggy source:
private static void addToList(final List<SchemaElement> result,org.apache.parquet.schema.Type field){
  field.accept(new TypeVisitor(){
    @Override public void visit(    PrimitiveType primitiveType){
      SchemaElement element=new SchemaElement(primitiveType.getName());
      element.setRepetition_type(toParquetRepetition(primitiveType.getRepetition()));
      element.setType(getType(primitiveType.getPrimitiveTypeName()));
      if (primitiveType.getOriginalType() != null) {
        element.setConverted_type(getConvertedType(primitiveType.getOriginalType()));
      }
      if (primitiveType.getDecimalMetadata() != null) {
        element.setPrecision(primitiveType.getDecimalMetadata().getPrecision());
        element.setScale(primitiveType.getDecimalMetadata().getScale());
      }
      if (primitiveType.getTypeLength() > 0) {
        element.setType_length(primitiveType.getTypeLength());
      }
      result.add(element);
    }
    @Override public void visit(    MessageType messageType){
      SchemaElement element=new SchemaElement(messageType.getName());
      visitChildren(result,messageType.asGroupType(),element);
    }
    @Override public void visit(    GroupType groupType){
      SchemaElement element=new SchemaElement(groupType.getName());
      element.setRepetition_type(toParquetRepetition(groupType.getRepetition()));
      if (groupType.getOriginalType() != null) {
        element.setConverted_type(getConvertedType(groupType.getOriginalType()));
      }
      visitChildren(result,groupType,element);
    }
    private void visitChildren(    final List<SchemaElement> result,    GroupType groupType,    SchemaElement element){
      element.setNum_children(groupType.getFieldCount());
      result.add(element);
      for (      org.apache.parquet.schema.Type field : groupType.getFields()) {
        addToList(result,field);
      }
    }
  }
);
}

Fixed version (ground truth):
private void addToList(final List<SchemaElement> result,org.apache.parquet.schema.Type field){
  field.accept(new TypeVisitor(){
    @Override public void visit(    PrimitiveType primitiveType){
      SchemaElement element=new SchemaElement(primitiveType.getName());
      element.setRepetition_type(toParquetRepetition(primitiveType.getRepetition()));
      element.setType(getType(primitiveType.getPrimitiveTypeName()));
      if (primitiveType.getOriginalType() != null) {
        element.setConverted_type(getConvertedType(primitiveType.getOriginalType()));
      }
      if (primitiveType.getDecimalMetadata() != null) {
        element.setPrecision(primitiveType.getDecimalMetadata().getPrecision());
        element.setScale(primitiveType.getDecimalMetadata().getScale());
      }
      if (primitiveType.getTypeLength() > 0) {
        element.setType_length(primitiveType.getTypeLength());
      }
      result.add(element);
    }
    @Override public void visit(    MessageType messageType){
      SchemaElement element=new SchemaElement(messageType.getName());
      visitChildren(result,messageType.asGroupType(),element);
    }
    @Override public void visit(    GroupType groupType){
      SchemaElement element=new SchemaElement(groupType.getName());
      element.setRepetition_type(toParquetRepetition(groupType.getRepetition()));
      if (groupType.getOriginalType() != null) {
        element.setConverted_type(getConvertedType(groupType.getOriginalType()));
      }
      visitChildren(result,groupType,element);
    }
    private void visitChildren(    final List<SchemaElement> result,    GroupType groupType,    SchemaElement element){
      element.setNum_children(groupType.getFieldCount());
      result.add(element);
      for (      org.apache.parquet.schema.Type field : groupType.getFields()) {
        addToList(result,field);
      }
    }
  }
);
}