nus-yam/ex-repair huggingface dataset:
Program: 142405
Project: 142405
Buggy source:
@Override public Object unmarshal(HierarchicalStreamReader reader,UnmarshallingContext context) throws NullPointerException {
  if (reader.getNodeName().equals("String_Node_Str")) {
    getValuesFromXML(reader,context);
  }
  if (point == null || curve == null || n == null) {
    log(ECParameterSpecConverter.class,"String_Node_Str",ERROR);
    throw new NullPointerException("String_Node_Str");
  }
  return new ECParameterSpec(curve,point,n,h);
}

Fixed version (ground truth):
@Override public Object unmarshal(HierarchicalStreamReader reader,UnmarshallingContext context) throws NullPointerException {
  if (reader.getNodeName().toLowerCase().endsWith("String_Node_Str")) {
    getValuesFromXML(reader,context);
  }
  if (point == null || curve == null || n == null) {
    log(ECParameterSpecConverter.class,"String_Node_Str",ERROR);
    throw new NullPointerException("String_Node_Str");
  }
  return new ECParameterSpec(curve,point,n,h);
}
Program: 142406
Project: 142406
Buggy source:
public void widgetSelected(SelectionEvent e){
  txtOutput.setText("String_Node_Str");
  for (int i=0; i < txtOutput.getBounds().height / txtOutput.getFont().getFontData()[0].getHeight(); i++) {
    consoleStrings.indexOf(consoleStrings.get(slider.getSelection() + i));
    appendToGuiFromList((consoleStrings.get(slider.getSelection() + i)));
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  txtOutput.setText("String_Node_Str");
  consoleStrings.indexOf(consoleStrings.get(slider.getSelection()));
  appendToGuiFromList((consoleStrings.get(slider.getSelection())));
  for (int i=0; i < 35; i++) {
    if (slider.getSelection() + i < consoleStrings.size()) {
      consoleStrings.indexOf(consoleStrings.get(slider.getSelection() + i));
      appendToGuiFromList((consoleStrings.get(slider.getSelection() + i)));
    }
 else     return;
  }
}
Program: 142407
Project: 142407
Buggy source:
protected void appendToGui(String s){
  if (consoleStrings.size() < maxLines && !s.equals("String_Node_Str")) {
    consoleStrings.add(s);
  }
 else   if (!s.equals("String_Node_Str")) {
    consoleStrings.pollFirst();
    consoleStrings.add(s);
  }
}

Fixed version (ground truth):
protected void appendToGui(String s){
  if (consoleStrings.size() < maxLines && !s.equals("String_Node_Str")) {
    consoleStrings.add(s);
    sync.asyncExec(new Runnable(){
      @Override public void run(){
        slider.setMaximum(consoleStrings.size());
      }
    }
);
  }
 else   if (!s.equals("String_Node_Str")) {
    consoleStrings.pollFirst();
    consoleStrings.add(s);
  }
}
Program: 142409
Project: 142409
Buggy source:
public static ECPoint doublePoint(EllipticCurve curve,ECPoint ecPoint){
  if (ecPoint.equals(ECPoint.POINT_INFINITY)) {
    return ecPoint;
  }
  BigInteger p=((ECFieldFp)curve.getField()).getP();
  BigInteger a=curve.getA();
  BigInteger x=ecPoint.getAffineX();
  BigInteger y=ecPoint.getAffineY();
  BigInteger lambda=((((x.pow(2)).multiply(THREE)).add(a)).multiply((y.multiply(TWO)).modInverse(p))).mod(p);
  BigInteger xDoubled=((lambda.pow(2)).subtract(x.multiply(TWO))).mod(p);
  BigInteger yDoubled=(((lambda.multiply(x.subtract(xDoubled)))).subtract(y)).mod(p);
  ECPoint ecPointDoubled=new ECPoint(xDoubled,yDoubled);
  return ecPointDoubled;
}

Fixed version (ground truth):
/** 
 * This method performs EC point doubling
 * @param curve the elliptic curve to be used
 * @param ecPointP the second point for addition
 * @return the result of the point doubling
 */
public static ECPoint doublePoint(EllipticCurve curve,ECPoint ecPointP){
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  BigInteger p=((ECFieldFp)curve.getField()).getP();
  BigInteger a=curve.getA();
  BigInteger xp=ecPointP.getAffineX();
  BigInteger yp=ecPointP.getAffineY();
  BigInteger lambda=((((xp.pow(2)).multiply(THREE)).add(a)).multiply((yp.multiply(TWO)).modInverse(p))).mod(p);
  BigInteger xr=computeXr(p,lambda,xp);
  BigInteger yr=computeYr(p,lambda,xp,yp,xr);
  ECPoint ecPointR=new ECPoint(xr,yr);
  return ecPointR;
}
Program: 142410
Project: 142410
Buggy source:
public static ECPoint doublePointBc(EllipticCurve curve,ECPoint ecPoint){
  if (ecPoint.equals(ECPoint.POINT_INFINITY)) {
    return ecPoint;
  }
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint pointBc, pointBcTwice;
  curveBc=EC5Util.convertCurve(curve);
  pointBc=EC5Util.convertPoint(curveBc,ecPoint,false);
  pointBcTwice=pointBc.twice();
  ECFieldElement ecfX=pointBcTwice.normalize().getXCoord();
  ECFieldElement ecfY=pointBcTwice.normalize().getYCoord();
  BigInteger x=ecfX.toBigInteger();
  BigInteger y=ecfY.toBigInteger();
  ECPoint ecPointTwice=new ECPoint(x,y);
  return ecPointTwice;
}

Fixed version (ground truth):
/** 
 * This method performs EC point doubling relying on Bouncy Castle
 * @param curve the elliptic curve to be used
 * @param ecPointP the second point for addition
 * @return the result of the point doubling
 */
public static ECPoint doublePointBc(EllipticCurve curve,ECPoint ecPointP){
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint ecPointPbc, ecPointRbc;
  curveBc=EC5Util.convertCurve(curve);
  ecPointPbc=EC5Util.convertPoint(curveBc,ecPointP,false);
  ecPointRbc=ecPointPbc.twice();
  ECFieldElement ecfX=ecPointRbc.normalize().getXCoord();
  ECFieldElement ecfY=ecPointRbc.normalize().getYCoord();
  BigInteger rx=ecfX.toBigInteger();
  BigInteger ry=ecfY.toBigInteger();
  ECPoint ecPointR=new ECPoint(rx,ry);
  return ecPointR;
}
Program: 142411
Project: 142411
Buggy source:
/** 
 * TODO remove BC dependency, maybe move to a dedicated helper class This method performs EC point addition
 * @param curve the elliptic curve to be used
 * @param ecPointQ the first point for addition
 * @param ecPointP the second point for addition
 * @return the addition result
 */
public static ECPoint addPointBc(EllipticCurve curve,ECPoint ecPointQ,ECPoint ecPointP){
  if (ecPointQ.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointQ;
  }
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint pointBc1, pointBc2, pointBcAdd;
  curveBc=EC5Util.convertCurve(curve);
  pointBc1=EC5Util.convertPoint(curveBc,ecPointQ,false);
  pointBc2=EC5Util.convertPoint(curveBc,ecPointP,false);
  pointBcAdd=pointBc1.add(pointBc2);
  ECFieldElement ecfX=pointBcAdd.normalize().getXCoord();
  ECFieldElement ecfY=pointBcAdd.normalize().getYCoord();
  BigInteger x=ecfX.toBigInteger();
  BigInteger y=ecfY.toBigInteger();
  ECPoint ecPointAdd=new ECPoint(x,y);
  return ecPointAdd;
}

Fixed version (ground truth):
/** 
 * This method performs EC point addition relying on Bouncy Castle
 * @param curve the elliptic curve to be used
 * @param ecPointQ the first point for addition
 * @param ecPointP the second point for addition
 * @return the result of the point addition
 */
public static ECPoint addPointBc(EllipticCurve curve,ECPoint ecPointQ,ECPoint ecPointP){
  if (ecPointQ.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointQ;
  }
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint ecPointQbc, ecPointPbc, ecPointRbc;
  curveBc=EC5Util.convertCurve(curve);
  ecPointQbc=EC5Util.convertPoint(curveBc,ecPointQ,false);
  ecPointPbc=EC5Util.convertPoint(curveBc,ecPointP,false);
  ecPointRbc=ecPointQbc.add(ecPointPbc);
  ECFieldElement ecfX=ecPointRbc.normalize().getXCoord();
  ECFieldElement ecfY=ecPointRbc.normalize().getYCoord();
  BigInteger rx=ecfX.toBigInteger();
  BigInteger ry=ecfY.toBigInteger();
  ECPoint ecPointR=new ECPoint(rx,ry);
  return ecPointR;
}
Program: 142412
Project: 142412
Buggy source:
public static ECPoint addPoint(EllipticCurve curve,ECPoint ecPointQ,ECPoint ecPointP){
  BigInteger p=((ECFieldFp)curve.getField()).getP();
  BigInteger xq=ecPointQ.getAffineX();
  BigInteger yq=ecPointQ.getAffineY();
  BigInteger xp=ecPointP.getAffineX();
  BigInteger yp=ecPointP.getAffineY();
  if (ecPointQ.equals(ecPointP)) {
    return doublePoint(curve,ecPointQ);
  }
  if (ecPointQ.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointQ;
  }
  BigInteger lambda=((yq.subtract(yp)).multiply(xq.subtract(xp).modInverse(p))).mod(p);
  BigInteger addedX=(((lambda.modPow(TWO,p).subtract(xq))).subtract(xp)).mod(p);
  BigInteger addedY=((lambda.multiply(ecPointP.getAffineX().subtract(addedX)).mod(p)).subtract(yp)).mod(p);
  ECPoint ecPointAdded=new ECPoint(addedX,addedY);
  return ecPointAdded;
}

Fixed version (ground truth):
/** 
 * This method performs EC point addition
 * @param curve the elliptic curve to be used
 * @param ecPointQ the first point for addition
 * @param ecPointP the second point for addition
 * @return the result of the point addition
 */
public static ECPoint addPoint(EllipticCurve curve,ECPoint ecPointQ,ECPoint ecPointP){
  if (ecPointQ.equals(ecPointP)) {
    return doublePoint(curve,ecPointQ);
  }
  if (ecPointQ.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointQ;
  }
  BigInteger p=((ECFieldFp)curve.getField()).getP();
  BigInteger xq=ecPointQ.getAffineX();
  BigInteger yq=ecPointQ.getAffineY();
  BigInteger xp=ecPointP.getAffineX();
  BigInteger yp=ecPointP.getAffineY();
  BigInteger lambda=((yq.subtract(yp)).multiply(xq.subtract(xp).modInverse(p))).mod(p);
  BigInteger xr=computeXr(p,lambda,xp,xq);
  BigInteger yr=computeYr(p,lambda,xp,yp,xr);
  ECPoint ecPointR=new ECPoint(xr,yr);
  return ecPointR;
}
Program: 142413
Project: 142413
Buggy source:
/** 
 * This method performs EC scalar point multiplication using Double-and-add method.
 * @param curve the elliptic curve to be used
 * @param ecPoint the point to be multiplied
 * @param multiplicator the scalar multiplier
 * @return the multiplied EC point
 */
public static ECPoint scalarPointMultiplication(EllipticCurve curve,ECPoint ecPoint,BigInteger multiplicator){
  if (ecPoint.equals(ECPoint.POINT_INFINITY)) {
    return ecPoint;
  }
  BigInteger p=((ECFieldFp)curve.getField()).getP();
  BigInteger scalar=multiplicator.mod(p);
  ECPoint ecPointMult=ECPoint.POINT_INFINITY;
  int length=scalar.bitLength();
  System.out.println("String_Node_Str" + length);
  System.out.println("String_Node_Str" + HexString.encode(scalar));
  System.out.println("String_Node_Str" + scalar);
  System.out.println("String_Node_Str" + scalar.toString(2));
  for (int i=length - 1; i >= 0; i--) {
    ecPointMult=doublePoint(curve,ecPointMult);
    if (scalar.testBit(i)) {
      ecPointMult=addPoint(curve,ecPointMult,ecPoint);
    }
  }
  return ecPointMult;
}

Fixed version (ground truth):
/** 
 * This method performs EC scalar point multiplication using Double-and-add method.
 * @param curve the elliptic curve to be used
 * @param ecPointP the point to be multiplied
 * @param scalar the scalar multiplier
 * @return the multiplied EC point
 */
public static ECPoint scalarPointMultiplication(EllipticCurve curve,ECPoint ecPointP,BigInteger scalar){
  if (ecPointP.equals(ECPoint.POINT_INFINITY)) {
    return ecPointP;
  }
  ECPoint ecPointR=ECPoint.POINT_INFINITY;
  for (int i=(scalar.bitLength()) - 1; i >= 0; i--) {
    ecPointR=doublePoint(curve,ecPointR);
    if (scalar.testBit(i)) {
      ecPointR=addPoint(curve,ecPointR,ecPointP);
    }
  }
  return ecPointR;
}
Program: 142414
Project: 142414
Buggy source:
/** 
 * TODO remove BC dependency, maybe move to a dedicated helper class This method performs EC scalar point multiplication
 * @param curve the elliptic curve to be used
 * @param ecPoint the point to be multiplied
 * @param multiplicator the scalar multiplier
 * @return the multiplied EC point
 */
public static ECPoint scalarPointMultiplicationBc(EllipticCurve curve,ECPoint ecPoint,BigInteger multiplicator){
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint pointBc, pointBcMult;
  curveBc=EC5Util.convertCurve(curve);
  pointBc=EC5Util.convertPoint(curveBc,ecPoint,false);
  pointBcMult=pointBc.multiply(multiplicator);
  ECFieldElement ecfX=pointBcMult.normalize().getXCoord();
  ECFieldElement ecfY=pointBcMult.normalize().getYCoord();
  BigInteger x=ecfX.toBigInteger();
  BigInteger y=ecfY.toBigInteger();
  ECPoint ecPointMult=new ECPoint(x,y);
  return ecPointMult;
}

Fixed version (ground truth):
/** 
 * This method performs EC scalar point multiplication relying on Bouncy Castle
 * @param curve the elliptic curve to be used
 * @param ecPointP the point to be multiplied
 * @param multiplicator the scalar multiplier
 * @return the multiplied EC point
 */
public static ECPoint scalarPointMultiplicationBc(EllipticCurve curve,ECPoint ecPointP,BigInteger multiplicator){
  org.bouncycastle.math.ec.ECCurve curveBc;
  org.bouncycastle.math.ec.ECPoint ecPointPbc, ecPointRbc;
  curveBc=EC5Util.convertCurve(curve);
  ecPointPbc=EC5Util.convertPoint(curveBc,ecPointP,false);
  ecPointRbc=ecPointPbc.multiply(multiplicator);
  ECFieldElement ecfX=ecPointRbc.normalize().getXCoord();
  ECFieldElement ecfY=ecPointRbc.normalize().getYCoord();
  BigInteger rx=ecfX.toBigInteger();
  BigInteger ry=ecfY.toBigInteger();
  ECPoint ecPointR=new ECPoint(rx,ry);
  return ecPointR;
}
Program: 142415
Project: 142415
Buggy source:
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}

