nus-yam/ex-repair huggingface dataset:
Program: 24585
Project: 24585
Buggy source:
/** 
 * As per specifications [ M | 1 | 0000...000 | L ] where M is the input 1 is a high bit 0000...000 the smallest number of zeroes such that the entire message is a multiple of 512 bits L is the number of bits in M
 * @param input
 * @return
 */
private String addPadding(String input){
  StringBuilder sb=new StringBuilder(input);
  char a=0x80;
  sb.append(a);
  long l=input.length() * 8;
  int i=(int)(l % 512);
  int p=((512 - 64 - 8- i) % 512) / 8;
  while (p > 0) {
    sb.append((char)0);
    p--;
  }
  sb.append((char)((l >> 56) & 0xff));
  sb.append((char)((l >> 48) & 0xff));
  sb.append((char)((l >> 40) & 0xff));
  sb.append((char)((l >> 32) & 0xff));
  sb.append((char)((l >> 24) & 0xff));
  sb.append((char)((l >> 16) & 0xff));
  sb.append((char)((l >> 8) & 0xff));
  sb.append((char)(l & 0xff));
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * As per specifications [ M | 1 | 0000...000 | L ] where M is the input 1 is a high bit 0000...000 the smallest number of zeroes such that the entire message is a multiple of 512 bits L is the number of bits in M
 * @param input
 * @return
 */
private String addPadding(String input){
  StringBuilder sb=new StringBuilder(input);
  char a=0x80;
  sb.append(a);
  long l=input.length() * 8;
  int i=(int)(l % 512);
  int p=((1024 - 64 - 8- i) % 512) / 8;
  while (p > 0) {
    sb.append((char)0);
    p--;
  }
  sb.append((char)((l >> 56) & 0xff));
  sb.append((char)((l >> 48) & 0xff));
  sb.append((char)((l >> 40) & 0xff));
  sb.append((char)((l >> 32) & 0xff));
  sb.append((char)((l >> 24) & 0xff));
  sb.append((char)((l >> 16) & 0xff));
  sb.append((char)((l >> 8) & 0xff));
  sb.append((char)(l & 0xff));
  return sb.toString();
}
Program: 24587
Project: 24587
Buggy source:
public HealthReport getBuildHealth(){
  Integer health=1;
  float worst=100f;
  String worstStr="String_Node_Str";
  boolean healthy=true;
  for (  MonKitTarget mkt : publisher.getTargets()) {
    for (    MonKitCategory mkc : monkit) {
      if (mkt.getCategory().equalsIgnoreCase(mkc.getName())) {
        for (        MonKitObservation mko : mkc) {
          Float f=new Float(mko.getValue());
          Float fu=new Float(mkt.getUnstable());
          System.out.println("String_Node_Str" + f + "String_Node_Str"+ fu);
          if ((mkt.isGreater() && f < fu) || (!mkt.isGreater() && f > fu)) {
            return new HealthReport(0,"String_Node_Str" + mkc.getName() + "String_Node_Str"+ mko.getName());
          }
          Float fh=new Float(mkt.getHealthy());
          System.out.println("String_Node_Str" + fh);
          if ((mkt.isGreater() && f < fh) || (!mkt.isGreater() && f > fh)) {
            float diff=fh - fu;
            float nf1=f - fu;
            float inter=(nf1 / diff) * 100;
            if (inter < worst) {
              worst=inter;
              worstStr=mkc.getName() + "String_Node_Str" + mko.getName();
            }
            healthy=false;
          }
        }
      }
    }
  }
  if (healthy) {
    return new HealthReport(100,"String_Node_Str");
  }
 else {
    return new HealthReport((int)worst,"String_Node_Str" + worstStr);
  }
}

Fixed version (ground truth):
public HealthReport getBuildHealth(){
  Integer health=1;
  float worst=100f;
  String worstStr="String_Node_Str";
  boolean healthy=true;
  for (  MonKitTarget mkt : publisher.getTargets()) {
    for (    MonKitCategory mkc : monkit) {
      if (mkt.getCategory().equalsIgnoreCase(mkc.getName())) {
        for (        MonKitObservation mko : mkc) {
          Float f=new Float(mko.getValue());
          Float fu=new Float(mkt.getUnstable());
          System.out.println("String_Node_Str" + f + "String_Node_Str"+ fu);
          if ((mkt.isGreater() && f < fu) || (!mkt.isGreater() && f > fu)) {
            return new HealthReport(0,"String_Node_Str" + mkc.getName() + "String_Node_Str"+ mko.getName());
          }
          Float fh=new Float(mkt.getHealthy());
          System.out.println("String_Node_Str" + fh);
          if ((mkt.isGreater() && f < fh) || (!mkt.isGreater() && f > fh)) {
            float diff=fh - fu;
            float nf1=f - fu;
            float inter=(nf1 / diff) * 100;
            System.out.println("String_Node_Str" + diff + "String_Node_Str"+ nf1+ "String_Node_Str"+ inter);
            System.out.println("String_Node_Str" + inter);
            if (inter < worst) {
              worst=inter;
              worstStr=mkc.getName() + "String_Node_Str" + mko.getName();
            }
            healthy=false;
          }
        }
      }
    }
  }
  if (healthy) {
    return new HealthReport(100,"String_Node_Str");
  }
 else {
    return new HealthReport((int)worst,"String_Node_Str" + worstStr);
  }
}
Program: 24589
Project: 24589
Buggy source:
public HealthReport getBuildHealth(){
  float worst=100f;
  String worstStr="String_Node_Str";
  boolean healthy=true;
  for (  MonKitTarget mkt : publisher.getTargets()) {
    for (    MonKitCategory mkc : monkit) {
      if (mkt.getCategory().equalsIgnoreCase(mkc.getName())) {
        for (        MonKitObservation mko : mkc) {
          Float f=new Float(mko.getValue());
          Float fu=new Float(mkt.getUnstable());
          if ((mkt.isGreater() && f < fu) || (!mkt.isGreater() && f > fu)) {
            return new HealthReport(0,"String_Node_Str" + mkc.getName() + "String_Node_Str"+ mko.getName());
          }
          Float fh=new Float(mkt.getHealthy());
          if ((mkt.isGreater() && f < fh) || (!mkt.isGreater() && f > fh)) {
            float diff=fh - fu;
            float nf1=f - fu;
            float inter=(nf1 / diff) * 100;
            if (inter < worst) {
              worst=inter;
              worstStr=mkc.getName() + "String_Node_Str" + mko.getName();
            }
            healthy=false;
          }
        }
      }
    }
  }
  if (healthy) {
    return new HealthReport(100,"String_Node_Str");
  }
 else {
    return new HealthReport((int)worst,"String_Node_Str" + worstStr);
  }
}

Fixed version (ground truth):
public HealthReport getBuildHealth(){
  Case worst=publisher.getWorst(monkit);
  if (worst.health == null) {
    return new HealthReport(0,"String_Node_Str" + worst.category + "String_Node_Str"+ worst.name);
  }
 else   if (worst.category == null) {
    return new HealthReport(100,"String_Node_Str");
  }
 else {
    return new HealthReport(worst.health.intValue(),"String_Node_Str" + worst.category + "String_Node_Str"+ worst.name);
  }
}
Program: 24590
Project: 24590
Buggy source:
public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  final FilePath[] moduleRoots=build.getModuleRoots();
  final boolean multipleModuleRoots=moduleRoots != null && moduleRoots.length > 1;
  final FilePath moduleRoot=multipleModuleRoots ? build.getWorkspace() : build.getModuleRoot();
  FilePath[] reports=new FilePath[0];
  try {
    reports=moduleRoot.list(monKitFile);
    if (build.getResult().isWorseOrEqualTo(Result.FAILURE) && reports.length == 0)     return true;
  }
 catch (  IOException e) {
    Util.displayIOException(e,listener);
    e.printStackTrace(listener.fatalError("String_Node_Str"));
    build.setResult(Result.FAILURE);
  }
  List<MonKit> mks=new ArrayList<MonKit>();
  for (int i=0; i < reports.length; i++) {
    try {
      MonKit mke=MonKit.fromString(reports[i].readToString());
      mks.add(mke);
    }
 catch (    MonKitException e) {
      e.printStackTrace(listener.fatalError("String_Node_Str" + reports[i].getName() + "String_Node_Str"));
    }
  }
  MonKit mk=MonKit.merge(mks);
  final MonKitBuildAction mka=new MonKitBuildAction(build,mk.getCategories());
  mka.setPublisher(this);
  build.getActions().add(mka);
  return true;
}

