text:
.class Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;
.super Ljava/lang/Object;
.source "IBluetoothHeadsetPhone.java"

# interfaces
.implements Landroid/bluetooth/IBluetoothHeadsetPhone;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "Proxy"
.end annotation

# instance fields
.field private mRemote:Landroid/os/IBinder;

# direct methods
.method constructor <init>(Landroid/os/IBinder;)V
    .locals 0
    .param p1, "remote"    # Landroid/os/IBinder;

    .prologue
    .line 147
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 149
    iput-object p1, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    .line 147
    return-void
.end method

# virtual methods
.method public answerCall()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 163
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 164
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 167
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 168
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x1

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 169
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 170
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 173
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 174
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 176
    return v2

    .line 170
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 172
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 173
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 174
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 172
    throw v3
.end method

.method public asBinder()Landroid/os/IBinder;
    .locals 1

    .prologue
    .line 153
    iget-object v0, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    return-object v0
.end method

.method public cdmaSetSecondCallState(Z)V
    .locals 5
    .param p1, "state"    # Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 331
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 332
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 334
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 335
    if-eqz p1, :cond_0

    const/4 v2, 0x1

    :cond_0
    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInt(I)V

    .line 336
    iget-object v2, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v3, 0xb

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 337
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 340
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 341
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 329
    return-void

    .line 339
    :catchall_0
    move-exception v2

    .line 340
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 341
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 339
    throw v2
.end method

.method public cdmaSwapSecondCallState()V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 317
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 318
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 320
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v2, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 321
    iget-object v2, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v3, 0xa

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 322
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 325
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 326
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 315
    return-void

    .line 324
    :catchall_0
    move-exception v2

    .line 325
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 326
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 324
    throw v2
.end method

.method public getInterfaceDescriptor()Ljava/lang/String;
    .locals 1

    .prologue
    .line 157
    const-string/jumbo v0, "android.bluetooth.IBluetoothHeadsetPhone"

    return-object v0
.end method

.method public getNetworkOperator()Ljava/lang/String;
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 233
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 234
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 237
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 238
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x5

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 239
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 240
    invoke-virtual {v1}, Landroid/os/Parcel;->readString()Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v2

    .line 243
    .local v2, "_result":Ljava/lang/String;
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 244
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 246
    return-object v2

    .line 242
    .end local v2    # "_result":Ljava/lang/String;
    :catchall_0
    move-exception v3

    .line 243
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 244
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 242
    throw v3
.end method

.method public getSubscriberNumber()Ljava/lang/String;
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 250
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 251
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 254
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 255
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x6

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 256
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 257
    invoke-virtual {v1}, Landroid/os/Parcel;->readString()Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v2

    .line 260
    .local v2, "_result":Ljava/lang/String;
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 261
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 263
    return-object v2

    .line 259
    .end local v2    # "_result":Ljava/lang/String;
    :catchall_0
    move-exception v3

    .line 260
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 261
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 259
    throw v3
.end method

.method public hangupCall()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 180
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 181
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 184
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 185
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x2

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 186
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 187
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 190
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 191
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 193
    return v2

    .line 187
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 189
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 190
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 191
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 189
    throw v3
.end method

.method public listCurrentCalls()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 267
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 268
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 271
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 272
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x7

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 273
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 274
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 277
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 278
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 280
    return v2

    .line 274
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 276
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 277
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 278
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 276
    throw v3
.end method

.method public processChld(I)Z
    .locals 6
    .param p1, "chld"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 215
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 216
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 219
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 220
    invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeInt(I)V

    .line 221
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x4

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 222
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 223
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 226
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 227
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 229
    return v2

    .line 223
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 225
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 226
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 227
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 225
    throw v3
.end method

.method public queryPhoneState()Z
    .locals 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 284
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 285
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 288
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 289
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v4, 0x8

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 290
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 291
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 294
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 295
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 297
    return v2

    .line 291
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 293
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 294
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 295
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 293
    throw v3
.end method

.method public sendDtmf(I)Z
    .locals 6
    .param p1, "dtmf"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 197
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 198
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 201
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v3, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v3}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 202
    invoke-virtual {v0, p1}, Landroid/os/Parcel;->writeInt(I)V

    .line 203
    iget-object v3, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/4 v4, 0x3

    const/4 v5, 0x0

    invoke-interface {v3, v4, v0, v1, v5}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 204
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V

    .line 205
    invoke-virtual {v1}, Landroid/os/Parcel;->readInt()I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v3

    if-eqz v3, :cond_0

    const/4 v2, 0x1

    .line 208
    .local v2, "_result":Z
    :goto_0
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 209
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 211
    return v2

    .line 205
    .end local v2    # "_result":Z
    :cond_0
    const/4 v2, 0x0

    .restart local v2    # "_result":Z
    goto :goto_0

    .line 207
    .end local v2    # "_result":Z
    :catchall_0
    move-exception v3

    .line 208
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 209
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 207
    throw v3
.end method

.method public updateBtHandsfreeAfterRadioTechnologyChange()V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    .prologue
    .line 303
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v0

    .line 304
    .local v0, "_data":Landroid/os/Parcel;
    invoke-static {}, Landroid/os/Parcel;->obtain()Landroid/os/Parcel;

    move-result-object v1

    .line 306
    .local v1, "_reply":Landroid/os/Parcel;
    :try_start_0
    const-string/jumbo v2, "android.bluetooth.IBluetoothHeadsetPhone"

    invoke-virtual {v0, v2}, Landroid/os/Parcel;->writeInterfaceToken(Ljava/lang/String;)V

    .line 307
    iget-object v2, p0, Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder;

    const/16 v3, 0x9

    const/4 v4, 0x0

    invoke-interface {v2, v3, v0, v1, v4}, Landroid/os/IBinder;->transact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    .line 308
    invoke-virtual {v1}, Landroid/os/Parcel;->readException()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 311
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 312
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 301
    return-void

    .line 310
    :catchall_0
    move-exception v2

    .line 311
    invoke-virtual {v1}, Landroid/os/Parcel;->recycle()V

    .line 312
    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 310
    throw v2
.end method


text:
#include <iostream>

namespace ckdb
{
extern "C" {
extern ckdb::KeySet * elektraDocu;
extern std::ostream * elektraLog;
}
void elektraSingleCleanup ();
} // namespace ckdb

int main (int argc, char ** argv)
{
	using namespace ckdb;
	::testing::InitGoogleTest (&argc, argv);
	int ret = RUN_ALL_TESTS ();
	elektraClose (); // valgrind does not detect cleanup outside main, so lets do it here
	elektraSingleCleanup ();
	return ret;
}

redpajama_set_name: RedPajamaGithub


text:
typedef unsigned int size_t;

void *memcpy(void *dest, const void *src, size_t n);
void *memmove(void *dest, const void *src, size_t n);
void *memset(void *s, int c, size_t n);

size_t strlen(const char *str);
int strcmp(const char *s1, const char *s2);
int strncmp(const char *s1, const char *s2, size_t n);
char *strcpy(char *dest, const char *src);
char *strcat(char *dest, const char *src);
char *strchr(const char *s, int c);
char *strstr(const char *haystack, const char *needle);

int printf(const char *fmt, ...);
int snprintf(char *str, size_t size, const char *fmt, ...);

void stoupper (char *str);


text: <extends:base-b c="Block C defined in file C(default)."/>


text:
module Reports
  class RentLogic < BaseLogic

    def build_model
      ret = RentModel.new
      start_from = Date.strptime(start_ym.to_s + '01', '%Y%m%d')
      end_to = Date.strptime(end_ym.to_s + HyaccDateUtil.get_days_of_month(end_ym/100, end_ym%100).to_s, '%Y%m%d')

      details = {}
      Rent.order('status desc, end_to, start_from').each do |rent|
        detail = RentDetailModel.new
        detail.rent = rent

          if rent.start_from < start_from
          detail.start_from = start_from
        else
          detail.start_from = rent.start_from
        end

        if rent.end_to.nil? || rent.end_to > end_to
          detail.end_to = end_to
        else
          detail.end_to = rent.end_to
        end

        details[rent.id] = detail
      end

      Journal.where(conditions).includes(:journal_details).each do |jh|
        jh.journal_details.each do |jd|
          next unless jd.account.code == ACCOUNT_CODE_RENT

          if jd.dc_type == jd.account.dc_type
            details[jd.sub_account_id].total_amount += jd.amount
          else
            details[jd.sub_account_id].total_amount -= jd.amount
          end
        end
      end

      details.each do |id, detail|
        next unless detail.total_amount > 0
        ret.add_detail(detail)
      end

      ret
    end

    private

    def conditions
      sql = SqlBuilder.new
      sql.append('deleted = ?', false)
      sql.append('and ym >= ? and ym <= ?', start_ym, end_ym)
      sql.append('and finder_key rlike ?', JournalUtil.build_rlike_condition(ACCOUNT_CODE_RENT, 0, branch_id))
      sql.to_a
    end

  end

  class RentModel
    attr_accessor :details

    def initialize
      @details = []
    end

    def add_detail(detail)
      self.details << detail
    end
  end

  class RentDetailModel
    attr_accessor :rent
    attr_accessor :total_amount
    attr_accessor :start_from
    attr_accessor :end_to

    def initialize
      @total_amount = 0
    end
  end
end


text:
namespace ui {
class LayerOwnerDelegate;

class COMPOSITOR_EXPORT LayerOwner {
 public:
  LayerOwner();
  virtual ~LayerOwner();

  void SetLayer(Layer* layer);

  // Releases the owning reference to its layer, and returns it.
  // This is used when you need to animate the presentation of the owner just
  // prior to destroying it. The Owner can be destroyed soon after calling this
  // function, and the caller is then responsible for disposing of the layer
  // once any animation completes. Note that layer() will remain valid until the
  // end of ~LayerOwner().
  std::unique_ptr<Layer> AcquireLayer();

