nus-yam/ex-repair huggingface dataset:
Program: 111194
Project: 111194
Buggy source:
protected void calculateBarPositions(int _DataSize){
  float barWidth=mBarWidth;
  float margin=mBarMargin;
  if (!mFixedBarWidth) {
    barWidth=(mGraphWidth / _DataSize) - margin;
  }
  if (mFixedBarWidth) {
    float cumulatedBarWidths=barWidth * _DataSize;
    float remainingWidth=mGraphWidth - cumulatedBarWidths;
    margin=remainingWidth / _DataSize;
  }
  calculateBounds(barWidth,margin);
}

Fixed version (ground truth):
protected void calculateBarPositions(int _DataSize){
  float barWidth=mBarWidth;
  float margin=mBarMargin;
  if (!mFixedBarWidth) {
    barWidth=(mGraphWidth / _DataSize) - margin;
  }
 else {
    float cumulatedBarWidths=barWidth * _DataSize;
    float remainingWidth=mGraphWidth - cumulatedBarWidths;
    margin=remainingWidth / _DataSize;
  }
  calculateBounds(barWidth,margin);
}
Program: 111196
Project: 111196
Buggy source:
/** 
 * Implement this to do your drawing.
 * @param canvas the canvas on which the background will be drawn
 */
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  if (mUseCustomLegend) {
    for (    LegendModel model : mLegendList) {
      Rect textBounds=model.getTextBounds();
      RectF bounds=model.getLegendBounds();
      canvas.drawText(model.getLegendLabel(),bounds.centerX() - (textBounds.width() / 2),bounds.centerY(),mLegendPaint);
      canvas.drawLine(bounds.centerX(),bounds.centerY() - textBounds.height() - mLegendTopPadding,bounds.centerX(),mLegendTopPadding,mLegendPaint);
    }
  }
 else {
    List<? extends BaseModel> list=mSeries.get(0).getSeries();
    for (    BaseModel model : list) {
      if (model.canShowLabel()) {
        RectF bounds=model.getLegendBounds();
        canvas.drawText(model.getLegendLabel(),model.getLegendLabelPosition(),bounds.bottom - mMaxFontHeight,mLegendPaint);
        canvas.drawLine(bounds.centerX(),bounds.bottom - mMaxFontHeight * 2 - mLegendTopPadding,bounds.centerX(),mLegendTopPadding,mLegendPaint);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Implement this to do your drawing.
 * @param canvas the canvas on which the background will be drawn
 */
@Override protected void onDraw(Canvas canvas){
  super.onDraw(canvas);
  if (!mSeries.isEmpty()) {
    if (mUseCustomLegend) {
      for (      LegendModel model : mLegendList) {
        Rect textBounds=model.getTextBounds();
        RectF bounds=model.getLegendBounds();
        canvas.drawText(model.getLegendLabel(),bounds.centerX() - (textBounds.width() / 2),bounds.centerY(),mLegendPaint);
        canvas.drawLine(bounds.centerX(),bounds.centerY() - textBounds.height() - mLegendTopPadding,bounds.centerX(),mLegendTopPadding,mLegendPaint);
      }
    }
 else {
      List<? extends BaseModel> list=mSeries.get(0).getSeries();
      for (      BaseModel model : list) {
        if (model.canShowLabel()) {
          RectF bounds=model.getLegendBounds();
          canvas.drawText(model.getLegendLabel(),model.getLegendLabelPosition(),bounds.bottom - mMaxFontHeight,mLegendPaint);
          canvas.drawLine(bounds.centerX(),bounds.bottom - mMaxFontHeight * 2 - mLegendTopPadding,bounds.centerX(),mLegendTopPadding,mLegendPaint);
        }
      }
    }
  }
}
Program: 111198
Project: 111198
Buggy source:
@Override public void onAnimationUpdate(ValueAnimator animation){
  mRevealValue=(animation.getAnimatedFraction());
  mScale.reset();
  mScale.setScale(1,1.f * mRevealValue,0,mUseableGraphHeight + mTopPadding);
  mGraph.invalidate();
}

Fixed version (ground truth):
@Override public void onAnimationUpdate(ValueAnimator animation){
  mRevealValue=animation.getAnimatedFraction();
  mScale.reset();
  mScale.setScale(1,1.f * mRevealValue,0,mUseableGraphHeight + mTopPadding);
  mGraph.invalidate();
}
Program: 111200
Project: 111200
Buggy source:
public void clearChart(){
  mData.clear();
  onDataChanged();
}

Fixed version (ground truth):
public void clearChart(){
  mData.clear();
}
Program: 111201
Project: 111201
Buggy source:
protected void calculateBarPositions(int _DataSize){
  float barWidth=mBarWidth;
  float margin=mBarMargin;
  if (!mFixedBarWidth) {
    barWidth=(mGraphWidth / _DataSize) - margin;
  }
 else {
    float cumulatedBarWidths=barWidth * _DataSize;
    float remainingWidth=mGraphWidth - cumulatedBarWidths;
    margin=remainingWidth / _DataSize;
  }
  calculateBounds(barWidth,margin);
}

Fixed version (ground truth):
protected void calculateBarPositions(int _DataSize){
  float barWidth=mBarWidth;
  float margin=mBarMargin;
  if (!mFixedBarWidth) {
    barWidth=(mGraphWidth / _DataSize) - margin;
  }
 else {
    float cumulatedBarWidths=barWidth * _DataSize;
    float remainingWidth=mGraphWidth - cumulatedBarWidths;
    margin=remainingWidth / _DataSize;
  }
  calculateBounds(barWidth,margin);
  mLegend.invalidate();
  mGraph.invalidate();
}
Program: 111202
Project: 111202
Buggy source:
public void clearChart(){
  mPieData.clear();
  mTotalValue=0;
  onDataChanged();
}

Fixed version (ground truth):
public void clearChart(){
  mPieData.clear();
  mTotalValue=0;
}
Program: 111203
Project: 111203
Buggy source:
public void clearChart(){
  mData.clear();
  onDataChanged();
}

Fixed version (ground truth):
public void clearChart(){
  mData.clear();
}
Program: 111205
Project: 111205
Buggy source:
public boolean needsImportFrom(String packageName){
  return getParseType() == TypeUtils.ParseType.PARSABLE_OBJECT && !getPackageName().equals(packageName) && !StringUtil.isNullOrEmpty(getParsableTypeParserClass());
}

Fixed version (ground truth):
public boolean needsImportFrom(String packageName){
  return getParseType() == TypeUtils.ParseType.PARSABLE_OBJECT && !getPackageName().equals(packageName);
}
Program: 111206
Project: 111206
Buggy source:
@Override protected void onWindowVisibilityChanged(int visibility){
  super.onWindowVisibilityChanged(visibility);
  if (View.GONE == visibility) {
    removeCallbacks(mRefreshProgressRunnable);
  }
}

Fixed version (ground truth):
@Override protected void onWindowVisibilityChanged(int visibility){
  super.onWindowVisibilityChanged(visibility);
  if (View.GONE == visibility) {
    removeCallbacks(mRefreshProgressRunnable);
  }
 else {
    removeCallbacks(mRefreshProgressRunnable);
    mRefreshProgressRunnable=new RefreshProgressRunnable();
    post(mRefreshProgressRunnable);
  }
}
Program: 111207
Project: 111207
Buggy source:
private void startWave(){
  if (getWidth() != 0) {
    int width=getWidth();
    mXZoom=width + width / 2;
    left=getLeft();
    top=getTop();
    right=getRight();
    bottom=getBottom();
    mMaxRight=right + mXOffset;
    omega=PI2 / mXZoom;
  }
  mRefreshProgressRunnable=new RefreshProgressRunnable();
  post(mRefreshProgressRunnable);
}

Fixed version (ground truth):
private void startWave(){
  if (getWidth() != 0) {
    int width=getWidth();
    mXZoom=width + width / 2;
    left=getLeft();
    top=getTop();
    right=getRight();
    bottom=getBottom();
    mMaxRight=right + mXOffset;
    omega=PI2 / mXZoom;
  }
}
Program: 111208
Project: 111208
Buggy source:
public void setProgress(int progress){
  this.progress=progress > 100 ? 100 : progress;
  invalidate();
}

Fixed version (ground truth):
public void setProgress(int progress){
  this.progress=progress > 100 ? 100 : progress;
}
Program: 111209
Project: 111209
Buggy source:
/** 
 * Creates a new instance from the provided   {@link MapSession}.
 * @param cached the {@link MapSession} that represents the persisted session thatwas retrieved. Cannot be null.
 */
RedisSession(MapSession cached){
  Assert.notNull("String_Node_Str");
  this.cached=cached;
  this.originalPrincipalName=PRINCIPAL_NAME_RESOLVER.resolvePrincipal(this);
}

Fixed version (ground truth):
/** 
 * Creates a new instance from the provided   {@link MapSession}.
 * @param cached the {@link MapSession} that represents the persisted session thatwas retrieved. Cannot be null.
 */
RedisSession(MapSession cached){
  Assert.notNull(cached,"String_Node_Str");
  this.cached=cached;
  this.originalPrincipalName=PRINCIPAL_NAME_RESOLVER.resolvePrincipal(this);
}
Program: 111210
Project: 111210
Buggy source:
JdbcSession(ExpiringSession delegate){
  Assert.notNull("String_Node_Str");
  this.delegate=delegate;
}

Fixed version (ground truth):
JdbcSession(ExpiringSession delegate){
  Assert.notNull(delegate,"String_Node_Str");
  this.delegate=delegate;
}
Program: 111211
Project: 111211
Buggy source:
/** 
 * Callback method during Spring bean initialization that will capture the fully-qualified name of the GemFire cache   {@link Region} used to manage Sessionstate and register this SessionRepository as a GemFire {@link com.gemstone.gemfire.cache.CacheListener}.
 * @throws Exception if an error occurs during the initialization process.
 */
public void afterPropertiesSet() throws Exception {
  GemfireOperations template=getTemplate();
  Assert.isInstanceOf(GemfireAccessor.class,template);
  Region<Object,ExpiringSession> region=((GemfireAccessor)template).getRegion();
  this.fullyQualifiedRegionName=region.getFullPath();
  region.getAttributesMutator().addCacheListener(this);
}

Fixed version (ground truth):
/** 
 * Callback method during Spring bean initialization that will capture the fully-qualified name of the GemFire cache   {@link Region} used to manage Session state and register this SessionRepositoryas a GemFire  {@link com.gemstone.gemfire.cache.CacheListener}. Additionally, this method registers GemFire   {@link Instantiator}s for the   {@link GemFireSession}and   {@link GemFireSessionAttributes} types to optimize GemFire's instantiation logic on deserializationusing the data serialization framework when accessing the  {@link Session}'s state stored in GemFire.
 * @throws Exception if an error occurs during the initialization process.
 */
public void afterPropertiesSet() throws Exception {
  GemfireOperations template=getTemplate();
  Assert.isInstanceOf(GemfireAccessor.class,template);
  Region<Object,ExpiringSession> region=((GemfireAccessor)template).getRegion();
  this.fullyQualifiedRegionName=region.getFullPath();
  region.getAttributesMutator().addCacheListener(this);
  Instantiator.register(new Instantiator(GemFireSession.class,800813552){
    @Override public DataSerializable newInstance(){
      return new GemFireSession();
    }
  }
);
  Instantiator.register(new Instantiator(GemFireSessionAttributes.class,800828008){
    @Override public DataSerializable newInstance(){
      return new GemFireSessionAttributes();
    }
  }
);
}
Program: 111212
Project: 111212
Buggy source:
/** 
 * Gets the current session's alias from the   {@link HttpServletRequest}.
 * @param request the  {@link HttpServletRequest} to obtain the current session'salias from.
 * @return the current sessions' alias. Cannot be null.
 */
String getCurrentSessionAlias(HttpServletRequest request);

Fixed version (ground truth):
/** 
 * Gets the current session's alias from the   {@link HttpServletRequest}.
 * @param request the {@link HttpServletRequest} to obtain the current session's alias from.
 * @return the current sessions' alias. Cannot be null.
 */
String getCurrentSessionAlias(HttpServletRequest request);
Program: 111213
Project: 111213
Buggy source:
/** 
 * Gets a mapping of the session alias to the session id from the  {@link HttpServletRequest}
 * @param request the  {@link HttpServletRequest} to obtain the mapping from.Cannot be null.
 * @return a mapping of the session alias to the session id from the{@link HttpServletRequest}. Cannot be null.
 */
Map<String,String> getSessionIds(HttpServletRequest request);

Fixed version (ground truth):
/** 
 * Gets a mapping of the session alias to the session id from the  {@link HttpServletRequest}
 * @param request the {@link HttpServletRequest} to obtain the mapping from. Cannot be null.
 * @return a mapping of the session alias to the session id from the{@link HttpServletRequest}. Cannot be null.
 */
Map<String,String> getSessionIds(HttpServletRequest request);
Program: 111214
Project: 111214
Buggy source:
/** 
 * Gets a new and unique Session alias. Typically this will be called to pass into  {@code HttpSessionManager#encodeURL(java.lang.String)}. For example: <code> String newAlias = httpSessionManager.getNewSessionAlias(request); String addAccountUrl = httpSessionManager.encodeURL("./", newAlias); </code>
 * @param request
 * @return
 */
String getNewSessionAlias(HttpServletRequest request);

Fixed version (ground truth):
/** 
 * Gets a new and unique Session alias. Typically this will be called to pass into  {@code HttpSessionManager#encodeURL(java.lang.String)}. For example: <code> String newAlias = httpSessionManager.getNewSessionAlias(request); String addAccountUrl = httpSessionManager.encodeURL("./", newAlias); </code>
 * @param request the {@link HttpServletRequest} to get a new alias from
 * @return
 */
String getNewSessionAlias(HttpServletRequest request);
Program: 111215
Project: 111215
Buggy source:
/** 
 * Same contract as for   {@code doFilter}, but guaranteed to be just invoked once per request within a single request thread. <p>Provides HttpServletRequest and HttpServletResponse arguments instead of the default ServletRequest and ServletResponse ones.
 */
protected abstract void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain filterChain) throws ServletException, IOException ;

Fixed version (ground truth):
/** 
 * Same contract as for   {@code doFilter}, but guaranteed to be just invoked once per request within a single request thread. <p>Provides HttpServletRequest and HttpServletResponse arguments instead of the default ServletRequest and ServletResponse ones.
 * @see Filter#doFilter
 */
protected abstract void doFilterInternal(HttpServletRequest request,HttpServletResponse response,FilterChain filterChain) throws ServletException, IOException ;
Program: 111217
Project: 111217
Buggy source:
public Builder addRecipientPrivateKey(ECPrivateKey val) throws GeneralSecurityException {
  recipientPrivateKeys.add(val);
  return this;
}

Fixed version (ground truth):
/** 
 * Adds the decryption private key of the recipient. 
 */
public Builder addRecipientPrivateKey(ECPrivateKey val) throws GeneralSecurityException {
  recipientPrivateKeys.add(val);
  return this;
}
Program: 111218
Project: 111218
Buggy source:
/** 
 * Adds a custom   {@link PaymentMethodTokenRecipientKem}. <p>This is useful for clients that store keys in an HSM and need a more control on how the key is used. If you are not using an HSM, you probably should just use   {@link #addRecipientPrivateKey}.
 */
public Builder addRecipientKem(PaymentMethodTokenRecipientKem kem){
  recipientKems.add(kem);
  return this;
}

Fixed version (ground truth):
/** 
 * Adds a custom   {@link PaymentMethodTokenRecipientKem}. <p>This is useful for clients that store keys in an HSM and need a more control on how the key is used. If you are not using an HSM, you probably should just use   {@link #addRecipientPrivateKey}.
 * @since 1.1.0
 */
public Builder addRecipientKem(PaymentMethodTokenRecipientKem kem){
  recipientKems.add(kem);
  return this;
}
Program: 111219
Project: 111219
Buggy source:
/** 
 * JSON containing sender intermediate signing key and a signature of it by the sender signing key. <p>This can be generated by   {@link SenderIntermediateCertFactory}.
 */
public Builder senderIntermediateCert(String val) throws GeneralSecurityException {
  this.senderIntermediateCert=val;
  return this;
}

Fixed version (ground truth):
/** 
 * JSON containing sender intermediate signing key and a signature of it by the sender signing key. <p>This can be generated by   {@link SenderIntermediateCertFactory}.
 * @since 1.1.0
 */
public Builder senderIntermediateCert(String val) throws GeneralSecurityException {
  this.senderIntermediateCert=val;
  return this;
}
Program: 111220
Project: 111220
Buggy source:
public Builder senderIntermediateSigningKey(ECPrivateKey val) throws GeneralSecurityException {
  senderIntermediateSigningKey=val;
  return this;
}

Fixed version (ground truth):
/** 
 * Sets the intermediate signing key of the sender.
 * @since 1.1.0
 */
public Builder senderIntermediateSigningKey(ECPrivateKey val) throws GeneralSecurityException {
  senderIntermediateSigningKey=val;
  return this;
}
Program: 111221
Project: 111221
Buggy source:
/** 
 * Checks that test vector has the expected algorithm and version. 
 */
public static void checkAlgAndVersion(JSONObject testvector,String expectedAlgorithm,String expectedVersion) throws Exception {
  String algorithm=testvector.getString("String_Node_Str");
  if (!expectedAlgorithm.equals(algorithm)) {
    fail("String_Node_Str" + expectedAlgorithm + "String_Node_Str"+ algorithm);
  }
  String generatorVersion=testvector.getString("String_Node_Str");
  if (!generatorVersion.equals(expectedVersion)) {
    fail("String_Node_Str" + expectedVersion + "String_Node_Str"+ generatorVersion);
  }
}

Fixed version (ground truth):
/** 
 * Checks that test vector has the expected algorithm and version. 
 */
public static void checkAlgAndVersion(JSONObject testvector,String expectedAlgorithm,String expectedVersion) throws Exception {
  String algorithm=testvector.getString("String_Node_Str");
  if (!expectedAlgorithm.equals(algorithm)) {
    System.out.println("String_Node_Str" + expectedAlgorithm + "String_Node_Str"+ algorithm+ "String_Node_Str");
  }
  String generatorVersion=testvector.getString("String_Node_Str");
  if (!generatorVersion.equals(expectedVersion)) {
    System.out.println("String_Node_Str" + expectedVersion + "String_Node_Str"+ generatorVersion+ "String_Node_Str"+ expectedAlgorithm+ "String_Node_Str");
  }
}
Program: 111222
Project: 111222
Buggy source:
/** 
 * Adds a verifying public key of the sender. <p><b>IMPORTANT</b>: Instead of using this method to set the verifying public keys of the sender, prefer calling   {@link #fetchVerifyingPublicKeysWith} passing it an instance of {@link KeysDownloader}. It will take care of fetching fresh keys and caching in memory. Only use this method if you can't use   {@link #fetchVerifyingPublicKeysWith} and be aware you will needto handle Google key rotations yourself.
 */
public Builder addVerifyingPublicKey(int keyId,final ECPublicKey val) throws GeneralSecurityException {
  this.verifyingPublicKeysProviders.add(new VerifyingPublicKeysProvider(){
    @Override public Map<Integer,ECPublicKey> get() throws GeneralSecurityException {
      return Collections.singletonMap(keyId,val);
    }
  }
);
  return this;
}

Fixed version (ground truth):
/** 
 * Adds a verifying public key of the sender. <p><b>IMPORTANT</b>: Instead of using this method to set the verifying public keys of the sender, prefer calling   {@link #fetchVerifyingPublicKeysWith} passing it an instance of {@link KeysDownloader}. It will take care of fetching fresh keys and caching in memory. Only use this method if you can't use   {@link #fetchVerifyingPublicKeysWith} and be aware you will needto handle Google key rotations yourself.
 */
public Builder addVerifyingPublicKey(final int keyId,final ECPublicKey val) throws GeneralSecurityException {
  this.verifyingPublicKeysProviders.add(new VerifyingPublicKeysProvider(){
    @Override public Map<Integer,ECPublicKey> get() throws GeneralSecurityException {
      return Collections.singletonMap(keyId,val);
    }
  }
);
  return this;
}
Program: 111223
Project: 111223
Buggy source:
@Test public void testAesSiv192() throws Exception {
  byte[] key=Random.randBytes(48);
  AesSiv siv;
  try {
    siv=new AesSiv(key);
  }
 catch (  GeneralSecurityException ex) {
    System.out.println("String_Node_Str");
    return;
  }
  testEncryptionDecryption(siv,5,128,20);
}

Fixed version (ground truth):
@Test public void testAesSiv192() throws Exception {
  byte[] key=Random.randBytes(48);
  AesSiv siv;
  try {
    siv=new AesSiv(key);
  }
 catch (  GeneralSecurityException ex) {
    System.out.println("String_Node_Str" + ex.toString());
    return;
  }
  testEncryptionDecryption(siv,5,128,20);
}
Program: 111224
Project: 111224
Buggy source:
@Test public void testAesSiv256() throws Exception {
  byte[] key=Random.randBytes(64);
  AesSiv siv;
  try {
    siv=new AesSiv(key);
  }
 catch (  GeneralSecurityException ex) {
    System.out.println("String_Node_Str");
    return;
  }
  testEncryptionDecryption(siv,5,128,20);
}

Fixed version (ground truth):
@Test public void testAesSiv256() throws Exception {
  byte[] key=Random.randBytes(64);
  AesSiv siv;
  try {
    siv=new AesSiv(key);
  }
 catch (  GeneralSecurityException ex) {
    System.out.println("String_Node_Str" + ex.toString());
    return;
  }
  testEncryptionDecryption(siv,5,128,20);
}
Program: 111225
Project: 111225
Buggy source:
@Test public void testNonNullContextInfo() throws Exception {
  KeyPair uaKeyPair=EllipticCurves.generateKeyPair(WebPushConstants.NIST_P256_CURVE_TYPE);
  ECPrivateKey uaPrivateKey=(ECPrivateKey)uaKeyPair.getPrivate();
  ECPublicKey uaPublicKey=(ECPublicKey)uaKeyPair.getPublic();
  byte[] authSecret=Random.randBytes(16);
  HybridEncrypt hybridEncrypt=new WebPushHybridEncrypt.Builder().withAuthSecret(authSecret).withRecipientPublicKey(uaPublicKey).build();
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=new byte[0];
  try {
    byte[] ciphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException ex) {
  }
}

Fixed version (ground truth):
@Test public void testNonNullContextInfo() throws Exception {
  KeyPair uaKeyPair=EllipticCurves.generateKeyPair(WebPushConstants.NIST_P256_CURVE_TYPE);
  ECPublicKey uaPublicKey=(ECPublicKey)uaKeyPair.getPublic();
  byte[] authSecret=Random.randBytes(16);
  HybridEncrypt hybridEncrypt=new WebPushHybridEncrypt.Builder().withAuthSecret(authSecret).withRecipientPublicKey(uaPublicKey).build();
  byte[] plaintext=Random.randBytes(20);
  byte[] contextInfo=new byte[0];
  try {
    byte[] unusedCiphertext=hybridEncrypt.encrypt(plaintext,contextInfo);
    fail("String_Node_Str");
  }
 catch (  GeneralSecurityException ex) {
  }
}
Program: 111226
Project: 111226
Buggy source:
/** 
 * @param jsonKey JSON formated {@code AesCtrHmacAeadKey}-proto
 * @return {@code AesCtrHmacAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    KeyManager<IndCpaCipher> aesCtrKeyManager=Registry.getKeyManager(AesCtrKeyManager.TYPE_URL);
    KeyManager<Mac> hmacKeyManager=Registry.getKeyManager(MacConfig.HMAC_TYPE_URL);
    return AesCtrHmacAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setAesCtrKey((AesCtrKey)aesCtrKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setHmacKey((HmacKey)hmacKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code AesCtrHmacAeadKey}-proto
 * @return {@code AesCtrHmacAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    KeyManager<IndCpaCipher> aesCtrKeyManager=Registry.getKeyManager(AesCtrKeyManager.TYPE_URL);
    KeyManager<Mac> hmacKeyManager=Registry.getKeyManager(MacConfig.HMAC_TYPE_URL);
    return AesCtrHmacAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setAesCtrKey((AesCtrKey)aesCtrKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setHmacKey((HmacKey)hmacKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111227
Project: 111227
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code AesCtrHmacAeadKeyFromat}-proto
 * @return {@code AesCtrHmacAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    KeyManager<IndCpaCipher> aesCtrKeyManager=Registry.getKeyManager(AesCtrKeyManager.TYPE_URL);
    KeyManager<Mac> hmacKeyManager=Registry.getKeyManager(MacConfig.HMAC_TYPE_URL);
    return AesCtrHmacAeadKeyFormat.newBuilder().setAesCtrKeyFormat((AesCtrKeyFormat)aesCtrKeyManager.jsonToKeyFormat(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setHmacKeyFormat((HmacKeyFormat)hmacKeyManager.jsonToKeyFormat(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code AesCtrHmacAeadKeyFromat}-proto
 * @return {@code AesCtrHmacAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    KeyManager<IndCpaCipher> aesCtrKeyManager=Registry.getKeyManager(AesCtrKeyManager.TYPE_URL);
    KeyManager<Mac> hmacKeyManager=Registry.getKeyManager(MacConfig.HMAC_TYPE_URL);
    return AesCtrHmacAeadKeyFormat.newBuilder().setAesCtrKeyFormat((AesCtrKeyFormat)aesCtrKeyManager.jsonToKeyFormat(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setHmacKeyFormat((HmacKeyFormat)hmacKeyManager.jsonToKeyFormat(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111228
Project: 111228
Buggy source:
/** 
 * @param jsonKey JSON formated {@code AesCtrKey}-proto
 * @return {@code AesCtrKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesCtrKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code AesCtrKey}-proto
 * @return {@code AesCtrKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesCtrKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111229
Project: 111229
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code AesCtrKeyFromat}-proto
 * @return {@code AesCtrKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesCtrKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code AesCtrKeyFromat}-proto
 * @return {@code AesCtrKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesCtrKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111230
Project: 111230
Buggy source:
/** 
 * @param jsonKey JSON formated {@code AesEaxKey}-proto
 * @return {@code AesEaxKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesEaxKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code AesEaxKey}-proto
 * @return {@code AesEaxKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesEaxKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111231
Project: 111231
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code AesEaxKeyFromat}-proto
 * @return {@code AesEaxKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesEaxKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code AesEaxKeyFromat}-proto
 * @return {@code AesEaxKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesEaxKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111232
Project: 111232
Buggy source:
/** 
 * @param jsonKey JSON formated {@code AesGcmKey}-proto
 * @return {@code AesGcmKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesGcmKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code AesGcmKey}-proto
 * @return {@code AesGcmKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesGcmKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111233
Project: 111233
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code AesGcmKeyFromat}-proto
 * @return {@code AesGcmKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesGcmKeyFormat.newBuilder().setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code AesGcmKeyFromat}-proto
 * @return {@code AesGcmKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesGcmKeyFormat.newBuilder().setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111234
Project: 111234
Buggy source:
/** 
 * @param jsonKey JSON formated {@code ChaCha20Poly1305Key}-proto
 * @return {@code ChaCha20Poly1305Key}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return ChaCha20Poly1305Key.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code ChaCha20Poly1305Key}-proto
 * @return {@code ChaCha20Poly1305Key}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return ChaCha20Poly1305Key.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111235
Project: 111235
Buggy source:
/** 
 * @param jsonKey JSON formated {@code KmsAeadKey}-proto
 * @return {@code KmsAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return KmsAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code KmsAeadKey}-proto
 * @return {@code KmsAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return KmsAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111236
Project: 111236
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code KmsAeadKeyFromat}-proto
 * @return {@code KmsAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return KmsAeadKeyFormat.newBuilder().setKeyUri(json.getString("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code KmsAeadKeyFromat}-proto
 * @return {@code KmsAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return KmsAeadKeyFormat.newBuilder().setKeyUri(json.getString("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111237
Project: 111237
Buggy source:
/** 
 * @param jsonKey JSON formated {@code KmsEnvelopeAeadKey}-proto
 * @return {@code KmsEnvelopeAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return KmsEnvelopeAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code KmsEnvelopeAeadKey}-proto
 * @return {@code KmsEnvelopeAeadKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return KmsEnvelopeAeadKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111238
Project: 111238
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code KmsEnvelopeAeadKeyFromat}-proto
 * @return {@code KmsEnvelopeAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return keyFormatFromJson(json);
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code KmsEnvelopeAeadKeyFromat}-proto
 * @return {@code KmsEnvelopeAeadKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return keyFormatFromJson(json);
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111239
Project: 111239
Buggy source:
/** 
 * @param jsonKey JSON formated {@code AesSivKey}-proto
 * @return {@code AesSivKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesSivKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code AesSivKey}-proto
 * @return {@code AesSivKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return AesSivKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111240
Project: 111240
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code AesSivKeyFromat}-proto
 * @return {@code AesSivKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesSivKeyFormat.newBuilder().setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code AesSivKeyFromat}-proto
 * @return {@code AesSivKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return AesSivKeyFormat.newBuilder().setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111241
Project: 111241
Buggy source:
/** 
 * @param jsonKey JSON formated {@code EciesAeadHkdfPublicKey}-proto
 * @return {@code EciesAeadHkdfPublicKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return EciesAeadHkdfPublicKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setX(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).setY(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code EciesAeadHkdfPublicKey}-proto
 * @return {@code EciesAeadHkdfPublicKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    return EciesAeadHkdfPublicKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setX(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).setY(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111242
Project: 111242
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code EciesAeadHkdfPublicKeyFromat}-proto
 * @return {@code EciesAeadHkdfKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return EciesAeadHkdfKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code EciesAeadHkdfPublicKeyFromat}-proto
 * @return {@code EciesAeadHkdfKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return EciesAeadHkdfKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111243
Project: 111243
Buggy source:
/** 
 * @param jsonKey JSON formated {@code HmacKey}-proto
 * @return {@code HmacKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return HmacKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code HmacKey}-proto
 * @return {@code HmacKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    byte[] keyValue=Base64.decode(json.getString("String_Node_Str"));
    return HmacKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeyValue(ByteString.copyFrom(keyValue)).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111244
Project: 111244
Buggy source:
/** 
 * @param jsonKeyFormat JSON formated {@code HmacKeyFromat}-proto
 * @return {@code HmacKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return HmacKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKeyFormat JSON formatted {@code HmacKeyFromat}-proto
 * @return {@code HmacKeyFormat}-proto
 */
@Override public MessageLite jsonToKeyFormat(final byte[] jsonKeyFormat) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKeyFormat,Util.UTF_8));
    validateKeyFormat(json);
    return HmacKeyFormat.newBuilder().setParams(paramsFromJson(json.getJSONObject("String_Node_Str"))).setKeySize(json.getInt("String_Node_Str")).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}