Fixed version (ground truth):
public boolean perform(AbstractBuild<?,?> build,Launcher launcher,BuildListener listener) throws InterruptedException, IOException {
  final FilePath[] moduleRoots=build.getModuleRoots();
  final boolean multipleModuleRoots=moduleRoots != null && moduleRoots.length > 1;
  final FilePath moduleRoot=multipleModuleRoots ? build.getWorkspace() : build.getModuleRoot();
  FilePath[] reports=new FilePath[0];
  try {
    reports=moduleRoot.list(monKitFile);
    if (build.getResult().isWorseOrEqualTo(Result.FAILURE) && reports.length == 0)     return true;
  }
 catch (  IOException e) {
    Util.displayIOException(e,listener);
    e.printStackTrace(listener.fatalError("String_Node_Str"));
    build.setResult(Result.FAILURE);
  }
  List<MonKit> mks=new ArrayList<MonKit>();
  for (int i=0; i < reports.length; i++) {
    try {
      MonKit mke=MonKit.fromString(reports[i].readToString());
      mks.add(mke);
    }
 catch (    MonKitException e) {
      e.printStackTrace(listener.fatalError("String_Node_Str" + reports[i].getName() + "String_Node_Str"));
    }
  }
  MonKit mk=MonKit.merge(mks);
  final MonKitBuildAction mka=new MonKitBuildAction(build,mk.getCategories());
  mka.setPublisher(this);
  build.getActions().add(mka);
  Case worst=getWorst(mk.getCategories());
  if (worst.health == null) {
    build.setResult(Result.UNSTABLE);
  }
  return true;
}
Program: 24591
Project: 24591
Buggy source:
public ReadLog(String filename,double burnIn){
  String[] lines=LoadStrings(filename);
  int commentedLines=0;
  for (int row=0; row < lines.length; row++) {
    if (lines[row].startsWith("String_Node_Str")) {
      commentedLines++;
    }
  }
  nrow=lines.length - commentedLines - 1;
  String[] colNames=lines[commentedLines].split("String_Node_Str");
  List<Integer> list=new ArrayList<Integer>();
  Pattern pattern=Pattern.compile("String_Node_Str");
  for (int row=0; row < colNames.length; row++) {
    Matcher matcher=pattern.matcher(colNames[row]);
    if (matcher.find()) {
      list.add(row);
    }
  }
  ncol=list.size();
  int delete=(int)(nrow * burnIn) + 1;
  System.out.println(nrow * burnIn);
  indicators=new double[nrow - delete][ncol];
  int i=0;
  for (int row=delete; row < nrow; row++) {
    String[] line=lines[row].split("String_Node_Str");
    indicators[i]=Utils.parseDouble(Utils.Subset(line,list.get(0),ncol));
    i++;
  }
  indicators=(double[][])indicators;
  nrow=indicators.length;
}

