nus-yam/ex-repair huggingface dataset:
Program: 111291
Project: 111291
Buggy source:
/** 
 * @return a new keyset handle that contains a single fresh key generatedaccording to the  {@code keyTemplate}.
 * @throws GeneralSecurityException
 */
public static final KeysetHandle generateNew(KeyTemplate keyTemplate) throws GeneralSecurityException {
  return KeysetManager.withEmptyKeyset().rotate(keyTemplate).getKeysetHandle();
}

Fixed version (ground truth):
/** 
 * @return a new {@link KeysetHandle} that contains a single fresh key generated according to{@code keyTemplate}.
 * @throws GeneralSecurityException
 */
public static final KeysetHandle generateNew(KeyTemplate keyTemplate) throws GeneralSecurityException {
  return KeysetManager.withEmptyKeyset().rotate(keyTemplate).getKeysetHandle();
}
Program: 111292
Project: 111292
Buggy source:
/** 
 * Validate that an keyset handle contains enough key material to build a keyset on, and throws otherwise.
 * @throws GeneralSecurityException
 */
public static void assertEnoughKeyMaterial(Keyset keyset) throws GeneralSecurityException {
  if (keyset == null || keyset.getKeyCount() <= 0) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Validates that an keyset handle contains enough key material to build a keyset on.
 * @throws GeneralSecurityException
 */
public static void assertEnoughKeyMaterial(Keyset keyset) throws GeneralSecurityException {
  if (keyset == null || keyset.getKeyCount() <= 0) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}
Program: 111293
Project: 111293
Buggy source:
/** 
 * Validates that an encrypted keyset contains enough key material to build a keyset on, and throws otherwise.
 * @throws GeneralSecurityException
 */
public static void assertEnoughEncryptedKeyMaterial(EncryptedKeyset keyset) throws GeneralSecurityException {
  if (keyset == null || keyset.getEncryptedKeyset().size() == 0) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Validates that an encrypted keyset contains enough key material to build a keyset on.
 * @throws GeneralSecurityException
 */
public static void assertEnoughEncryptedKeyMaterial(EncryptedKeyset keyset) throws GeneralSecurityException {
  if (keyset == null || keyset.getEncryptedKeyset().size() == 0) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}
Program: 111294
Project: 111294
Buggy source:
/** 
 * Encrypts the keyset with the   {@code Aead} master key.
 */
private static EncryptedKeyset encrypt(Keyset keyset,Aead masterKey) throws GeneralSecurityException {
  byte[] encryptedKeyset=masterKey.encrypt(keyset.toByteArray(),new byte[0]);
  try {
    final Keyset keyset2=Keyset.parseFrom(masterKey.decrypt(encryptedKeyset,new byte[0]));
    if (!keyset2.equals(keyset)) {
      throw new GeneralSecurityException("String_Node_Str");
    }
  }
 catch (  InvalidProtocolBufferException e) {
    throw new GeneralSecurityException("String_Node_Str");
  }
  return EncryptedKeyset.newBuilder().setEncryptedKeyset(ByteString.copyFrom(encryptedKeyset)).setKeysetInfo(Util.getKeysetInfo(keyset)).build();
}

Fixed version (ground truth):
/** 
 * Encrypts the keyset with the   {@link Aead} master key.
 */
private static EncryptedKeyset encrypt(Keyset keyset,Aead masterKey) throws GeneralSecurityException {
  byte[] encryptedKeyset=masterKey.encrypt(keyset.toByteArray(),new byte[0]);
  try {
    final Keyset keyset2=Keyset.parseFrom(masterKey.decrypt(encryptedKeyset,new byte[0]));
    if (!keyset2.equals(keyset)) {
      throw new GeneralSecurityException("String_Node_Str");
    }
  }
 catch (  InvalidProtocolBufferException e) {
    throw new GeneralSecurityException("String_Node_Str");
  }
  return EncryptedKeyset.newBuilder().setEncryptedKeyset(ByteString.copyFrom(encryptedKeyset)).setKeysetInfo(Util.getKeysetInfo(keyset)).build();
}
Program: 111295
Project: 111295
Buggy source:
/** 
 * Prints out the   {@code KeysetInfo}.
 */
@Override public String toString(){
  return getKeysetInfo().toString();
}

Fixed version (ground truth):
/** 
 * Extracts and returns the string representation of the  {@link com.google.crypto.tink.proto.KeysetInfo} of the managed keyset.
 */
@Override public String toString(){
  return getKeysetInfo().toString();
}
Program: 111296
Project: 111296
Buggy source:
/** 
 * Decrypts the encrypted keyset with the   {@code Aead} master key.
 */
private static Keyset decrypt(EncryptedKeyset encryptedKeyset,Aead masterKey) throws GeneralSecurityException {
  try {
    Keyset keyset=Keyset.parseFrom(masterKey.decrypt(encryptedKeyset.getEncryptedKeyset().toByteArray(),new byte[0]));
    assertEnoughKeyMaterial(keyset);
    return keyset;
  }
 catch (  InvalidProtocolBufferException e) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Decrypts the encrypted keyset with the   {@link Aead} master key.
 */
private static Keyset decrypt(EncryptedKeyset encryptedKeyset,Aead masterKey) throws GeneralSecurityException {
  try {
    Keyset keyset=Keyset.parseFrom(masterKey.decrypt(encryptedKeyset.getEncryptedKeyset().toByteArray(),new byte[0]));
    assertEnoughKeyMaterial(keyset);
    return keyset;
  }
 catch (  InvalidProtocolBufferException e) {
    throw new GeneralSecurityException("String_Node_Str");
  }
}
Program: 111297
Project: 111297
Buggy source:
/** 
 * Constructs a ReadableByteChannel with ciphertext from a ReadableByteChannel. The method constructs a new thread that is used to encrypt the plaintext. TODO(bleichen): Using PipedInputStream may have performance problems.
 */
private ReadableByteChannel ciphertextChannel(AesGcmHkdfStreaming ags,ReadableByteChannel plaintext,byte[] aad,int chunkSize) throws Exception {
  PipedOutputStream output=new PipedOutputStream();
  PipedInputStream result=new PipedInputStream(output);
  WritableByteChannel ciphertext=Channels.newChannel(output);
  new Thread(new Runnable(){
    public void run(){
      encryptChannel(ags,plaintext,ciphertext,aad,chunkSize);
    }
  }
).start();
  return Channels.newChannel(result);
}

Fixed version (ground truth):
/** 
 * Constructs a ReadableByteChannel with ciphertext from a ReadableByteChannel. The method constructs a new thread that is used to encrypt the plaintext. TODO(bleichen): Using PipedInputStream may have performance problems.
 */
private ReadableByteChannel ciphertextChannel(final AesGcmHkdfStreaming ags,final ReadableByteChannel plaintext,final byte[] aad,final int chunkSize) throws Exception {
  PipedOutputStream output=new PipedOutputStream();
  PipedInputStream result=new PipedInputStream(output);
  final WritableByteChannel ciphertext=Channels.newChannel(output);
  new Thread(new Runnable(){
    public void run(){
      encryptChannel(ags,plaintext,ciphertext,aad,chunkSize);
    }
  }
).start();
  return Channels.newChannel(result);
}
Program: 111299
Project: 111299
Buggy source:
/** 
 * Assertion that an exception's message contains the right message. When this fails, the exception's message and the expected value will be in the failure log.
 */
public static void assertExceptionContains(Throwable e,String contains){
  String message="String_Node_Str" + e.getMessage() + "String_Node_Str"+ contains+ "String_Node_Str";
  assertTrue(message,e.getMessage().contains(contains));
}

Fixed version (ground truth):
/** 
 * Assertion that an exception's message contains the right message. When this fails, the exception's message and the expected value will be in the failure log.
 */
public static void assertExceptionContains(Throwable e,String contains){
  String message=String.format("String_Node_Str",e.getMessage(),contains);
  assertTrue(message,e.getMessage().contains(contains));
}
Program: 111300
Project: 111300
Buggy source:
EciesAeadHkdfHybridEncrypt(final ECPublicKey recipientPublicKey,final byte[] hkdfSalt,String hkdfHmacAlgo,KeyTemplate aeadDemTemplate,EcPointFormat ecPointFormat) throws GeneralSecurityException {
  EcUtil.checkPublicKey(recipientPublicKey);
  this.recipientPublicKey=recipientPublicKey;
  this.senderKem=new EciesHkdfSenderKem(recipientPublicKey);
  this.hkdfSalt=hkdfSalt;
  this.hkdfHmacAlgo=hkdfHmacAlgo;
  this.ecPointFormat=Util.getPointFormat(ecPointFormat);
  this.aeadFactory=new EciesAeadHkdfAeadFactory(aeadDemTemplate);
}

Fixed version (ground truth):
EciesAeadHkdfHybridEncrypt(final ECPublicKey recipientPublicKey,final byte[] hkdfSalt,String hkdfHmacAlgo,KeyTemplate aeadDemTemplate,EcPointFormat ecPointFormat) throws GeneralSecurityException {
  EcUtil.checkPublicKey(recipientPublicKey);
  this.senderKem=new EciesHkdfSenderKem(recipientPublicKey);
  this.hkdfSalt=hkdfSalt;
  this.hkdfHmacAlgo=hkdfHmacAlgo;
  this.ecPointFormat=Util.getPointFormat(ecPointFormat);
  this.aeadFactory=new EciesAeadHkdfAeadFactory(aeadDemTemplate);
}
Program: 111301
Project: 111301
Buggy source:
void validate(){
  try {
    SubtleUtil.validateNotExist(outFile);
    SubtleUtil.validateExists(configFile);
    SubtleUtil.validateExists(credentialFile);
    SubtleUtil.validateExists(inFile);
  }
 catch (  Exception e) {
    SubtleUtil.die(e.toString());
  }
}

Fixed version (ground truth):
void validate(){
  try {
    SubtleUtil.validateNotExists(outFile);
    SubtleUtil.validateExists(configFile);
    SubtleUtil.validateExists(credentialFile);
    SubtleUtil.validateExists(inFile);
  }
 catch (  Exception e) {
    SubtleUtil.die(e.toString());
  }
}
Program: 111302
Project: 111302
Buggy source:
@Override public final int parseArguments(final Parameters params) throws CmdLineException {
  final String token=params.getParameter(0);
  try {
    File inFile=Paths.get(token).toFile();
    SubtleUtil.validateNotExist(inFile);
    setter.addValue(new FileInputStream(inFile));
  }
 catch (  IOException e) {
    throw new CmdLineException(owner,e.getMessage(),e);
  }
  return 1;
}

Fixed version (ground truth):
@Override public final int parseArguments(final Parameters params) throws CmdLineException {
  final String token=params.getParameter(0);
  try {
    File inFile=Paths.get(token).toFile();
    SubtleUtil.validateExists(inFile);
    setter.addValue(new FileInputStream(inFile));
  }
 catch (  IOException e) {
    throw new CmdLineException(owner,e.getMessage(),e);
  }
  return 1;
}
Program: 111303
Project: 111303
Buggy source:
@Override public final int parseArguments(final Parameters params) throws CmdLineException {
  final String token=params.getParameter(0);
  try {
    File outFile=Paths.get(token).toFile();
    SubtleUtil.validateNotExist(outFile);
    setter.addValue(new FileOutputStream(outFile));
  }
 catch (  IOException e) {
    throw new CmdLineException(owner,e.getMessage(),e);
  }
  return 1;
}

Fixed version (ground truth):
@Override public final int parseArguments(final Parameters params) throws CmdLineException {
  final String token=params.getParameter(0);
  try {
    File outFile=Paths.get(token).toFile();
    SubtleUtil.validateNotExists(outFile);
    setter.addValue(new FileOutputStream(outFile));
  }
 catch (  IOException e) {
    throw new CmdLineException(owner,e.getMessage(),e);
  }
  return 1;
}
Program: 111304
Project: 111304
Buggy source:
private static BigInteger recoverX(BigInteger y){
  BigInteger xx=y.pow(2).subtract(BigInteger.ONE).multiply(D.multiply(y.pow(2)).add(BigInteger.ONE).modInverse(P));
  BigInteger x=xx.modPow(P.add(BigInteger.valueOf(3)).divide(BigInteger.valueOf(8)),P);
  if (x.pow(2).subtract(xx).mod(P) != BigInteger.ZERO) {
    x=x.multiply(SQRTM1).mod(P);
  }
  if (x.testBit(0)) {
    x=P.subtract(x);
  }
  return x;
}

Fixed version (ground truth):
private static BigInteger recoverX(BigInteger y){
  BigInteger xx=y.pow(2).subtract(BigInteger.ONE).multiply(D.multiply(y.pow(2)).add(BigInteger.ONE).modInverse(P));
  BigInteger x=xx.modPow(P.add(BigInteger.valueOf(3)).divide(BigInteger.valueOf(8)),P);
  if (!x.pow(2).subtract(xx).mod(P).equals(BigInteger.ZERO)) {
    x=x.multiply(SQRTM1).mod(P);
  }
  if (x.testBit(0)) {
    x=P.subtract(x);
  }
  return x;
}
Program: 111305
Project: 111305
Buggy source:
/** 
 * Tests with EciesAesCtrHmacAead keys generated by Tinkey.
 */
@Test public void testWithTinkeyEciesAesCtrHmacAead() throws Exception {
  final String PRIVATE_KEYSET="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final String PUBLIC_KEYSET="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  HybridDecrypt hybridDecrypt=HybridDecryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(PRIVATE_KEYSET)));
  HybridEncrypt hybridEncrypt=HybridEncryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(PUBLIC_KEYSET)));
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=Random.randBytes(20);
  byte[] ciphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
  assertArrayEquals(plaintext,hybridDecrypt.decrypt(ciphertext,contextInfo));
}

