nus-yam/ex-repair huggingface dataset:
Program: 50551
Project: 50551
Buggy source:
public void addOrInsert(Object o){
  int i=0;
  boolean found=false;
  while (i < list.size() && !found) {
    if (DEBUG)     System.out.println(o.getClass().getName().toString());
    if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Yeast y=(Yeast)list.get(i);
      Yeast y2=(Yeast)o;
      found=y.getName().equalsIgnoreCase(y2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Fermentable f=(Fermentable)list.get(i);
      Fermentable f2=(Fermentable)o;
      found=f.getName().equalsIgnoreCase(f2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Hop h=(Hop)list.get(i);
      Hop h2=(Hop)o;
      found=h.getName().equalsIgnoreCase(h2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Style s=(Style)list.get(i);
      Style s2=(Style)o;
      found=s.getName().equalsIgnoreCase(s2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      String q=(String)list.get(i);
      String q2=(String)o;
      found=q.equalsIgnoreCase(q2);
    }
    i++;
  }
  if (!found) {
    list.add(o);
    selected=o;
  }
 else   selected=list.get(i - 1);
}

Fixed version (ground truth):
public void addOrInsert(Object o){
  int i=0;
  boolean found=false;
  while (i < list.size() && !found) {
    if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Yeast y=(Yeast)list.get(i);
      Yeast y2=(Yeast)o;
      found=y.getName().equalsIgnoreCase(y2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Fermentable f=(Fermentable)list.get(i);
      Fermentable f2=(Fermentable)o;
      found=f.getName().equalsIgnoreCase(f2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Hop h=(Hop)list.get(i);
      Hop h2=(Hop)o;
      found=h.getName().equalsIgnoreCase(h2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      Style s=(Style)list.get(i);
      Style s2=(Style)o;
      found=s.getName().equalsIgnoreCase(s2.getName());
    }
 else     if (o.getClass().getName().toString().equals("String_Node_Str")) {
      String q=(String)list.get(i);
      String q2=(String)o;
      found=q.equalsIgnoreCase(q2);
    }
    i++;
  }
  if (!found) {
    list.add(o);
    selected=o;
  }
 else {
    selected=list.get(i - 1);
  }
}
Program: 50552
Project: 50552
Buggy source:
public void displayWater(){
  String recipeUnitsAbrv=new Quantity().getVolAbrv(myRecipe.getVolUnits());
  String mashUnitsAbrv=new Quantity().getVolAbrv(myRecipe.mash.getMashVolUnits());
  totalWaterLbl.setText(myRecipe.getTotalWater());
  totalUnitsLbl.setText(recipeUnitsAbrv);
  usedMashLbl.setText(myRecipe.mash.getTotalWaterStr());
  usedInMashUnitsLbl.setText(mashUnitsAbrv);
  absorbedLbl.setText(myRecipe.mash.getAbsorbedStr());
  absorbedUnitsLbl.setText(mashUnitsAbrv);
  spargeWithLbl.setText(myRecipe.getSparge());
  spargeUnitsLbl.setText(mashUnitsAbrv);
  collectTxt.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits())));
  collectUnitsLbl.setText(recipeUnitsAbrv);
  postBoilTxt.setValue(new Double(myRecipe.getPostBoilVol(myRecipe.getVolUnits())));
  postBoilUnitsLbl.setText(recipeUnitsAbrv);
  chillShrinkLbl.setText(myRecipe.getChillShrink());
  kettleTxt.setValue(new Double(myRecipe.getKettleLoss()));
  kettleUnitsLbl.setText(recipeUnitsAbrv);
  trubLossTxt.setValue(new Double(myRecipe.getTrubLoss()));
  trubLossUnitsLbl.setText(recipeUnitsAbrv);
  miscLossTxt.setValue(new Double(myRecipe.getMiscLoss()));
  miscLosUnitsLbl.setText(recipeUnitsAbrv);
  finalVolTxt.setValue(new Double(myRecipe.getFinalWortVol()));
  finalUnitsLbl.setText(recipeUnitsAbrv);
}

Fixed version (ground truth):
public void displayWater(){
  String recipeUnitsAbrv=Quantity.getVolAbrv(myRecipe.getVolUnits());
  String mashUnitsAbrv=Quantity.getVolAbrv(myRecipe.mash.getMashVolUnits());
  totalWaterLbl.setText(myRecipe.getTotalWater());
  totalUnitsLbl.setText(recipeUnitsAbrv);
  usedMashLbl.setText(myRecipe.mash.getTotalWaterStr());
  usedInMashUnitsLbl.setText(mashUnitsAbrv);
  absorbedLbl.setText(myRecipe.mash.getAbsorbedStr());
  absorbedUnitsLbl.setText(mashUnitsAbrv);
  spargeWithLbl.setText(myRecipe.getSparge());
  spargeUnitsLbl.setText(mashUnitsAbrv);
  collectTxt.setValue(new Double(myRecipe.getPreBoilVol(myRecipe.getVolUnits())));
  collectUnitsLbl.setText(recipeUnitsAbrv);
  postBoilTxt.setValue(new Double(myRecipe.getPostBoilVol(myRecipe.getVolUnits())));
  postBoilUnitsLbl.setText(recipeUnitsAbrv);
  chillShrinkLbl.setText(myRecipe.getChillShrink());
  kettleTxt.setValue(new Double(myRecipe.getKettleLoss()));
  kettleUnitsLbl.setText(recipeUnitsAbrv);
  trubLossTxt.setValue(new Double(myRecipe.getTrubLoss()));
  trubLossUnitsLbl.setText(recipeUnitsAbrv);
  miscLossTxt.setValue(new Double(myRecipe.getMiscLoss()));
  miscLosUnitsLbl.setText(recipeUnitsAbrv);
  finalVolTxt.setValue(new Double(myRecipe.getFinalWortVol()));
  finalUnitsLbl.setText(recipeUnitsAbrv);
}
Program: 50554
Project: 50554
Buggy source:
private void calcAlcohol(String method){
  double oPlato=sGToPlato(estOg);
  double fPlato=sGToPlato(estFg);
  double q=0.22 + 0.001 * oPlato;
  double re=(q * oPlato + fPlato) / (1.0 + q);
  alcohol=(oPlato - re) / (2.0665 - 0.010665 * oPlato);
  if (method == "String_Node_Str")   alcohol=alcohol * estFg / 0.794;
}

Fixed version (ground truth):
private void calcAlcohol(String method){
  double oPlato=sGToPlato(estOg);
  double fPlato=sGToPlato(estFg);
  double q=0.22 + 0.001 * oPlato;
  double re=(q * oPlato + fPlato) / (1.0 + q);
  alcohol=(oPlato - re) / (2.0665 - 0.010665 * oPlato);
  if (method.equalsIgnoreCase("String_Node_Str"))   alcohol=alcohol * estFg / 0.794;
}
Program: 50557
Project: 50557
Buggy source:
public MashTableModel(MashManager m){
  mashManager=m;
}

Fixed version (ground truth):
public MashTableModel(){
  mashManager=null;
}
Program: 50560
Project: 50560
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("String_Node_Str")) {
    TableColumnModel tcm=hopsTable.getColumnModel();
    TableColumnModel tcmt=tblHopsTotals.getColumnModel();
    int columnCount=tcm.getColumnCount();
    for (int i=0; i < columnCount; i++) {
      tcmt.getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
    }
  }
}