Fixed version (ground truth):
public ReadLog(String filename,double burnIn){
  String[] lines=LoadStrings(filename);
  int commentedLines=0;
  for (int row=0; row < lines.length; row++) {
    if (lines[row].startsWith("String_Node_Str")) {
      commentedLines++;
    }
  }
  nrow=lines.length - commentedLines - 1;
  String[] colNames=lines[commentedLines].split("String_Node_Str");
  List<Integer> list=new ArrayList<Integer>();
  Pattern pattern=Pattern.compile("String_Node_Str");
  for (int row=0; row < colNames.length; row++) {
    Matcher matcher=pattern.matcher(colNames[row]);
    if (matcher.find()) {
      list.add(row);
    }
  }
  ncol=list.size();
  int delete=(int)(nrow * burnIn) + 1;
  indicators=new double[nrow - delete][ncol];
  int i=0;
  for (int row=delete; row < nrow; row++) {
    String[] line=lines[row].split("String_Node_Str");
    indicators[i]=Utils.parseDouble(Utils.Subset(line,list.get(0),ncol));
    i++;
  }
  indicators=(double[][])indicators;
  nrow=indicators.length;
}
Program: 24593
Project: 24593
Buggy source:
public ReadLog(String filename,double burnIn){
  time=-System.currentTimeMillis();
  String[] lines=LoadStrings(filename);
  int commentedLines=0;
  for (int row=0; row < lines.length; row++) {
    if (lines[row].startsWith("String_Node_Str")) {
      commentedLines++;
    }
  }
  nrow=lines.length - commentedLines - 1;
  String[] colNames=lines[commentedLines].split("String_Node_Str");
  List<Integer> list=new ArrayList<Integer>();
  Pattern pattern=Pattern.compile("String_Node_Str");
  for (int row=0; row < colNames.length; row++) {
    Matcher matcher=pattern.matcher(colNames[row]);
    if (matcher.find()) {
      list.add(row);
    }
  }
  ncol=list.size();
  int delete=(int)(nrow * burnIn) + 1;
  indicators=new double[nrow - delete][ncol];
  int i=0;
  for (int row=delete; row < nrow; row++) {
    String[] line=lines[row].split("String_Node_Str");
    indicators[i]=Utils.parseDouble(Utils.Subset(line,list.get(0),ncol));
    i++;
  }
  indicators=(double[][])indicators;
  nrow=indicators.length;
  time+=System.currentTimeMillis();
}