  // Asks the owner to recreate the layer, returning the old Layer. NULL is
  // returned if there is no existing layer, or recreate is not supported.
  //
  // This does not recurse. Existing children of the layer are moved to the new
  // layer.
  virtual std::unique_ptr<Layer> RecreateLayer();

  ui::Layer* layer() { return layer_; }
  const ui::Layer* layer() const { return layer_; }

  void set_layer_owner_delegate(LayerOwnerDelegate* delegate) {
    layer_owner_delegate_ = delegate;
  }

 protected:
  void DestroyLayer();

  bool OwnsLayer() const;

 private:
  // The LayerOwner owns its layer unless ownership is relinquished via a call
  // to AcquireLayer(). After that moment |layer_| will still be valid but
  // |layer_owner_| will be NULL. The reason for releasing ownership is that
  // the client may wish to animate the layer beyond the lifetime of the owner,
  // e.g. fading it out when it is destroyed.
  std::unique_ptr<Layer> layer_owner_;
  Layer* layer_;

  LayerOwnerDelegate* layer_owner_delegate_;

  DISALLOW_COPY_AND_ASSIGN(LayerOwner);
};

}  // namespace ui

#endif  // UI_COMPOSITOR_LAYER_OWNER_H_


text:
#include "board.h"

void SystemClock_Config(void)
{
  RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  RCC_PeriphCLKInitTypeDef PeriphClkInit = {0};

  /** Configure the main internal regulator output voltage
  */
  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
  /** Initializes the CPU, AHB and APB busses clocks
  */
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSE;
  RCC_OscInitStruct.LSEState = RCC_LSE_ON;
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
  RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL6;
  RCC_OscInitStruct.PLL.PLLDIV = RCC_PLL_DIV3;
  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  {
    Error_Handler();
  }
  /** Initializes the CPU, AHB and APB busses clocks
  */
  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;

  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK)
  {
    Error_Handler();
  }
  PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_RTC;
  PeriphClkInit.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
  if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK)
  {
    Error_Handler();
  }
}

#ifdef RT_USING_USB_DEVICE
void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
{
  if(pcdHandle->Instance==USB)
  {
  /* USER CODE BEGIN USB_MspInit 0 */

  /* USER CODE END USB_MspInit 0 */
    /* Peripheral clock enable */
    __HAL_RCC_USB_CLK_ENABLE();

    /* Peripheral interrupt init */
    HAL_NVIC_SetPriority(USB_LP_IRQn, 0, 0);
    HAL_NVIC_EnableIRQ(USB_LP_IRQn);
  /* USER CODE BEGIN USB_MspInit 1 */

  /* USER CODE END USB_MspInit 1 */
  }
}

void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
{
  if(pcdHandle->Instance==USB)
  {
  /* USER CODE BEGIN USB_MspDeInit 0 */

  /* USER CODE END USB_MspDeInit 0 */
    /* Peripheral clock disable */
    __HAL_RCC_USB_CLK_DISABLE();

    /* Peripheral interrupt Deinit*/
    HAL_NVIC_DisableIRQ(USB_LP_IRQn);

  /* USER CODE BEGIN USB_MspDeInit 1 */

  /* USER CODE END USB_MspDeInit 1 */
  }
}
#endif


text:
/*jshint expr: true*/
describe('eha.date-of-birth-or-age.service', function() {
  'use strict';

  var service;
  beforeEach(module('eha.date-of-birth-or-age.service', function($provide) {
    // Fake the current date so that our tests don't fail in the future
    sinon.useFakeTimers(new Date(2015, 4, 3).getTime()); //  Mai 3 2015
  }));

  beforeEach(inject(function(_ehaDateOfBirthOrAgeService_) {
    service = _ehaDateOfBirthOrAgeService_;
  }));

  describe('Public API', function() {
    describe('.getBirthDateFromAge()', function() {
      it('should return birth date when given an age', function() {
        var years = 32;
        var months = 7;
        var birthDate = service.getBirthDateFromAge(years, months);

        expect(birthDate.year).to.equal(1982);
        expect(birthDate.month).to.equal(10);
      });
    });

    describe('.getAgeFromBirthDate()', function() {
      it('should return birth date when given an age', function() {
        var year = 1982;
        var month = 10;
        var age = service.getAgeFromBirthDate(year, month);

        expect(age.years).to.equal(32);
        expect(age.months).to.equal(7);
      });
    });
  });
});


text:
\section{Anexos}
\subsection{Pseudocodigo de metodos}
copiar pseudocodigo (comentarios)

\subsection{Detalle de experimentos}

en este anexo detallamos los diferentes experimentos, como replicarlos y la
motivacion detras de cada uno de ellos.

por cada experimento indicar en que archivo esta, y que corridas se hicieron
con que datos y por que elegimos hacer ese exp.


text:
. "$(dirname "$0")/testlib.sh"

begin_test "mergetool works with large files"
(
  set -e

  reponame="mergetool-works-with-large-files"
  git init "$reponame"
  cd "$reponame"

  git lfs track "*.dat"
  printf "base" > conflict.dat
  git add .gitattributes conflict.dat
  git commit -m "initial commit"

  git checkout -b conflict
  printf "b" > conflict.dat
  git add conflict.dat
  git commit -m "conflict.dat: b"

  git checkout main

  printf "a" > conflict.dat
  git add conflict.dat
  git commit -m "conflict.dat: a"

  set +e
  git merge conflict
  set -e

  git config mergetool.inspect.cmd '
    for i in BASE LOCAL REMOTE; do
      echo "\$$i=$(eval "cat \"\$$i\"")";
    done;
    exit 1
  '
  git config mergetool.inspect.trustExitCode true

  yes | git mergetool \
      --no-prompt \
      --tool=inspect \
      -- conflict.dat 2>&1 \
    | tee mergetool.log

  grep "\$BASE=base" mergetool.log
  grep "\$LOCAL=a" mergetool.log
  grep "\$REMOTE=b" mergetool.log
)
end_test


text:
import React, { Component } from 'react';

import './pageBreak.css';

const PageBreak = (props) => (

{props.heading}

)

export default PageBreak;


text:
package util

import (
	"reflect"
	"regexp"
	"testing"

	"github.com/Shopify/go-lua"
)

func TestVarargsFrom1(t *testing.T) {
	l := lua.NewState()
	l.PushString("foo")
	l.PushString("bar")
	l.PushString("baz")

	testVarargs(t, l, 1, []interface{}{"foo", "bar", "baz"})
}

func TestVarargsFrom2(t *testing.T) {
	l := lua.NewState()
	l.PushString("foo")
	l.PushString("bar")
	l.PushString("baz")

	testVarargs(t, l, 2, []interface{}{"bar", "baz"})
}

func TestVarargsFromEnd(t *testing.T) {
	l := lua.NewState()
	l.PushString("foo")
	l.PushString("bar")
	l.PushString("baz")

	testVarargs(t, l, 4, []interface{}{})
}

func TestVarargsFromBeyondEnd(t *testing.T) {
	l := lua.NewState()
	l.PushString("foo")
	l.PushString("bar")
	l.PushString("baz")

	testVarargs(t, l, 5, []interface{}{})
}

func TestVarargsWithNil(t *testing.T) {
	l := lua.NewState()
	l.PushNil()

	testVarargs(t, l, 1, []interface{}{nil})
}

func TestVarargsWithBoolean(t *testing.T) {
	l := lua.NewState()
	l.PushBoolean(true)
	l.PushBoolean(false)

	testVarargs(t, l, 1, []interface{}{true, false})
}

func TestVarargsWithNumber(t *testing.T) {
	l := lua.NewState()
	l.PushNumber(-20.5)
	l.PushNumber(0)
	l.PushNumber(10000)

	testVarargs(t, l, 1, []interface{}{-20.5, 0., 10000.})
}

func TestVarargsWithString(t *testing.T) {
	l := lua.NewState()
	l.PushString("foo")
	l.PushString("")

	testVarargs(t, l, 1, []interface{}{"foo", ""})
}

func TestVarargsWithTable(t *testing.T) {
	l := lua.NewState()
	l.NewTable()
	l.PushString("bar")
	l.SetField(-2, "foo")

	testVarargs(t, l, 1, []interface{}{map[string]interface{}{"foo": "bar"}})
}

func TestVarargsWithFunction(t *testing.T) {
	l := lua.NewState()
	l.PushGoClosure(func(l *lua.State) int { return 0 }, 0)

	actual, err := PullVarargs(l, 1)
	if err != nil {
		t.Fatalf("Failed, %s", err.Error())
	}
	switch actual[0].(type) {
	case lua.Function:
		return
	default:
		t.Fatalf("Expected function, got %#v", actual[0])
	}
}

func TestVarargsWithUserData(t *testing.T) {
	userdata := regexp.MustCompile(".")
	l := lua.NewState()
	l.PushUserData(userdata)

	testVarargs(t, l, 1, []interface{}{userdata})
}

func TestVarargsWithThread(t *testing.T) {
	l := lua.NewState()
	l.PushThread()

	testVarargs(t, l, 1, []interface{}{l})
}

func testVarargs(t *testing.T, l *lua.State, index int, expected []interface{}) {
	actual, err := PullVarargs(l, index)
	if err != nil {
		t.Fatalf("Failed, %s", err.Error())
	}
	if !reflect.DeepEqual(expected, actual) {
		t.Fatalf("Expected %#v, got %#v", expected, actual)
	}
}


text:
if(DEFINED POLLY_CLANG_LIBSTDCXX_CMAKE)
  return()