Fixed version (ground truth):
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}
Program: 142416
Project: 142416
Buggy source:
/** 
 * Return the single used SignerInfo <p/> If more than one SignerInfo is used override   {@link #getSignerInfos()} and ignore this method
 * @param eContent the encapContentInfo to be signed  
 * @return
 */
protected TlvDataObject getSignerInfo(ConstructedTlvDataObject eContent){
  TlvDataObject version=new PrimitiveTlvDataObject(new TlvTag(Asn1.INTEGER),new byte[]{0x01});
  TlvDataObject sid=getSid();
  TlvDataObject digestAlgorithm=getDigestAlgorithm();
  TlvDataObject signedAttrs=getSignedAttrs(eContent);
  TlvDataObject signatureAlgorithm=new ConstructedTlvDataObject(HexString.toByteArray("String_Node_Str"));
  byte[] signatureBytes;
  if (signedAttrs != null) {
    byte[] sigInput=signedAttrs.toByteArray();
    sigInput[0]=Asn1.SEQUENCE;
    signatureBytes=getSignature(sigInput);
  }
 else {
    signatureBytes=getSignature(eContent.toByteArray());
  }
  TlvDataObject signature=new PrimitiveTlvDataObject(TAG_OCTET_STRING,signatureBytes);
  ConstructedTlvDataObject signerInfo=new ConstructedTlvDataObject(TAG_SEQUENCE);
  signerInfo.addTlvDataObject(version);
  signerInfo.addTlvDataObject(sid);
  signerInfo.addTlvDataObject(digestAlgorithm);
  signerInfo.addTlvDataObject(signedAttrs);
  signerInfo.addTlvDataObject(signatureAlgorithm);
  signerInfo.addTlvDataObject(signature);
  return signerInfo;
}