Fixed version (ground truth):
/** 
 * Tests with EciesAesCtrHmacAead keys generated by Tinkey.
 */
@Test public void testWithTinkeyEciesAesCtrHmacAead() throws Exception {
  final String privateKeyset="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final String publicKeyset="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  HybridDecrypt hybridDecrypt=HybridDecryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(privateKeyset)));
  HybridEncrypt hybridEncrypt=HybridEncryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(publicKeyset)));
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=Random.randBytes(20);
  byte[] ciphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
  assertArrayEquals(plaintext,hybridDecrypt.decrypt(ciphertext,contextInfo));
}
Program: 111306
Project: 111306
Buggy source:
/** 
 * Tests with EciesAesGcmHkdf keys generated by Tinkey.
 */
@Test public void testWithTinkeyEciesAesGcmHkdf() throws Exception {
  final String PRIVATE_KEYSET="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final String PUBLIC_KEYSET="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  HybridDecrypt hybridDecrypt=HybridDecryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(PRIVATE_KEYSET)));
  HybridEncrypt hybridEncrypt=HybridEncryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(PUBLIC_KEYSET)));
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=Random.randBytes(20);
  byte[] ciphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
  assertArrayEquals(plaintext,hybridDecrypt.decrypt(ciphertext,contextInfo));
}