Fixed version (ground truth):
public ReadLog(String filename,double burnIn){
  String[] lines=LoadStrings(filename);
  int commentedLines=0;
  for (int row=0; row < lines.length; row++) {
    if (lines[row].startsWith("String_Node_Str")) {
      commentedLines++;
    }
  }
  nrow=lines.length - commentedLines - 1;
  String[] colNames=lines[commentedLines].split("String_Node_Str");
  List<Integer> list=new ArrayList<Integer>();
  Pattern pattern=Pattern.compile("String_Node_Str");
  for (int row=0; row < colNames.length; row++) {
    Matcher matcher=pattern.matcher(colNames[row]);
    if (matcher.find()) {
      list.add(row);
    }
  }
  ncol=list.size();
  int delete=(int)(nrow * burnIn) + 1;
  System.out.println(nrow * burnIn);
  indicators=new double[nrow - delete][ncol];
  int i=0;
  for (int row=delete; row < nrow; row++) {
    String[] line=lines[row].split("String_Node_Str");
    indicators[i]=Utils.parseDouble(Utils.Subset(line,list.get(0),ncol));
    i++;
  }
  indicators=(double[][])indicators;
  nrow=indicators.length;
}
Program: 24594
Project: 24594
Buggy source:
@Override public byte[] getSubjectKeyIdentifier(X509Certificate cert){
  try {
    byte[] value=cert.getExtensionValue(X509Extensions.SubjectKeyIdentifier.getId());
    if (value == null) {
      return null;
    }
    return SubjectKeyIdentifier.getInstance(ASN1Object.fromByteArray(value)).getKeyIdentifier();
  }
 catch (  IOException ex) {
    throw new QiCryptoFailure("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
@Override public byte[] getSubjectKeyIdentifier(X509Certificate cert){
  try {
    byte[] value=cert.getExtensionValue(X509Extensions.SubjectKeyIdentifier.getId());
    if (value == null) {
      return null;
    }
    byte[] octets=((ASN1OctetString)ASN1Object.fromByteArray(value)).getOctets();
    return SubjectKeyIdentifier.getInstance(ASN1Object.fromByteArray(octets)).getKeyIdentifier();
  }
 catch (  IOException ex) {
    throw new QiCryptoFailure("String_Node_Str",ex);
  }
}
Program: 24595
Project: 24595
Buggy source:
@Before public void before(){
  CryptCodex cryptCodex=new CryptCodexImpl();
  CryptIO cryptIO=new CryptIOImpl();
  x509ExtReader=new X509ExtensionsReaderImpl(cryptCodex);
  baltimoreCyberTrustCodeSigningRoot=cryptIO.readX509PEM(new InputStreamReader(X509ExtensionsReaderTest.class.getResourceAsStream(RSRC_NAME_BALTIMORE_CRYBERTRUST_CODESIGNING_ROOT_PEM)));
  chamberOfCommerceRoot=cryptIO.readX509PEM(new InputStreamReader(X509ExtensionsReaderTest.class.getResourceAsStream(RSRC_NAME_CHAMBER_OF_COMMERCE_ROOT_PEM)));
}

Fixed version (ground truth):
@Before public void before(){
  cryptCodex=new CryptCodexImpl();
  cryptIO=new CryptIOImpl();
  x509ExtReader=new X509ExtensionsReaderImpl(cryptCodex);
  baltimoreCyberTrustCodeSigningRoot=cryptIO.readX509PEM(new InputStreamReader(X509ExtensionsReaderTest.class.getResourceAsStream(RSRC_NAME_BALTIMORE_CRYBERTRUST_CODESIGNING_ROOT_PEM)));
  chamberOfCommerceRoot=cryptIO.readX509PEM(new InputStreamReader(X509ExtensionsReaderTest.class.getResourceAsStream(RSRC_NAME_CHAMBER_OF_COMMERCE_ROOT_PEM)));
}
Program: 24597
Project: 24597
Buggy source:
public void build(EdiHandler handler) throws EdiException {
  String controlNumber=Integer.toString(ediBuilder.getGsSequenceNumber());
  if (padControlNumber) {
    controlNumber=Strings.padLeft(controlNumber,'0',9);
  }
  String fields[]={Integer.toString(ediBuilder.getGsSequenceCount()),controlNumber};
  handler.startSegment("String_Node_Str");
  for (  String field : fields) {
    handler.startElement(field);
    handler.endElement();
  }
}

Fixed version (ground truth):
public void build(EdiHandler handler) throws EdiException {
  String controlNumber=Integer.toString(ediBuilder.getGsSequenceNumber());
  if (padControlNumber) {
    controlNumber=Strings.padLeft(controlNumber,'0',9);
  }
  String fields[]={Integer.toString(ediBuilder.getGsSequenceCount()),controlNumber};
  handler.startSegment("String_Node_Str");
  for (  String field : fields) {
    handler.startElement(field);
    handler.endElement();
  }
  handler.endSegment();
}
Program: 24599
Project: 24599
Buggy source:
public void build(EdiHandler handler) throws EdiException {
  String controlNumber=Strings.padLeft(Integer.toString(ediBuilder.getIsaSequenceNumber()),'0',9);
  String fields[]={"String_Node_Str",controlNumber};
  handler.startSegment("String_Node_Str");
  for (  String field : fields) {
    handler.startElement(field);
    handler.endElement();
  }
}

Fixed version (ground truth):
public void build(EdiHandler handler) throws EdiException {
  String controlNumber=Strings.padLeft(Integer.toString(ediBuilder.getIsaSequenceNumber()),'0',9);
  String fields[]={"String_Node_Str",controlNumber};
  handler.startSegment("String_Node_Str");
  for (  String field : fields) {
    handler.startElement(field);
    handler.endElement();
  }
  handler.endSegment();
}
Program: 24601
Project: 24601
Buggy source:
public void testAllFieldsSet_controlNumberPadding() throws Exception {
  expect(ediBuilder.getGsSequenceNumber()).andReturn(123);
  expect(ediBuilder.getGsSequenceCount()).andReturn(1);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  replay();
  GeSegmentBuilder builder=new GeSegmentBuilder(ediBuilder);
  builder.setPadControlNumber(true);
  builder.build(handler);
}

Fixed version (ground truth):
public void testAllFieldsSet_controlNumberPadding() throws Exception {
  expect(ediBuilder.getGsSequenceNumber()).andReturn(123);
  expect(ediBuilder.getGsSequenceCount()).andReturn(1);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  handler.endSegment();
  replay();
  GeSegmentBuilder builder=new GeSegmentBuilder(ediBuilder);
  builder.setPadControlNumber(true);
  builder.build(handler);
}
Program: 24602
Project: 24602
Buggy source:
public void testAllFieldsSet_noControlNumberPadding() throws Exception {
  expect(ediBuilder.getGsSequenceNumber()).andReturn(123);
  expect(ediBuilder.getGsSequenceCount()).andReturn(1);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  replay();
  GeSegmentBuilder builder=new GeSegmentBuilder(ediBuilder);
  builder.setPadControlNumber(false);
  builder.build(handler);
}

Fixed version (ground truth):
public void testAllFieldsSet_noControlNumberPadding() throws Exception {
  expect(ediBuilder.getGsSequenceNumber()).andReturn(123);
  expect(ediBuilder.getGsSequenceCount()).andReturn(1);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  handler.endSegment();
  replay();
  GeSegmentBuilder builder=new GeSegmentBuilder(ediBuilder);
  builder.setPadControlNumber(false);
  builder.build(handler);
}
Program: 24603
Project: 24603
Buggy source:
public void testAllFieldsSet_controlNumberPadding() throws Exception {
  expect(ediBuilder.startGsSequence()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(8);
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  GsSegmentBuilder builder=new GsSegmentBuilder(ediBuilder).setPadControlNumber(true).setFunctionalId("String_Node_Str").setApplicationSenderCode("String_Node_Str").setApplicationReceiverCode("String_Node_Str").setCreated(calendar).setResponsibleAgencyCode("String_Node_Str").setVersionIndustryReleaseCode("String_Node_Str");
  builder.build(handler);
}

Fixed version (ground truth):
public void testAllFieldsSet_controlNumberPadding() throws Exception {
  expect(ediBuilder.startGsSequence()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(8);
  handler.endSegment();
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  GsSegmentBuilder builder=new GsSegmentBuilder(ediBuilder).setPadControlNumber(true).setFunctionalId("String_Node_Str").setApplicationSenderCode("String_Node_Str").setApplicationReceiverCode("String_Node_Str").setCreated(calendar).setResponsibleAgencyCode("String_Node_Str").setVersionIndustryReleaseCode("String_Node_Str");
  builder.build(handler);
}
Program: 24604
Project: 24604
Buggy source:
public void testAllFieldsSet_noControlNumberPadding() throws Exception {
  expect(ediBuilder.startGsSequence()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(8);
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  GsSegmentBuilder builder=new GsSegmentBuilder(ediBuilder).setPadControlNumber(false).setFunctionalId("String_Node_Str").setApplicationSenderCode("String_Node_Str").setApplicationReceiverCode("String_Node_Str").setCreated(calendar).setResponsibleAgencyCode("String_Node_Str").setVersionIndustryReleaseCode("String_Node_Str");
  builder.build(handler);
}

Fixed version (ground truth):
public void testAllFieldsSet_noControlNumberPadding() throws Exception {
  expect(ediBuilder.startGsSequence()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(8);
  handler.endSegment();
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  GsSegmentBuilder builder=new GsSegmentBuilder(ediBuilder).setPadControlNumber(false).setFunctionalId("String_Node_Str").setApplicationSenderCode("String_Node_Str").setApplicationReceiverCode("String_Node_Str").setCreated(calendar).setResponsibleAgencyCode("String_Node_Str").setVersionIndustryReleaseCode("String_Node_Str");
  builder.build(handler);
}
Program: 24605
Project: 24605
Buggy source:
public void testBuildsSegment() throws Exception {
  expect(ediBuilder.getIsaSequenceNumber()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  replay();
  IeaSegmentBuilder builder=new IeaSegmentBuilder(ediBuilder);
  builder.build(handler);
}

Fixed version (ground truth):
public void testBuildsSegment() throws Exception {
  expect(ediBuilder.getIsaSequenceNumber()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(2);
  handler.endSegment();
  replay();
  IeaSegmentBuilder builder=new IeaSegmentBuilder(ediBuilder);
  builder.build(handler);
}
Program: 24606
Project: 24606
Buggy source:
public void testCreatedAndStageSet_buildsEmptySegment() throws Exception {
  expect(ediBuilder.getIsaSequenceNumber()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  expectLastCall().times(8);
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(16);
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  IsaSegmentBuilder builder=new IsaSegmentBuilder(ediBuilder).setSubElementSeparator(':').setInterchangeVersionId("String_Node_Str").setStage(IsaSegmentBuilder.Stage.TEST).setCreated(calendar);
  builder.build(handler);
}

Fixed version (ground truth):
public void testCreatedAndStageSet_buildsEmptySegment() throws Exception {
  expect(ediBuilder.getIsaSequenceNumber()).andReturn(123);
  handler.startSegment(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  expectLastCall().times(8);
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.startElement(eq("String_Node_Str"));
  handler.endElement();
  expectLastCall().times(16);
  handler.endSegment();
  replay();
  Calendar calendar=Calendar.getInstance();
  calendar.set(Calendar.YEAR,2011);
  calendar.set(Calendar.MONTH,7);
  calendar.set(Calendar.DAY_OF_MONTH,26);
  calendar.set(Calendar.HOUR_OF_DAY,8);
  calendar.set(Calendar.MINUTE,36);
  IsaSegmentBuilder builder=new IsaSegmentBuilder(ediBuilder).setSubElementSeparator(':').setInterchangeVersionId("String_Node_Str").setStage(IsaSegmentBuilder.Stage.TEST).setCreated(calendar);
  builder.build(handler);
}
Program: 24607
Project: 24607
Buggy source:
@Test public void testVersion() throws Exception {
  String re="String_Node_Str";
  String version=instance.version();
  assertTrue("String_Node_Str",version.matches(re));
}

Fixed version (ground truth):
@Test public void testVersion() throws Exception {
  String re="String_Node_Str";
  String version=instance.version();
  assertTrue("String_Node_Str" + version,version.matches(re));
}
Program: 24608
Project: 24608
Buggy source:
/** 
 * Moves the game forward one step.
 * @return the resulting grid state
 */
public Grid iterate(){
  for (int i=0; i < threadList.length; i++) {
    threadList[i]=new LifeThread(i);
  }
  for (  LifeThread t : threadList) {
    t.start();
  }
  for (  LifeThread t : threadList) {
    try {
      t.join();
    }
 catch (    InterruptedException e) {
    }
  }
  for (int i=0; i < noise; i++) {
    int row=(int)(Math.random() * current.getRows());
    int col=(int)(Math.random() * current.getCols());
    boolean alive=next.isAlive(row,col);
    next.setAlive(row,col,!alive);
  }
  Grid temp=current;
  current=next;
  next=temp;
  iterationCount++;
  return current;
}

Fixed version (ground truth):
/** 
 * Moves the game forward one step.
 * @return the resulting grid state
 */
public Grid iterate(){
  for (int i=0; i < threadList.length; i++) {
    threadList[i]=new LifeThread(i);
  }
  for (  LifeThread t : threadList) {
    t.start();
  }
  for (  LifeThread t : threadList) {
    try {
      t.join();
    }
 catch (    InterruptedException e) {
    }
  }
  if (noise > 0) {
    int changed[][]=new int[noise][2];
    for (int i=0; i < noise; i++) {
      boolean repeat;
      int row, col;
      do {
        repeat=false;
        row=(int)(Math.random() * current.getRows());
        col=(int)(Math.random() * current.getCols());
        for (int j=0; j < i; j++) {
          if (changed[j][0] == row && changed[j][1] == col) {
            repeat=true;
            break;
          }
        }
      }
 while (repeat);
      boolean alive=next.isAlive(row,col);
      next.setAlive(row,col,!alive);
      changed[i][0]=row;
      changed[i][1]=col;
    }
  }
  Grid temp=current;
  current=next;
  next=temp;
  iterationCount++;
  return current;
}
Program: 24609
Project: 24609
Buggy source:
public JsonContentRevision(String fileName) throws Exception {
  Gson gson=new Gson();
  InputStream in=JsonContentRevision.class.getResourceAsStream(fileName);
  container=gson.fromJson(new InputStreamReader(in),Container.class);
}

Fixed version (ground truth):
public JsonContentRevision(String fileName) throws Exception {
  Gson gson=new Gson();
  InputStream in=JsonContentRevision.class.getResourceAsStream(fileName);
  container=gson.fromJson(new InputStreamReader(in,"String_Node_Str"),Container.class);
}
Program: 24610
Project: 24610
Buggy source:
/** 
 * This method retrieves the corporation's standing of this character with a certain station's owner.
 * @param apiKey The  {@link ApiKey} containing the character id.
 * @param stationId The station id.
 * @return The corporation's standing of this character with a certain station's owner.
 */
@Transactional BigDecimal getCorporationStanding(ApiKey apiKey,long stationId){
  Session session=getDatabase().getCurrentSession();
  Station station=(Station)session.get(Station.class,stationId);
  if (station != null) {
    long characterId=apiKey.getCharacterId();
    StandingIdentifier id=new StandingIdentifier(characterId,station.getCorporationId());
    Standing standing=(Standing)session.get(Standing.class,id);
    if (standing != null) {
      return standing.getStanding();
    }
  }
  return BigDecimal.ZERO;
}

Fixed version (ground truth):
/** 
 * This method retrieves the corporation's standing of this character with a certain station's owner.
 * @param apiKey The  {@link ApiKey} containing the character id.
 * @param stationId The station id.
 * @return The corporation's standing of this character with a certain station's owner.
 */
@Transactional double getCorporationStanding(ApiKey apiKey,long stationId){
  Session session=getDatabase().getCurrentSession();
  Station station=(Station)session.get(Station.class,stationId);
  if (station != null) {
    long characterId=apiKey.getCharacterId();
    StandingIdentifier id=new StandingIdentifier(characterId,station.getCorporationId());
    Standing standing=(Standing)session.get(Standing.class,id);
    if (standing != null) {
      return standing.getStanding().doubleValue();
    }
  }
  return 0.0;
}
Program: 24611
Project: 24611
Buggy source:
/** 
 * This method retrieves the faction standings for a certain region.
 * @param apiKey The  {@link ApiKey} containing the character id.
 * @param mapRegionId The id of the region.
 * @return The faction standing of this character with this region's empire.
 */
@Transactional BigDecimal getFactionStanding(ApiKey apiKey,long mapRegionId){
  Session session=getDatabase().getCurrentSession();
  MapRegion region=(MapRegion)session.get(MapRegion.class,mapRegionId);
  if (region != null) {
    long characterId=apiKey.getCharacterId();
    StandingIdentifier id=new StandingIdentifier(characterId,region.getFactionId());
    Standing standing=(Standing)session.get(Standing.class,id);
    return standing.getStanding();
  }
  return BigDecimal.ZERO;
}

Fixed version (ground truth):
/** 
 * This method retrieves the faction standings for a certain region.
 * @param apiKey The  {@link ApiKey} containing the character id.
 * @param mapRegionId The id of the region.
 * @return The faction standing of this character with this region's empire.
 */
@Transactional double getFactionStanding(ApiKey apiKey,long mapRegionId){
  Session session=getDatabase().getCurrentSession();
  MapRegion region=(MapRegion)session.get(MapRegion.class,mapRegionId);
  if (region != null) {
    long characterId=apiKey.getCharacterId();
    StandingIdentifier id=new StandingIdentifier(characterId,region.getFactionId());
    Standing standing=(Standing)session.get(Standing.class,id);
    return standing.getStanding().doubleValue();
  }
  return 0.0;
}
Program: 24613
Project: 24613
Buggy source:
@Inject public InventoryManager(ImportManager importManager,Provider<InventoryWorker> workerProvider,Database database){
  this.workerProvider=workerProvider;
  this.database=database;
  this.executor=new ThreadPoolExecutor(5,10,5,TimeUnit.MINUTES,new ArrayBlockingQueue<Runnable>(256,true));
  executor.setRejectedExecutionHandler(new RejectedExecutionHandler(){
    @Override public void rejectedExecution(    Runnable r,    ThreadPoolExecutor executor){
      LOG.warn("String_Node_Str");
    }
  }
);
  importManager.addListener(Api.CHAR_WALLET_TRANSACTIONS,new ImportListener(){
    @Override public void onImportComplete(){
      processUnprocessedTransactions();
    }
  }
);
}

Fixed version (ground truth):
@Inject public InventoryManager(ImportManager importManager,Provider<InventoryWorker> workerProvider,ProfitPanel profitPanel,Database database){
  this.profitPanel=profitPanel;
  this.workerProvider=workerProvider;
  this.database=database;
  this.executor=new ThreadPoolExecutor(5,10,5,TimeUnit.MINUTES,new ArrayBlockingQueue<Runnable>(256,true));
  executor.setRejectedExecutionHandler(new RejectedExecutionHandler(){
    @Override public void rejectedExecution(    Runnable r,    ThreadPoolExecutor executor){
      LOG.warn("String_Node_Str");
    }
  }
);
  importManager.addListener(Api.CHAR_WALLET_TRANSACTIONS,new ImportListener(){
    @Override public void onImportComplete(){
      processUnprocessedTransactions();
    }
  }
);
}
Program: 24614
Project: 24614
Buggy source:
public void processUnprocessedTransactions(){
  List<Number> typeIds=queryUnprocessedTypeIds();
  LOG.info("String_Node_Str" + typeIds.size() + "String_Node_Str");
  for (  Number typeId : typeIds) {
    InventoryWorker worker=workerProvider.get();
    worker.initialize(typeId.longValue());
    executor.submit(worker);
  }
}

Fixed version (ground truth):
public void processUnprocessedTransactions(){
  Collection<Future<?>> futures=new LinkedList<Future<?>>();
  List<Number> typeIds=queryUnprocessedTypeIds();
  LOG.info("String_Node_Str" + typeIds.size() + "String_Node_Str");
  for (  Number typeId : typeIds) {
    InventoryWorker worker=workerProvider.get();
    worker.initialize(typeId.longValue());
    Future<?> future=executor.submit(worker);
    futures.add(future);
  }
  for (  Future<?> future : futures) {
    try {
      future.get();
    }
 catch (    Exception e) {
    }
  }
  if (!typeIds.isEmpty()) {
    profitPanel.reloadTab();
  }
}
Program: 24615
Project: 24615
Buggy source:
public synchronized void initialize(){
  columnModel.initialize();
  table.initialize(journalData,columnModel);
  journalData.initialize();
  JScrollPane scrollPane=new JScrollPane(table);
  scrollPane.getVerticalScrollBar().setUnitIncrement(16);
  JPanel toolBar=createTopMenu();
  GroupLayout layout=new GroupLayout(this);
  setLayout(layout);
  layout.setHorizontalGroup(layout.createSequentialGroup().addGap(7).addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(scrollPane).addComponent(toolBar)).addGap(7));
  layout.setVerticalGroup(layout.createSequentialGroup().addGap(5).addComponent(toolBar).addGap(7).addComponent(scrollPane).addGap(7));
}

Fixed version (ground truth):
public synchronized void initialize(){
  columnModel.initialize();
  journalData.initialize();
  table.initialize(journalData,columnModel);
  JScrollPane scrollPane=new JScrollPane(table);
  scrollPane.getVerticalScrollBar().setUnitIncrement(16);
  JPanel toolBar=createTopMenu();
  GroupLayout layout=new GroupLayout(this);
  setLayout(layout);
  layout.setHorizontalGroup(layout.createSequentialGroup().addGap(7).addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(scrollPane).addComponent(toolBar)).addGap(7));
  layout.setVerticalGroup(layout.createSequentialGroup().addGap(5).addComponent(toolBar).addGap(7).addComponent(scrollPane).addGap(7));
}
Program: 24616
Project: 24616
Buggy source:
public synchronized void initialize(ITableDataModel tableDataModel,ColumnModel columns){
  if (isInitialized) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.tableDataModel=tableDataModel;
  this.columnModel=columns;
  setRowHeight(21);
  getTableHeader().setReorderingAllowed(false);
  setFillsViewportHeight(true);
  setSelectionBackground(new Color(51,153,255));
  setGridColor(new Color(223,223,223));
  reload();
  setModel(createTableModel());
  updateColumns();
  setAutoCreateRowSorter(true);
  getColumnModel().addColumnModelListener(new TableColumnResizeModelListener(columnModel));
  this.isInitialized=true;
}

Fixed version (ground truth):
public synchronized void initialize(ITableDataModel tableDataModel,ColumnModel columns){
  if (isInitialized) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.tableDataModel=tableDataModel;
  this.columnModel=columns;
  this.isInitialized=true;
  setRowHeight(21);
  getTableHeader().setReorderingAllowed(false);
  setFillsViewportHeight(true);
  setSelectionBackground(new Color(51,153,255));
  setGridColor(new Color(223,223,223));
  reload();
  setModel(createTableModel());
  updateColumns();
  setAutoCreateRowSorter(true);
  getColumnModel().addColumnModelListener(new TableColumnResizeModelListener(columnModel));
}
Program: 24617
Project: 24617
Buggy source:
public void initialize(){
  settingsManager.loadInt(SettingsManager.FILTER_JOURNAL_PERIOD,IPeriodFilter.WEEK);
}

Fixed version (ground truth):
public void initialize(){
  setPeriod(settingsManager.loadInt(SettingsManager.FILTER_JOURNAL_PERIOD,IPeriodFilter.WEEK));
}
Program: 24618
Project: 24618
Buggy source:
public void initialize(final ProgressManager progressManager,String[] args) throws Exception {
synchronized (this) {
    Preconditions.checkArgument(!initialized,"String_Node_Str");
    LOG.info("String_Node_Str");
    progressManager.update(9,1,"String_Node_Str");
    settingsManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,2,"String_Node_Str");
    database.getCurrentSession();
    LOG.info("String_Node_Str");
    progressManager.update(9,3,"String_Node_Str");
    proxyManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,4,"String_Node_Str");
    revisionExecutor.execute(new StructureUpgrader());
    revisionExecutor.execute(new ContentUpgrader());
    progressManager.update(9,4,"String_Node_Str");
    translator.initialize(Locale.ENGLISH);
    new Thread(){
      public void run(){
        try {
          Thread.sleep(30000);
        }
 catch (        InterruptedException e) {
          e.printStackTrace();
        }
        LOG.info("String_Node_Str");
        progressManager.update(9,5,"String_Node_Str");
        inventoryManager.processUnprocessedTransactions();
      }
    }
.start();
    LOG.info("String_Node_Str");
    progressManager.update(9,6,"String_Node_Str");
    importManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,7,"String_Node_Str");
    Runtime.getRuntime().addShutdownHook(new ShutdownThread(settingsManager));
    LOG.info("String_Node_Str");
    progressManager.update(9,8,"String_Node_Str");
    initialized=true;
  }
}

Fixed version (ground truth):
public void initialize(final ProgressManager progressManager,String[] args) throws Exception {
synchronized (this) {
    Preconditions.checkArgument(!initialized,"String_Node_Str");
    LOG.info("String_Node_Str");
    progressManager.update(9,1,"String_Node_Str");
    settingsManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,2,"String_Node_Str");
    database.getCurrentSession();
    LOG.info("String_Node_Str");
    progressManager.update(9,3,"String_Node_Str");
    proxyManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,4,"String_Node_Str");
    revisionExecutor.execute(new StructureUpgrader());
    revisionExecutor.execute(new ContentUpgrader());
    progressManager.update(9,4,"String_Node_Str");
    translator.initialize(Locale.ENGLISH);
    LOG.info("String_Node_Str");
    progressManager.update(9,5,"String_Node_Str");
    inventoryManager.processUnprocessedTransactions();
    LOG.info("String_Node_Str");
    progressManager.update(9,6,"String_Node_Str");
    importManager.initialize();
    LOG.info("String_Node_Str");
    progressManager.update(9,7,"String_Node_Str");
    Runtime.getRuntime().addShutdownHook(new ShutdownThread(settingsManager));
    LOG.info("String_Node_Str");
    progressManager.update(9,8,"String_Node_Str");
    initialized=true;
  }
}
Program: 24619
Project: 24619
Buggy source:
/** 
 * Calculates the distance between two instances.
 * @param first 	the first instance
 * @param second 	the second instance
 * @return 		the distance between the two given instances
 */
@Override public double distance(Instance first,Instance second){
  double sum_nominal=0.0;
  double sum_continuous=0.0;
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).isNominal()) {
      if (first.attribute(i).equals(second.attribute(i)))       sum_nominal+=1.0;
    }
 else     if (first.attribute(i).isNumeric()) {
      sum_continuous+=distance(first,second,Double.POSITIVE_INFINITY);
    }
  }
  return sum_continuous + m_Gamma * sum_nominal;
}

Fixed version (ground truth):
/** 
 * Calculates the distance between two instances.
 * @param first 	the first instance
 * @param second 	the second instance
 * @return 		the distance between the two given instances
 */
@Override public double distance(Instance first,Instance second){
  double sum_nominal=0.0;
  double sum_continuous=0.0;
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).isNominal()) {
      if (!first.attribute(i).equals(second.attribute(i)))       sum_nominal+=1.0;
    }
 else     if (first.attribute(i).isNumeric()) {
      sum_continuous+=distance(first,second,Double.POSITIVE_INFINITY);
    }
  }
  return sum_continuous + m_Gamma * sum_nominal;
}
Program: 24620
Project: 24620
Buggy source:
/** 
 * Calculates the distance between two instances.
 * @param first 	the first instance
 * @param second 	the second instance
 * @return 		the distance between the two given instances
 */