Fixed version (ground truth):
/** 
 * Return the single used SignerInfo <p/> If more than one SignerInfo is used override   {@link #getSignerInfos()} and ignore this method
 * @param eContent the encapContentInfo to be signed  
 * @return
 */
protected TlvDataObject getSignerInfo(ConstructedTlvDataObject eContent){
  TlvDataObject version=new PrimitiveTlvDataObject(new TlvTag(Asn1.INTEGER),new byte[]{0x01});
  TlvDataObject sid=getSid();
  TlvDataObject digestAlgorithm=getDigestAlgorithm();
  TlvDataObject signedAttrs=getSignedAttrs(eContent);
  TlvDataObject signatureAlgorithm=new ConstructedTlvDataObject(HexString.toByteArray("String_Node_Str"));
  byte[] signatureBytes;
  if (signedAttrs != null) {
    byte[] sigInput=signedAttrs.toByteArray();
    sigInput[0]=Asn1.SET;
    signatureBytes=getSignature(sigInput);
  }
 else {
    signatureBytes=getSignature(eContent.toByteArray());
  }
  TlvDataObject signature=new PrimitiveTlvDataObject(TAG_OCTET_STRING,signatureBytes);
  ConstructedTlvDataObject signerInfo=new ConstructedTlvDataObject(TAG_SEQUENCE);
  signerInfo.addTlvDataObject(version);
  signerInfo.addTlvDataObject(sid);
  signerInfo.addTlvDataObject(digestAlgorithm);
  signerInfo.addTlvDataObject(signedAttrs);
  signerInfo.addTlvDataObject(signatureAlgorithm);
  signerInfo.addTlvDataObject(signature);
  return signerInfo;
}
Program: 142417
Project: 142417
Buggy source:
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}