else()
  set(POLLY_CLANG_LIBSTDCXX_CMAKE 1)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_init.cmake")

polly_init(
    "clang / GNU Standard C++ Library (libstdc++) / c++11 support"
    "Unix Makefiles"
)

include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")

include("${CMAKE_CURRENT_LIST_DIR}/compiler/clang.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/library/std/libstdcxx.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/flags/fpic.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/flags/static-std.cmake")

include("${CMAKE_CURRENT_LIST_DIR}/os/osx.cmake")


text:
<?php
/**
 * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
 */
namespace Team3\PayU\Order\Autocomplete;

use Psr\Log\LoggerInterface;
use Team3\PayU\Configuration\ConfigurationInterface;
use Team3\PayU\Order\Autocomplete\Strategy\AutocompleteStrategyInterface;
use Team3\PayU\Order\Model\OrderInterface;

class OrderAutocomplete implements OrderAutocompleteInterface
{
    /**
     * @var AutocompleteStrategyInterface[]
     */
    private $strategies;

    /**
     * @var LoggerInterface
     */
    private $logger;

    /**
     * @param LoggerInterface $logger
     */
    public function __construct(LoggerInterface $logger)
    {
        $this->strategies = [];
        $this->logger = $logger;
    }

    /**
     * @param OrderInterface         $order
     * @param ConfigurationInterface $configuration
     */
    public function autocomplete(
        OrderInterface $order,
        ConfigurationInterface $configuration
    ) {
        foreach ($this->strategies as $strategy) {
            if ($strategy->supports($order)) {
                $strategy->autocomplete($order, $configuration);
                $this->logAutocompletion($order, $strategy);
            }
        }
    }

    /**
     * @param AutocompleteStrategyInterface $autocompleteStrategy
     *
     * @return $this
     */
    public function addStrategy(
        AutocompleteStrategyInterface $autocompleteStrategy
    ) {
        $this->strategies[] = $autocompleteStrategy;

        return $this;
    }

    /**
     * @param OrderInterface                $order
     * @param AutocompleteStrategyInterface $strategy
     */
    private function logAutocompletion(
        OrderInterface $order,
        AutocompleteStrategyInterface $strategy
    ) {
        $this
            ->logger
            ->info(
                sprintf(
                    'Order with ID %s parameters were autocompleted by %s',
                    $order->getOrderId(),
                    get_class($strategy)
                ),
                [
                    'order' => $order,
                    'strategy' => $strategy,
                ]
            );
    }
}


text:
/**
 * Created by jakub on 08.07.2017.
 */
import React from "react"
import PropTypes from 'prop-types';

/**
 * Basic button. with handleClick and className parameters
 * @param props handleClick and className
 * @returns {XML}
 * @constructor
 */
const Button = (props) => {
  return <button
    type="button"
    className={props.className}
    onClick={props.handleClick}>
    {props.children}
  </button>
};
Button.propTypes = {
  handleClick: PropTypes.func.isRequired,
  className: PropTypes.string,
};
export {Button}


text:
/**
 */
package org.afplib.afplib.impl;

import org.afplib.afplib.AfplibPackage;
import org.afplib.afplib.MSURG;