Program: 111245
Project: 111245
Buggy source:
/** 
 * @param jsonKey JSON formated {@code EcdsaPrivateKey}-proto
 * @return {@code EcdsaPrivateKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    EcdsaVerifyKeyManager publicKeyManager=new EcdsaVerifyKeyManager();
    return EcdsaPrivateKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setPublicKey((EcdsaPublicKey)publicKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setKeyValue(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}

Fixed version (ground truth):
/** 
 * @param jsonKey JSON formatted {@code EcdsaPrivateKey}-proto
 * @return {@code EcdsaPrivateKey}-proto
 */
@Override public MessageLite jsonToKey(final byte[] jsonKey) throws GeneralSecurityException {
  try {
    JSONObject json=new JSONObject(new String(jsonKey,Util.UTF_8));
    validateKey(json);
    EcdsaVerifyKeyManager publicKeyManager=new EcdsaVerifyKeyManager();
    return EcdsaPrivateKey.newBuilder().setVersion(json.getInt("String_Node_Str")).setPublicKey((EcdsaPublicKey)publicKeyManager.jsonToKey(json.getJSONObject("String_Node_Str").toString(4).getBytes(Util.UTF_8))).setKeyValue(ByteString.copyFrom(Base64.decode(json.getString("String_Node_Str")))).build();
  }
 catch (  JSONException e) {
    throw new GeneralSecurityException(e);
  }
}