Fixed version (ground truth):
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}
Program: 142418
Project: 142418
Buggy source:
@Override public Collection<String> getSupportedProfiles(){
  HashSet<String> retVal=new HashSet<String>();
  retVal.add(GtConstants.PROFILE_CA2);
  retVal.add(GtConstants.PROFILE_ECDH);
  retVal.add(GtConstants.PROFILE_PACE);
  retVal.add(GtConstants.PROFILE_PACE_CAN);
  retVal.add(GtConstants.PROFILE_PACE_ECDH);
  retVal.add(GtConstants.PROFILE_PACE_GM);
  retVal.add(GtConstants.PROFILE_TA2);
  retVal.add(GtConstants.PROFILE_EPASSPORT);
  retVal.add(GtConstants.PROFILE_eID);
  retVal.add(GtConstants.PROFILE_MIG);
  retVal.add(GtConstants.PROFILE_ECDSA);
  retVal.add(GtConstants.PROFILE_EPASSPORT_DG3);
  retVal.add(GtConstants.PROFILE_EPASSPORT_DG4);
  retVal.add(GtConstants.PROFILE_RI);
  retVal.add(GtConstants.PROFILE_AUX);
  retVal.add(GtConstants.PROFILE_CNG_PIN_PUK);
  retVal.add(GtConstants.PROFILE_CNG_PIN_AR);
  retVal.add(GtConstants.PROFILE_CNG_CAN_AR);
  retVal.add(GtConstants.PROFILE_eID_DG1);
  retVal.add(GtConstants.PROFILE_eID_DG2);
  retVal.add(GtConstants.PROFILE_eID_DG3);
  retVal.add(GtConstants.PROFILE_eID_DG4);
  retVal.add(GtConstants.PROFILE_eID_DG5);
  retVal.add(GtConstants.PROFILE_eID_DG6);
  retVal.add(GtConstants.PROFILE_eID_DG7);
  retVal.add(GtConstants.PROFILE_eID_DG8);
  retVal.add(GtConstants.PROFILE_eID_DG9);
  retVal.add(GtConstants.PROFILE_eID_DG13);
  retVal.add(GtConstants.PROFILE_eID_DG17);
  retVal.add(GtConstants.PROFILE_eID_DG18);
  return retVal;
}

Fixed version (ground truth):
@Override public Collection<String> getSupportedProfiles(){
  HashSet<String> retVal=new HashSet<String>();
  retVal.add(GtConstants.PROFILE_CA2);
  retVal.add(GtConstants.PROFILE_CS);
  retVal.add(GtConstants.PROFILE_ECDH);
  retVal.add(GtConstants.PROFILE_PACE);
  retVal.add(GtConstants.PROFILE_PACE_CAN);
  retVal.add(GtConstants.PROFILE_PACE_ECDH);
  retVal.add(GtConstants.PROFILE_PACE_GM);
  retVal.add(GtConstants.PROFILE_TA2);
  retVal.add(GtConstants.PROFILE_EPASSPORT);
  retVal.add(GtConstants.PROFILE_eID);
  retVal.add(GtConstants.PROFILE_MIG);
  retVal.add(GtConstants.PROFILE_ECDSA);
  retVal.add(GtConstants.PROFILE_EPASSPORT_DG3);
  retVal.add(GtConstants.PROFILE_EPASSPORT_DG4);
  retVal.add(GtConstants.PROFILE_RI);
  retVal.add(GtConstants.PROFILE_AUX);
  retVal.add(GtConstants.PROFILE_CNG_PIN_PUK);
  retVal.add(GtConstants.PROFILE_CNG_PIN_AR);
  retVal.add(GtConstants.PROFILE_CNG_CAN_AR);
  retVal.add(GtConstants.PROFILE_eID_DG1);
  retVal.add(GtConstants.PROFILE_eID_DG2);
  retVal.add(GtConstants.PROFILE_eID_DG3);
  retVal.add(GtConstants.PROFILE_eID_DG4);
  retVal.add(GtConstants.PROFILE_eID_DG5);
  retVal.add(GtConstants.PROFILE_eID_DG6);
  retVal.add(GtConstants.PROFILE_eID_DG7);
  retVal.add(GtConstants.PROFILE_eID_DG8);
  retVal.add(GtConstants.PROFILE_eID_DG9);
  retVal.add(GtConstants.PROFILE_eID_DG13);
  retVal.add(GtConstants.PROFILE_eID_DG17);
  retVal.add(GtConstants.PROFILE_eID_DG18);
  return retVal;
}
Program: 142419
Project: 142419
Buggy source:
@Override public void process(ProcessingData processingData){
  byte cla=processingData.getCommandApdu().getCla();
  byte ins=processingData.getCommandApdu().getIns();
  if (cla == (byte)0xff && ins == INS_86_GENERAL_AUTHENTICATE) {
    processInitPaceBypass(processingData);
  }
 else   if (cla != 0xff && ((cla & 0x03) == 0x03)) {
    processSm(processingData);
  }
}

Fixed version (ground truth):
@Override public void process(ProcessingData processingData){
  byte cla=processingData.getCommandApdu().getCla();
  byte ins=processingData.getCommandApdu().getIns();
  if (cla == (byte)0xff && ins == INS_86_GENERAL_AUTHENTICATE) {
    processInitPaceBypass(processingData);
  }
 else {
    processSm(processingData);
  }
}
Program: 142420
Project: 142420
Buggy source:
/** 
 * Handle pseudo SM APDU. <p/> After PACE was successfully initialized through  {@link #processInitPaceBypass(ProcessingData)} pseudo SM is initiated,that does not provide any kind of security. This is indicated by usage of the otherwise unused logical Channel 3 e.g. the lowest two bits of CLA are set. <p/> This method removes these flagging bits and ensures that the "decoded" commandApdu correctly returns on {@link IsoSecureMessagingCommandApdu#wasSecureMessaging()}<p/> Responses are simply returned in plain. Pseudo SM is aborted when an SM 6987 or 6988 is returned or whenever a plain (unflagged) APDU is transmitted.
 */
