text:
.class public final Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
.super Lcom/htc/protobuf/GeneratedMessage$Builder;
.source "SyncProtocol.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Builder"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/htc/protobuf/GeneratedMessage$Builder",
        "<",
        "Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;",
        ">;"
    }
.end annotation

# instance fields
.field private result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

# direct methods
.method private constructor <init>()V
    .locals 0

    .prologue
    .line 35783
    invoke-direct {p0}, Lcom/htc/protobuf/GeneratedMessage$Builder;-><init>()V

    return-void
.end method

.method static synthetic access$68600(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 1
    .parameter "x0"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/htc/protobuf/InvalidProtocolBufferException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-direct {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->buildParsed()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$68700()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->create()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method private buildParsed()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/htc/protobuf/InvalidProtocolBufferException;
        }
    .end annotation

    .prologue
    .line 35857
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->isInitialized()Z

    move-result v0

    if-nez v0, :cond_0

    .line 35858
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-static {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->newUninitializedMessageException(Lcom/htc/protobuf/Message;)Lcom/htc/protobuf/UninitializedMessageException;

    move-result-object v0

    invoke-virtual {v0}, Lcom/htc/protobuf/UninitializedMessageException;->asInvalidProtocolBufferException()Lcom/htc/protobuf/InvalidProtocolBufferException;

    move-result-object v0

    throw v0

    .line 35861
    :cond_0
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method private static create()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 3

    .prologue
    .line 35786
    new-instance v0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    invoke-direct {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;-><init>()V

    .line 35787
    .local v0, builder:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    new-instance v1, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v2, 0x0

    invoke-direct {v1, v2}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;-><init>(Lcom/htc/cscore/transport/SyncProtocol$1;)V

    iput-object v1, v0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    .line 35788
    return-object v0
.end method

# virtual methods
.method public build()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 1

    .prologue
    .line 35849
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->isInitialized()Z

    move-result v0

    if-nez v0, :cond_0

    .line 35850
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-static {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->newUninitializedMessageException(Lcom/htc/protobuf/Message;)Lcom/htc/protobuf/UninitializedMessageException;

    move-result-object v0

    throw v0

    .line 35852
    :cond_0
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic build()Lcom/htc/protobuf/Message;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->build()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic build()Lcom/htc/protobuf/MessageLite;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->build()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public buildPartial()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 3

    .prologue
    .line 35869
    iget-object v1, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    if-nez v1, :cond_0

    .line 35870
    new-instance v1, Ljava/lang/IllegalStateException;

    const-string v2, "build() has already been called on this Builder."

    invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 35873
    :cond_0
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    .line 35874
    .local v0, returnMe:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    .line 35875
    return-object v0
.end method

.method public bridge synthetic buildPartial()Lcom/htc/protobuf/Message;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic buildPartial()Lcom/htc/protobuf/MessageLite;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public clear()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2

    .prologue
    .line 35804
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    if-nez v0, :cond_0

    .line 35805
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Cannot call clear() after build()."

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 35808
    :cond_0
    new-instance v0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;-><init>(Lcom/htc/cscore/transport/SyncProtocol$1;)V

    iput-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    .line 35809
    return-object p0
.end method

.method public bridge synthetic clear()Lcom/htc/protobuf/AbstractMessage$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clear()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clear()Lcom/htc/protobuf/Message$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clear()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clear()Lcom/htc/protobuf/MessageLite$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clear()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public clearPeopleGroup()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2

    .prologue
    .line 35995
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v1, 0x0

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup:Z
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$68902(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Z)Z

    .line 35996
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;->getDefaultInstance()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69002(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    .line 35997
    return-object p0
.end method

.method public clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2

    .prologue
    .line 35817
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->create()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    iget-object v1, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Lcom/htc/protobuf/AbstractMessage$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Lcom/htc/protobuf/AbstractMessageLite$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Lcom/htc/protobuf/GeneratedMessage$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Lcom/htc/protobuf/Message$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Lcom/htc/protobuf/MessageLite$Builder;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic clone()Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/CloneNotSupportedException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->clone()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public getDefaultInstanceForType()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 1

    .prologue
    .line 35834
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getDefaultInstance()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic getDefaultInstanceForType()Lcom/htc/protobuf/Message;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->getDefaultInstanceForType()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic getDefaultInstanceForType()Lcom/htc/protobuf/MessageLite;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->getDefaultInstanceForType()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public getDescriptorForType()Lcom/htc/protobuf/Descriptors$Descriptor;
    .locals 1

    .prologue
    .line 35826
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getDescriptor()Lcom/htc/protobuf/Descriptors$Descriptor;

    move-result-object v0

    return-object v0
.end method

.method public getPeopleGroup()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    .locals 1

    .prologue
    .line 35952
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getPeopleGroup()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public hasPeopleGroup()Z
    .locals 1

    .prologue
    .line 35945
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup()Z

    move-result v0

    return v0
.end method

.method protected internalGetResult()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;
    .locals 1

    .prologue
    .line 35796
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    return-object v0
.end method

.method protected bridge synthetic internalGetResult()Lcom/htc/protobuf/GeneratedMessage;
    .locals 1

    .prologue
    .line 35778
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->internalGetResult()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    return-object v0
.end method

.method public isInitialized()Z
    .locals 1

    .prologue
    .line 35842
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->isInitialized()Z

    move-result v0

    return v0
.end method

.method public mergeFrom(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 1
    .parameter "other"

    .prologue
    .line 35892
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getDefaultInstance()Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    move-result-object v0

    if-ne p1, v0, :cond_0

    .line 35897
    :goto_0
    return-object p0

    .line 35893
    :cond_0
    invoke-virtual {p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 35894
    invoke-virtual {p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getPeopleGroup()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergePeopleGroup(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    .line 35896
    :cond_1
    invoke-virtual {p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->getUnknownFields()Lcom/htc/protobuf/UnknownFieldSet;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeUnknownFields(Lcom/htc/protobuf/UnknownFieldSet;)Lcom/htc/protobuf/GeneratedMessage$Builder;

    goto :goto_0
.end method

.method public mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 4
    .parameter "input"
    .parameter "extensionRegistry"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 35908
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->getUnknownFields()Lcom/htc/protobuf/UnknownFieldSet;

    move-result-object v3

    invoke-static {v3}, Lcom/htc/protobuf/UnknownFieldSet;->newBuilder(Lcom/htc/protobuf/UnknownFieldSet;)Lcom/htc/protobuf/UnknownFieldSet$Builder;

    move-result-object v2

    .line 35912
    .local v2, unknownFields:Lcom/htc/protobuf/UnknownFieldSet$Builder;
    :cond_0
    :goto_0
    invoke-virtual {p1}, Lcom/htc/protobuf/CodedInputStream;->readTag()I

    move-result v1

    .line 35913
    .local v1, tag:I
    sparse-switch v1, :sswitch_data_0

    .line 35918
    invoke-virtual {p0, p1, v2, p2, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->parseUnknownField(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/UnknownFieldSet$Builder;Lcom/htc/protobuf/ExtensionRegistryLite;I)Z

    move-result v3

    if-nez v3, :cond_0

    .line 35920
    invoke-virtual {v2}, Lcom/htc/protobuf/UnknownFieldSet$Builder;->build()Lcom/htc/protobuf/UnknownFieldSet;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->setUnknownFields(Lcom/htc/protobuf/UnknownFieldSet;)Lcom/htc/protobuf/GeneratedMessage$Builder;

    .line 35921
    :goto_1
    return-object p0

    .line 35915
    :sswitch_0
    invoke-virtual {v2}, Lcom/htc/protobuf/UnknownFieldSet$Builder;->build()Lcom/htc/protobuf/UnknownFieldSet;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->setUnknownFields(Lcom/htc/protobuf/UnknownFieldSet;)Lcom/htc/protobuf/GeneratedMessage$Builder;

    goto :goto_1

    .line 35926
    :sswitch_1
    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;->newBuilder()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;

    move-result-object v0

    .line 35927
    .local v0, subBuilder:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->hasPeopleGroup()Z

    move-result v3

    if-eqz v3, :cond_1

    .line 35928
    invoke-virtual {p0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->getPeopleGroup()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v3

    invoke-virtual {v0, v3}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;->mergeFrom(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;

    .line 35930
    :cond_1
    invoke-virtual {p1, v0, p2}, Lcom/htc/protobuf/CodedInputStream;->readMessage(Lcom/htc/protobuf/MessageLite$Builder;Lcom/htc/protobuf/ExtensionRegistryLite;)V

    .line 35931
    invoke-virtual {v0}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->setPeopleGroup(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    goto :goto_0

    .line 35913
    nop

    :sswitch_data_0
    .sparse-switch
        0x0 -> :sswitch_0
        0x371a -> :sswitch_1
    .end sparse-switch
.end method

.method public mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 1
    .parameter "other"

    .prologue
    .line 35883
    instance-of v0, p1, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    if-eqz v0, :cond_0

    .line 35884
    check-cast p1, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object p0

    .line 35887
    .end local p0
    :goto_0
    return-object p0

    .line 35886
    .restart local p0
    .restart local p1
    :cond_0
    invoke-super {p0, p1}, Lcom/htc/protobuf/GeneratedMessage$Builder;->mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/protobuf/AbstractMessage$Builder;

    goto :goto_0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/protobuf/AbstractMessage$Builder;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-virtual {p0, p1, p2}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/protobuf/AbstractMessage$Builder;
    .locals 1
    .parameter "x0"

    .prologue
    .line 35778
    invoke-virtual {p0, p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/protobuf/AbstractMessageLite$Builder;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-virtual {p0, p1, p2}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/protobuf/Message$Builder;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-virtual {p0, p1, p2}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/protobuf/Message$Builder;
    .locals 1
    .parameter "x0"

    .prologue
    .line 35778
    invoke-virtual {p0, p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/Message;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/protobuf/MessageLite$Builder;
    .locals 1
    .parameter "x0"
    .parameter "x1"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .prologue
    .line 35778
    invoke-virtual {p0, p1, p2}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->mergeFrom(Lcom/htc/protobuf/CodedInputStream;Lcom/htc/protobuf/ExtensionRegistryLite;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;

    move-result-object v0

    return-object v0
.end method

.method public mergePeopleGroup(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2
    .parameter "value"

    .prologue
    .line 35980
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    #getter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69000(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v0

    invoke-static {}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;->getDefaultInstance()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v1

    if-eq v0, v1, :cond_0

    .line 35982
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    iget-object v1, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    #getter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69000(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v1

    invoke-static {v1}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;->newBuilder(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;->mergeFrom(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;->buildPartial()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69002(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    .line 35987
    :goto_0
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v1, 0x1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup:Z
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$68902(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Z)Z

    .line 35988
    return-object p0

    .line 35985
    :cond_0
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0, p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69002(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    goto :goto_0
.end method

.method public setPeopleGroup(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2
    .parameter "builderForValue"

    .prologue
    .line 35971
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v1, 0x1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup:Z
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$68902(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Z)Z

    .line 35972
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    invoke-virtual {p1}, Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup$Builder;->build()Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    move-result-object v1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69002(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    .line 35973
    return-object p0
.end method

.method public setPeopleGroup(Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;
    .locals 2
    .parameter "value"

    .prologue
    .line 35959
    if-nez p1, :cond_0

    .line 35960
    new-instance v0, Ljava/lang/NullPointerException;

    invoke-direct {v0}, Ljava/lang/NullPointerException;-><init>()V

    throw v0

    .line 35962
    :cond_0
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    const/4 v1, 0x1

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->hasPeopleGroup:Z
    invoke-static {v0, v1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$68902(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Z)Z

    .line 35963
    iget-object v0, p0, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup$Builder;->result:Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;

    #setter for: Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->peopleGroup_:Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;
    invoke-static {v0, p1}, Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;->access$69002(Lcom/htc/cscore/transport/SyncProtocol$AddPeopleGroup;Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;)Lcom/htc/cscore/transport/SyncProtocol$HPeopleGroup;

    .line 35964
    return-object p0
.end method


text:
/* This C header file is generated by NIT to compile modules and programs that requires ../lib/standard/hash. */
#ifndef standard___hash_sep
#define standard___hash_sep
#include "standard___kernel._sep.h"
#include <nit_common.h>
extern const char LOCATE_standard___hash[];
extern const int SFT_standard___hash[];
#define CALL_standard___hash___Object___hash(recv) ((standard___hash___Object___hash_t)CALL((recv), (SFT_standard___hash[0] + 0)))
val_t standard___hash___Object___hash(val_t p0);
typedef val_t (*standard___hash___Object___hash_t)(val_t p0);
val_t standard___hash___Int___hash(val_t p0);
typedef val_t (*standard___hash___Int___hash_t)(val_t p0);
val_t standard___hash___Char___hash(val_t p0);
typedef val_t (*standard___hash___Char___hash_t)(val_t p0);
val_t standard___hash___Bool___hash(val_t p0);
typedef val_t (*standard___hash___Bool___hash_t)(val_t p0);
#endif

redpajama_set_name: RedPajamaGithub


text:
import { run } from '@ember/runloop';
import { merge } from '@ember/polyfills';
import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
  var App;

  var attributes = merge({}, config.APP);
  attributes = merge(attributes, attrs); // use defaults, but you can override;

  run(function () {
    App = Application.create(attributes);
    App.setupForTesting();
    App.injectTestHelpers();
  });

  return App;
}


text:
#include "json-test.h"

#ifdef _MSC_VER
#include <io.h>
#else
#include <dirent.h>
#endif

/*
 *-----------------------------------------------------------------------
 *
 * assemble_path --
 *
 *       Given a parent directory and filename, compile a full path to
 *       the child file.
 *
 *-----------------------------------------------------------------------
 */
void
assemble_path (const char *parent_path,
               const char *child_name,
               char       *dst /* OUT */)
{
   int path_len = (int)strlen(parent_path);
   int name_len = (int)strlen(child_name);

   assert(path_len + name_len + 1 < MAX_TEST_NAME_LENGTH);

   memset(dst, '\0', MAX_TEST_NAME_LENGTH * sizeof(char));
   strncat(dst, parent_path, path_len);
   strncat(dst, "/", 1);
   strncat(dst, child_name, name_len);
}

/*
 *-----------------------------------------------------------------------
 *
 * collect_tests_from_dir --
 *
 *       Recursively search the directory at @dir_path for files with
 *       '.json' in their filenames. Append all found file paths to
 *       @paths, and return the number of files found.
 *
 *-----------------------------------------------------------------------
 */
int
collect_tests_from_dir (char (*paths)[MAX_TEST_NAME_LENGTH] /* OUT */,
                        const char *dir_path,
                        int paths_index,
                        int max_paths)
{
#ifdef _MSC_VER
   intptr_t handle;
   struct _finddata_t info;

   char child_path[MAX_TEST_NAME_LENGTH];

   handle = _findfirst(dir_path, &info);

   if (handle == -1) {
      return 0;
   }

   while (1) {
      assert(paths_index < max_paths);

      if (_findnext(handle, &info) == -1) {
         break;
      }

      if (info.attrib & _A_SUBDIR) {
         /* recursively call on child directories */
         if (strcmp (info.name, "..") != 0 &&
             strcmp (info.name, ".") != 0) {

            assemble_path(dir_path, info.name, child_path);
            paths_index = collect_tests_from_dir(paths, child_path, paths_index, max_paths);
         }
      } else if (strstr(info.name, ".json")) {
         /* if this is a JSON test, collect its path */
         assemble_path(dir_path, info.name, paths[paths_index++]);
      }
   }

   _findclose(handle);

   return paths_index;
#else
   struct dirent *entry;
   struct stat dir_stat;
   char child_path[MAX_TEST_NAME_LENGTH];
   DIR *dir;

   dir = opendir(dir_path);
   assert (dir);
   while ((entry = readdir(dir))) {
      assert(paths_index < max_paths);

      if (0 == stat(entry->d_name, &dir_stat) && S_ISDIR(dir_stat.st_mode)) {
         /* recursively call on child directories */
         if (strcmp (entry->d_name, "..") != 0 &&
             strcmp (entry->d_name, ".") != 0) {

            assemble_path(dir_path, entry->d_name, child_path);
            paths_index = collect_tests_from_dir(paths, child_path, paths_index,
                                                 max_paths);
         }
      } else if (strncmp (entry->d_name + (strlen(entry->d_name)-5), ".json", 5) == 0) {
         /* if this is a JSON test, collect its path */
         assemble_path(dir_path, entry->d_name, paths[paths_index++]);
      }
   }

   closedir(dir);

   return paths_index;
#endif
}

/*
 *-----------------------------------------------------------------------
 *
 * get_bson_from_json_file --
 *
 *        Open the file at @filename and store its contents in a
 *        bson_t. This function assumes that @filename contains a
 *        single JSON object.
 *
 *        NOTE: caller owns returned bson_t and must free it.
 *
 *-----------------------------------------------------------------------
 */
bson_t *
get_bson_from_json_file(char *filename)
{
   FILE *file;
   long length;
   bson_t *data;
   bson_error_t error;
   const char *buffer;

   file = fopen(filename, "rb");
   if (!file) {
      return NULL;
   }

   /* get file length */
   fseek(file, 0, SEEK_END);
   length = ftell(file);
   fseek(file, 0, SEEK_SET);
   if (length < 1) {
      return NULL;
   }

   /* read entire file into buffer */
   buffer = (const char *)bson_malloc0(length);
   if (fread((void *)buffer, 1, length, file) != length) {
      abort();
   }

   fclose(file);
   if (!buffer) {
      return NULL;
   }

   /* convert to bson */
   data = bson_new_from_json((const uint8_t*)buffer, length, &error);
   if (!data) {
      fprintf (stderr, "Cannot parse %s: %s\n", filename, error.message);
      abort();
   }

   bson_free((void *)buffer);

   return data;
}

/*
 *-----------------------------------------------------------------------
 *
 * install_json_test_suite --
 *
 *      Given a path to a directory containing JSON tests, import each
 *      test into a BSON blob and call the provided callback for
 *      evaluation.
 *
 *      It is expected that the callback will assert on failure, so if
 *      callback returns quietly the test is considered to have passed.
 *
 *-----------------------------------------------------------------------
 */
void
install_json_test_suite(TestSuite *suite, const char *dir_path, test_hook callback)
{
   char test_paths[MAX_NUM_TESTS][MAX_TEST_NAME_LENGTH];
   int num_tests;
   int i;
   bson_t *test;
   char *skip_json;
   char *ext;

   num_tests = collect_tests_from_dir(&test_paths[0],
                                      dir_path,
                                      0, MAX_NUM_TESTS);

   for (i = 0; i < num_tests; i++) {
      test = get_bson_from_json_file(test_paths[i]);
      skip_json = strstr(test_paths[i], "/json") + strlen("/json");
      assert(skip_json);
      ext = strstr (skip_json, ".json");
      assert(ext);
      ext[0] = '\0';

      TestSuite_AddWC(suite, skip_json, (void (*)(void *))callback, (void (*)(void*))bson_destroy, test);
   }
}


text:
A sails Policy conditions builder, based on criteria of the passed in model

# Example
A policy to check whether the user id is the owner of the object available through the request.
```
module.exports = function(req, res, next) {

  // User is allowed, proceed to the next policy,
  // or if this is the last policy, the controller

  var policyValidator = ModelPolicy(req);

  if (policyValidator.queriedModelCreteria({owner:req.session.user_id}) ) {
    return next();
  }

  // User is not allowed
  res.status(403);
  return res.json({error:'not allowed'});
};

```


text:
/**
 * This class contains method to create Phone Lookup data, request and parse response data.
 * @author Kushal Shah
 * @since  2014-06-08
 */

package com.whitepages.webservice;

import com.whitepages.data.Result;
import com.whitepages.utilities.PhoneLookupParser;
import com.whitepages.utilities.ServerApis;
import com.whitepages.utilities.ServerUrls;
import com.whitepages.utilities.Constants;

public class PhoneService {

	/**
	 * This method to calls method doGetPhoneLookupData to get response of API
	 * and calls parseDataResonse to parse the result and returns
	 * PhoneLookupData object.
	 *
	 * @param phoneNumber phone number.
	 * @return PhoneLookupData.
	 */
	public Result getPhoneLookupData(String phoneNumber) {
		Result phoneLookupData = null;

		if (phoneNumber != null && !phoneNumber.equals("")) {
			phoneNumber = phoneNumber.trim();
			String request = getPhoneLookupRequest(phoneNumber);
			HttpRestClient httpRestClient = new HttpRestClient();
			String response = httpRestClient.doGetPhoneLookupData(request);

			// Parse phone lookup data json response
			phoneLookupData = parseDataResonse(response);
		}

		return phoneLookupData;
	}

	/**
	 * This method creates a request to get phone lookup data.
	 *
	 * @param phoneNumber phone number to get data.
	 * @return request to get phone data.
	 */
	private String getPhoneLookupRequest(String phoneNumber) {
		String request = null;
		String serverUrl = ServerUrls.SERVER_URL;
		String apiVersion = ServerApis.API_VERSION;
		String phoneApi = ServerApis.PHONE_API;
		String apiKey = Constants.API_KEY;
		String apiRequestParam = ServerApis.PHONE_API_REQUEST_PARAM;
		apiRequestParam = apiRequestParam.replace(":phoneNumber", phoneNumber);
		apiRequestParam = apiRequestParam.replace(":api_key", apiKey);

		request = serverUrl + apiVersion + phoneApi + "?" + apiRequestParam;
		return request;
	}

	/**
	 * This method parse JSON response for phone lookup data.
	 * @param jsonResponse
	 * @return resultData
	 */
	private Result parseDataResonse(String jsonResponse) {
		Result resultData = null;
		if (jsonResponse != null && !jsonResponse.equals("")) {
			PhoneLookupParser phoneLookupParser = new PhoneLookupParser();
			resultData = phoneLookupParser.parsePhoneLookupData(jsonResponse);
		}

		return resultData;
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.javolution</groupId>
  <artifactId>javolution</artifactId>
  <versioning>
    <release>6.0.0</release>
    <versions>
      <version>6.0.0</version>
    </versions>
    <lastUpdated>20150429134945</lastUpdated>
  </versioning>
</metadata>


text:
package com.sequenceiq.cloudbreak.cloud.aws.common;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.when;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.ArgumentMatcher;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException;
import com.amazonaws.services.dynamodbv2.model.DeleteTableResult;
import com.amazonaws.services.dynamodbv2.model.DescribeTableResult;
import com.amazonaws.services.dynamodbv2.model.ResourceNotFoundException;
import com.amazonaws.services.dynamodbv2.model.TableDescription;
import com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonDynamoDBClient;
import com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException;
import com.sequenceiq.cloudbreak.cloud.model.base.ResponseStatus;
import com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableDeleteRequest;
import com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableDeleteResponse;
import com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableMetadataRequest;
import com.sequenceiq.cloudbreak.cloud.model.nosql.NoSqlTableMetadataResponse;

@RunWith(MockitoJUnitRunner.class)
public class AwsNoSqlConnectorTest {

    public static final String ARN = "arn:";

    public static final String ACTIVE_STATUS = "ACTIVE";

    public static final String DELETING_STATUS = "DELETING";

    @Rule
    public final ExpectedException thrown = ExpectedException.none();

    @Mock
    private CommonAwsClient awsClient;

    @Mock
    private AmazonDynamoDBClient dynamoDb;

    @InjectMocks
    private AwsNoSqlConnector underTest;

    @Before
    public void setUp() throws Exception {
        when(awsClient.createDynamoDbClient(any(), any())).thenReturn(dynamoDb);
    }

    @Test
    public void getNoSqlTableMetaDataOk() {
        TableDescription tableDescription = new TableDescription().withTableArn(ARN).withTableStatus(ACTIVE_STATUS);
        DescribeTableResult describeResult = new DescribeTableResult().withTable(tableDescription);
        when(dynamoDb.describeTable(argThat((ArgumentMatcher<String>) argument -> true))).thenReturn(describeResult);
        NoSqlTableMetadataResponse result = underTest.getNoSqlTableMetaData(new NoSqlTableMetadataRequest());
        assertEquals(ARN, result.getId());
        assertEquals(ACTIVE_STATUS, result.getTableStatus());
        assertEquals(ResponseStatus.OK, result.getStatus());
    }

    @Test
    public void getNoSqlTableMetaDataResourceNotFound() {
        when(dynamoDb.describeTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new ResourceNotFoundException("not found"));
        NoSqlTableMetadataResponse result = underTest.getNoSqlTableMetaData(new NoSqlTableMetadataRequest());
        assertNull(result.getId());
        assertNull(result.getTableStatus());
        assertEquals(ResponseStatus.RESOURCE_NOT_FOUND, result.getStatus());
    }

    @Test
    public void getNoSqlTableMetaDataAwsError() {
        when(dynamoDb.describeTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new AmazonDynamoDBException("provider error"));
        thrown.expect(CloudConnectorException.class);
        thrown.expectMessage("provider error");
        underTest.getNoSqlTableMetaData(new NoSqlTableMetadataRequest());
    }

    @Test
    public void deleteNoSqlTable() {
        TableDescription tableDescription = new TableDescription().withTableArn(ARN).withTableStatus(DELETING_STATUS);
        DeleteTableResult deleteResult = new DeleteTableResult().withTableDescription(tableDescription);
        when(dynamoDb.deleteTable(argThat((ArgumentMatcher<String>) argument -> true))).thenReturn(deleteResult);
        NoSqlTableDeleteResponse result = underTest.deleteNoSqlTable(new NoSqlTableDeleteRequest());
        assertEquals(ARN, result.getId());
        assertEquals(DELETING_STATUS, result.getTableStatus());
        assertEquals(ResponseStatus.OK, result.getStatus());
    }

    @Test
    public void getNoSqlTableResourceNotFound() {
        when(dynamoDb.deleteTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new ResourceNotFoundException("not found"));
        NoSqlTableDeleteResponse result = underTest.deleteNoSqlTable(new NoSqlTableDeleteRequest());
        assertNull(result.getId());
        assertNull(result.getTableStatus());
        assertEquals(ResponseStatus.RESOURCE_NOT_FOUND, result.getStatus());
    }

    @Test
    public void getNoSqlTableAwsError() {
        when(dynamoDb.deleteTable(argThat((ArgumentMatcher<String>) argument -> true))).thenThrow(new AmazonDynamoDBException("provider error"));
        thrown.expect(CloudConnectorException.class);
        thrown.expectMessage("provider error");
        underTest.deleteNoSqlTable(new NoSqlTableDeleteRequest());
    }

    @Test
    public void platform() {
        assertEquals(AwsConstants.AWS_PLATFORM, underTest.platform());
    }

    @Test
    public void variant() {
        assertEquals(AwsConstants.AWS_DEFAULT_VARIANT, underTest.variant());
    }
}


text:
namespace Ui {
class AboutDialog;
}

class AboutDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AboutDialog(QWidget *parent = 0);
    ~AboutDialog();

// QWidget interface
protected:
    void paintEvent(QPaintEvent *);

private:
    Ui::AboutDialog *m_ui;
    QTime m_time;
    QTimer m_timer;
    std::vector<QLine> m_initialsFirstName;
    std::vector<QLine> m_initialsLastName;
    std::vector<QLine> m_initialsPatronimic;

    void drawInitials(std::vector<QLine> const& initials, QPainter & painter, float timeY);

    void initInitialsVector();
    void initFirstNameLetter(int x);
    void initLastNameLetter(int x);
    void initPatronymicLetter(int x);
};


text:
using System;

namespace Lunchorder.Domain.Entities.DocumentDb
{
    /// <summary>
    /// A menu entry
    /// </summary>
    public class MenuEntry
    {
        /// <summary>
        /// An identifier for the menu entry
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// The name of the menu entry
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// The description of the menu entry
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// The associated category for the menu entry
        /// </summary>
        public Guid CategoryId { get; set; }

        /// <summary>
        /// An URL that contains a picture for the menu entry
        /// </summary>
        public string Picture { get; set; }

        /// <summary>
        /// The price for the menu entry
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// Represents if the entry is in an enabled state
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// Is the order a healthy item
        /// </summary>
        public bool Healthy { get; set; }

        /// <summary>
        /// Is the order a pasta item
        /// </summary>
        public bool Pasta { get; set; }
    }
}


text:
namespace System.CodeDom
{
    public class CodeThisReferenceExpression : CodeExpression
    {
    }
}


text:
layout: page
title: Contribute
categories: Contribute
hide_title: true
---

Contribute and Join The Global Community
===================================================

### Feedback and Mailing list

Let us know how to improve

         Submit Feedback

Want to stay up-to-date on the latest STIX discussions?

           Mailing List Subscription

### Contribute Tools and Libraries

To have code commited to OASIS repositories a Contributor License Agreement(CLA) must be submitted and approved.
Bug reports, suggestions and help requests about specific OASIS GitHub projects should be done through GitHub issues on their respective repository.

Contributor License Agreement

         License Agreement

Resources

         Notable Resources

         CTI OASIS Open Repositories

### Specification Contributions and Design

To be directly involved in the development of the STIX specification one must join OASIS and the Technical Committee(TC). This should only be considered by those willing to have a dedicated commitment to STIX and/or CTI.

Join the Technical Committee

         Join Technical Committee


text:
package org.neo4j.kernel.api.exceptions.schema;

import org.neo4j.kernel.api.EntityType;
import org.neo4j.kernel.api.TokenNameLookup;

import static java.lang.String.format;

public class DuplicateEntitySchemaRuleException extends DuplicateSchemaRuleException
{
    private static final String DUPLICATE_NODE_RULE_MESSAGE_TEMPLATE =
            "Multiple %s found for label '%s' and property '%s'.";
    private static final String DUPLICATED_RELATIONSHIP_RULE_MESSAGE_TEMPLATE =
            "Multiple %s found for relationship type '%s' and property '%s'.";

    private EntityType entityType;

    public DuplicateEntitySchemaRuleException( EntityType entityType, int entityId, int propertyKeyId )
    {
        this( entityType, entityId, propertyKeyId, false );
    }

    public DuplicateEntitySchemaRuleException( EntityType entityType, int ruleEntityId, int propertyKeyId,
            boolean unique )
    {
        super( getMessageTemplate( entityType ), ruleEntityId, propertyKeyId,
                unique ? UNIQUE_CONSTRAINT_PREFIX : CONSTRAINT_PREFIX );
        this.entityType = entityType;
    }

    @Override
    public String getUserMessage( TokenNameLookup tokenNameLookup )
    {
        String entityName = EntityType.NODE == entityType ? tokenNameLookup.labelGetName( ruleEntityId ) :
                            tokenNameLookup.relationshipTypeGetName( ruleEntityId );
        return format( messageTemplate, messagePrefix, entityName,
                tokenNameLookup.propertyKeyGetName( propertyKeyId ) );
    }

    private static String getMessageTemplate( EntityType entityType )
    {
        switch ( entityType )
        {
        case NODE:
            return DUPLICATE_NODE_RULE_MESSAGE_TEMPLATE;
        case RELATIONSHIP:
            return DUPLICATED_RELATIONSHIP_RULE_MESSAGE_TEMPLATE;
        default:
            throw new IllegalArgumentException( "Schema rules for specified entityType not supported." );
        }
    }
}


text:
package org.beansugar.oauth.exceptions;

import org.beansugar.oauth.net.OAuthRequest;

/**
 * Specialized exception that represents a missing OAuth parameter.
 *
 * @author Pablo Fernandez
 */
public class OAuthParametersMissingException extends OAuthException {

	private static final long serialVersionUID = 1745308760111976671L;
	private static final String MSG = "Could not find oauth parameters in request: %s. "
			+ "OAuth parameters must be specified with the addOAuthParameter() method";

	/**
	 * Default constructor.
	 *
	 * @param request OAuthRequest that caused the error
	 */
	public OAuthParametersMissingException(OAuthRequest request) {
		super(String.format(MSG, request));
	}
}


text:
var vocal = require("../lib/vocal.js");

vocal("Testing 1 2 3 Testing One Two Three.. Is this thing on?", function() {
  return vocal("Ok great. Hello and welcome. This is vocal a free tts module.", function() {
    return vocal("I am a module for node js and also coffeescript.", function() {
      return vocal("I am licensed under the M I T license. For free use in your projects.", function() {
        return vocal("This project is Open Source and forking and pulling are welcome.", function() {
          return vocal("Thank you, have a great day.");
        });
      });
    });
  });
});


text:
namespace gpu {

namespace {
// Global instance in browser process.
absl::optional<DevicePerfInfo> g_device_perf_info;

base::Lock& GetLock() {
  static base::NoDestructor<base::Lock> lock;
  return *lock;
}
}  // namespace

absl::optional<DevicePerfInfo> GetDevicePerfInfo() {
  base::AutoLock lock(GetLock());
  return g_device_perf_info;
}

void SetDevicePerfInfo(const DevicePerfInfo& device_perf_info) {
  base::AutoLock lock(GetLock());
  g_device_perf_info = device_perf_info;
}

}  // namespace gpu


text:
package main

import (
	"fmt"
	"io/ioutil"
	"time"

	"github.com/Jeffail/gabs"
	"golang.org/x/net/context"
	"golang.org/x/net/context/ctxhttp"
)

func main() {
	ctx, _ := context.WithTimeout(context.Background(), 3*time.Second)

	resp, err := ctxhttp.Get(ctx, nil, "http://httpbin.org/get")
	if err != nil {
		panic(err)
	}

	resBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	jsonParsed, err := gabs.ParseJSON(resBody)
	if err != nil {
		panic(err)
	}

	fmt.Println(jsonParsed.StringIndent("", "  "))
}


text:
import {combineReducers} from 'redux';

import {countryListdReducer, userListReducer} from "../containers/App/reducers";
import {userReducer, userIsLoggedReducer} from "../containers/ManageUser/reducers";
import {getUserNameByIdReducer, getUserScreenshotByIdReducer} from "../containers/ManageVideo/reducers";

export const rootReducer = combineReducers({
    user: userReducer,
    userList: userListReducer,
    countryList: countryListdReducer,
    isLogged: userIsLoggedReducer,
    getOrgNameById: getUserNameByIdReducer,
    getUserScreenshotById: getUserScreenshotByIdReducer
});


text:
layout: default
title: "Lord Oxburgh"
house: lords

---

        {% include members/lord-oxburgh.html %}

What is Lord Oxburgh interested in?

Lord Oxburgh hasn't said he is interested in anything! Why not write to them and ask?

Party

Lord Oxburgh is part of the Crossbench party.

What is a party?


text:
define(function(require) {
  'use strict';

  var Backbone = require('backbone')
    , wizardTpl = require('tpl/apps/WizardExample/steps/summary/template')
  ;

  return Backbone.View.extend({

    initialize: function() {
      console.log('first wizard view');
      this.template = wizardTpl;
    },

    render: function() {
      $(this.el).html(this.template());
      return this;
    }

  });
});


text:
def TestServer(app):
    def _TestServer(host, port):
        print("test server started at {host}:{port}".format(
            host=host, port=port))
        app.run(host=host, port=port, debug=True)

    return _TestServer


text:
ACCEPTED

#### According to
GRIN Taxonomy for Plants

#### Published in
Mitt. Deutsch. Dendrol. Ges. 15:180. 1906

#### Original name
null

### Remarks
null


text:
package com.amazonaws.services.dynamodbv2.model;

import javax.annotation.Generated;

/**
 *

 * A source table with the name TableName does not currently exist within the subscriber's account or the
 * subscriber is operating in the wrong Amazon Web Services Region.
 *

 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TableNotFoundException extends com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException {
    private static final long serialVersionUID = 1L;

    /**
     * Constructs a new TableNotFoundException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public TableNotFoundException(String message) {
        super(message);
    }

}


text:
using Microsoft.EntityFrameworkCore;
using Stories.Data.Entities;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Stories.Data.DbContexts
{
    public interface IDbContext : IDisposable
    {
        DbSet<Comment> Comments { get; set; }
        DbSet<CommentScore> CommentScores { get; set; }
        DbSet<Flag> Flags { get; set; }
        DbSet<StoryScore> StoryScores { get; set; }
        DbSet<Story> Stories { get; set; }
        DbSet<User> Users { get; set; }
        DbSet<UserSettings> UserSettings { get; set; }
        DbSet<Vote> Votes { get; set; }
        DbSet<Referral> Referrals { get; set; }
        DbSet<Role> Roles { get; set; }
        DbSet<UserBan> UserBans { get; set; }
        DbSet<UserRole> UserRoles { get; set; }

        int SaveChanges();
        Task<int> SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken));
    }
}


text:
package org.dnal.compiler.generate.old;

import java.util.List;
import java.util.Map;

import org.dnal.compiler.et.XErrorTracker;
import org.dnal.compiler.parser.error.ErrorTrackingBase;
import org.dnal.compiler.parser.error.LineLocator;
import org.dnal.compiler.parser.error.TypeInfo;
import org.dnal.core.DListType;
import org.dnal.core.DMapType;
import org.dnal.core.DStructHelper;
import org.dnal.core.DStructType;
import org.dnal.core.DType;
import org.dnal.core.DTypeRegistry;
import org.dnal.core.DValue;
import org.dnal.core.Shape;
import org.dnal.core.nrule.NRule;
import org.dnal.core.repository.World;

public class OldDNALGeneratePhase extends ErrorTrackingBase {
    private DTypeRegistry registry;
    private World world;

    public OldDNALGeneratePhase(XErrorTracker et, DTypeRegistry registry, World world, LineLocator lineLocator) {
        super(et, lineLocator);
        this.registry = registry;
        this.world = world;
    }

    public boolean generate(OldOutputGenerator visitor) {
        boolean b = false;
        try {
            b = doGenerate(visitor);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return b;
    }

    public boolean doGenerate(OldOutputGenerator visitor) throws Exception {
        List<DType> orderedTypeList = registry.getOrderedList();

        for(DType dtype: orderedTypeList) {
            if (TypeInfo.isBuiltIntype(dtype.getName())) {
                continue;
            }

            if (dtype.isStructShape()) {
                DStructType fste = (DStructType) dtype;
                visitor.startStructType(dtype.getName(), fste);
                //!!fix to be ordered
                for(String fieldName: fste.orderedList()) {
                    DType field = fste.getFields().get(fieldName);
                    visitor.structMember(fieldName, field);
                }
            } else if (dtype.isShape(Shape.ENUM)) {
                DStructType structType = (DStructType) dtype;
                visitor.startEnumType(dtype.getName(), structType);
                for(String key: structType.orderedList()) {
                    DType elType = structType.getFields().get(key);
                    visitor.enumMember(key, elType);
                }
            } else if (dtype instanceof DListType) {
                DListType listType = (DListType) dtype;
                doList(visitor, listType);
            } else if (dtype instanceof DMapType) {
            	DMapType mapType = (DMapType) dtype;
                doMap(visitor, mapType);
            } else {
                visitor.startType(dtype.getName(), dtype);
            }

            int index = 0;
            for(NRule rule: dtype.getRawRules()) {
                String ruleText = rule.getRuleText();
                visitor.rule(index++, ruleText, rule); //fix later!! need ruleText
            }

            visitor.endType(dtype.getName(), dtype);
        }

        List<String> orderedValueList = world.getOrderedList();
        for(String valueName: orderedValueList) {
            DValue dval = world.findTopLevelValue(valueName);
            doval(visitor, 0, valueName, dval, null);
        }

        return areNoErrors();
    }
	private void doList(OldOutputGenerator visitor, DListType listType) throws Exception {
        visitor.startListType(listType.getName(), listType);
    }
    private void doMap(OldOutputGenerator visitor, DMapType mapType) throws Exception {
        visitor.startMapType(mapType.getName(), mapType);
	}

    private void doval(OldOutputGenerator visitor, int indent, String valueName, DValue dval, DValue parentVal) throws Exception {

        if (dval == null) {
            //optional field
            visitor.value(valueName, null, parentVal);
        } else if (dval.getType().isStructShape()) {
            visitor.startStruct(valueName, dval);

            DStructHelper helper = new DStructHelper(dval);

            int index = 0;
            DStructType structType = (DStructType) dval.getType();
            for(String fieldName : structType.orderedList()) {
                DValue inner = helper.getField(fieldName);
                doval(visitor, indent+1, fieldName, inner, dval); //!recursion!
                index++;
            }
            visitor.endStruct(valueName, dval);
        } else if (dval.getType().isListShape()) {
            visitor.startList(valueName, dval);
            List<DValue> elementL = dval.asList();

            int index = 0;
            for(DValue el: elementL) {
                doval(visitor, indent+1, "", el, dval); //!recursion!
                index++;
            }
            visitor.endList(valueName, dval);
        } else if (dval.getType().isMapShape()) {
            visitor.startMap(valueName, dval);
            Map<String,DValue> map = dval.asMap();

            int index = 0;
            for(String key: map.keySet()) {
            	DValue el = map.get(key);
                doval(visitor, indent+1, key, el, dval); //!recursion!
                index++;
            }
            visitor.endMap(valueName, dval);
        } else {
//          String shape = this.doc.getShape(valueExp.type);
//          boolean isScalar = TypeInfo.isScalarType(new IdentExp(shape));
            visitor.value(valueName, dval, parentVal);
        }
    }

    /**
     * Output a single dval
     * @param visitor
     * @param dval
     * @return
     */
    public boolean generate(OldOutputGenerator visitor, String varName, DValue dval) {
        boolean b = false;
        try {
            b = doGenerateSingle(visitor, varName, dval);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return b;
    }

    public boolean doGenerateSingle(OldOutputGenerator visitor, String varName, DValue dval) throws Exception {
    	doval(visitor, 0, varName, dval, null);
        return areNoErrors();
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping
>
    <class
        name="org.appfuse.model.Role"
        table="role"
        dynamic-update="false"
        dynamic-insert="false"
        select-before-update="false"
        optimistic-lock="version"
    >

        <id
            name="name"
            column="name"
            type="java.lang.String"
            length="20"
            unsaved-value="version"
        >
            <generator class="assigned">
              <!--
                  To add non XDoclet generator parameters, create a file named
                  hibernate-generator-params-Role.xml
                  containing the additional parameters and place it in your merge dir.
              -->
            </generator>
        </id>

        <version
            name="version"
            type="java.lang.Integer"
            column="version"
            access="property"
            unsaved-value="undefined"
        />

        <property
            name="description"
            type="java.lang.String"
            update="true"
            insert="true"
            access="property"
            column="description"
        />

        <!--
            To add non XDoclet property mappings, create a file named
                hibernate-properties-Role.xml
            containing the additional properties and place it in your merge dir.
        -->

    </class>

</hibernate-mapping>


text:
The **smart-stub-generator** works by adding functionality to ScalaCheck and in in order to use the stub generator, you need to have an idea of how ScalaCheck itself works. The ScalaCheck library is not available in the default library and the easiest way to manage the dependancy is to create a directory with a simple build.sbt file in it that brings it in:

```sh
$ mkdir stubs
$ cd stubs
$ echo 'libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.4"' > build.sbt
$ sbt console
scala>
```

You will now be able to start using ScalaCheck. For example:

```tut
import org.scalacheck._

val personName = Gen.alphaStr
personName.sample.foreach(println)
```

This is ideal for producing tests with the intent of stressing our code since the strings that are produced are the kind of names that we would not normally use. They exercise the code in the presence of really unusual names (for example names hundreds of characters long, or names with punctuation in them).

From the perspective of rapidly creating a stub that has to produce _plausible_ data, ScalaCheck is limited not ideal though. We want to construct names that look like they might represent a real person so that we can either demonstrate our work or visualize it.

We would also like to be able to recreate data on demand. ScalaCheck will produce a different alphanumeric string each time it is asked to give a sample. So if you were to restart sbt and create another personName you would get an entirely different string:

```tut
import org.scalacheck._

val personName = Gen.alphaStr
personName.sample.foreach(println)
```

The stub generator addresses both of these issues. In order to try it, you need to add the library dependancy to the build.sbt file:

```sh
$ echo 'libraryDependencies += "hmrc" %% "stub-data-generator" % "0.1.0"' >> build.sbt
```

(Note the use of the ```>>``` in this command, it appends text to a file.)

Alternatively, open the build.sbt in the text editor of your choice and add:

```scala
libraryDependencies += "hmrc" %% "stub-data-generator" % "0.1.0"
```

Now you can use the ```sbt console``` command to work with the stub generator. We can use the new ```Gen.forename``` method to create plausible first names.

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val name = Gen.forename
name.sample.foreach(println)
name.sample.foreach(println)
name.sample.foreach(println)
```

We can generate surnames in a similar fashion:

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val lastname = Gen.surname
lastname.sample.foreach{println}
lastname.sample.foreach{println}
lastname.sample.foreach{println}
```

These meet the requirement that the data that is generated is plausible, but using this method the data is not repeatable. If the console is restarted and another surname is generated:

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val lastname = Gen.surname
lastname.sample.foreach{println}
```

The surnames generated will be different.

How can we ensure that the same names are generated on demand? We can use the ``seeded`` method rather than the ```sample``` method:

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val name = Gen.forename
name.seeded(1L).foreach{println}
name.seeded(2L).foreach{println}
name.seeded(12874638L).foreach{println}
```

Even if the console is restarted, ``seeded(2L)``  will always return "Isaiha":

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val name = Gen.forename
name.seeded(2L).foreach{println}
```

This leads to an important difference when generating a collection of names. If we want each one to be random, the sample method has to be called for each one, and each time it will give an arbitrary answer:

```tut
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val randomNames = (1 to 5).map{x => name.sample.get}
val moreRandomNames = (1 to 5).map{x => name.sample.get}
```

But if we want to generate the same collection of names each time, we have to use ```seeded``` with the same inputs:

```scala
import org.scalacheck._
import uk.gov.uk.gov.hmrc.smartstub._

val seededNames = (1 to 5).map{x => name.seeded(x.toLong).get}
val moreSeededNames = (1 to 5).map{x => name.seeded(x.toLong).get}
```

Note that the integer ```x``` has to be explicitly converted into a long to make this work.

There are a variety of additional data generators available covering emails, national insurance numbers (NINOs), uk addresses, and many more. The library also allows strings that meet arbitrary patterns to be created. These are covered in the following section.


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.anarres.tftp.protocol.resource;

import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.cache.Weigher;
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;

/**
 *
 * @author shevek
 */
public class TftpFileCacheDataProvider extends TftpFileChannelDataProvider {

    public static final long DEFAULT_SIZE = 64L * 1024 * 1024;
    private final LoadingCache<File, TftpByteArrayData> cache;

    /**
     * @param cacheSize The cache size in bytes.
     */
    public TftpFileCacheDataProvider(@Nonnull String prefix, @Nonnegative long cacheSize) {
        super(prefix);
        this.cache = CacheBuilder.newBuilder()
                .weigher(new Weigher<Object, TftpByteArrayData>() {
            public int weigh(Object key, TftpByteArrayData value) {
                return value.getSize();
            }
        }).maximumWeight(cacheSize)
                .expireAfterAccess(10, TimeUnit.MINUTES)
                .softValues()
                .build(new CacheLoader<File, TftpByteArrayData>() {
            @Override
            public TftpByteArrayData load(File key) throws Exception {
                byte[] data = Files.toByteArray(key);
                return new TftpByteArrayData(data);
            }
        });
    }

    /**
     * @param cacheSize The cache size in bytes.
     */
    public TftpFileCacheDataProvider(@Nonnegative long cacheSize) {
        this(DEFAULT_PREFIX, cacheSize);
    }

    /** Uses a 64 Mb cache. */
    public TftpFileCacheDataProvider(@Nonnull String prefix) {
        this(prefix, DEFAULT_SIZE);
    }

    /** Uses a 64 Mb cache. */
    public TftpFileCacheDataProvider() {
        this(DEFAULT_PREFIX, DEFAULT_SIZE);
    }

    @Override
    public TftpData open(String filename) throws IOException {
        File file = toFile(filename);
        if (file == null)
            return null;
        return cache.getUnchecked(file);
    }
}