Fixed version (ground truth):
/** 
 * Tests with EciesAesGcmHkdf keys generated by Tinkey.
 */
@Test public void testWithTinkeyEciesAesGcmHkdf() throws Exception {
  final String privateKeyset="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final String publicKeyset="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  HybridDecrypt hybridDecrypt=HybridDecryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(privateKeyset)));
  HybridEncrypt hybridEncrypt=HybridEncryptFactory.getPrimitive(CleartextKeysetHandle.parseFrom(base64().decode(publicKeyset)));
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=Random.randBytes(20);
  byte[] ciphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
  assertArrayEquals(plaintext,hybridDecrypt.decrypt(ciphertext,contextInfo));
}
Program: 111307
Project: 111307
Buggy source:
@Test public void testInvalidKeyset() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager=new KeysetManager.Builder().setKeyFormat(format).build();
  manager.rotate();
  Keyset keyset=manager.getKeysetHandle().getKeyset();
  byte[] proto=keyset.toByteArray();
  proto[0]=(byte)~proto[0];
  try {
    KeysetHandle handle=CleartextKeysetHandle.fromBinaryFormat(proto);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
  String str=TextFormat.printToUnicodeString(keyset);
  try {
    KeysetHandle handle=CleartextKeysetHandle.fromTextFormat(str + "String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Test public void testInvalidKeyset() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager=new KeysetManager.Builder().setKeyFormat(format).build();
  manager.rotate();
  Keyset keyset=manager.getKeysetHandle().getKeyset();
  byte[] proto=keyset.toByteArray();
  proto[0]=(byte)~proto[0];
  try {
    KeysetHandle unused=CleartextKeysetHandle.fromBinaryFormat(proto);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
  String str=TextFormat.printToUnicodeString(keyset);
  try {
    KeysetHandle unused=CleartextKeysetHandle.fromTextFormat(str + "String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
}
Program: 111308
Project: 111308
Buggy source:
/** 
 * Tests that when encryption with KMS failed, an exception is thrown.
 */
@Test public void testFaultyKms() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager=new KeysetManager.Builder().setKeyFormat(format).build();
  manager.rotate();
  FaultyAead faultyAead=Registry.INSTANCE.getPrimitive(Registry.INSTANCE.newKey(KeyFormat.newBuilder().setTypeUrl(faultyAeadTypeUrl).build()));
  try {
    KeysetHandle keysetHandle=manager.getKeysetHandle(faultyAead);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
}

Fixed version (ground truth):
/** 
 * Tests that when encryption with KMS failed, an exception is thrown.
 */
@Test public void testFaultyKms() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager=new KeysetManager.Builder().setKeyFormat(format).build();
  manager.rotate();
  FaultyAead faultyAead=Registry.INSTANCE.getPrimitive(Registry.INSTANCE.newKey(KeyFormat.newBuilder().setTypeUrl(faultyAeadTypeUrl).build()));
  try {
    KeysetHandle unused=manager.getKeysetHandle(faultyAead);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException e) {
    assertTrue(e.toString().contains("String_Node_Str"));
  }
}
Program: 111309
Project: 111309
Buggy source:
@Test public void testExistingKeyset() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager1=new KeysetManager.Builder().setKeyFormat(format).build();
  manager1.rotate();
  Keyset keyset1=manager1.getKeysetHandle().getKeyset();
  KeysetManager manager2=new KeysetManager.Builder().setKeysetHandle(manager1.getKeysetHandle()).build();
  manager2.rotate(format);
  Keyset keyset2=manager2.getKeysetHandle().getKeyset();
  assertEquals(2,keyset2.getKeyCount());
  assertEquals(keyset2.getPrimaryKeyId(),keyset2.getKey(1).getKeyId());
}

Fixed version (ground truth):
@Test public void testExistingKeyset() throws Exception {
  KeyFormat format=KeyFormat.newBuilder().setTypeUrl(macTypeUrl).build();
  KeysetManager manager1=new KeysetManager.Builder().setKeyFormat(format).build();
  manager1.rotate();
  Keyset keyset1=manager1.getKeysetHandle().getKeyset();
  KeysetManager manager2=new KeysetManager.Builder().setKeysetHandle(manager1.getKeysetHandle()).build();
  manager2.rotate(format);
  Keyset keyset2=manager2.getKeysetHandle().getKeyset();
  assertEquals(2,keyset2.getKeyCount());
  assertEquals(keyset1.getKey(0),keyset2.getKey(0));
  assertEquals(keyset2.getPrimaryKeyId(),keyset2.getKey(1).getKeyId());
}
Program: 111312
Project: 111312
Buggy source:
@Override public byte[] encrypt(byte[] plaintext,byte[] aad) throws GeneralSecurityException {
  return label.getBytes();
}

Fixed version (ground truth):
@Override public byte[] encrypt(byte[] plaintext,byte[] aad) throws GeneralSecurityException {
  try {
    return label.getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    return null;
  }
}
Program: 111313
Project: 111313
Buggy source:
@Override public byte[] decrypt(byte[] ciphertext,byte[] aad) throws GeneralSecurityException {
  return label.getBytes();
}

Fixed version (ground truth):
@Override public byte[] decrypt(byte[] ciphertext,byte[] aad) throws GeneralSecurityException {
  try {
    return label.getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    return null;
  }
}
Program: 111314
Project: 111314
Buggy source:
@Override public byte[] computeMac(byte[] data) throws GeneralSecurityException {
  return label.getBytes();
}

Fixed version (ground truth):
@Override public byte[] computeMac(byte[] data) throws GeneralSecurityException {
  try {
    return label.getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    return null;
  }
}
Program: 111315
Project: 111315
Buggy source:
@Test public void testBasicAesGcm() throws Exception {
  ECParameterSpec spec=Util.getCurveSpec(EllipticCurveType.NIST_P256);
  KeyPairGenerator keyGen=KeyPairGenerator.getInstance("String_Node_Str");
  keyGen.initialize(spec);
  KeyPair recipientKey=keyGen.generateKeyPair();
  ECPublicKey recipientPublicKey=(ECPublicKey)recipientKey.getPublic();
  ECPrivateKey recipientPrivateKey=(ECPrivateKey)recipientKey.getPrivate();
  byte[] salt="String_Node_Str".getBytes("String_Node_Str");
  String hmacAlgo="String_Node_Str";
  KeyFormat keyFormat=KeyFormat.newBuilder().setTypeUrl("String_Node_Str").setValue(AesGcmKeyFormat.newBuilder().setKeySize(AES_GCM_KEY_SIZE).build().toByteString()).build();
  HybridEncrypt hybridEncrypt=new EciesAeadHkdfHybridEncrypt(recipientPublicKey,salt,hmacAlgo,keyFormat,EcPointFormat.UNCOMPRESSED);
  HybridDecrypt hybridDecrypt=new EciesAeadHkdfHybridDecrypt(recipientPrivateKey,salt,hmacAlgo,keyFormat,EcPointFormat.UNCOMPRESSED);
  byte[] ciphertext=hybridEncrypt.encrypt(PLAINTEXT.getBytes("String_Node_Str"),CONTEXT.getBytes("String_Node_Str"));
  byte[] decrypted=hybridDecrypt.decrypt(ciphertext,CONTEXT.getBytes("String_Node_Str"));
  assertFalse(PLAINTEXT.equals(new String(ciphertext)));
  assertEquals(PLAINTEXT,new String(decrypted));
}

Fixed version (ground truth):
@Test public void testBasicAesGcm() throws Exception {
  ECParameterSpec spec=Util.getCurveSpec(EllipticCurveType.NIST_P256);
  KeyPairGenerator keyGen=KeyPairGenerator.getInstance("String_Node_Str");
  keyGen.initialize(spec);
  KeyPair recipientKey=keyGen.generateKeyPair();
  ECPublicKey recipientPublicKey=(ECPublicKey)recipientKey.getPublic();
  ECPrivateKey recipientPrivateKey=(ECPrivateKey)recipientKey.getPrivate();
  byte[] salt="String_Node_Str".getBytes("String_Node_Str");
  String hmacAlgo="String_Node_Str";
  KeyFormat keyFormat=KeyFormat.newBuilder().setTypeUrl("String_Node_Str").setValue(AesGcmKeyFormat.newBuilder().setKeySize(AES_GCM_KEY_SIZE).build().toByteString()).build();
  HybridEncrypt hybridEncrypt=new EciesAeadHkdfHybridEncrypt(recipientPublicKey,salt,hmacAlgo,keyFormat,EcPointFormat.UNCOMPRESSED);
  HybridDecrypt hybridDecrypt=new EciesAeadHkdfHybridDecrypt(recipientPrivateKey,salt,hmacAlgo,keyFormat,EcPointFormat.UNCOMPRESSED);
  byte[] ciphertext=hybridEncrypt.encrypt(PLAINTEXT.getBytes("String_Node_Str"),CONTEXT.getBytes("String_Node_Str"));
  byte[] decrypted=hybridDecrypt.decrypt(ciphertext,CONTEXT.getBytes("String_Node_Str"));
  assertFalse(PLAINTEXT.equals(new String(ciphertext,"String_Node_Str")));
  assertEquals(PLAINTEXT,new String(decrypted,"String_Node_Str"));
}
Program: 111316
Project: 111316
Buggy source:
public MacJce(String algorithm,java.security.Key key,int digestSize) throws GeneralSecurityException {
  this.mac=javax.crypto.Mac.getInstance(algorithm);
  this.digestSize=digestSize;
  mac.init(key);
}

Fixed version (ground truth):
public MacJce(String algorithm,java.security.Key key,int digestSize) throws GeneralSecurityException {
  this.mac=javax.crypto.Mac.getInstance(algorithm);
  this.algorithm=algorithm;
  this.digestSize=digestSize;
  mac.init(key);
  this.key=key;
}
Program: 111317
Project: 111317
Buggy source:
@Override public byte[] computeMac(final byte[] data) throws GeneralSecurityException {
  javax.crypto.Mac tmp=instance();
  tmp.update(data);
  byte[] digest=new byte[digestSize];
  System.arraycopy(tmp.doFinal(),0,digest,0,digestSize);
  return digest;
}

Fixed version (ground truth):
@Override public byte[] computeMac(final byte[] data) throws GeneralSecurityException {
  javax.crypto.Mac tmp=javax.crypto.Mac.getInstance(this.algorithm);
  tmp.init(this.key);
  tmp.update(data);
  byte[] digest=new byte[digestSize];
  System.arraycopy(tmp.doFinal(),0,digest,0,digestSize);
  return digest;
}
Program: 111318
Project: 111318
Buggy source:
/** 
 * Recursively tar file
 * @param inputPath file path can be directory
 * @param outputPath where to put the archived file
 * @param childrenOnly if inputPath is directory and if childrenOnly is true, the archive will contain all of its children, else the archive contains unique entry which is the inputPath itself
 * @param gZipped compress with gzip algorithm
 */
public static void tar(Path inputPath,Path outputPath,boolean gZipped,boolean childrenOnly) throws IOException {
  if (!Files.exists(inputPath)) {
    throw new FileNotFoundException("String_Node_Str" + inputPath);
  }
  FileUtils.touch(outputPath.toFile());
  try (TarArchiveOutputStream tarArchiveOutputStream=buildTarStream(outputPath,gZipped)){
    if (!Files.isDirectory(inputPath)) {
      TarArchiveEntry tarEntry=new TarArchiveEntry(inputPath.getFileName().toString());
      if (inputPath.toFile().canExecute()) {
        tarEntry.setMode(tarEntry.getMode() | 0755);
      }
      putTarEntry(tarArchiveOutputStream,tarEntry,inputPath);
    }
 else {
      Path sourcePath=inputPath;
      if (!childrenOnly) {
        sourcePath=inputPath.getParent();
      }
      Files.walkFileTree(inputPath,new TarDirWalker(sourcePath,tarArchiveOutputStream));
    }
    tarArchiveOutputStream.flush();
  }
 }

Fixed version (ground truth):
/** 
 * Recursively tar file
 * @param inputPath file path can be directory
 * @param outputPath where to put the archived file
 * @param childrenOnly if inputPath is directory and if childrenOnly is true, the archive will contain all of its children, else the archive contains unique entry which is the inputPath itself
 * @param gZipped compress with gzip algorithm
 */
public static void tar(Path inputPath,Path outputPath,boolean gZipped,boolean childrenOnly) throws IOException {
  if (!Files.exists(inputPath)) {
    throw new FileNotFoundException("String_Node_Str" + inputPath);
  }
  FileUtils.touch(outputPath.toFile());
  try (TarArchiveOutputStream tarArchiveOutputStream=buildTarStream(outputPath,gZipped)){
    if (!Files.isDirectory(inputPath)) {
      TarArchiveEntry tarEntry=new TarArchiveEntry(inputPath.getFileName().toString());
      if (inputPath.toFile().canExecute()) {
        tarEntry.setMode(tarEntry.getMode() | 0755);
      }
      putTarEntry(tarArchiveOutputStream,tarEntry,inputPath);
    }
 else {
      Path sourcePath=inputPath;
      if (!childrenOnly) {
        sourcePath=inputPath.getParent();
      }
      Files.walkFileTree(inputPath,EnumSet.of(FOLLOW_LINKS),Integer.MAX_VALUE,new TarDirWalker(sourcePath,tarArchiveOutputStream));
    }
    tarArchiveOutputStream.flush();
  }
 }
Program: 111319
Project: 111319
Buggy source:
@Override public FileVisitResult visitFile(Path file,BasicFileAttributes attrs) throws IOException {
  TarArchiveEntry tarEntry=new TarArchiveEntry(FilePathUtil.relativize(basePath,file));
  if (file.toFile().canExecute()) {
    tarEntry.setMode(tarEntry.getMode() | 0755);
  }
  CompressArchiveUtil.putTarEntry(tarArchiveOutputStream,tarEntry,file);
  return FileVisitResult.CONTINUE;
}

Fixed version (ground truth):
@Override public FileVisitResult visitFile(Path file,BasicFileAttributes attrs) throws IOException {
  if (attrs.isSymbolicLink()) {
    return FileVisitResult.CONTINUE;
  }
  TarArchiveEntry tarEntry=new TarArchiveEntry(FilePathUtil.relativize(basePath,file));
  if (file.toFile().canExecute()) {
    tarEntry.setMode(tarEntry.getMode() | 0755);
  }
  CompressArchiveUtil.putTarEntry(tarArchiveOutputStream,tarEntry,file);
  return FileVisitResult.CONTINUE;
}
Program: 111320
Project: 111320
Buggy source:
@Test public void testExecutableFlagIsPreserved() throws Exception {
  File executableFile=createExecutableFile();
  File archive=CompressArchiveUtil.archiveTARFiles(executableFile.getParentFile(),asList(executableFile),"String_Node_Str");
  File expectedFile=extractFileByName(archive,"String_Node_Str");
  assertThat("String_Node_Str",expectedFile.canExecute());
}

Fixed version (ground truth):
@Test public void testExecutableFlagIsPreserved() throws Exception {
  File executableFile=createExecutableFile();
  File archive=CompressArchiveUtil.archiveTARFiles(executableFile.getParentFile(),asList(executableFile),"String_Node_Str");
  File expectedFile=extractFileByName(archive,"String_Node_Str","String_Node_Str");
  assertThat("String_Node_Str",expectedFile.canExecute());
  expectedFile.delete();
  archive.delete();
}
Program: 111321
Project: 111321
Buggy source:
private File extractFileByName(File archive,String filenameToExtract) throws IOException {
  File baseDir=new File(FileUtils.getTempDirectoryPath());
  File expectedFile=new File(baseDir,filenameToExtract);
  expectedFile.delete();
  assertThat(expectedFile.exists(),is(false));
  TarArchiveInputStream tarArchiveInputStream=new TarArchiveInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(archive))));
  TarArchiveEntry entry;
  while ((entry=tarArchiveInputStream.getNextTarEntry()) != null) {
    String individualFiles=entry.getName();
    assertThat(individualFiles,equalTo("String_Node_Str"));
    IOUtils.copy(tarArchiveInputStream,new FileOutputStream(expectedFile));
    if ((entry.getMode() & 0755) == 0755) {
      expectedFile.setExecutable(true);
    }
  }
  tarArchiveInputStream.close();
  return expectedFile;
}