private void processSm(ProcessingData processingData){
  CommandApdu commandApdu=processingData.getCommandApdu();
  byte cla=commandApdu.getCla();
  if ((cla & 0x03) != 0x03) {
    if (pseudoSmIsActive) {
      log(this,"String_Node_Str");
      pseudoSmIsActive=false;
      processingData.addUpdatePropagation(this,"String_Node_Str",new ProtocolUpdate(true));
    }
  }
  if (!pseudoSmIsActive) {
    return;
  }
  SmMarkerApdu smMarkerApdu=new SmMarkerApdu(commandApdu);
  processingData.updateCommandApdu(this,"String_Node_Str",smMarkerApdu);
  byte[] apduBytes=commandApdu.toByteArray();
  apduBytes[0]&=(byte)0xFC;
  processingData.updateCommandApdu(this,"String_Node_Str",CommandApduFactory.createCommandApdu(apduBytes,smMarkerApdu));
}

Fixed version (ground truth):
/** 
 * Handle pseudo SM APDU. <p/> After PACE was successfully initialized through  {@link #processInitPaceBypass(ProcessingData)} pseudo SM is initiated,that does not provide any kind of security. This is indicated by usage of the otherwise unused logical Channel 3 e.g. the lowest two bits of CLA are set. <p/> This method removes these flagging bits and ensures that the "decoded" commandApdu correctly returns on {@link IsoSecureMessagingCommandApdu#wasSecureMessaging()}<p/> Responses are simply returned in plain. Pseudo SM is aborted when an SM 6987 or 6988 is returned or whenever a plain (unflagged) APDU is transmitted.
 */
private void processSm(ProcessingData processingData){
  CommandApdu commandApdu=processingData.getCommandApdu();
  byte cla=commandApdu.getCla();
  if ((cla & 0x03) != 0x03) {
    if (pseudoSmIsActive) {
      if (!(commandApdu instanceof IsoSecureMessagingCommandApdu) || !((IsoSecureMessagingCommandApdu)commandApdu).wasSecureMessaging()) {
        log(this,"String_Node_Str");
        pseudoSmIsActive=false;
        processingData.addUpdatePropagation(this,"String_Node_Str",new ProtocolUpdate(true));
      }
    }
    return;
  }
  if (!pseudoSmIsActive) {
    return;
  }
  SmMarkerApdu smMarkerApdu=new SmMarkerApdu(commandApdu);
  processingData.updateCommandApdu(this,"String_Node_Str",smMarkerApdu);
  byte[] apduBytes=commandApdu.toByteArray();
  apduBytes[0]&=(byte)0xFC;
  processingData.updateCommandApdu(this,"String_Node_Str",CommandApduFactory.createCommandApdu(apduBytes,smMarkerApdu));
}
Program: 142421
Project: 142421
Buggy source:
@Override public void reset(){
  pseudoSmIsActive=false;
}

Fixed version (ground truth):
@Override public void reset(){
}
Program: 142423
Project: 142423
Buggy source:
private void configureGtServer() throws Exception {
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setSupportedProfiles(getSupportedProfiles());
  transmitPasswords();
}

Fixed version (ground truth):
private void configureGtServer() throws Exception {
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setSupportedProfiles(getSupportedProfiles());
  transmitPasswords();
  transmitEidData();
}
Program: 142424
Project: 142424
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate01();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile01();
  }
  return persoCache;
}
Program: 142425
Project: 142425
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate02();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile02();
  }
  return persoCache;
}
Program: 142426
Project: 142426
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate03();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile03();
  }
  return persoCache;
}
Program: 142427
Project: 142427
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate04();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile04();
  }
  return persoCache;
}
Program: 142428
Project: 142428
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate05();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile05();
  }
  return persoCache;
}
Program: 142429
Project: 142429
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate06();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile06();
  }
  return persoCache;
}
Program: 142430
Project: 142430
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate07();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile07();
  }
  return persoCache;
}
Program: 142431
Project: 142431
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate08();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile08();
  }
  return persoCache;
}
Program: 142432
Project: 142432
Buggy source:
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new DefaultPersoTestPkiTemplate09();
  }
  return persoCache;
}

Fixed version (ground truth):
@Override public Personalization getPersonalization(){
  if (persoCache == null) {
    persoCache=new Profile09();
  }
  return persoCache;
}
Program: 142434
Project: 142434
Buggy source:
@Override protected void buildProtocolList(){
  protocols=new ArrayList<>();
  PaceProtocol paceProtocol=new PaceProtocol();
  paceProtocol.init();
  protocols.add(paceProtocol);
  FileProtocol fileManagementProtocol=new FileProtocol();
  fileManagementProtocol.init();
  protocols.add(fileManagementProtocol);
  TaProtocol taProtocol=new TaProtocol();
  taProtocol.init();
  protocols.add(taProtocol);
  RiProtocol riProtocol=new RiProtocol();
  protocols.add(riProtocol);
  CaProtocol caProtocol=new CaProtocol();
  caProtocol.init();
  protocols.add(caProtocol);
  protocols.add(new AuxProtocol());
  PinProtocol pinProtocol=new PinProtocol();
  pinProtocol.init();
  protocols.add(pinProtocol);
}