Fixed version (ground truth):
public void propertyChange(PropertyChangeEvent evt){
  if (evt.getPropertyName().equals("String_Node_Str")) {
    TableColumnModel tcm=hopsTable.getColumnModel();
    TableColumnModel tcmt=tblHopsTotals.getColumnModel();
    int colCount=tcm.getColumnCount();
    for (int i=0; i < colCount; i++) {
      tcmt.getColumn(i).setPreferredWidth(tcm.getColumn(i).getPreferredWidth());
    }
  }
}
Program: 50563
Project: 50563
Buggy source:
public void windowClosed(WindowEvent evt){
  System.exit(1);
}

Fixed version (ground truth):
public void windowClosed(WindowEvent e){
}
Program: 50565
Project: 50565
Buggy source:
/** 
 * Start of an element handler when we know this is a StrangeBrew recipe
 * @param eName
 */
void sbStartElement(String eName){
  if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str") && currentList.equals("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    if (currentList.equals("String_Node_Str")) {
      m=new Fermentable();
    }
 else     if (currentList.equals("String_Node_Str")) {
      h=new Hop();
    }
 else     if (currentList.equals("String_Node_Str")) {
      misc=new Misc();
    }
 else     if (currentList.equals("String_Node_Str")) {
      note=new Note();
    }
  }
}

Fixed version (ground truth):
/** 
 * Start of an element handler when we know this is a StrangeBrew recipe
 * @param eName
 */
void sbStartElement(String eName){
  if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str") && currentList.equals("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str") && !currentList.equals("String_Node_Str")) {
    currentList="String_Node_Str";
  }
 else   if (eName.equalsIgnoreCase("String_Node_Str")) {
    if (currentList.equals("String_Node_Str")) {
      m=new Fermentable();
    }
 else     if (currentList.equals("String_Node_Str")) {
      h=new Hop();
    }
 else     if (currentList.equals("String_Node_Str")) {
      misc=new Misc();
    }
 else     if (currentList.equals("String_Node_Str")) {
      note=new Note();
    }
  }
}
Program: 50570
Project: 50570
Buggy source:
public void setOutputDirectory(File outputDirectory){
  if (!outputDirectory.isDirectory()) {
    throw new IllegalArgumentException("String_Node_Str" + outputDirectory);
  }
  this.outputDirectory=outputDirectory;
}