Fixed version (ground truth):
private File extractFileByName(File archive,String filenameToExtract,String outputName) throws IOException {
  File baseDir=new File(FileUtils.getTempDirectoryPath());
  File expectedFile=new File(baseDir,outputName);
  expectedFile.delete();
  assertThat(expectedFile.exists(),is(false));
  TarArchiveInputStream tarArchiveInputStream=new TarArchiveInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(archive))));
  TarArchiveEntry entry;
  boolean found=false;
  while ((entry=tarArchiveInputStream.getNextTarEntry()) != null) {
    String individualFiles=entry.getName();
    if (individualFiles.equals(filenameToExtract) || individualFiles.endsWith("String_Node_Str" + filenameToExtract)) {
      found=true;
      IOUtils.copy(tarArchiveInputStream,new FileOutputStream(expectedFile));
      if ((entry.getMode() & 0755) == 0755) {
        expectedFile.setExecutable(true);
      }
      break;
    }
  }
  assertThat("String_Node_Str",found);
  tarArchiveInputStream.close();
  return expectedFile;
}
Program: 111322
Project: 111322
Buggy source:
/** 
 * @throws com.github.dockerjava.api.exception.NotFoundException No such container
 */
@Override public Void exec() throws NotFoundException {
  if (StringUtils.isNotEmpty(this.hostResource)) {
    if (this.tarInputStream != null) {
      throw new DockerClientException("String_Node_Str");
    }
    Path toUpload=null;
    try {
      toUpload=Files.createTempFile("String_Node_Str","String_Node_Str");
      CompressArchiveUtil.tar(Paths.get(hostResource),toUpload,true,dirChildrenOnly);
    }
 catch (    IOException createFileIOException) {
      if (toUpload != null) {
        toUpload.toFile().delete();
      }
      throw new DockerClientException("String_Node_Str" + this.hostResource,createFileIOException);
    }
    try (InputStream uploadStream=Files.newInputStream(toUpload)){
      this.tarInputStream=uploadStream;
      return super.exec();
    }
 catch (    IOException e) {
      throw new DockerClientException("String_Node_Str" + toUpload.toFile().getAbsolutePath(),e);
    }
 finally {
      toUpload.toFile().delete();
    }
  }
 else   if (this.tarInputStream == null) {
    throw new DockerClientException("String_Node_Str");
  }
  return super.exec();
}