import org.afplib.base.impl.TripletImpl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 *
 * An implementation of the model object 'MSURG'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link org.afplib.afplib.impl.MSURGImpl#getSUPname SU Pname}

 *
{@link org.afplib.afplib.impl.MSURGImpl#getReserved Reserved}

 *
{@link org.afplib.afplib.impl.MSURGImpl#getSUPid SU Pid}

 *

 *
 * @generated
 */
public class MSURGImpl extends TripletImpl implements MSURG {
	/**
	 * The default value of the '{@link #getSUPname() SU Pname}' attribute.
	 *
	 *
	 * @see #getSUPname()
	 * @generated
	 * @ordered
	 */
	protected static final String SU_PNAME_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSUPname() SU Pname}' attribute.
	 *
	 *
	 * @see #getSUPname()
	 * @generated
	 * @ordered
	 */
	protected String suPname = SU_PNAME_EDEFAULT;

	/**
	 * The default value of the '{@link #getReserved() Reserved}' attribute.
	 *
	 *
	 * @see #getReserved()
	 * @generated
	 * @ordered
	 */
	protected static final byte[] RESERVED_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getReserved() Reserved}' attribute.
	 *
	 *
	 * @see #getReserved()
	 * @generated
	 * @ordered
	 */
	protected byte[] reserved = RESERVED_EDEFAULT;

	/**
	 * The default value of the '{@link #getSUPid() SU Pid}' attribute.
	 *
	 *
	 * @see #getSUPid()
	 * @generated
	 * @ordered
	 */
	protected static final Integer SU_PID_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getSUPid() SU Pid}' attribute.
	 *
	 *
	 * @see #getSUPid()
	 * @generated
	 * @ordered
	 */
	protected Integer suPid = SU_PID_EDEFAULT;

	/**
	 *
	 *
	 * @generated
	 */
	protected MSURGImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return AfplibPackage.eINSTANCE.getMSURG();
	}

	/**
	 *
	 *
	 * @generated
	 */
	public String getSUPname() {
		return suPname;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSUPname(String newSUPname) {
		String oldSUPname = suPname;
		suPname = newSUPname;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MSURG__SU_PNAME, oldSUPname, suPname));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public byte[] getReserved() {
		return reserved;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setReserved(byte[] newReserved) {
		byte[] oldReserved = reserved;
		reserved = newReserved;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MSURG__RESERVED, oldReserved, reserved));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public Integer getSUPid() {
		return suPid;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSUPid(Integer newSUPid) {
		Integer oldSUPid = suPid;
		suPid = newSUPid;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MSURG__SU_PID, oldSUPid, suPid));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case AfplibPackage.MSURG__SU_PNAME:
				return getSUPname();
			case AfplibPackage.MSURG__RESERVED:
				return getReserved();
			case AfplibPackage.MSURG__SU_PID:
				return getSUPid();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case AfplibPackage.MSURG__SU_PNAME:
				setSUPname((String)newValue);
				return;
			case AfplibPackage.MSURG__RESERVED:
				setReserved((byte[])newValue);
				return;
			case AfplibPackage.MSURG__SU_PID:
				setSUPid((Integer)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case AfplibPackage.MSURG__SU_PNAME:
				setSUPname(SU_PNAME_EDEFAULT);
				return;
			case AfplibPackage.MSURG__RESERVED:
				setReserved(RESERVED_EDEFAULT);
				return;
			case AfplibPackage.MSURG__SU_PID:
				setSUPid(SU_PID_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case AfplibPackage.MSURG__SU_PNAME:
				return SU_PNAME_EDEFAULT == null ? suPname != null : !SU_PNAME_EDEFAULT.equals(suPname);
			case AfplibPackage.MSURG__RESERVED:
				return RESERVED_EDEFAULT == null ? reserved != null : !RESERVED_EDEFAULT.equals(reserved);
			case AfplibPackage.MSURG__SU_PID:
				return SU_PID_EDEFAULT == null ? suPid != null : !SU_PID_EDEFAULT.equals(suPid);
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (SUPname: ");
		result.append(suPname);
		result.append(", Reserved: ");
		result.append(reserved);
		result.append(", SUPid: ");
		result.append(suPid);
		result.append(')');
		return result.toString();
	}

} //MSURGImpl


text:
var uuid = require('node-uuid')
var pluralize = require('pluralize')

module.exports = {
  getRemovable: getRemovable,
  createId: createId,
  deepQuery: deepQuery
}

// Returns document ids that have unsatisfied relations
// Example: a comment that references a post that doesn't exist
function getRemovable (db) {
  var _ = this
  var removable = []
  _.each(db, function (coll, collName) {
    _.each(coll, function (doc) {
      _.each(doc, function (value, key) {
        if (/Id$/.test(key)) {
          var refName = pluralize.plural(key.slice(0, -2))
          // Test if table exists
          if (db[refName]) {
            // Test if references is defined in table
            var ref = _.getById(db[refName], value)
            if (_.isUndefined(ref)) {
              removable.push({name: collName, id: doc.id})
            }
          }
        }
      })
    })
  })

  return removable
}

// Return incremented id or uuid
// Used to override underscore-db's createId with utils.createId
function createId (coll) {
  var _ = this
  var idProperty = _.__id()
  if (_.isEmpty(coll)) {
    return 1
  } else {
    var id = _.max(coll, function (doc) {
      return doc[idProperty]
    })[idProperty]

    if (_.isFinite(id)) {
      // Increment integer id
      return ++id
    } else {
      // Generate string id
      return uuid()
    }
  }
}

function deepQuery (value, q) {
  var _ = this
  if (value && q) {
    if (_.isArray(value)) {
      for (var i = 0; i < value.length; i++) {
        if (_.deepQuery(value[i], q)) {
          return true
        }
      }
    } else if (_.isObject(value) && !_.isArray(value)) {
      for (var k in value) {
        if (_.deepQuery(value[k], q)) {
          return true
        }
      }
    } else if (value.toString().toLowerCase().indexOf(q) !== -1) {
      return true
    }
  }
}


text:
import { Observable } from 'rxjs/Observable';
/**
 * @name Bluetooth Serial
 * @description This plugin enables serial communication over Bluetooth. It was written for communicating between Android or iOS and an Arduino.
 * @usage
 * ```typescript
 * import { BluetoothSerial } from 'ionic-native';
 *
 *
 * // Write a string
 * BluetoothSerial.write("hello world").then(success, failure);
 *
 * // Array of int or bytes
 * BluetoothSerial.write([186, 220, 222]).then(success, failure);
 *
 * // Typed Array
 * var data = new Uint8Array(4);
 * data[0] = 0x41;
 * data[1] = 0x42;
 * data[2] = 0x43;
 * data[3] = 0x44;
 * BluetoothSerial.write(data).then(success, failure);
 *
 * // Array Buffer
 * BluetoothSerial.write(data.buffer).then(success, failure);
 * ```
 */
export declare class BluetoothSerial {
    /**
     * Connect to a Bluetooth device
     * @param {string} macAddress_or_uuid Identifier of the remote device
     * @returns {Observable} Subscribe to connect, unsubscribe to disconnect.
     */
    static connect(macAddress_or_uuid: string): Observable<any>;
    /**
     * Connect insecurely to a Bluetooth device
     * @param {string} macAddress Identifier of the remote device
     * @returns {Observable} Subscribe to connect, unsubscribe to disconnect.
     */
    static connectInsecure(macAddress: string): Observable<any>;
    /**
     * Writes data to the serial port
     * @param {any} data ArrayBuffer of data
     * @returns {Promise} returns a promise when data has been written
     */
    static write(data: any): Promise<any>;
    /**
     * Gets the number of bytes of data available
     * @returns {Promise} returns a promise that contains the available bytes
     */
    static available(): Promise<any>;
    /**
     * Reads data from the buffer
     * @returns {Promise} returns a promise with data from the buffer
     */
    static read(): Promise<any>;
    /**
     * Reads data from the buffer until it reaches a delimiter
     * @param {string} delimiter string that you want to search until
     * @returns {Promise} returns a promise
     */
    static readUntil(delimiter: string): Promise<any>;
    /**
     * Subscribe to be notified when data is received
     * @param {string} delimiter the string you want to watch for
     * @returns {Observable} returns an observable.
     */
    static subscribe(delimiter: string): Observable<any>;
    /**
     * Subscribe to be notified when data is received
     * @returns {Observable} returns an observable
     */
    static subscribeRawData(): Observable<any>;
    /**
     * Clears data in buffer
     * @returns {Promise} returns a promise when completed
     */
    static clear(): Promise<any>;
    /**
     * Lists bonded devices
     * @returns {Promise} returns a promise
     */
    static list(): Promise<any>;
    /**
     * Reports if bluetooth is enabled
     * @returns {Promise} returns a promise
     */
    static isEnabled(): Promise<any>;
    /**
     * Reports the connection status
     * @returns {Promise} returns a promise
     */
    static isConnected(): Promise<any>;
    /**
     * Reads the RSSI from the connected peripheral
     * @returns {Promise} returns a promise
     */
    static readRSSI(): Promise<any>;
    /**
     * Show the Bluetooth settings on the device
     * @returns {Promise} returns a promise
     */
    static showBluetoothSettings(): Promise<any>;
    /**
     * Enable Bluetooth on the device
     * @returns {Promise} returns a promise
     */
    static enable(): Promise<any>;
    /**
     * Discover unpaired devices
     * @returns {Promise} returns a promise
     */
    static discoverUnpaired(): Promise<any>;
    /**
     * Subscribe to be notified on Bluetooth device discovery. Discovery process must be initiated with the `discoverUnpaired` function.
     * @returns {Observable} Returns an observable
     */
    static setDeviceDiscoveredListener(): Observable<any>;
    /**
     * Sets the human readable device name that is broadcasted to other devices
     * @param {string} newName Desired name of device
     */
    static setName(newName: string): void;
    /**
     * Makes the device discoverable by other devices
     * @param {number} discoverableDuration Desired number of seconds device should be discoverable for
     */
    static setDiscoverable(discoverableDuration: number): void;
}


text:
class ProjectsController < ApplicationController
  load_and_authorize_resource
  respond_to :html, :json
  def index
    @projects = Project.all
    respond_with @projects
  end

  def show
    @project = Project.find(params[:id])
    respond_with @project
  end

  def new
    @project = current_user.projects.build
    respond_with @project
  end

  def create
    @project = current_user.projects.build(params[:project])
    if @project.save
      flash[:notice] = "Successfully created project."
    else
      flash[:notice] = "Unable to create project."
    end
    respond_with @project
  end

  def edit
    @project = current_user.projects.find(params[:id])
    respond_with @project
  end

  def update
    @project = current_user.projects.find(params[:id])
    if @project.update_attributes(params[:project])
      flash[:notice] = "Successfully updated project."
    else
      flash[:notice] = "Unable to update project."
    end
    respond_with @project
  end

  def destroy
    @project = current_user.projects.find(params[:id])
    if @project.destroy
      flash[:notice] = "Successfully deleted project."
    else
      flash[:notice] = "Unable to delete project."
    end
    respond_with @project
  end
end


text:
package com.cloud.implicitplanner;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import com.cloud.capacity.Capacity;
import com.cloud.capacity.CapacityManager;
import com.cloud.capacity.dao.CapacityDao;
import com.cloud.context.CallContext;
import com.cloud.dc.ClusterDetailsDao;
import com.cloud.dc.DataCenterVO;
import com.cloud.dc.dao.ClusterDao;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.dc.dao.HostPodDao;
import com.cloud.deploy.DataCenterDeployment;
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
import com.cloud.deploy.ImplicitDedicationPlanner;
import com.cloud.engine.subsystem.api.storage.DataStoreManager;
import com.cloud.exception.InsufficientServerCapacityException;
import com.cloud.framework.config.dao.ConfigurationDao;
import com.cloud.gpu.dao.HostGpuGroupsDao;
import com.cloud.host.HostVO;
import com.cloud.host.dao.HostDao;
import com.cloud.host.dao.HostTagsDao;
import com.cloud.resource.ResourceManager;
import com.cloud.service.ServiceOfferingVO;
import com.cloud.service.dao.ServiceOfferingDao;
import com.cloud.service.dao.ServiceOfferingDetailsDao;
import com.cloud.storage.StorageManager;
import com.cloud.storage.dao.DiskOfferingDao;
import com.cloud.storage.dao.GuestOSCategoryDao;
import com.cloud.storage.dao.GuestOSDao;
import com.cloud.storage.dao.StoragePoolHostDao;
import com.cloud.storage.dao.VolumeDao;
import com.cloud.storage.datastore.db.PrimaryDataStoreDao;
import com.cloud.test.utils.SpringUtils;
import com.cloud.user.Account;
import com.cloud.user.AccountManager;
import com.cloud.user.AccountVO;
import com.cloud.user.User;
import com.cloud.user.UserVO;
import com.cloud.utils.Pair;
import com.cloud.utils.component.ComponentContext;
import com.cloud.vm.UserVmVO;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachineProfileImpl;
import com.cloud.vm.dao.UserVmDao;
import com.cloud.vm.dao.VMInstanceDao;

import javax.inject.Inject;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.TypeFilter;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class)
public class ImplicitPlannerTest {

    private static final long domainId = 5L;
    @Inject
    ImplicitDedicationPlanner planner = new ImplicitDedicationPlanner();
    @Inject
    HostDao hostDao;
    @Inject
    DataCenterDao dcDao;
    @Inject
    HostPodDao podDao;
    @Inject
    ClusterDao clusterDao;
    @Inject
    GuestOSDao guestOSDao;
    @Inject
    GuestOSCategoryDao guestOSCategoryDao;
    @Inject
    DiskOfferingDao diskOfferingDao;
    @Inject
    StoragePoolHostDao poolHostDao;
    @Inject
    UserVmDao vmDao;
    @Inject
    VMInstanceDao vmInstanceDao;
    @Inject
    VolumeDao volsDao;
    @Inject
    CapacityManager capacityMgr;
    @Inject
    ConfigurationDao configDao;
    @Inject
    PrimaryDataStoreDao storagePoolDao;
    @Inject
    CapacityDao capacityDao;
    @Inject
    AccountManager accountMgr;
    @Inject
    StorageManager storageMgr;
    @Inject
    DataStoreManager dataStoreMgr;
    @Inject
    ClusterDetailsDao clusterDetailsDao;
    @Inject
    ServiceOfferingDao serviceOfferingDao;
    @Inject
    ServiceOfferingDetailsDao serviceOfferingDetailsDao;
    @Inject
    ResourceManager resourceMgr;
    long dataCenterId = 1L;
    long accountId = 200L;
    long offeringId = 12L;
    int noOfCpusInOffering = 1;
    int cpuSpeedInOffering = 500;
    int ramInOffering = 512;
    AccountVO acct = new AccountVO(accountId);

    @Before
    public void setUp() {
        ComponentContext.initComponentsLifeCycle();

        acct.setType(Account.ACCOUNT_TYPE_NORMAL);
        acct.setAccountName("user1");
        acct.setDomainId(domainId);
        acct.setId(accountId);

        final UserVO user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone", UUID.randomUUID().toString(), User.Source.UNKNOWN);
        CallContext.register(user, acct);
    }

    @After
    public void tearDown() {
        CallContext.unregister();
    }