Fixed version (ground truth):
public void setOutputDirectory(File outputDirectory){
  this.outputDirectory=outputDirectory;
}
Program: 50571
Project: 50571
Buggy source:
public void processResult(Request request,List<ResultFile> resultFiles){
  File resultsDir=new File(outputDirectory,String.valueOf(request.getId()));
  if (!resultsDir.mkdir()) {
    throw new RuntimeException("String_Node_Str" + resultsDir.getAbsolutePath());
  }
  try {
    for (    ResultFile resultFile : resultFiles) {
      writeFile(resultsDir,resultFile);
    }
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public void processResult(Request request,List<ResultFile> resultFiles){
  File resultsDir=new File(outputDirectory,String.valueOf(request.getId()));
  if (!resultsDir.mkdirs()) {
    throw new RuntimeException("String_Node_Str" + resultsDir.getAbsolutePath());
  }
  try {
    for (    ResultFile resultFile : resultFiles) {
      writeFile(resultsDir,resultFile);
    }
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 50572
Project: 50572
Buggy source:
public synchronized void measurementFinished(Request request,RequestProcessor processor,List<ResultFile> results){
  if (results != null) {
    resultsMap.put(processor,results);
  }
  finishedProcessors++;
  if (finishedProcessors == processors.size() && !resultsMap.isEmpty()) {
    recordResults(this);
  }
 else {
    terminateRequest(request);
  }
}

Fixed version (ground truth):
public synchronized void measurementFinished(Request request,RequestProcessor processor,List<ResultFile> results){
  if (results != null) {
    resultsMap.put(processor,results);
  }
  finishedProcessors++;
  if (finishedProcessors == processors.size()) {
    if (!resultsMap.isEmpty())     recordResults(this);
 else     terminateRequest(request);
  }
}
Program: 50573
Project: 50573
Buggy source:
@Test public void testRequestTimeout(){
  RequestManager requestManager=initRequestManager(15000);
  TestProcessingThread testThread=new TestProcessingThread(5000);
  Request testRequest=new Request();
  testRequest.setThreadId(testThread.getId());
  testThread.start();
  requestManager.requestStarting(testRequest);
  try {
    Thread.sleep(15000);
  }
 catch (  InterruptedException ex) {
  }
  requestManager.shutdown();
  RequestManager.Status status=requestManager.awaitTermination(30000);
  testThread.stopRunning();
  assertEquals(RequestManager.Status.STOPPED,status);
  File resultsFile=new File("String_Node_Str" + testRequest.getId() + "String_Node_Str");
  assertTrue(resultsFile.exists());
}

Fixed version (ground truth):
@Test public void testRequestTimeout(){
  RequestManager requestManager=initRequestManager(15000);
  TestProcessingThread testThread=new TestProcessingThread(5000);
  Request testRequest=new TestRequest();
  testRequest.setThreadId(testThread.getId());
  testThread.start();
  requestManager.requestStarting(testRequest);
  try {
    Thread.sleep(15000);
  }
 catch (  InterruptedException ex) {
  }
  requestManager.shutdown();
  RequestManager.Status status=requestManager.awaitTermination(30000);
  testThread.stopRunning();
  assertEquals(RequestManager.Status.STOPPED,status);
  File resultsFile=new File("String_Node_Str" + testRequest.getId() + "String_Node_Str");
  assertTrue(resultsFile.exists());
}
Program: 50574
Project: 50574
Buggy source:
@BeforeClass public static void initOutputDirectory(){
  File testOutputDir=new File("String_Node_Str");
  if (testOutputDir.exists())   deleteDir(testOutputDir);
  testOutputDir.mkdir();
}

Fixed version (ground truth):
@BeforeClass public static void initOutputDirectory(){
  File testOutputDir=new File("String_Node_Str");
  if (testOutputDir.exists())   deleteDir(testOutputDir);
}
Program: 50575
Project: 50575
Buggy source:
public RequestManager initRequestManager(long requestTimeout){
  RequestManager requestManager=new RequestManager().withRequestProcessor(new ThreadSamplingRequestProcessor().withRequestLengthSamplingThreshold(5000)).withResultsProcessor(new FileResultsArchiver().withOutputDirectory(new File("String_Node_Str"))).withRequestTimeout(requestTimeout);
  requestManager.start();
  return requestManager;
}

Fixed version (ground truth):
public RequestManager initRequestManager(long requestTimeout){
  RequestManager requestManager=new RequestManager().withRequestProcessor(new ThreadSamplingRequestProcessor().withRequestLengthSamplingThreshold(5000)).withRequestProcessor(new RequestRecorderRequestProcessor()).withResultsProcessor(new FileResultsArchiver().withOutputDirectory(new File("String_Node_Str"))).withRequestTimeout(requestTimeout);
  requestManager.start();
  return requestManager;
}
Program: 50576
Project: 50576
Buggy source:
static void putPrimitiveInCollection(Object lastObject,Value value,Field field){
  try {
    getOrCreateColl(checkNotNull(lastObject),checkNotNull(field)).add(value.get());
  }
 catch (  RuntimeException re) {
    throw re;
  }
catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
static void putPrimitiveInCollection(Object lastObject,Value value,Field field){
  try {
    getOrCreateColl(checkNotNull(lastObject),checkNotNull(field)).add(getValueObject(value,field));
  }
 catch (  RuntimeException re) {
    throw re;
  }
catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 50577
Project: 50577
Buggy source:
static void putPrimitiveValue(Object lastObject,Value value,Field field){
  checkNotNull(field);
  try {
    field.set(checkNotNull(lastObject),value.coerce(field.getType(),null));
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
static void putPrimitiveValue(Object lastObject,Value value,Field field){
  checkNotNull(field);
  try {
    field.set(checkNotNull(lastObject),getValueObject(value,field));
  }
 catch (  Exception ex) {
    throw new RuntimeException(ex);
  }
}
Program: 50578
Project: 50578
Buggy source:
private void build(String fieldName,Class<?> clazz){
  final ClassContext ctx=new ClassContext();
  types.put(fieldName,clazz);
  contexts.put(clazz,ctx);
  for (  Field field : clazz.getDeclaredFields()) {
    if (field.isAnnotationPresent(XmlValue.class)) {
      checkBasicClass(field.getType(),field.getName());
      ctx.setXmlValueField(field);
    }
 else     if (field.isAnnotationPresent(XmlAttribute.class)) {
      if (!isEnumType(field.getType()))       checkBasicClass(field.getType(),field.getName());
      ctx.addAttribute(field);
    }
 else     if (field.isAnnotationPresent(XmlElement.class)) {
      Class<?> fieldClass=isCollection(field) ? getParametricClass(field) : field.getType();
      if (isXmlType(fieldClass)) {
        build(getElementName(field),fieldClass);
      }
 else       if (isEnumType(fieldClass)) {
        checkArgument(!isCollection(field),"String_Node_Str" + fieldName);
      }
 else {
        checkBasicClass(fieldClass,field.getName());
      }
      if (isCollection(field)) {
        ctx.addCollection(field);
      }
 else {
        ctx.addElement(field);
      }
    }
  }
}

Fixed version (ground truth):
private void build(String fieldName,Class<?> clazz){
  final ClassContext ctx=new ClassContext();
  types.put(fieldName,clazz);
  contexts.put(clazz,ctx);
  for (  Field field : clazz.getDeclaredFields()) {
    if (field.isAnnotationPresent(XmlValue.class)) {
      checkBasicClass(field.getType(),field.getName());
      ctx.setXmlValueField(field);
    }
 else     if (field.isAnnotationPresent(XmlAttribute.class)) {
      if (!isEnumType(field.getType()))       checkBasicClass(field.getType(),field.getName());
      ctx.addAttribute(field);
    }
 else     if (field.isAnnotationPresent(XmlElement.class)) {
      Class<?> fieldClass=getFieldClass(field);
      if (isXmlType(fieldClass)) {
        build(getElementName(field),fieldClass);
      }
 else {
        if (!isEnumType(fieldClass))         checkBasicClass(fieldClass,field.getName());
      }
      if (isCollection(field)) {
        ctx.addCollection(field);
      }
 else {
        ctx.addElement(field);
      }
    }
  }
}
Program: 50579
Project: 50579
Buggy source:
@Override public void process(Book object){
  ref.set(object);
}

Fixed version (ground truth):
@Override public void process(Book object){
  ref2.set(object);
}
Program: 50580
Project: 50580
Buggy source:
@Override public void elementStart(String elementName){
}

Fixed version (ground truth):
@Override public void elementStart(String elementName){
  assertEquals("String_Node_Str",elementName);
}
Program: 50581
Project: 50581
Buggy source:
@Test public void testParseBook(){
  XPathStaxParser parser=new XPathStaxParser();
  final AtomicReference<Book> ref=new AtomicReference<Book>();
  parser.addHandler(new NodeConverter<Book>("String_Node_Str"){
    @Override public void process(    Book object){
      ref.set(object);
    }
  }
);
  parser.parse(asStream("String_Node_Str"));
  Book book=ref.get();
  assertBookDetails(book,"String_Node_Str","String_Node_Str","String_Node_Str",44.95,Genre.Computer);
  assertTrue(newHashSet("String_Node_Str","String_Node_Str","String_Node_Str").containsAll(book.getTypes()));
  assertDescDetails(book.getDescription(),"String_Node_Str");
  assertRevisions(book.getRevisions());
}

Fixed version (ground truth):
@Test public void testParseBook(){
  XPathStaxParser parser=new XPathStaxParser();
  final AtomicReference<Book> ref=new AtomicReference<Book>();
  parser.addHandler(new NodeConverter<Book>("String_Node_Str"){
    @Override public void process(    Book object){
      ref.set(object);
    }
  }
);
  parser.parse(asStream("String_Node_Str"));
  Book book=ref.get();
  assertBookDetails(book,"String_Node_Str","String_Node_Str","String_Node_Str",44.95,Genre.Computer);
  assertTrue(newHashSet(Type.Softback,Type.Hardcover,Type.Bounded).containsAll(book.getTypes()));
  assertTrue(newArrayList("String_Node_Str","String_Node_Str").containsAll(book.getComments()));
  assertDescDetails(book.getDescription(),"String_Node_Str");
  assertRevisions(book.getRevisions());
}
Program: 50582
Project: 50582
Buggy source:
@Test @Ignore public void testParse(){
  XPathStaxParser parser=new XPathStaxParser();
  final AtomicDouble resultCount=new AtomicDouble();
  parser.addHandler(new XPathRequest("String_Node_Str"),new NodeHandler(){
    @Override public void processNode(    XmlNode xmlNode){
      Value count=xmlNode.getText();
      resultCount.set(count.asDouble(0d));
    }
    @Override public void elementStart(    String elementName){
    }
  }
);
  parser.parse(asStream("String_Node_Str"));
  assertEquals(44.95,resultCount.get(),0.001);
}

Fixed version (ground truth):
@Test public void testParse(){
  XPathStaxParser parser=new XPathStaxParser();
  parser.addHandler(new XPathRequest("String_Node_Str"),new NodeHandler(){
    @Override public void processNode(    XmlNode xmlNode){
      Value count=xmlNode.getText();
      assertEquals(44.95,count.asDouble(),0.001);
    }
    @Override public void elementStart(    String elementName){
      assertEquals("String_Node_Str",elementName);
    }
  }
);
  parser.parse(asStream("String_Node_Str"));
}
Program: 50583
Project: 50583
Buggy source:
@Override public void processNode(XmlNode xmlNode){
  Value count=xmlNode.getText();
  resultCount.set(count.asDouble(0d));
}

Fixed version (ground truth):
@Override public void processNode(XmlNode xmlNode){
  Value count=xmlNode.getText();
  assertEquals(44.95,count.asDouble(),0.001);
}
Program: 50584
Project: 50584
Buggy source:
public void setTypes(Set<String> types){
  this.types=types;
}

Fixed version (ground truth):
public void setTypes(Set<Type> types){
  this.types=types;
}
Program: 50585
Project: 50585
Buggy source:
public Set<String> getTypes(){
  return types;
}

Fixed version (ground truth):
public Set<Type> getTypes(){
  return types;
}
Program: 50586
Project: 50586
Buggy source:
@Test public void testBinder(){
  XmlBinderContext<Book> ctx=new XmlBinderContext<Book>(Book.class);
  assertNotNull(ctx);
  Map<String,Class<?>> types=ctx.getTypes();
  checkNames(types,"String_Node_Str","String_Node_Str","String_Node_Str");
  Map<Class<?>,ClassContext> contexts=ctx.getContexts();
  checkClasses(contexts,Book.class,Revision.class,Desc.class);
  ClassContext bookCtx=contexts.get(Book.class);
  checkAttributes(bookCtx,"String_Node_Str");
  checkElements(bookCtx,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  checkCollections(bookCtx,"String_Node_Str","String_Node_Str");
  ClassContext revCtx=contexts.get(Revision.class);
  checkAttributes(revCtx,"String_Node_Str","String_Node_Str");
  checkXmlValue(revCtx);
  ClassContext descCtx=contexts.get(Desc.class);
  checkXmlValue(descCtx);
}

Fixed version (ground truth):
@Test public void testBinder(){
  XmlBinderContext<Book> ctx=new XmlBinderContext<Book>(Book.class);
  assertNotNull(ctx);
  Map<String,Class<?>> types=ctx.getTypes();
  checkNames(types,"String_Node_Str","String_Node_Str","String_Node_Str");
  Map<Class<?>,ClassContext> contexts=ctx.getContexts();
  checkClasses(contexts,Book.class,Revision.class,Desc.class);
  ClassContext bookCtx=contexts.get(Book.class);
  checkAttributes(bookCtx,"String_Node_Str");
  checkElements(bookCtx,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  checkCollections(bookCtx,"String_Node_Str","String_Node_Str","String_Node_Str");
  ClassContext revCtx=contexts.get(Revision.class);
  checkAttributes(revCtx,"String_Node_Str","String_Node_Str");
  checkXmlValue(revCtx);
  ClassContext descCtx=contexts.get(Desc.class);
  checkXmlValue(descCtx);
}
Program: 50587
Project: 50587
Buggy source:
/** 
 * Learn the final weight
 */
public double[] executeMethod(){
}

Fixed version (ground truth):
/** 
 * Learn the final weight
 */
public double[] executeMethod(){
  int length=FeatureFactory.getFeatures().length;
  double[] returnweight=new double[length];
  for (int i=0; i < methodEpoch; i++) {
    double[] weight=new double[length];
    double[] totalWeight=new double[length];
    int violation=0;
    Parameter para=new Parameter(weight,totalWeight,violation);
    for (int j=0; j < numberOfFunctions; j++) {
      ResultOutput.writeTextFile(logFile,"String_Node_Str" + i + "String_Node_Str"+ j+ "String_Node_Str");
      ResultOutput.printParameter(para,logFile);
      para=trainModel(para,i,j);
      ResultOutput.writeTextFile(logFile,"String_Node_Str" + i + "String_Node_Str"+ j+ "String_Node_Str");
      testModel(generateWeightForTesting(para),i,j);
    }
    if (i == methodEpoch - 1) {
      returnweight=generateWeightForTesting(para);
    }
  }
  return returnweight;
}
Program: 50588
Project: 50588
Buggy source:
private Parameter trainModel(Parameter para,int i,int j){
}

Fixed version (ground truth):
/** 
 * train the model
 * @param para
 * @param j
 * @param i
 * @param phaseID
 * @return
 */
private Parameter trainModel(Parameter para,int i,int j){
  ISearch search=EecbConstructor.createSearchMethod(searchMethod);
  Parameter returnPara=para.makeCopy();
  String phaseID="String_Node_Str" + i + "String_Node_Str"+ j;
  for (  String topic : trainingTopics) {
    ResultOutput.writeTextFile(logFile,"String_Node_Str" + i + "String_Node_Str"+ j+ "String_Node_Str"+ topic+ "String_Node_Str");
    Document document=ResultOutput.deserialize(topic,serializeOutput,false);
    ResultOutput.printParameter(returnPara,logFile);
    if (j == 0) {
      returnPara=search.trainingBySearch(document,returnPara,phaseID);
    }
 else {
      search.testingBySearch(document,generateWeightForTesting(returnPara),phaseID,true);
      IClassifier classifier=EecbConstructor.createClassifier(classificationMethod);
      List<String> filePaths=getPaths(i,j);
      returnPara=classifier.train(filePaths,returnPara);
    }
  }
  return returnPara.makeCopy();
}
Program: 50589
Project: 50589
Buggy source:
private List<String> getPaths(String[] topics,int i,int j){
}

Fixed version (ground truth):
private List<String> getPaths(String[] topics,int i,int j){
  List<String> files=new ArrayList<String>();
  for (  String topic : topics) {
    String topicPath=experimentResultFolder + "String_Node_Str" + topic+ "String_Node_Str";
    List<String> file=new ArrayList<String>(Arrays.asList(new File(topicPath).list()));
    Map<String,String> fileMap=new HashMap<String,String>();
    for (    String f : file) {
      fileMap.put(f,"String_Node_Str");
    }
    for (int it=0; it <= i; it++) {
      for (int jt=0; jt <= j; jt++) {
        fileMap.remove("String_Node_Str" + it + "String_Node_Str"+ jt);
        fileMap.remove("String_Node_Str" + it + "String_Node_Str"+ jt);
      }
    }
    List<String> editeFile=new ArrayList<String>();
    for (    String key : fileMap.keySet()) {
      editeFile.add(topicPath + "String_Node_Str" + key);
    }
    files.addAll(editeFile);
  }
  return files;
}
Program: 50590
Project: 50590
Buggy source:
private void testDocument(String[] topics,double[] weight,int i,int j,boolean postProcess,String phase){
}

Fixed version (ground truth):
private void testDocument(String[] topics,double[] weight,int i,int j,boolean postProcess,String phase){
  String predictedCorefCluster=conllResultPath + "String_Node_Str" + i+ "String_Node_Str"+ j;
  String goldCorefCluster=conllResultPath + "String_Node_Str" + i+ "String_Node_Str"+ j;
  PrintWriter writerPredicted=null;
  PrintWriter writerGold=null;
  try {
    writerPredicted=new PrintWriter(new FileOutputStream(predictedCorefCluster));
    writerGold=new PrintWriter(new FileOutputStream(goldCorefCluster));
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  String phaseID="String_Node_Str" + i + "String_Node_Str"+ j;
  for (  String topic : topics) {
    ResultOutput.writeTextFile(logFile,"String_Node_Str" + phaseID + "String_Node_Str"+ topic+ "String_Node_Str");
    Document document=ResultOutput.deserialize(topic,serializeOutput,false);
    ISearch search=EecbConstructor.createSearchMethod(searchMethod);
    State<CorefCluster> bestLossState=search.testingBySearch(document,weight,phaseID,false);
    document.corefClusters=bestLossState.getState();
    DocumentAlignment.updateOrderedPredictedMentions(document);
    try {
      DeterministicCorefSieve pronounSieve=(DeterministicCorefSieve)Class.forName("String_Node_Str").getConstructor().newInstance();
      CorefSystem cs=new CorefSystem();
      cs.getCorefSystem().coreference(document,pronounSieve);
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
    if (postProcess) {
      SieveCoreferenceSystem.postProcessing(document);
    }
    SieveCoreferenceSystem.printConllOutput(document,writerPredicted,false,postProcess);
    SieveCoreferenceSystem.printConllOutput(document,writerGold,true);
  }
  CoNLLScorerHelper conllScorerHelper=new CoNLLScorerHelper(i * 10 + j,logFile);
  conllScorerHelper.printFinalCoNLLScore(goldCorefCluster,predictedCorefCluster,phase);
  double predictedCoNLL=conllScorerHelper.getFinalCoNllF1Result();
  double predictedScore=conllScorerHelper.getLossScoreF1Result();
}
Program: 50591
Project: 50591
Buggy source:
public static void setMap(int mapID){
  setScene(mapID);
  if (mapID == 0) {
    mapName="String_Node_Str";
    mapOffset=20;
  }
  if (mapID == 1) {
    mapName="String_Node_Str";
    mapOffset=20;
  }
  if (mapID == 2) {
    mapName="String_Node_Str";
    mapOffset=100;
  }
}

Fixed version (ground truth):
public static void setMap(int _mapID){
  mapID=_mapID;
  setScene(_mapID);
  if (_mapID == 0) {
    mapName="String_Node_Str";
    mapOffset=20;
  }
  if (_mapID == 1) {
    mapName="String_Node_Str";
    mapOffset=20;
  }
  if (_mapID == 2) {
    mapName="String_Node_Str";
    mapOffset=100;
  }
}
Program: 50593
Project: 50593
Buggy source:
public void destroyGameObject(String name){
  if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape(name)) != null) {
    if (name.contains("String_Node_Str")) {
      remainingEnemies--;
      Debug.d("String_Node_Str" + remainingEnemies);
    }
    mScene.detachChild(findShape(name));
    mPhysicsWorld.destroyBody(mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape(name)));
    mPhysicsWorld.unregisterPhysicsConnector(mPhysicsWorld.getPhysicsConnectorManager().findPhysicsConnectorByShape(findShape(name)));
  }
}

Fixed version (ground truth):
public void destroyGameObject(String name){
  if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape(name)) != null) {
    if (name.contains("String_Node_Str")) {
      reduceRemainingEnemies();
      Debug.d("String_Node_Str" + remainingEnemies);
    }
    mScene.detachChild(findShape(name));
    mPhysicsWorld.destroyBody(mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape(name)));
    mPhysicsWorld.unregisterPhysicsConnector(mPhysicsWorld.getPhysicsConnectorManager().findPhysicsConnectorByShape(findShape(name)));
  }
}
Program: 50594
Project: 50594
Buggy source:
public void endGame(){
  mPhysicsWorld.destroyBody(player_self_body);
  mPhysicsWorld.unregisterPhysicsConnector(mPhysicsWorld.getPhysicsConnectorManager().findPhysicsConnectorByShape(player_self_sprite));
  mScene.detachChild(player_self_sprite);
  Intent StartIntent=new Intent(BotWars.this,StartMenu.class);
  startActivity(StartIntent);
  finish();
}

Fixed version (ground truth):
public void endGame(int action){
  mCountDownTimer.cancel();
  if (action == 0) {
    Intent StartIntent=new Intent(BotWars.this,StartMenu.class);
    finish();
    startActivity(StartIntent);
  }
  if (action == 1) {
    Intent StartIntent=new Intent(BotWars.this,GameOver.class);
    finish();
    startActivity(StartIntent);
  }
  if (action == 2) {
    Intent StartIntent=new Intent(BotWars.this,LevelComplete.class);
    finish();
    startActivity(StartIntent);
  }
}
Program: 50595
Project: 50595
Buggy source:
@Override public boolean onKeyDown(int keyCode,KeyEvent event){
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
    Intent openStartMenu=new Intent(BotWars.this,StartMenu.class);
    startActivity(openStartMenu);
    finish();
    return true;
  }
  return super.onKeyDown(keyCode,event);
}

Fixed version (ground truth):
@Override public boolean onKeyDown(int keyCode,KeyEvent event){
  if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
    endGame(0);
    return true;
  }
  return super.onKeyDown(keyCode,event);
}
Program: 50596
Project: 50596
Buggy source:
public void createGameUpdateHandler(){
  gameUpdater=new IUpdateHandler(){
    public void onUpdate(    float pSecondsElapsed){
      makeBulletsDefyGravity();
      updateScore();
      doAICalculations(player_self_body);
      mRemainingEnemiesChangeableText.setText(remainingEnemies + "String_Node_Str");
      if (desEnemy) {
        if (fix1_name.contains("String_Node_Str"))         destroyGameObject(fix1_name);
        if (fix2_name.contains("String_Node_Str"))         destroyGameObject(fix2_name);
        desEnemy=false;
      }
      if (desBull) {
        if (fix1_name.contains("String_Node_Str"))         destroyGameObject(fix1_name);
        if (fix2_name.contains("String_Node_Str"))         destroyGameObject(fix2_name);
        desBull=false;
      }
      if (machineGun && test % 4 == 0) {
        test=1;
        spawnBullet(player_self_sprite,playerDir,"String_Node_Str");
      }
 else       if (machineGun && test % 4 != 0)       test++;
      updateHealthBar();
      if (Player_Max_Health <= 0) {
        endGame();
      }
      if (!mScrollDetector.isEnabled()) {
      }
    }
    @Override public void reset(){
    }
  }
;
}

Fixed version (ground truth):
public void createGameUpdateHandler(){
  gameUpdater=new IUpdateHandler(){
    public void onUpdate(    float pSecondsElapsed){
      makeBulletsDefyGravity();
      updateScore();
      doAICalculations(player_self_body);
      mRemainingEnemiesChangeableText.setText(remainingEnemies + "String_Node_Str");
      if (remainingEnemies == 0) {
        endGame(2);
      }
      if (desEnemy) {
        if (fix1_name.contains("String_Node_Str"))         destroyGameObject(fix1_name);
        if (fix2_name.contains("String_Node_Str"))         destroyGameObject(fix2_name);
        desEnemy=false;
      }
      if (desBull) {
        if (fix1_name.contains("String_Node_Str"))         destroyGameObject(fix1_name);
        if (fix2_name.contains("String_Node_Str"))         destroyGameObject(fix2_name);
        desBull=false;
      }
      if (machineGun && test % 4 == 0) {
        test=1;
        spawnBullet(player_self_sprite,playerDir,"String_Node_Str");
      }
 else       if (machineGun && test % 4 != 0)       test++;
      updateHealthBar();
      if (Player_Max_Health <= 0) {
        endGame(1);
      }
      if (!mScrollDetector.isEnabled()) {
      }
    }
    @Override public void reset(){
    }
  }
;
}
Program: 50597
Project: 50597
Buggy source:
private void updateScore(){
  if (enemyShot) {
    mScore+=10;
    mScoreChangeableText.setText("String_Node_Str" + mScore);
    enemyShot=false;
  }
}

Fixed version (ground truth):
public void updateScore(){
  if (enemyShot) {
    mScore+=10;
    mScoreChangeableText.setText("String_Node_Str" + mScore);
    enemyShot=false;
  }
}
Program: 50599
Project: 50599
Buggy source:
public void onUpdate(float pSecondsElapsed){
  makeBulletsDefyGravity();
  updateScore();
  doAICalculations(player_self_body);
  mRemainingEnemiesChangeableText.setText(remainingEnemies + "String_Node_Str");
  if (desEnemy) {
    if (fix1_name.contains("String_Node_Str"))     destroyGameObject(fix1_name);
    if (fix2_name.contains("String_Node_Str"))     destroyGameObject(fix2_name);
    desEnemy=false;
  }
  if (desBull) {
    if (fix1_name.contains("String_Node_Str"))     destroyGameObject(fix1_name);
    if (fix2_name.contains("String_Node_Str"))     destroyGameObject(fix2_name);
    desBull=false;
  }
  if (machineGun && test % 4 == 0) {
    test=1;
    spawnBullet(player_self_sprite,playerDir,"String_Node_Str");
  }
 else   if (machineGun && test % 4 != 0)   test++;
  updateHealthBar();
  if (Player_Max_Health <= 0) {
    endGame();
  }
  if (!mScrollDetector.isEnabled()) {
  }
}

Fixed version (ground truth):
public void onUpdate(float pSecondsElapsed){
  makeBulletsDefyGravity();
  updateScore();
  doAICalculations(player_self_body);
  mRemainingEnemiesChangeableText.setText(remainingEnemies + "String_Node_Str");
  if (remainingEnemies == 0) {
    endGame(2);
  }
  if (desEnemy) {
    if (fix1_name.contains("String_Node_Str"))     destroyGameObject(fix1_name);
    if (fix2_name.contains("String_Node_Str"))     destroyGameObject(fix2_name);
    desEnemy=false;
  }
  if (desBull) {
    if (fix1_name.contains("String_Node_Str"))     destroyGameObject(fix1_name);
    if (fix2_name.contains("String_Node_Str"))     destroyGameObject(fix2_name);
    desBull=false;
  }
  if (machineGun && test % 4 == 0) {
    test=1;
    spawnBullet(player_self_sprite,playerDir,"String_Node_Str");
  }
 else   if (machineGun && test % 4 != 0)   test++;
  updateHealthBar();
  if (Player_Max_Health <= 0) {
    endGame(1);
  }
  if (!mScrollDetector.isEnabled()) {
  }
}
Program: 50600
Project: 50600
Buggy source:
@Override public void onTimePassed(TimerHandler pTimerHandler){
  if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")) != null) {
    sendMessage("String_Node_Str" + mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().x + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().y);
  }
  for (int i=0; i < enemyLandedArr.length; i++) {
    if (enemyLandedArr[i] && mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)) != null) {
      sendMessage("String_Node_Str" + i + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().x+ "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().y);
    }
  }
}

Fixed version (ground truth):
@Override public void onTimePassed(TimerHandler pTimerHandler){
  if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")) != null) {
    sendMessage("String_Node_Str" + mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().x + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().y);
  }
  for (int i=0; i < enemyLandedArr.length; i++) {
    if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)) != null) {
      sendMessage("String_Node_Str" + i + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().x+ "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().y);
    }
  }
}
Program: 50601
Project: 50601
Buggy source:
public void endGame(int action){
}