Fixed version (ground truth):
@Override protected void buildProtocolList(){
  protocols=new ArrayList<>();
  PaceProtocol paceProtocol=new PaceProtocol();
  paceProtocol.init();
  protocols.add(paceProtocol);
  FileProtocol fileManagementProtocol=new FileProtocol();
  fileManagementProtocol.init();
  protocols.add(fileManagementProtocol);
  TaProtocol taProtocol=new TaProtocol();
  taProtocol.init();
  protocols.add(taProtocol);
  RiProtocol riProtocol=new RiProtocol();
  protocols.add(riProtocol);
  CaProtocol caProtocol=new CaProtocol();
  caProtocol.init();
  protocols.add(caProtocol);
  protocols.add(new AuxProtocol());
  PinProtocol pinProtocol=new PinProtocol();
  pinProtocol.init();
  protocols.add(pinProtocol);
  protocols.add(new NpaProtocol());
}
Program: 142436
Project: 142436
Buggy source:
private void configureGtServer() throws Exception {
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setSupportedProfiles(getSupportedProfiles());
  transmitPasswords();
}

Fixed version (ground truth):
private void configureGtServer() throws Exception {
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_TESTMANAGER,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setPreferences(GtServerConnection.PREF_QUALIFIER_LOGGING,"String_Node_Str","String_Node_Str");
  gtServer.setSupportedProfiles(getSupportedProfiles());
  transmitPasswords();
  transmitEidData();
}
Program: 142437
Project: 142437
Buggy source:
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(GtConstants.SUITE_EAC2_ISO7816_M);
  retVal.add(GtConstants.SUITE_EAC2_ISO7816_N);
  retVal.add(new SimulatorReset());
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}

Fixed version (ground truth):
@Override public Collection<JobDescriptor> getAllApplicableGtTests(){
  Collection<JobDescriptor> retVal=new ArrayList<JobDescriptor>();
  retVal.add(new GtSuiteDescriptor(GtConstants.PROJECT_EPA_EAC2_BSI,"String_Node_Str"));
  return retVal;
}
Program: 142438
Project: 142438
Buggy source:
@Override protected void addAuxData(){
  byte[] communityId;
  initPersonalizationDataContainer();
  try {
    communityId=persoDataContainer.getDg18PlainData().getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    e.printStackTrace();
    communityId=new byte[0];
  }
  Date dateOfBirth=Utils.getDate(persoDataContainer.getDg8PlainData(),Utils.DATE_SET_MAX_VALUE);
  Date validityDate=Utils.getDate(persoDataContainer.getDg3PlainData());
  mf.addChild(new ByteDataAuxObject(new OidIdentifier(TaOid.id_CommunityID),communityId));
  mf.addChild(new DateAuxObject(new OidIdentifier(TaOid.id_DateOfBirth),dateOfBirth));
  mf.addChild(new DateAuxObject(new OidIdentifier(TaOid.id_DateOfExpiry),validityDate));
}

Fixed version (ground truth):
@Override protected void addAuxData(){
  initPersonalizationDataContainer();
  byte[] communityId=HexString.toByteArray(persoDataContainer.getDg18PlainData());
  mf.addChild(new ByteDataAuxObject(new OidIdentifier(TaOid.id_CommunityID),communityId));
  Date dateOfBirth=Utils.getDate(persoDataContainer.getDg8PlainData(),Utils.DATE_SET_MAX_VALUE);
  mf.addChild(new DateAuxObject(new OidIdentifier(TaOid.id_DateOfBirth),dateOfBirth));
  Date validityDate=Utils.getDate(persoDataContainer.getDg3PlainData());
  mf.addChild(new DateAuxObject(new OidIdentifier(TaOid.id_DateOfExpiry),validityDate));
}
Program: 142439
Project: 142439
Buggy source:
/** 
 * Add the eID application to the card and fill it with content
 */
protected void addEidApplication(){
  DedicatedFile eIdAppl=new DedicatedFile(null,new DedicatedFileIdentifier(HexString.toByteArray("String_Node_Str")));
  mf.addChild(eIdAppl);
  addEidDg1(eIdAppl);
  addEidDg2(eIdAppl);
  addEidDg3(eIdAppl);
  addEidDg4(eIdAppl);
  addEidDg5(eIdAppl);
  addEidDg6(eIdAppl);
  addEidDg7(eIdAppl);
  addEidDg8(eIdAppl);
  addEidDg9(eIdAppl);
  addEidDg10(eIdAppl);
  addEidDg11(eIdAppl);
  addEidDg12(eIdAppl);
  addEidDg13(eIdAppl);
  addEidDg17(eIdAppl);
  addEidDg18(eIdAppl);
  addEidDg19(eIdAppl);
  addEidDg20(eIdAppl);
  addEidDg21(eIdAppl);
}

Fixed version (ground truth):
/** 
 * Add the eID application to the card and fill it with content
 */