Fixed version (ground truth):
/** 
 * @throws com.github.dockerjava.api.exception.NotFoundException No such container
 */
@Override public Void exec() throws NotFoundException {
  if (StringUtils.isNotEmpty(this.hostResource)) {
    if (this.tarInputStream != null) {
      throw new DockerClientException("String_Node_Str");
    }
    Path toUpload=null;
    try {
      toUpload=Files.createTempFile("String_Node_Str","String_Node_Str");
      CompressArchiveUtil.tar(Paths.get(hostResource),toUpload,true,dirChildrenOnly);
    }
 catch (    IOException createFileIOException) {
      if (toUpload != null) {
        toUpload.toFile().delete();
      }
      throw new DockerClientException("String_Node_Str" + this.hostResource,createFileIOException);
    }
    try (InputStream uploadStream=Files.newInputStream(toUpload)){
      this.tarInputStream=uploadStream;
      return super.exec();
    }
 catch (    IOException e) {
      throw new DockerClientException("String_Node_Str" + toUpload.toFile().getAbsolutePath(),e);
    }
 finally {
      this.tarInputStream=null;
      toUpload.toFile().delete();
    }
  }
 else   if (this.tarInputStream == null) {
    throw new DockerClientException("String_Node_Str");
  }
  return super.exec();
}
Program: 111323
Project: 111323
Buggy source:
/** 
 * @see #ioMergedRecursive
 */