Fixed version (ground truth):
@Override public void endGame(int action){
  sendMessage("String_Node_Str");
  isRunning=false;
  super.endGame(action);
}
Program: 50602
Project: 50602
Buggy source:
@Override public boolean onKeyDown(int keyCode,KeyEvent event){
  if ((keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_HOME) && event.getRepeatCount() == 0) {
    isRunning=false;
    Intent openStartMenu=new Intent(BotWars_MultiPlayer.this,StartMenu.class);
    startActivity(openStartMenu);
    finish();
    return true;
  }
  return super.onKeyDown(keyCode,event);
}

Fixed version (ground truth):
@Override public boolean onKeyDown(int keyCode,KeyEvent event){
  if ((keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_HOME) && event.getRepeatCount() == 0) {
    isRunning=false;
    super.onKeyDown(keyCode,event);
    return true;
  }
  return super.onKeyDown(keyCode,event);
}
Program: 50603
Project: 50603
Buggy source:
@Override protected void onDestroy(){
  isRunning=false;
  super.onDestroy();
}

Fixed version (ground truth):
@Override protected void onDestroy(){
  super.onDestroy();
}
Program: 50604
Project: 50604
Buggy source:
@Override public Scene onLoadScene(){
  super.onLoadScene();
  spawnPlayer("String_Node_Str",super.mPlayer_MPTextureRegion);
  createLocationErrorCorrectionHandler();
  createMPHandler();
  player_mp_sprite=(AnimatedSprite)findShape("String_Node_Str");
  player_mp_body=super.mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(player_mp_sprite);
  startReceiverThread();
  return super.mScene;
}