@Override public double distance(Instance first,Instance second){
  double sum_nominal=0.0;
  double sum_continuous=0.0;
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).isNominal()) {
      if (!first.attribute(i).equals(second.attribute(i)))       sum_nominal+=1.0;
    }
 else     if (first.attribute(i).isNumeric()) {
      sum_continuous+=distance(first,second,Double.POSITIVE_INFINITY) * distance(first,second,Double.POSITIVE_INFINITY);
    }
  }
  return sum_continuous + m_Gamma * sum_nominal;
}

Fixed version (ground truth):
/** 
 * Calculates the distance between two instances.
 * @param first 	the first instance
 * @param second 	the second instance
 * @return 		the distance between the two given instances
 */
@Override public double distance(Instance first,Instance second){
  double sum_nominal=0.0;
  double sum_continuous=0.0;
  for (int i=0; i < first.numAttributes(); i++) {
    if (first.attribute(i).isNominal()) {
      if (!first.attribute(i).equals(second.attribute(i)))       sum_nominal+=1.0;
    }
 else     if (first.attribute(i).isNumeric()) {
      sum_continuous+=distance(first,second,Double.POSITIVE_INFINITY) * distance(first,second,Double.POSITIVE_INFINITY);
    }
  }
  return Math.sqrt(sum_continuous) + m_Gamma * sum_nominal;
}
Program: 24622
Project: 24622
Buggy source:
private void runUpdate(long timeToday,Context context){
  if (DEBUG_PRINT)   Log.d(TAG,"String_Node_Str" + timeToday);
  if (timeToday > 0) {
    removeTimeNotification();
  }
 else {
    String post="String_Node_Str";
    updateNotificationTime(post,context);
  }
}