@CheckForNull public List<Long> getIoMergedRecursive(){
  return ioMergedRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioMergedRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoMergedRecursive(){
  return ioMergedRecursive;
}
Program: 111324
Project: 111324
Buggy source:
/** 
 * @see #sectorsRecursive
 */
@CheckForNull public List<Long> getSectorsRecursive(){
  return sectorsRecursive;
}

Fixed version (ground truth):
/** 
 * @see #sectorsRecursive
 */
@CheckForNull public List<BlkioStatEntry> getSectorsRecursive(){
  return sectorsRecursive;
}
Program: 111325
Project: 111325
Buggy source:
/** 
 * @see #ioWaitTimeRecursive
 */
@CheckForNull public List<Long> getIoWaitTimeRecursive(){
  return ioWaitTimeRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioWaitTimeRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoWaitTimeRecursive(){
  return ioWaitTimeRecursive;
}
Program: 111326
Project: 111326
Buggy source:
/** 
 * @see #ioTimeRecursive
 */
@CheckForNull public List<Long> getIoTimeRecursive(){
  return ioTimeRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioTimeRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoTimeRecursive(){
  return ioTimeRecursive;
}
Program: 111327
Project: 111327
Buggy source:
/** 
 * @see #ioServiceBytesRecursive
 */
@CheckForNull public List<Long> getIoServiceBytesRecursive(){
  return ioServiceBytesRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioServiceBytesRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoServiceBytesRecursive(){
  return ioServiceBytesRecursive;
}
Program: 111328
Project: 111328
Buggy source:
/** 
 * @see #ioServicedRecursive
 */
@CheckForNull public List<Long> getIoServicedRecursive(){
  return ioServicedRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioServicedRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoServicedRecursive(){
  return ioServicedRecursive;
}
Program: 111329
Project: 111329
Buggy source:
/** 
 * @see #ioServiceTimeRecursive
 */
@CheckForNull public List<Long> getIoServiceTimeRecursive(){
  return ioServiceTimeRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioServiceTimeRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoServiceTimeRecursive(){
  return ioServiceTimeRecursive;
}
Program: 111330
Project: 111330
Buggy source:
/** 
 * @see #ioQueueRecursive
 */
@CheckForNull public List<Long> getIoQueueRecursive(){
  return ioQueueRecursive;
}

Fixed version (ground truth):
/** 
 * @see #ioQueueRecursive
 */
@CheckForNull public List<BlkioStatEntry> getIoQueueRecursive(){
  return ioQueueRecursive;
}
Program: 111332
Project: 111332
Buggy source:
@Override public ListServicesCmd withIdFilter(List<String> ids){
  checkNotNull(ids,"String_Node_Str");
  this.filters.withIds(ids);
  return this;
}

Fixed version (ground truth):
@Override public ListServicesCmd withIdFilter(List<String> ids){
  checkNotNull(ids,"String_Node_Str");
  this.filters.withFilter("String_Node_Str",ids);
  return this;
}
Program: 111333
Project: 111333
Buggy source:
@Override public ListServicesCmd withNameFilter(List<String> names){
  checkNotNull(names,"String_Node_Str");
  this.filters.withNames(names);
  return this;
}

Fixed version (ground truth):
@Override public ListServicesCmd withNameFilter(List<String> names){
  checkNotNull(names,"String_Node_Str");
  this.filters.withFilter("String_Node_Str",names);
  return this;
}
Program: 111334
Project: 111334
Buggy source:
@Test public void testListTasks() throws DockerException {
  dockerRule.getClient().initializeSwarmCmd(new SwarmSpec()).withListenAddr("String_Node_Str").withAdvertiseAddr("String_Node_Str").exec();
  CreateServiceResponse response=dockerRule.getClient().createServiceCmd(new ServiceSpec().withName(SERVICE_NAME).withMode(new ServiceModeConfig().withReplicated(new ServiceReplicatedModeOptions().withReplicas(2))).withTaskTemplate(new TaskSpec().withContainerSpec(new ContainerSpec().withImage(DEFAULT_IMAGE)))).exec();
  String serviceId=response.getId();
  List<Task> tasks=dockerRule.getClient().listTasksCmd().withServiceFilter(serviceId).exec();
  assertThat(tasks,hasSize(2));
  String taskId=tasks.get(0).getId(), secondId=tasks.get(1).getId();
  tasks=dockerRule.getClient().listTasksCmd().withIdFilter(taskId).exec();
  assertThat(tasks,hasSize(1));
  assertThat(tasks.get(0).getId(),is(taskId));
  tasks=dockerRule.getClient().listTasksCmd().withIdFilter(secondId,taskId).exec();
  String nodeId=tasks.get(0).getNodeId();
  tasks=dockerRule.getClient().listTasksCmd().withNodeFilter(nodeId).exec();
  assertThat(tasks.get(0).getNodeId(),is(nodeId));
  tasks=dockerRule.getClient().listTasksCmd().withStateFilter(TaskState.RUNNING).exec();
  assertThat(tasks,hasSize(2));
  dockerRule.getClient().removeServiceCmd(SERVICE_NAME).exec();
}

Fixed version (ground truth):
@Test public void testListTasks() throws DockerException {
  dockerRule.getClient().initializeSwarmCmd(new SwarmSpec()).withListenAddr("String_Node_Str").withAdvertiseAddr("String_Node_Str").exec();
  Map<String,String> taskLabels=Collections.singletonMap(TASK_LABEL_KEY,TASK_LABEL_VALUE);
  CreateServiceResponse response=dockerRule.getClient().createServiceCmd(new ServiceSpec().withName(SERVICE_NAME).withMode(new ServiceModeConfig().withReplicated(new ServiceReplicatedModeOptions().withReplicas(2))).withTaskTemplate(new TaskSpec().withContainerSpec(new ContainerSpec().withImage(DEFAULT_IMAGE))).withLabels(taskLabels)).exec();
  String serviceId=response.getId();
  List<Task> tasks=dockerRule.getClient().listTasksCmd().withServiceFilter(serviceId).exec();
  assertThat(tasks,hasSize(2));
  String taskId=tasks.get(0).getId(), secondId=tasks.get(1).getId();
  tasks=dockerRule.getClient().listTasksCmd().withIdFilter(taskId).exec();
  assertThat(tasks,hasSize(1));
  assertThat(tasks.get(0).getId(),is(taskId));
  tasks=dockerRule.getClient().listTasksCmd().withIdFilter(secondId,taskId).exec();
  String nodeId=tasks.get(0).getNodeId();
  tasks=dockerRule.getClient().listTasksCmd().withNodeFilter(nodeId).exec();
  assertThat(tasks.get(0).getNodeId(),is(nodeId));
  tasks=dockerRule.getClient().listTasksCmd().withStateFilter(TaskState.RUNNING).exec();
  assertThat(tasks,hasSize(2));
  tasks=dockerRule.getClient().listTasksCmd().withLabelFilter(taskLabels).exec();
  assertThat(tasks,hasSize(2));
  tasks=dockerRule.getClient().listTasksCmd().withLabelFilter(TASK_LABEL_KEY + "String_Node_Str" + TASK_LABEL_VALUE).exec();
  assertThat(tasks,hasSize(2));
  dockerRule.getClient().removeServiceCmd(SERVICE_NAME).exec();
}
Program: 111335
Project: 111335
Buggy source:
private String getBodyAsMessage(ClientResponseContext responseContext) throws IOException {
  if (responseContext.hasEntity()) {
    int contentLength=responseContext.getLength();
    if (contentLength != -1) {
      byte[] buffer=new byte[contentLength];
      try {
        InputStream entityStream=responseContext.getEntityStream();
        IOUtils.readFully(entityStream,buffer);
        entityStream.close();
      }
 catch (      EOFException e) {
        return null;
      }
      Charset charset=null;
      MediaType mediaType=responseContext.getMediaType();
      if (mediaType != null) {
        String charsetName=mediaType.getParameters().get("String_Node_Str");
        if (charsetName != null) {
          try {
            charset=Charset.forName(charsetName);
          }
 catch (          Exception e) {
          }
        }
      }
      if (charset == null) {
        charset=Charset.defaultCharset();
      }
      return new String(buffer,charset);
    }
  }
  return null;
}

Fixed version (ground truth):
private String getBodyAsMessage(ClientResponseContext responseContext) throws IOException {
  if (responseContext.hasEntity()) {
    try (InputStream entityStream=responseContext.getEntityStream()){
      Charset charset=null;
      MediaType mediaType=responseContext.getMediaType();
      if (mediaType != null) {
        String charsetName=mediaType.getParameters().get("String_Node_Str");
        if (charsetName != null) {
          try {
            charset=Charset.forName(charsetName);
          }
 catch (          Exception ignored) {
          }
        }
      }
      if (charset == null) {
        charset=Charset.defaultCharset();
      }
      return IOUtils.toString(entityStream,charset);
    }
 catch (    Exception ignored) {
    }
  }
  return null;
}
Program: 111336
Project: 111336
Buggy source:
@Override protected List<Service> execute(ListServicesCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<Service> services=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<Service>>(){
  }
);
  LOGGER.trace("String_Node_Str",services);
  return services;
}

Fixed version (ground truth):
@Override protected List<Service> execute(ListServicesCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",FiltersEncoder.jsonEncode(command.getFilters()));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<Service> services=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<Service>>(){
  }
);
  LOGGER.trace("String_Node_Str",services);
  return services;
}
Program: 111337
Project: 111337
Buggy source:
@Override protected List<SwarmNode> execute(ListSwarmNodesCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<SwarmNode> nodes=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<SwarmNode>>(){
  }
);
  LOGGER.trace("String_Node_Str",nodes);
  return nodes;
}

Fixed version (ground truth):
@Override protected List<SwarmNode> execute(ListSwarmNodesCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",FiltersEncoder.jsonEncode(command.getFilters()));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<SwarmNode> nodes=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<SwarmNode>>(){
  }
);
  LOGGER.trace("String_Node_Str",nodes);
  return nodes;
}
Program: 111338
Project: 111338
Buggy source:
@Override protected List<Task> execute(ListTasksCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",urlPathSegmentEscaper().escape(FiltersEncoder.jsonEncode(command.getFilters())));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<Task> tasks=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<Task>>(){
  }
);
  LOGGER.trace("String_Node_Str",tasks);
  return tasks;
}