    @Test
    public void checkWhenDcInAvoidList() throws InsufficientServerCapacityException {
        final DataCenterVO mockDc = mock(DataCenterVO.class);
        final ExcludeList avoids = mock(ExcludeList.class);
        final VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final VMInstanceVO vm = mock(VMInstanceVO.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);

        when(avoids.shouldAvoid(mockDc)).thenReturn(true);
        when(vmProfile.getVirtualMachine()).thenReturn(vm);
        when(vm.getDataCenterId()).thenReturn(1L);
        when(dcDao.findById(1L)).thenReturn(mockDc);

        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);
        assertTrue("Cluster list should be null/empty if the dc is in avoid list", (clusterList == null || clusterList.isEmpty()));
    }

    @Test
    public void checkStrictModeWithCurrentAccountVmsPresent() throws InsufficientServerCapacityException {
        final VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);
        final ExcludeList avoids = new ExcludeList();

        initializeForTest(vmProfile, plan);

        initializeForImplicitPlannerTest(false);

        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);

        // Validations.
        // Check cluster 2 and 3 are not in the cluster list.
        // Host 6 and 7 should also be in avoid list.
        assertFalse("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
        boolean foundNeededCluster = false;
        for (final Long cluster : clusterList) {
            if (cluster != 1) {
                fail("Found a cluster that shouldn't have been present, cluster id : " + cluster);
            } else {
                foundNeededCluster = true;
            }
        }
        assertTrue("Didn't find cluster 1 in the list. It should have been present", foundNeededCluster);

        final Set<Long> hostsInAvoidList = avoids.getHostsToAvoid();
        assertFalse("Host 5 shouldn't have be in the avoid list, but it is present", hostsInAvoidList.contains(5L));
        final Set<Long> hostsThatShouldBeInAvoidList = new HashSet<>();
        hostsThatShouldBeInAvoidList.add(6L);
        hostsThatShouldBeInAvoidList.add(7L);
        assertTrue("Hosts 6 and 7 that should have been present were not found in avoid list", hostsInAvoidList.containsAll(hostsThatShouldBeInAvoidList));
    }

    private void initializeForTest(final VirtualMachineProfileImpl vmProfile, final DataCenterDeployment plan) {
        final DataCenterVO mockDc = mock(DataCenterVO.class);
        final VMInstanceVO vm = mock(VMInstanceVO.class);
        final UserVmVO userVm = mock(UserVmVO.class);
        final ServiceOfferingVO offering = mock(ServiceOfferingVO.class);

        final AccountVO account = mock(AccountVO.class);
        when(account.getId()).thenReturn(accountId);
        when(account.getAccountId()).thenReturn(accountId);
        when(vmProfile.getOwner()).thenReturn(account);
        when(vmProfile.getVirtualMachine()).thenReturn(vm);
        when(vmProfile.getId()).thenReturn(12L);
        when(vmDao.findById(12L)).thenReturn(userVm);
        when(userVm.getAccountId()).thenReturn(accountId);

        when(vm.getDataCenterId()).thenReturn(dataCenterId);
        when(dcDao.findById(1L)).thenReturn(mockDc);
        when(plan.getDataCenterId()).thenReturn(dataCenterId);
        when(plan.getClusterId()).thenReturn(null);
        when(plan.getPodId()).thenReturn(null);
        when(configDao.getValue(anyString())).thenReturn("false").thenReturn("CPU");

        // Mock offering details.
        when(vmProfile.getServiceOffering()).thenReturn(offering);
        when(offering.getId()).thenReturn(offeringId);
        when(vmProfile.getServiceOfferingId()).thenReturn(offeringId);
        when(offering.getCpu()).thenReturn(noOfCpusInOffering);
        when(offering.getSpeed()).thenReturn(cpuSpeedInOffering);
        when(offering.getRamSize()).thenReturn(ramInOffering);

        final List<Long> clustersWithEnoughCapacity = new ArrayList<>();
        clustersWithEnoughCapacity.add(1L);
        clustersWithEnoughCapacity.add(2L);
        clustersWithEnoughCapacity.add(3L);
        when(
                capacityDao.listClustersInZoneOrPodByHostCapacities(dataCenterId, noOfCpusInOffering * cpuSpeedInOffering, ramInOffering * 1024L * 1024L,
                        Capacity.CAPACITY_TYPE_CPU, true)).thenReturn(clustersWithEnoughCapacity);

        final Map<Long, Double> clusterCapacityMap = new HashMap<>();
        clusterCapacityMap.put(1L, 2048D);
        clusterCapacityMap.put(2L, 2048D);
        clusterCapacityMap.put(3L, 2048D);
        final Pair<List<Long>, Map<Long, Double>> clustersOrderedByCapacity = new Pair<>(clustersWithEnoughCapacity, clusterCapacityMap);
        when(capacityDao.orderClustersByAggregateCapacity(dataCenterId, Capacity.CAPACITY_TYPE_CPU, true)).thenReturn(clustersOrderedByCapacity);

        final List<Long> disabledClusters = new ArrayList<>();
        final List<Long> clustersWithDisabledPods = new ArrayList<>();
        when(clusterDao.listDisabledClusters(dataCenterId, null)).thenReturn(disabledClusters);
        when(clusterDao.listClustersWithDisabledPods(dataCenterId)).thenReturn(clustersWithDisabledPods);
    }

    private void initializeForImplicitPlannerTest(final boolean preferred) {
        String plannerMode = new String("Strict");
        if (preferred) {
            plannerMode = new String("Preferred");
        }

        final Map<String, String> details = new HashMap<>();
        details.put("ImplicitDedicationMode", plannerMode);
        when(serviceOfferingDetailsDao.listDetailsKeyPairs(offeringId)).thenReturn(details);

        // Initialize hosts in clusters
        final HostVO host1 = mock(HostVO.class);
        when(host1.getId()).thenReturn(5L);
        final HostVO host2 = mock(HostVO.class);
        when(host2.getId()).thenReturn(6L);
        final HostVO host3 = mock(HostVO.class);
        when(host3.getId()).thenReturn(7L);
        final List<HostVO> hostsInCluster1 = new ArrayList<>();
        final List<HostVO> hostsInCluster2 = new ArrayList<>();
        final List<HostVO> hostsInCluster3 = new ArrayList<>();
        hostsInCluster1.add(host1);
        hostsInCluster2.add(host2);
        hostsInCluster3.add(host3);
        when(resourceMgr.listAllHostsInCluster(1)).thenReturn(hostsInCluster1);
        when(resourceMgr.listAllHostsInCluster(2)).thenReturn(hostsInCluster2);
        when(resourceMgr.listAllHostsInCluster(3)).thenReturn(hostsInCluster3);

        // Mock vms on each host.
        final long offeringIdForVmsOfThisAccount = 15L;
        final long offeringIdForVmsOfOtherAccount = 16L;
        final UserVmVO vm1 = mock(UserVmVO.class);
        when(vm1.getAccountId()).thenReturn(accountId);
        when(vm1.getServiceOfferingId()).thenReturn(offeringIdForVmsOfThisAccount);
        final UserVmVO vm2 = mock(UserVmVO.class);
        when(vm2.getAccountId()).thenReturn(accountId);
        when(vm2.getServiceOfferingId()).thenReturn(offeringIdForVmsOfThisAccount);
        // Vm from different account
        final UserVmVO vm3 = mock(UserVmVO.class);
        when(vm3.getAccountId()).thenReturn(201L);
        when(vm3.getServiceOfferingId()).thenReturn(offeringIdForVmsOfOtherAccount);
        final List<VMInstanceVO> vmsForHost1 = new ArrayList<>();
        final List<VMInstanceVO> vmsForHost2 = new ArrayList<>();
        final List<VMInstanceVO> vmsForHost3 = new ArrayList<>();
        final List<VMInstanceVO> stoppedVmsForHost = new ArrayList<>();
        // Host 2 is empty.
        vmsForHost1.add(vm1);
        vmsForHost1.add(vm2);
        vmsForHost3.add(vm3);
        when(vmInstanceDao.listUpByHostId(5L)).thenReturn(vmsForHost1);
        when(vmInstanceDao.listUpByHostId(6L)).thenReturn(vmsForHost2);
        when(vmInstanceDao.listUpByHostId(7L)).thenReturn(vmsForHost3);
        when(vmInstanceDao.listByLastHostId(5L)).thenReturn(stoppedVmsForHost);
        when(vmInstanceDao.listByLastHostId(6L)).thenReturn(stoppedVmsForHost);
        when(vmInstanceDao.listByLastHostId(7L)).thenReturn(stoppedVmsForHost);

        // Mock the offering with which the vm was created.
        final ServiceOfferingVO offeringForVmOfThisAccount = mock(ServiceOfferingVO.class);
        when(serviceOfferingDao.findByIdIncludingRemoved(offeringIdForVmsOfThisAccount)).thenReturn(offeringForVmOfThisAccount);
        when(offeringForVmOfThisAccount.getDeploymentPlanner()).thenReturn(planner.getName());

        final ServiceOfferingVO offeringForVMOfOtherAccount = mock(ServiceOfferingVO.class);
        when(serviceOfferingDao.findByIdIncludingRemoved(offeringIdForVmsOfOtherAccount)).thenReturn(offeringForVMOfOtherAccount);
        when(offeringForVMOfOtherAccount.getDeploymentPlanner()).thenReturn("FirstFitPlanner");
    }

    @Test
    public void checkStrictModeHostWithCurrentAccountVmsFull() throws InsufficientServerCapacityException {
        final
        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);
        final ExcludeList avoids = new ExcludeList();

        initializeForTest(vmProfile, plan);

        initializeForImplicitPlannerTest(false);

        // Mark the host 5 with current account vms to be in avoid list.
        avoids.addHost(5L);
        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);

        // Validations.
        // Check cluster 1 and 3 are not in the cluster list.
        // Host 5 and 7 should also be in avoid list.
        assertFalse("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
        boolean foundNeededCluster = false;
        for (final Long cluster : clusterList) {
            if (cluster != 2) {
                fail("Found a cluster that shouldn't have been present, cluster id : " + cluster);
            } else {
                foundNeededCluster = true;
            }
        }
        assertTrue("Didn't find cluster 2 in the list. It should have been present", foundNeededCluster);

        final Set<Long> hostsInAvoidList = avoids.getHostsToAvoid();
        assertFalse("Host 6 shouldn't have be in the avoid list, but it is present", hostsInAvoidList.contains(6L));
        final Set<Long> hostsThatShouldBeInAvoidList = new HashSet<>();
        hostsThatShouldBeInAvoidList.add(5L);
        hostsThatShouldBeInAvoidList.add(7L);
        assertTrue("Hosts 5 and 7 that should have been present were not found in avoid list", hostsInAvoidList.containsAll(hostsThatShouldBeInAvoidList));
    }

    @Test
    public void checkStrictModeNoHostsAvailable() throws InsufficientServerCapacityException {
        final
        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);
        final ExcludeList avoids = new ExcludeList();

        initializeForTest(vmProfile, plan);

        initializeForImplicitPlannerTest(false);

        // Mark the host 5 and 6 to be in avoid list.
        avoids.addHost(5L);
        avoids.addHost(6L);
        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);

        // Validations.
        // Check cluster list is empty.
        assertTrue("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
    }

    @Test
    public void checkPreferredModePreferredHostAvailable() throws InsufficientServerCapacityException {
        final
        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);
        final ExcludeList avoids = new ExcludeList();

        initializeForTest(vmProfile, plan);

        initializeForImplicitPlannerTest(true);

        // Mark the host 5 and 6 to be in avoid list.
        avoids.addHost(5L);
        avoids.addHost(6L);
        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);

        // Validations.
        // Check cluster 1 and 2 are not in the cluster list.
        // Host 5 and 6 should also be in avoid list.
        assertFalse("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
        boolean foundNeededCluster = false;
        for (final Long cluster : clusterList) {
            if (cluster != 3) {
                fail("Found a cluster that shouldn't have been present, cluster id : " + cluster);
            } else {
                foundNeededCluster = true;
            }
        }
        assertTrue("Didn't find cluster 3 in the list. It should have been present", foundNeededCluster);

        final Set<Long> hostsInAvoidList = avoids.getHostsToAvoid();
        assertFalse("Host 7 shouldn't have be in the avoid list, but it is present", hostsInAvoidList.contains(7L));
        final Set<Long> hostsThatShouldBeInAvoidList = new HashSet<>();
        hostsThatShouldBeInAvoidList.add(5L);
        hostsThatShouldBeInAvoidList.add(6L);
        assertTrue("Hosts 5 and 6 that should have been present were not found in avoid list", hostsInAvoidList.containsAll(hostsThatShouldBeInAvoidList));
    }

    @Test
    public void checkPreferredModeNoHostsAvailable() throws InsufficientServerCapacityException {
        final
        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
        final DataCenterDeployment plan = mock(DataCenterDeployment.class);
        final ExcludeList avoids = new ExcludeList();

        initializeForTest(vmProfile, plan);

        initializeForImplicitPlannerTest(false);

        // Mark the host 5, 6 and 7 to be in avoid list.
        avoids.addHost(5L);
        avoids.addHost(6L);
        avoids.addHost(7L);
        final List<Long> clusterList = planner.orderClusters(vmProfile, plan, avoids);

        // Validations.
        // Check cluster list is empty.
        assertTrue("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
    }

    @Configuration
    @ComponentScan(basePackageClasses = {ImplicitDedicationPlanner.class},
            includeFilters = {@Filter(value = TestConfiguration.Library.class, type = FilterType.CUSTOM)},
            useDefaultFilters = false)
    public static class TestConfiguration extends SpringUtils.CloudStackTestConfiguration {

        @Bean
        public HostDao hostDao() {
            return Mockito.mock(HostDao.class);
        }

        @Bean
        public HostTagsDao hostTagsDao() {
            return Mockito.mock(HostTagsDao.class);
        }

        @Bean
        public HostGpuGroupsDao hostGpuGroupsDao() {
            return Mockito.mock(HostGpuGroupsDao.class);
        }

        @Bean
        public DataCenterDao dcDao() {
            return Mockito.mock(DataCenterDao.class);
        }

        @Bean
        public HostPodDao hostPodDao() {
            return Mockito.mock(HostPodDao.class);
        }

        @Bean
        public ClusterDao clusterDao() {
            return Mockito.mock(ClusterDao.class);
        }

        @Bean
        public GuestOSDao guestOsDao() {
            return Mockito.mock(GuestOSDao.class);
        }

        @Bean
        public GuestOSCategoryDao guestOsCategoryDao() {
            return Mockito.mock(GuestOSCategoryDao.class);
        }

        @Bean
        public DiskOfferingDao diskOfferingDao() {
            return Mockito.mock(DiskOfferingDao.class);
        }

        @Bean
        public StoragePoolHostDao storagePoolHostDao() {
            return Mockito.mock(StoragePoolHostDao.class);
        }

        @Bean
        public UserVmDao userVmDao() {
            return Mockito.mock(UserVmDao.class);
        }

        @Bean
        public VMInstanceDao vmInstanceDao() {
            return Mockito.mock(VMInstanceDao.class);
        }

        @Bean
        public VolumeDao volumeDao() {
            return Mockito.mock(VolumeDao.class);
        }

        @Bean
        public CapacityManager capacityManager() {
            return Mockito.mock(CapacityManager.class);
        }

        @Bean
        public ConfigurationDao configurationDao() {
            return Mockito.mock(ConfigurationDao.class);
        }

        @Bean
        public PrimaryDataStoreDao primaryDataStoreDao() {
            return Mockito.mock(PrimaryDataStoreDao.class);
        }

        @Bean
        public CapacityDao capacityDao() {
            return Mockito.mock(CapacityDao.class);
        }

        @Bean
        public AccountManager accountManager() {
            return Mockito.mock(AccountManager.class);
        }

        @Bean
        public StorageManager storageManager() {
            return Mockito.mock(StorageManager.class);
        }

        @Bean
        public DataStoreManager dataStoreManager() {
            return Mockito.mock(DataStoreManager.class);
        }

        @Bean
        public ClusterDetailsDao clusterDetailsDao() {
            return Mockito.mock(ClusterDetailsDao.class);
        }

        @Bean
        public ServiceOfferingDao serviceOfferingDao() {
            return Mockito.mock(ServiceOfferingDao.class);
        }

        @Bean
        public ServiceOfferingDetailsDao serviceOfferingDetailsDao() {
            return Mockito.mock(ServiceOfferingDetailsDao.class);
        }

        @Bean
        public ResourceManager resourceManager() {
            return Mockito.mock(ResourceManager.class);
        }

        public static class Library implements TypeFilter {
            @Override
            public boolean match(final MetadataReader mdr, final MetadataReaderFactory arg1) throws IOException {
                final ComponentScan cs = TestConfiguration.class.getAnnotation(ComponentScan.class);
                return SpringUtils.includedInBasePackageClasses(mdr.getClassMetadata().getClassName(), cs);
            }
        }
    }
}