protected void addEidApplication(){
  DedicatedFile eIdAppl=new DedicatedFile(null,new DedicatedFileIdentifier(HexString.toByteArray(AID_EID)));
  mf.addChild(eIdAppl);
  addEidDg1(eIdAppl);
  addEidDg2(eIdAppl);
  addEidDg3(eIdAppl);
  addEidDg4(eIdAppl);
  addEidDg5(eIdAppl);
  addEidDg6(eIdAppl);
  addEidDg7(eIdAppl);
  addEidDg8(eIdAppl);
  addEidDg9(eIdAppl);
  addEidDg10(eIdAppl);
  addEidDg11(eIdAppl);
  addEidDg12(eIdAppl);
  addEidDg13(eIdAppl);
  addEidDg17(eIdAppl);
  addEidDg18(eIdAppl);
  addEidDg19(eIdAppl);
  addEidDg20(eIdAppl);
  addEidDg21(eIdAppl);
}
Program: 142441
Project: 142441
Buggy source:
@Override public byte[] comp(PublicKey publicKey){
  ECPublicKey ecPublicKey;
  if (publicKey instanceof ECPublicKey) {
    ecPublicKey=(ECPublicKey)publicKey;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ECPoint publicPoint=ecPublicKey.getW();
  BigInteger publicPointX=publicPoint.getAffineX();
  ECField field=ecPublicKey.getParams().getCurve().getField();
  if (field instanceof ECFieldFp) {
    ECFieldFp fieldFp=(ECFieldFp)field;
    int expectedLength=(int)Math.ceil(Utils.logarithm(fieldFp.getP().doubleValue(),256));
    byte[] result=Utils.toUnsignedByteArray(publicPointX);
    if (result.length < expectedLength) {
      byte[] padding=new byte[expectedLength - result.length];
      result=Utils.concatByteArrays(result,padding);
    }
    return result;
  }
  return null;
}

Fixed version (ground truth):
@Override public byte[] comp(PublicKey publicKey){
  ECPublicKey ecPublicKey;
  if (publicKey instanceof ECPublicKey) {
    ecPublicKey=(ECPublicKey)publicKey;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ECPoint publicPoint=ecPublicKey.getW();
  BigInteger publicPointX=publicPoint.getAffineX();
  ECField field=ecPublicKey.getParams().getCurve().getField();
  if (field instanceof ECFieldFp) {
    ECFieldFp fieldFp=(ECFieldFp)field;
    int expectedLength=(int)Math.ceil(Utils.logarithm(fieldFp.getP().doubleValue(),256));
    byte[] result=Utils.toUnsignedByteArray(publicPointX);
    if (result.length < expectedLength) {
      byte[] padding=new byte[expectedLength - result.length];
      result=Utils.concatByteArrays(padding,result);
    }
    return result;
  }
  return null;
}
Program: 142442
Project: 142442
Buggy source:
@Override public byte[] comp(PublicKey publicKey){
  ECPublicKey ecPublicKey;
  if (publicKey instanceof ECPublicKey) {
    ecPublicKey=(ECPublicKey)publicKey;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ECPoint publicPoint=ecPublicKey.getW();
  BigInteger publicPointX=publicPoint.getAffineX();
  ECField field=ecPublicKey.getParams().getCurve().getField();
  if (field instanceof ECFieldFp) {
    ECFieldFp fieldFp=(ECFieldFp)field;
    int expectedLength=(int)Math.ceil(Utils.logarithm(fieldFp.getP().doubleValue(),256));
    byte[] result=Utils.toUnsignedByteArray(publicPointX);
    if (result.length < expectedLength) {
      byte[] padding=new byte[expectedLength - result.length];
      result=Utils.concatByteArrays(result,padding);
    }
    return result;
  }
  return null;
}

Fixed version (ground truth):
@Override public byte[] comp(PublicKey publicKey){
  ECPublicKey ecPublicKey;
  if (publicKey instanceof ECPublicKey) {
    ecPublicKey=(ECPublicKey)publicKey;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ECPoint publicPoint=ecPublicKey.getW();
  BigInteger publicPointX=publicPoint.getAffineX();
  ECField field=ecPublicKey.getParams().getCurve().getField();
  if (field instanceof ECFieldFp) {
    ECFieldFp fieldFp=(ECFieldFp)field;
    int expectedLength=(int)Math.ceil(Utils.logarithm(fieldFp.getP().doubleValue(),256));
    byte[] result=Utils.toUnsignedByteArray(publicPointX);
    if (result.length < expectedLength) {
      byte[] padding=new byte[expectedLength - result.length];
      result=Utils.concatByteArrays(padding,result);
    }
    return result;
  }
  return null;
}
Program: 142443
Project: 142443
Buggy source:
public Artifact resolveArtifact(String coord) throws ArtifactResolutionException {
  DefaultArtifact artifact=new DefaultArtifact(coord);
  return resolveArtifact(artifact);
}

Fixed version (ground truth):
public Artifact resolveArtifact(String coord){
  DefaultArtifact artifact=new DefaultArtifact(coord);
  return resolveArtifact(artifact);
}
Program: 142444
Project: 142444
Buggy source:
public Set<Artifact> resolveArtifacts(Set<String> coords) throws ArtifactResolutionException {
  Set<Artifact> result=new LinkedHashSet<Artifact>();
  for (  String coord : coords) {
    result.add(resolveArtifact(coord));
  }
  return result;
}

Fixed version (ground truth):
public Set<Artifact> resolveArtifacts(Set<String> coords){
  Set<Artifact> result=new LinkedHashSet<Artifact>();
  for (  String coord : coords) {
    Artifact artifact=resolveArtifact(coord);
    if (artifact != null) {
      result.add(artifact);
    }
  }
  return result;
}
Program: 142445
Project: 142445
Buggy source:
public AetherUtil(RepositorySystem repoSystem,RepositorySystemSession repoSession,List<RemoteRepository> remoteRepos,File localRepository){
  this.repoSystem=repoSystem;
  this.repoSession=repoSession;
  this.remoteRepos=remoteRepos;
  this.localRepository=localRepository;
}

Fixed version (ground truth):
public AetherUtil(RepositorySystem repoSystem,RepositorySystemSession repoSession,List<RemoteRepository> remoteRepos,File localRepository,Log log){
  this.repoSystem=repoSystem;
  this.repoSession=repoSession;
  this.remoteRepos=remoteRepos;
  this.localRepository=localRepository;
  this.log=log;
}
Program: 142446
Project: 142446
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  aetherUtil=new AetherUtil(repoSystem,repoSession,remoteRepos,localRepo);
  try {
    Set<Artifact> featureArtifacts=new LinkedHashSet<Artifact>();
    featureArtifacts.addAll(aetherUtil.resolveDependencies(MvnToAetherMapper.toAether(project.getDependencies()),new KarafFeaturesDependencyFilter()));
    Set<Features> features=FeatureUtil.readFeatures(featureArtifacts);
    features.addAll(FeatureUtil.findAllFeaturesRecursively(aetherUtil,features,FeatureUtil.featuresRepositoryToCoords(features)));
    for (    Features feature : features) {
      getLog().info("String_Node_Str" + feature.getName());
    }
    Set<Artifact> artifacts=aetherUtil.resolveArtifacts(FeatureUtil.featuresToCoords(features));
    artifacts.addAll(featureArtifacts);
    for (    Artifact artifact : artifacts) {
      getLog().info("String_Node_Str" + artifact.toString());
    }
    if (localRepo != null) {
      aetherUtil.installArtifacts(artifacts);
    }
  }
 catch (  Exception e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  aetherUtil=new AetherUtil(repoSystem,repoSession,remoteRepos,localRepo,getLog());
  try {
    Set<Artifact> featureArtifacts=readFeatureCfg();
    featureArtifacts.addAll(aetherUtil.resolveDependencies(MvnToAetherMapper.toAether(project.getDependencies()),new KarafFeaturesDependencyFilter()));
    Set<Features> features=FeatureUtil.readFeatures(featureArtifacts);
    features.addAll(FeatureUtil.findAllFeaturesRecursively(aetherUtil,features,FeatureUtil.featuresRepositoryToCoords(features)));
    for (    Features feature : features) {
      getLog().info("String_Node_Str" + feature.getName());
    }
    Set<Artifact> artifacts=aetherUtil.resolveArtifacts(FeatureUtil.featuresToCoords(features));
    artifacts.addAll(featureArtifacts);
    for (    Artifact artifact : artifacts) {
      getLog().info("String_Node_Str" + artifact.toString());
    }
    if (localRepo != null) {
      aetherUtil.installArtifacts(artifacts);
    }
  }
 catch (  Exception e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}
Program: 142447
Project: 142447
Buggy source:
public Artifact resolveArtifact(String coord) throws ArtifactResolutionException {
  DefaultArtifact artifact=new DefaultArtifact(coord);
  return resolveArtifact(artifact);
}

Fixed version (ground truth):
public Artifact resolveArtifact(String coord){
  DefaultArtifact artifact=new DefaultArtifact(coord);
  return resolveArtifact(artifact);
}
Program: 142448
Project: 142448
Buggy source:
public Set<Artifact> resolveArtifacts(Set<String> coords) throws ArtifactResolutionException {
  Set<Artifact> result=new LinkedHashSet<Artifact>();
  for (  String coord : coords) {
    result.add(resolveArtifact(coord));
  }
  return result;
}

Fixed version (ground truth):
public Set<Artifact> resolveArtifacts(Set<String> coords){
  Set<Artifact> result=new LinkedHashSet<Artifact>();
  for (  String coord : coords) {
    Artifact artifact=resolveArtifact(coord);
    if (artifact != null) {
      result.add(artifact);
    }
  }
  return result;
}
Program: 142449
Project: 142449
Buggy source:
public AetherUtil(RepositorySystem repoSystem,RepositorySystemSession repoSession,List<RemoteRepository> remoteRepos,File localRepository){
  this.repoSystem=repoSystem;
  this.repoSession=repoSession;
  this.remoteRepos=remoteRepos;
  this.localRepository=localRepository;
}

Fixed version (ground truth):
public AetherUtil(RepositorySystem repoSystem,RepositorySystemSession repoSession,List<RemoteRepository> remoteRepos,File localRepository,Log log){
  this.repoSystem=repoSystem;
  this.repoSession=repoSession;
  this.remoteRepos=remoteRepos;
  this.localRepository=localRepository;
  this.log=log;
}
Program: 142450
Project: 142450
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  aetherUtil=new AetherUtil(repoSystem,repoSession,remoteRepos,localRepo);
  try {
    Set<Artifact> featureArtifacts=new LinkedHashSet<Artifact>();
    featureArtifacts.addAll(aetherUtil.resolveDependencies(MvnToAetherMapper.toAether(project.getDependencies()),new KarafFeaturesDependencyFilter()));
    Set<Features> features=FeatureUtil.readFeatures(featureArtifacts);
    features.addAll(FeatureUtil.findAllFeaturesRecursively(aetherUtil,features,FeatureUtil.featuresRepositoryToCoords(features)));
    for (    Features feature : features) {
      getLog().info("String_Node_Str" + feature.getName());
    }
    Set<Artifact> artifacts=aetherUtil.resolveArtifacts(FeatureUtil.featuresToCoords(features));
    artifacts.addAll(featureArtifacts);
    for (    Artifact artifact : artifacts) {
      getLog().info("String_Node_Str" + artifact.toString());
    }
    if (localRepo != null) {
      aetherUtil.installArtifacts(artifacts);
    }
  }
 catch (  Exception e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  aetherUtil=new AetherUtil(repoSystem,repoSession,remoteRepos,localRepo,getLog());
  try {
    Set<Artifact> featureArtifacts=readFeatureCfg();
    featureArtifacts.addAll(aetherUtil.resolveDependencies(MvnToAetherMapper.toAether(project.getDependencies()),new KarafFeaturesDependencyFilter()));
    Set<Features> features=FeatureUtil.readFeatures(featureArtifacts);
    features.addAll(FeatureUtil.findAllFeaturesRecursively(aetherUtil,features,FeatureUtil.featuresRepositoryToCoords(features)));
    for (    Features feature : features) {
      getLog().info("String_Node_Str" + feature.getName());
    }
    Set<Artifact> artifacts=aetherUtil.resolveArtifacts(FeatureUtil.featuresToCoords(features));
    artifacts.addAll(featureArtifacts);
    for (    Artifact artifact : artifacts) {
      getLog().info("String_Node_Str" + artifact.toString());
    }
    if (localRepo != null) {
      aetherUtil.installArtifacts(artifacts);
    }
  }
 catch (  Exception e) {
    throw new MojoExecutionException("String_Node_Str",e);
  }
}
Program: 142451
Project: 142451
Buggy source:
public static String getNodeName(FilePath path){
  Node node=workspaceToNode(path);
  String nodeName=nameOf(node);
  return nodeName.isEmpty() ? MASTER_NODE_NAME : nodeName;
}

Fixed version (ground truth):
/** 
 * Helper: find the node name used for the build
 * @param path Jenkins workspace on build node
 * @return Node name
 */
public static String getNodeName(FilePath path){
  Node node=workspaceToNode(path);
  String nodeName=nameOf(node);
  return nodeName.isEmpty() ? MASTER_NODE_NAME : nodeName;
}
Program: 142452
Project: 142452
Buggy source:
/** 
 * Helper: find the Remote/Local Computer used for build
 * @param workspace Jenkins workspace on build node
 */
private static Computer workspaceToComputer(FilePath workspace){
  if (workspace != null) {
    return workspace.toComputer();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Helper: find the Remote/Local Computer used for build
 * @param workspace Jenkins workspace on build node
 * @return Computer
 */
private static Computer workspaceToComputer(FilePath workspace){
  if (workspace != null) {
    return workspace.toComputer();
  }
  return null;
}