Fixed version (ground truth):
@Override public Scene onLoadScene(){
  super.onLoadScene();
  spawnPlayer("String_Node_Str",super.mPlayer_MPTextureRegion);
  createLocationErrorCorrectionHandler();
  createMPHandler();
  player_mp_sprite=(AnimatedSprite)findShape("String_Node_Str");
  player_mp_body=super.mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(player_mp_sprite);
  startReceiverThread();
  mTeamScoreChangeableText=new ChangeableText(5,35,mScoreFont,"String_Node_Str","String_Node_Str".length());
  mTeamScoreChangeableText.setBlendFunction(GL10.GL_SRC_ALPHA,GL10.GL_ONE_MINUS_SRC_ALPHA);
  mTeamScoreChangeableText.setAlpha(0.9f);
  mHUD.attachChild(mTeamScoreChangeableText);
  return super.mScene;
}
Program: 50605
Project: 50605
Buggy source:
private void createLocationErrorCorrectionHandler(){
  this.getEngine().registerUpdateHandler(new TimerHandler(5,true,new ITimerCallback(){
    @Override public void onTimePassed(    TimerHandler pTimerHandler){
      if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")) != null) {
        sendMessage("String_Node_Str" + mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().x + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().y);
      }
      for (int i=0; i < enemyLandedArr.length; i++) {
        if (enemyLandedArr[i] && mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)) != null) {
          sendMessage("String_Node_Str" + i + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().x+ "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().y);
        }
      }
    }
  }
));
}