Fixed version (ground truth):
@Override protected List<Task> execute(ListTasksCmd command){
  WebTarget webTarget=getBaseResource().path("String_Node_Str");
  if (command.getFilters() != null && !command.getFilters().isEmpty()) {
    webTarget=webTarget.queryParam("String_Node_Str",FiltersEncoder.jsonEncode(command.getFilters()));
  }
  LOGGER.trace("String_Node_Str",webTarget);
  List<Task> tasks=webTarget.request().accept(MediaType.APPLICATION_JSON).get(new TypeReference<List<Task>>(){
  }
);
  LOGGER.trace("String_Node_Str",tasks);
  return tasks;
}
Program: 111339
Project: 111339
Buggy source:
@CheckForNull Integer getVersion();

Fixed version (ground truth):
@CheckForNull Long getVersion();
Program: 111340
Project: 111340
Buggy source:
UpdateSwarmNodeCmd withVersion(@Nonnull Integer versionId);

Fixed version (ground truth):
UpdateSwarmNodeCmd withVersion(@Nonnull Long versionId);
Program: 111341
Project: 111341
Buggy source:
public ObjectVersion withIndex(Integer index){
  this.index=index;
  return this;
}

Fixed version (ground truth):
public ObjectVersion withIndex(Long index){
  this.index=index;
  return this;
}
Program: 111342
Project: 111342
Buggy source:
public Integer getIndex(){
  return index;
}

Fixed version (ground truth):
public Long getIndex(){
  return index;
}
Program: 111343
Project: 111343
Buggy source:
@CheckForNull @Override public Integer getVersion(){
  return version;
}

Fixed version (ground truth):
@CheckForNull @Override public Long getVersion(){
  return version;
}
Program: 111344
Project: 111344
Buggy source:
@Override public UpdateSwarmNodeCmd withVersion(@Nonnull Integer versionId){
  this.version=versionId;
  return this;
}

Fixed version (ground truth):
@Override public UpdateSwarmNodeCmd withVersion(@Nonnull Long versionId){
  this.version=versionId;
  return this;
}