text:
namespace Nancy.Tests.Fakes
{
    public class FakeObjectSerializer : IObjectSerializer
    {
        /// <summary>
        /// Serialize an object
        /// </summary>
        /// <param name="sourceObject">Source object</param>
        /// <returns>Serialised object string</returns>
        public string Serialize(object sourceObject)
        {
            return sourceObject.ToString();
        }

        /// <summary>
        /// Deserialize an object string
        /// </summary>
        /// <param name="sourceString">Source object string</param>
        /// <returns>Deserialized object</returns>
        public object Deserialize(string sourceString)
        {
            return sourceString;
        }
    }
}


text:
import { debounce, trim } from 'lodash';

import { StoreState, ThunkDispatch, ThunkResult } from 'app/types';

import { variableAdapters } from '../../adapters';
import { toKeyedAction } from '../../state/keyedVariablesReducer';
import { getVariable, getVariablesState } from '../../state/selectors';
import { changeVariableProp, setCurrentVariableValue } from '../../state/sharedReducer';
import { KeyedVariableIdentifier } from '../../state/types';
import { VariableOption, VariableWithMultiSupport, VariableWithOptions } from '../../types';
import { containsSearchFilter, getCurrentValue, toVariablePayload } from '../../utils';
import { NavigationKey } from '../types';

import {
  hideOptions,
  moveOptionsHighlight,
  OptionsPickerState,
  showOptions,
  toggleOption,
  updateOptionsAndFilter,
  updateOptionsFromSearch,
  updateSearchQuery,
} from './reducer';

export const navigateOptions = (rootStateKey: string, key: NavigationKey, clearOthers: boolean): ThunkResult<void> => {
  return async (dispatch, getState) => {
    if (key === NavigationKey.cancel) {
      return await dispatch(commitChangesToVariable(rootStateKey));
    }

    if (key === NavigationKey.select) {
      return dispatch(toggleOptionByHighlight(rootStateKey, clearOthers));
    }

    if (key === NavigationKey.selectAndClose) {
      dispatch(toggleOptionByHighlight(rootStateKey, clearOthers, true));
      return await dispatch(commitChangesToVariable(rootStateKey));
    }

    if (key === NavigationKey.moveDown) {
      return dispatch(toKeyedAction(rootStateKey, moveOptionsHighlight(1)));
    }

    if (key === NavigationKey.moveUp) {
      return dispatch(toKeyedAction(rootStateKey, moveOptionsHighlight(-1)));
    }

    return undefined;
  };
};

export const filterOrSearchOptions = (
  passedIdentifier: KeyedVariableIdentifier,
  searchQuery = ''
): ThunkResult<void> => {
  return async (dispatch, getState) => {
    const { rootStateKey } = passedIdentifier;
    const { id, queryValue } = getVariablesState(rootStateKey, getState()).optionsPicker;
    const identifier: KeyedVariableIdentifier = { id, rootStateKey: rootStateKey, type: 'query' };
    const { query, options } = getVariable<VariableWithOptions>(identifier, getState());
    dispatch(toKeyedAction(rootStateKey, updateSearchQuery(searchQuery)));

    if (trim(queryValue) === trim(searchQuery)) {
      return;
    }

    if (containsSearchFilter(query)) {
      return searchForOptionsWithDebounce(dispatch, getState, searchQuery, rootStateKey);
    }
    return dispatch(toKeyedAction(rootStateKey, updateOptionsAndFilter(options)));
  };
};