Fixed version (ground truth):
private void createLocationErrorCorrectionHandler(){
  this.getEngine().registerUpdateHandler(new TimerHandler(5,true,new ITimerCallback(){
    @Override public void onTimePassed(    TimerHandler pTimerHandler){
      if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")) != null) {
        sendMessage("String_Node_Str" + mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().x + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str")).getPosition().y);
      }
      for (int i=0; i < enemyLandedArr.length; i++) {
        if (mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)) != null) {
          sendMessage("String_Node_Str" + i + "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().x+ "String_Node_Str"+ mPhysicsWorld.getPhysicsConnectorManager().findBodyByShape(findShape("String_Node_Str" + i)).getPosition().y);
        }
      }
    }
  }
));
}
Program: 50606
Project: 50606
Buggy source:
private void createMPHandler(){
  this.getEngine().registerUpdateHandler(new IUpdateHandler(){
    @Override public void onUpdate(    float pSecondsElapsed){
      if (spawnBullet_MP) {
        spawnBullet(player_mp_sprite,playerDir_MP,"String_Node_Str");
        spawnBullet_MP=false;
      }
      if (desPlayerMP) {
        destroyGameObject("String_Node_Str");
        TextPopupScene mTextPopupScene=new TextPopupScene(BotWars_MultiPlayer.this.getEngine().getCamera(),BotWars_MultiPlayer.this.getEngine().getScene(),mScoreFont,"String_Node_Str",5.0f);
        desPlayerMP=false;
      }
      doAICalculations(player_mp_body);
      if (remEnemy) {
        destroyGameObject("String_Node_Str" + remEnemyName);
      }
    }
    @Override public void reset(){
    }
  }
);
}