Fixed version (ground truth):
private void runUpdate(long timeToday,Context context){
  if (DEBUG_PRINT)   Log.d(TAG,"String_Node_Str" + timeToday);
  if (timeToday >= 0) {
    removeTimeNotification();
  }
 else {
    String post="String_Node_Str";
    updateNotificationTime(post,context);
  }
}
Program: 24623
Project: 24623
Buggy source:
@Override public void onTabUnselected(ActionBar.Tab tab){
  Log.d(TAG,"String_Node_Str" + tab);
}

Fixed version (ground truth):
@Override public void onTabUnselected(ActionBar.Tab tab){
  if (enableLog)   Log.d(TAG,"String_Node_Str" + tab);
}
Program: 24624
Project: 24624
Buggy source:
@Override public void onTabReselected(ActionBar.Tab tab){
  Log.d(TAG,"String_Node_Str" + tab);
}

Fixed version (ground truth):
@Override public void onTabReselected(ActionBar.Tab tab){
  if (enableLog)   Log.d(TAG,"String_Node_Str" + tab);
}
Program: 24625
Project: 24625
Buggy source:
@Override public void onTabSelected(ActionBar.Tab tab){
  invalidateOptionsMenu();
  if (tab.getPosition() == 0) {
    setContentView(new DatePairView(this,localPunchTable.getPunchesByDay(new DateTime())));
  }
 else   if (tab.getPosition() == 1) {
    setContentView(new PayPeriodSummaryView(this,getPunchesByDate()));
  }
  Log.d(TAG,"String_Node_Str" + tab);
  Log.d(TAG,"String_Node_Str" + tab.getPosition());
}

Fixed version (ground truth):
@Override public void onTabSelected(ActionBar.Tab tab){
  invalidateOptionsMenu();
  if (tab.getPosition() == 0) {
    setContentView(new DatePairView(this,localPunchTable.getPunchesByDay(new DateTime())));
  }
 else   if (tab.getPosition() == 1) {
    setContentView(new PayPeriodSummaryView(this,getPunchesByDate()));
  }
  if (enableLog)   Log.d(TAG,"String_Node_Str" + tab);
  if (enableLog)   Log.d(TAG,"String_Node_Str" + tab.getPosition());
}