const setVariable = async (updated: VariableWithMultiSupport) => {
  const adapter = variableAdapters.get(updated.type);
  await adapter.setValue(updated, updated.current, true);
  return;
};

export const commitChangesToVariable = (key: string, callback?: (updated: any) => void): ThunkResult<void> => {
  return async (dispatch, getState) => {
    const picker = getVariablesState(key, getState()).optionsPicker;
    const identifier: KeyedVariableIdentifier = { id: picker.id, rootStateKey: key, type: 'query' };
    const existing = getVariable<VariableWithMultiSupport>(identifier, getState());
    const currentPayload = { option: mapToCurrent(picker) };
    const searchQueryPayload = { propName: 'queryValue', propValue: picker.queryValue };

    dispatch(toKeyedAction(key, setCurrentVariableValue(toVariablePayload(existing, currentPayload))));
    dispatch(toKeyedAction(key, changeVariableProp(toVariablePayload(existing, searchQueryPayload))));
    const updated = getVariable<VariableWithMultiSupport>(identifier, getState());
    dispatch(toKeyedAction(key, hideOptions()));

    if (getCurrentValue(existing) === getCurrentValue(updated)) {
      return;
    }

    if (callback) {
      return callback(updated);
    }

    return await setVariable(updated);
  };
};

export const openOptions =
  (identifier: KeyedVariableIdentifier, callback?: (updated: any) => void): ThunkResult<void> =>
  async (dispatch, getState) => {
    const { id, rootStateKey: uid } = identifier;
    const picker = getVariablesState(uid, getState()).optionsPicker;

    if (picker.id && picker.id !== id) {
      await dispatch(commitChangesToVariable(uid, callback));
    }

    const variable = getVariable<VariableWithMultiSupport>(identifier, getState());
    dispatch(toKeyedAction(uid, showOptions(variable)));
  };

export const toggleOptionByHighlight = (key: string, clearOthers: boolean, forceSelect = false): ThunkResult<void> => {
  return (dispatch, getState) => {
    const { highlightIndex, options } = getVariablesState(key, getState()).optionsPicker;
    const option = options[highlightIndex];
    dispatch(toKeyedAction(key, toggleOption({ option, forceSelect, clearOthers })));
  };
};

const searchForOptions = async (
  dispatch: ThunkDispatch,
  getState: () => StoreState,
  searchQuery: string,
  key: string
) => {
  try {
    const { id } = getVariablesState(key, getState()).optionsPicker;
    const identifier: KeyedVariableIdentifier = { id, rootStateKey: key, type: 'query' };
    const existing = getVariable<VariableWithOptions>(identifier, getState());

    const adapter = variableAdapters.get(existing.type);
    await adapter.updateOptions(existing, searchQuery);

    const updated = getVariable<VariableWithOptions>(identifier, getState());
    dispatch(toKeyedAction(key, updateOptionsFromSearch(updated.options)));
  } catch (error) {
    console.error(error);
  }
};

const searchForOptionsWithDebounce = debounce(searchForOptions, 500);

export function mapToCurrent(picker: OptionsPickerState): VariableOption | undefined {
  const { options, selectedValues, queryValue: searchQuery, multi } = picker;

  if (options.length === 0 && searchQuery && searchQuery.length > 0) {
    return { text: searchQuery, value: searchQuery, selected: false };
  }

  if (!multi) {
    return selectedValues.find((o) => o.selected);
  }

  const texts: string[] = [];
  const values: string[] = [];

  for (const option of selectedValues) {
    if (!option.selected) {
      continue;
    }

    texts.push(option.text.toString());
    values.push(option.value.toString());
  }

  return {
    value: values,
    text: texts,
    selected: true,
  };
}


text:
require 'scss_lint/options'

module SCSSLint
  # Responsible for parsing command-line options and executing the appropriate
  # application logic based on the options specified.
  class CLI
    attr_reader :config, :options

    # Subset of semantic exit codes conforming to `sysexits` documentation.
    EXIT_CODES = {
      ok:             0,
      warning:        1,  # One or more warnings (but no errors) were reported
      error:          2,  # One or more errors were reported
      usage:          64, # Command line usage error
      no_input:       66, # Input file did not exist or was not readable
      unavailable:    69, # Required library is unavailable
      software:       70, # Internal software error
      config:         78, # Configuration error
      no_files:       80, # No files matched by specified glob patterns
      plugin:         82, # Plugin loading error
      preprocessor:   84, # Preprocessor error
    }.freeze

    # Create a CLI that outputs to the specified logger.
    #
    # @param logger [SCSSLint::Logger]
    def initialize(logger)
      @log = logger
    end

    def run(args)
      options = SCSSLint::Options.new.parse(args)
      act_on_options(options)
    rescue => ex
      handle_runtime_exception(ex, options)
    end

  private

    attr_reader :log

    def act_on_options(options)
      log.color_enabled = options.fetch(:color, log.tty?)
      load_required_paths(options)
      load_reporters(options)

      if options[:help]
        print_help(options)
      elsif options[:version]
        print_version
      elsif options[:show_formatters]
        print_formatters
      else
        config = setup_configuration(options)

        if options[:show_linters]
          print_linters
        else
          scan_for_lints(options, config)
        end
      end
    end

    def scan_for_lints(options, config)
      runner = Runner.new(config)
      files =
        if options[:stdin_file_path]
          [{ file: STDIN, path: options[:stdin_file_path] }]
        else
          FileFinder.new(config).find(options[:files]).map do |file_path|
            { path: file_path }
          end
        end
      runner.run(files)
      report_lints(options, runner.lints, files)

      if runner.lints.any?(&:error?)
        halt :error
      elsif runner.lints.any?
        halt :warning
      else
        halt :ok
      end
    end

    def handle_runtime_exception(exception, options) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/LineLength, Metrics/MethodLength
      case exception
      when SCSSLint::Exceptions::InvalidCLIOption
        log.error exception.message
        log.info 'Run `scss-lint --help` for usage documentation'
        halt :usage
      when SCSSLint::Exceptions::InvalidConfiguration
        log.error exception.message
        halt :config
      when SCSSLint::Exceptions::RequiredLibraryMissingError
        log.error exception.message
        halt :unavailable
      when SCSSLint::Exceptions::NoFilesError
        log.error exception.message
        halt :no_files
      when SCSSLint::Exceptions::PluginGemLoadError
        log.error exception.message
        halt :plugin
      when Errno::ENOENT
        log.error exception.message
        halt :no_input
      when NoSuchLinter
        log.error exception.message
        halt :usage
      when SCSSLint::Exceptions::PreprocessorError
        log.error exception.message
        halt :preprocessor
      else
        config_file = relevant_configuration_file(options) if options

        log.bold_error exception.message
        log.error exception.backtrace.join("\n")
        log.warning 'Report this bug at ', false
        log.info BUG_REPORT_URL
        log.newline
        log.success 'To help fix this issue, please include:'
        log.log '- The above stack trace'
        log.log '- SCSS-Lint version: ', false
        log.info SCSSLint::VERSION
        log.log '- Sass version: ', false
        log.info Gem.loaded_specs['sass'].version.to_s
        log.log '- Ruby version: ', false
        log.info RUBY_VERSION
        if config_file
          log.log '- Contents of ', false
          log.info File.expand_path(config_file)
        end
        halt :software
      end
    end

    def setup_configuration(options)
      config_file = relevant_configuration_file(options)
      config = config_file ? Config.load(config_file) : Config.default
      merge_options_with_config(options, config)
    end

    # Return the path of the configuration file that should be loaded.
    #
    # @param options [Hash]
    # @return [String]
    def relevant_configuration_file(options)
      if options[:config_file]
        options[:config_file]
      elsif File.exist?(Config::FILE_NAME)
        Config::FILE_NAME
      elsif File.exist?(Config.user_file)
        Config.user_file
      end
    end

    # @param options [Hash]
    # @param config [Config]
    # @return [Config]
    def merge_options_with_config(options, config)
      if options[:excluded_files]
        options[:excluded_files].each do |file|
          config.exclude_file(file)
        end
      end

      if options[:included_linters]
        config.disable_all_linters
        LinterRegistry.extract_linters_from(options[:included_linters]).each do |linter|
          config.enable_linter(linter)
        end
      end

      if options[:excluded_linters]
        LinterRegistry.extract_linters_from(options[:excluded_linters]).each do |linter|
          config.disable_linter(linter)
        end
      end

      config
    end

    # @param options [Hash]
    # @param lints [Array<Lint>]
    # @param files [Array<Hash>]
    def report_lints(options, lints, files)
      sorted_lints = lints.sort_by { |l| [l.filename, l.location] }
      options.fetch(:reporters).each do |reporter, output|
        results = reporter.new(sorted_lints, files, log).report_lints
        next unless results

        if output == :stdout
          log.log results
        else
          File.new(output, 'w+').print results
        end
      end
    end

    def load_required_paths(options)
      Array(options[:required_paths]).each do |path|
        require path
      end
    rescue LoadError => ex
      raise SCSSLint::Exceptions::RequiredLibraryMissingError,
            "Required library not found: #{ex.message}"
    end

    def load_reporters(options)
      options[:reporters].map! do |reporter_name, output_file|
        begin
          reporter = SCSSLint::Reporter.const_get(reporter_name + 'Reporter')
        rescue NameError
          raise SCSSLint::Exceptions::InvalidCLIOption,
                "Invalid output format specified: #{reporter_name}"
        end
        [reporter, output_file]
      end
    end

    def print_formatters
      log.log 'Installed formatters:'

      reporter_names = SCSSLint::Reporter.descendants.map do |reporter|
        reporter.name.split('::').last.split('Reporter').first
      end

      reporter_names.sort.each do |reporter_name|
        log.log " - #{reporter_name}"
      end

      halt
    end

    def print_linters
      log.log 'Installed linters:'

      linter_names = LinterRegistry.linters.map(&:simple_name)

      linter_names.sort.each do |linter_name|
        log.log " - #{linter_name}"
      end

      halt
    end

    # @param options [Hash]
    def print_help(options)
      log.log options[:help]
      halt :ok
    end

    # @param options [Hash]
    def print_version
      log.log "scss-lint #{SCSSLint::VERSION}"
      halt :ok
    end

    # Used for ease-of testing
    # @param exit_status [Symbol]
    def halt(exit_status = :ok)
      EXIT_CODES[exit_status]
    end
  end