Fixed version (ground truth):
private void createMPHandler(){
  this.getEngine().registerUpdateHandler(new IUpdateHandler(){
    @Override public void onUpdate(    float pSecondsElapsed){
      if (spawnBullet_MP) {
        spawnBullet(player_mp_sprite,playerDir_MP,"String_Node_Str");
        spawnBullet_MP=false;
      }
      if (desPlayerMP) {
        destroyGameObject("String_Node_Str");
        TextPopupScene mTextPopupScene=new TextPopupScene(BotWars_MultiPlayer.this.getEngine().getCamera(),mScene.getChildScene(),mScoreFont,"String_Node_Str",5.0f);
        desPlayerMP=false;
      }
      doAICalculations(player_mp_body);
      if (remEnemy) {
        destroyGameObject("String_Node_Str" + remEnemyName);
      }
      mTeamScoreChangeableText.setText("String_Node_Str" + mTeamScore);
    }
    @Override public void reset(){
    }
  }
);
}
Program: 50607
Project: 50607
Buggy source:
@Override public void onUpdate(float pSecondsElapsed){
  if (spawnBullet_MP) {
    spawnBullet(player_mp_sprite,playerDir_MP,"String_Node_Str");
    spawnBullet_MP=false;
  }
  if (desPlayerMP) {
    destroyGameObject("String_Node_Str");
    TextPopupScene mTextPopupScene=new TextPopupScene(BotWars_MultiPlayer.this.getEngine().getCamera(),BotWars_MultiPlayer.this.getEngine().getScene(),mScoreFont,"String_Node_Str",5.0f);
    desPlayerMP=false;
  }
  doAICalculations(player_mp_body);
  if (remEnemy) {
    destroyGameObject("String_Node_Str" + remEnemyName);
  }
}

Fixed version (ground truth):
@Override public void onUpdate(float pSecondsElapsed){
  if (spawnBullet_MP) {
    spawnBullet(player_mp_sprite,playerDir_MP,"String_Node_Str");
    spawnBullet_MP=false;
  }
  if (desPlayerMP) {
    destroyGameObject("String_Node_Str");
    TextPopupScene mTextPopupScene=new TextPopupScene(BotWars_MultiPlayer.this.getEngine().getCamera(),mScene.getChildScene(),mScoreFont,"String_Node_Str",5.0f);
    desPlayerMP=false;
  }
  doAICalculations(player_mp_body);
  if (remEnemy) {
    destroyGameObject("String_Node_Str" + remEnemyName);
  }
  mTeamScoreChangeableText.setText("String_Node_Str" + mTeamScore);
}