end


text:
package init;

import java.util.Hashtable;

public class ScenarioContext {
	private static Hashtable<String, String> scenariodata = new Hashtable<String, String>();
	private static String scenarioname;

	public static String getvalue(String scenarioname, String variable) {
		return scenariodata.get(scenarioname + "." + variable);
	}

	public static void addvalue(String scenarioname, String variable,
			String value) {
		scenariodata.put(scenarioname + "." + variable, value);
	}

	public static String getScenarioname() {
		return scenarioname;
	}

	public static void setScenarioname(String scenarioname) {
		ScenarioContext.scenarioname = scenarioname;
	}

	public static void flushscenariodata() {
		ScenarioContext.scenariodata.clear();
	}

}


text:
<?php
if ($rendah != NULL && $tinggi != NULL)
{
  //Ambil tahun terendah dan tertinggi
  foreach ($rendah as $row)
  {
      $tahun_rendah = $row->makan;
  }
  foreach ($tinggi as $row)
  {
      $tahun_tinggi = $row->makan;
  }
}
?>

      Manajemen Janji
    	Daftar Semua Janji Sebelum Deadline

 Manajemen janji

Daftar semua janji sebelum deadline

Navigasi

                <a href="<?php echo base_url() ?>janji"><button type="button" class="btn btn-primary">Lihat semua janji</button>
                <a href="<?php echo base_url() ?>janji/lewat_deadline"><button type="button" class="btn btn-danger">Lihat janji melewati deadline</button>
              	<a href="<?php echo base_url() ?>janji/sehari_deadline"><button type="button" class="btn btn-warning">Lihat janji mendekati deadline</button>

Filter

              <form method="get" action="<?php base_url() ?>filterpast">
              Filter berdasarkan:
                <select class="option-control" name="bulan" data-toggle="tooltip" data-placement="top" title="Pilih bulan">
                  <option value="01">Januari</option>
                  <option value="02">Februari</option>
                  <option value="03">Maret</option>
                  <option value="04">April</option>
                  <option value="05">Mei</option>
                  <option value="06">Juni</option>
                  <option value="07">Juli</option>
                  <option value="08">Agustus</option>
                  <option value="09">September</option>
                  <option value="10">Oktober</option>
                  <option value="11">November</option>
                  <option value="12">Desember</option>
                </select>
                <select class="option-control" name="tahun" data-toggle="tooltip" data-placement="top" title="Pilih tahun">
                    <?php
                      if($rendah != NULL)
                      {
                        for ($i=$tahun_rendah; $i<=$tahun_tinggi; $i++)
                        {
                          echo '<option value="'.$i.'"'; if($i == $tahun_tinggi) {echo "selected"; } echo '>'.$i.'</option>';
                          /*$i = $i + 1;*/
                        }
                      }
                      else
                      {
                        echo '<option value="';
                        echo date("Y");
                        echo '">';
                        echo date("Y");
                        echo '</option>';
                      }
                    ?>
                  </select>
                <select class="option-control" name="SKomplain" data-toggle="tooltip" data-placement="top" title="Pilih status komplain">
                  <option value="semua"> Semua Status Komplain</option>
                  <option value="In Progress">In Progress</option>
                  <option value="Closed">Closed</option>
                  <option value="Decline">Decline</option>
                </select>
                  <button type="submit" class="btn btn-success" id="bulan">Pilih</button>
              </form>

Daftar Semua Janji Sebelum Deadline

          <?php
          if($list != NULL)
          {
            echo '<button type="button" class="btn btn-primary">Unduh file excel</button>';
          }
          ?>

                  AKSI
                  DEADLINE
                  NO. POTS
                  NO. INTERNET
                  NAMA PELAPOR
                  LAYANAN
                  JENIS KOMPLAIN
                  TGL KOMPLAIN
                  TGL CLOSE
                  STATUS JANJI

                <?php
                if($list != NULL)
                {
                  foreach($list as $row)
                  {
                    $hour = (int)$row->HOUR;
                    if($hour > 24)
                    {?>

                        <a href="<?php echo base_url() . 'janji/lihat/' . $row->ID_KOMPLAIN ?>" data-toggle="tooltip" data-placement="top" title="Lihat">
                        <a href="<?php echo base_url() . 'janji/delete/' . $row->ID_KOMPLAIN ?>?mode=before" data-toggle="tooltip" data-placement="top" title="Hapus" onclick="return deldata()">

                      <?php echo $row->DEADLINE; ?>
                      <?php echo $row->NO_POTS; ?>
                      <?php
                      if($row->NO_INTERNET == '')
                      {
                        echo '-';
                      }
                      else
                      {
                        echo $row->NO_INTERNET;
                      }
                      ?>
                      <?php
                      if($row->NAMA_PELAPOR == '')
                      {
                        echo '-';
                      }
                      else
                      {
                        echo $row->NAMA_PELAPOR;
                      }
                      ?>
                      <?php echo $row->NAMA_LAYANAN; ?>
                      <?php echo $row->JENIS; ?>
                      <?php
                      if($row->TGL_KOMPLAIN == '00-00-0000 00:00:00' || $row->TGL_KOMPLAIN == '')
                      {
                        echo '-';
                      }
                      else
                      {
                        echo $row->TGL_KOMPLAIN;
                      }?>
                      <?php
                      if($row->TGL_CLOSE == '00-00-0000' || $row->TGL_CLOSE == '')
                      {
                        echo '-';
                      }
                      else
                      {
                        echo $row->TGL_CLOSE;
                      }?>
                      <?php
                      if($row->STATUS_JANJI == '0')
                      {
                        echo 'Belum ditangani';
                      }
                      else
                      {
                        echo 'Telah ditangani';
                      }?>

                    <?php
                    }
                  }
                }?>

                  AKSI
                  DEADLINE
                  NO. POTS
                  NO. INTERNET
                  NAMA PELAPOR
                  LAYANAN
                  JENIS KOMPLAIN
                  TGL KOMPLAIN
                  TGL CLOSE
                  STATUS JANJI


text:
package net.bytebuddy.implementation.bytecode.constant;

import net.bytebuddy.implementation.Implementation;
import net.bytebuddy.implementation.bytecode.StackManipulation;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.MethodRule;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

import java.util.Arrays;
import java.util.Collection;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

@RunWith(Parameterized.class)
public class DoubleConstantOpcodeTest {

    private final double value;

    private final int opcode;

    @Rule
    public MethodRule mockitoRule = MockitoJUnit.rule().silent();

    @Mock
    private MethodVisitor methodVisitor;

    @Mock
    private Implementation.Context implementationContext;

    public DoubleConstantOpcodeTest(double value, int opcode) {
        this.value = value;
        this.opcode = opcode;
    }

    @Parameterized.Parameters
    public static Collection<Object[]> data() {
        return Arrays.asList(new Object[][]{
                {0d, Opcodes.DCONST_0},
                {1d, Opcodes.DCONST_1}
        });
    }

    @After
    public void tearDown() throws Exception {
        verifyNoMoreInteractions(implementationContext);
    }

    @Test
    public void testConstant() throws Exception {
        StackManipulation.Size size = DoubleConstant.forValue(value).apply(methodVisitor, implementationContext);
        assertThat(size.getSizeImpact(), is(2));
        assertThat(size.getMaximalSize(), is(2));
        verify(methodVisitor).visitInsn(opcode);
        verifyNoMoreInteractions(methodVisitor);
    }
}


text:
package com.lcw.one.util.utils;

import java.util.Date;
import java.util.Map;
import java.util.regex.Matcher;

/**
 * @version 2017-04-30.
 * @auth Licw
 */
public class PersistenceUtils {

    public static String fillParams(String hql, Object... params) {
        String hqlFilled = hql;
        if (params != null && params.length > 0) {
            for (int i = 0; i < params.length; i++) {
                hqlFilled = hqlFilled.replaceAll("\\?" + (i + 1), getReplacement(params[i]));
            }
        }
        return hqlFilled;
    }

    public static String fillParams(String hql, Map<String, Object> params) {
        String hqlFilled = hql;
        if (CollectionUtils.isNotEmpty(params)) {
            for (Map.Entry<String, Object> entry : params.entrySet()) {
                hqlFilled = hqlFilled.replaceAll(":" + entry.getKey(), getReplacement(entry.getValue()));
            }
        }
        return hqlFilled;
    }

    private static String getReplacement(Object param) {
        if (param == null) {
            return "";
        }

        String returnValue = "";
        if (param instanceof String) {
            returnValue = "'" + String.valueOf(param) + "'";
        } else if (param instanceof Date) {
            returnValue = DateUtils.dateToString((Date) param, DateUtils.yyyy_MM_dd_HH_mm_ss_EN);
        } else {
            returnValue = String.valueOf(param);
        }
        return Matcher.quoteReplacement(returnValue);
    }
}