nus-yam/ex-repair huggingface dataset:
Program: 98366
Project: 98366
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getInfo().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getNotif().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getWarn().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getErr().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98367
Project: 98367
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200,IOrder.State.CLOSED);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getWarn().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}
Program: 98369
Project: 98369
Buggy source:
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  this.context=context;
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{teTimePeriod,teDeviation});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getWarn().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getNotif().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getInfo().println(order.getLabel() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  this.context=context;
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{teTimePeriod,teDeviation});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}
Program: 98370
Project: 98370
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getInfo().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getNotif().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getWarn().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getErr().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98371
Project: 98371
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200,IOrder.State.CLOSED);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getWarn().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}
Program: 98372
Project: 98372
Buggy source:
@Override public void onTick(Instrument instrument,ITick tick) throws JFException {
  if (instrument != this.instrument)   return;
  if (bar1 == null || bar2 == null)   return;
  if (tick.getBid() > donchian1[HIGH] && bar1.getClose() > donchian1[HIGH] && bar2.getClose() <= donchian2[HIGH]) {
    if (order == null || !order.isLong()) {
      closeOrder(order);
      order=submitOrder(OrderCommand.BUY);
    }
  }
  if (tick.getBid() < donchian1[HIGH] && bar1.getClose() < donchian1[LOW] && bar2.getClose() >= donchian2[LOW]) {
    if (order == null || order.isLong()) {
      closeOrder(order);
      order=submitOrder(OrderCommand.SELL);
    }
  }
}

Fixed version (ground truth):
@Override public void onTick(Instrument instrument,ITick tick) throws JFException {
  if (instrument != this.instrument)   return;
  if (bar1 == null || bar2 == null)   return;
  if (tick.getBid() > donchian1[HIGH] && bar1.getClose() > donchian1[HIGH] && bar2.getClose() <= donchian2[HIGH]) {
    if (order == null || !order.isLong()) {
      closeOrder(order);
      order=submitOrder(OrderCommand.BUY);
    }
  }
  if (tick.getBid() < donchian1[LOW] && bar1.getClose() < donchian1[LOW] && bar2.getClose() >= donchian2[LOW]) {
    if (order == null || order.isLong()) {
      closeOrder(order);
      order=submitOrder(OrderCommand.SELL);
    }
  }
}
Program: 98373
Project: 98373
Buggy source:
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{timePeriodFast,maTypeFast.ordinal(),timePeriodSlow,maTypeSlow.ordinal()});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{timePeriodFast,maTypeFast.ordinal(),timePeriodSlow,maTypeSlow.ordinal()});
  }
  this.order=null;
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().replaceAll("String_Node_Str","String_Node_Str"));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}
Program: 98374
Project: 98374
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + messageType);
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98375
Project: 98375
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
switch (order.getState()) {
case CREATED:
case CLOSED:
      this.order=null;
    break;
default :
  console.getOut().println(order.getLabel() + "String_Node_Str");
}
}
}
Program: 98376
Project: 98376
Buggy source:
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{dcTimePeriod});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{dcTimePeriod});
  }
  this.order=null;
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().replaceAll("String_Node_Str","String_Node_Str"));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}
Program: 98377
Project: 98377
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + messageType);
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98378
Project: 98378
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
switch (order.getState()) {
case CREATED:
case CLOSED:
      this.order=null;
    break;
default :
  console.getOut().println(order.getLabel() + "String_Node_Str");
}
}
}
Program: 98379
Project: 98379
Buggy source:
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{teTimePeriod,teDeviation});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{teTimePeriod,teDeviation});
  }
  this.order=null;
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().replaceAll("String_Node_Str","String_Node_Str"));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}
Program: 98380
Project: 98380
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + messageType);
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98381
Project: 98381
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
switch (order.getState()) {
case CREATED:
case CLOSED:
      this.order=null;
    break;
default :
  console.getOut().println(order.getLabel() + "String_Node_Str");
}
}
}
Program: 98382
Project: 98382
Buggy source:
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{barsOnSides});
  }
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().substring(5,14));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStart(IContext context) throws JFException {
  console=context.getConsole();
  engine=context.getEngine();
  history=context.getHistory();
  indicators=context.getIndicators();
  Set subscribedInstruments=new HashSet();
  subscribedInstruments.add(instrument);
  context.setSubscribedInstruments(subscribedInstruments);
  IChart chart=context.getChart(instrument);
  if (chart != null && engine.getType() == IEngine.Type.TEST) {
    chart.addIndicator(indicators.getIndicator("String_Node_Str"),new Object[]{barsOnSides});
  }
  this.order=null;
  for (  IOrder order : engine.getOrders(instrument)) {
    if (order.getLabel().substring(0,id.length()).equals(id)) {
      if (this.order != null) {
        console.getOut().println(this.order.getLabel() + "String_Node_Str");
      }
      this.order=order;
      counter=Integer.valueOf(order.getLabel().replaceAll("String_Node_Str","String_Node_Str"));
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
  if (isActive(order))   console.getOut().println(order.getLabel() + "String_Node_Str");
}
Program: 98383
Project: 98383
Buggy source:
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent());
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}

Fixed version (ground truth):
public void onMessage(IMessage message) throws JFException {
  if (message.getOrder() != null && message.getOrder().getLabel().substring(0,id.length()).equals(id)) {
    String orderLabel=message.getOrder().getLabel();
    IMessage.Type messageType=message.getType();
switch (messageType) {
case ORDER_FILL_OK:
case ORDER_CHANGED_OK:
      break;
case ORDER_SUBMIT_OK:
case ORDER_CLOSE_OK:
case ORDERS_MERGE_OK:
    console.getOut().println(orderLabel + "String_Node_Str" + messageType);
  break;
case NOTIFICATION:
console.getOut().println(orderLabel + "String_Node_Str" + message.getContent().replaceAll("String_Node_Str","String_Node_Str"));
break;
case ORDER_CHANGED_REJECTED:
case ORDER_CLOSE_REJECTED:
case ORDER_FILL_REJECTED:
case ORDER_SUBMIT_REJECTED:
case ORDERS_MERGE_REJECTED:
console.getOut().println(orderLabel + "String_Node_Str" + messageType);
break;
default :
console.getOut().println(orderLabel + "String_Node_Str" + messageType+ "String_Node_Str"+ message.getContent());
break;
}
}
}
Program: 98384
Project: 98384
Buggy source:
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
    if (order.getState() == IOrder.State.CLOSED) {
      this.order=null;
    }
 else {
      console.getOut().println(order.getLabel() + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void closeOrder(IOrder order) throws JFException {
  if (isActive(order)) {
    order.close();
    order.waitForUpdate(200);
switch (order.getState()) {
case CREATED:
case CLOSED:
      this.order=null;
    break;
default :
  console.getOut().println(order.getLabel() + "String_Node_Str");
}
}
}
Program: 98385
Project: 98385
Buggy source:
private int insert(Long nodePointer,RStarNode newChild){
  storage.saveNode(newChild);
  RStarInternal node=(RStarInternal)loadNode(nodePointer);
  if (node.isNotFull()) {
    int status=node.insert(newChild);
    if (status == 1) {
      storage.saveNode(node);
    }
 else {
      System.out.println("String_Node_Str");
    }
    return status;
  }
 else {
    return treatInternalOverflow(node,newChild);
  }
}

Fixed version (ground truth):
/** 
 * inserts a RStar node in the node pointed by nodePointer
 * @param nodePointer pointer to node in which the given nodeis to be inserted
 * @param nodeToInsert the node to be inserted
 * @return 1 of successful, else -1
 */
private int insert(Long nodePointer,RStarNode nodeToInsert){
  storage.saveNode(nodeToInsert);
  RStarInternal target=(RStarInternal)loadNode(nodePointer);
  if (target.isNotFull()) {
    target.insert(nodeToInsert);
    if (target.nodeId == rootPointer) {
      root=target;
    }
    storage.saveNode(target);
    adjustParentOf(target);
    return 1;
  }
 else {
    return treatInternalOverflow(target,nodeToInsert);
  }
}
Program: 98386
Project: 98386
Buggy source:
private void _rangeSearch(RStarNode start,HyperRectangle searchRegion){
  HyperRectangle intersection=start.getMBR().getIntersection(searchRegion);
  if (intersection != null) {
    if (start.isLeaf()) {
      for (      Long pointer : root.childPointers) {
        PointDTO dto=storage.loadPoint(pointer);
        SpatialPoint spoint=new SpatialPoint(dto);
        HyperRectangle pointMbr=new HyperRectangle(dto.coords);
        if (pointMbr.getIntersection(searchRegion) != null)         _rangeSearchResult.add(spoint);
      }
    }
 else {
      for (      Long pointer : root.childPointers) {
        try {
          RStarNode childNode=storage.loadNode(pointer);
          _rangeSearch(childNode,searchRegion);
        }
 catch (        FileNotFoundException e) {
          System.err.println("String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
private void _rangeSearch(RStarNode start,HyperRectangle searchRegion){
  HyperRectangle intersection=start.getMBR().getIntersection(searchRegion);
  if (intersection != null) {
    if (start.isLeaf()) {
      for (      Long pointer : start.childPointers) {
        PointDTO dto=storage.loadPoint(pointer);
        SpatialPoint spoint=new SpatialPoint(dto);
        HyperRectangle pointMbr=new HyperRectangle(dto.coords);
        if (pointMbr.getIntersection(searchRegion) != null)         _rangeSearchResult.add(spoint);
      }
    }
 else {
      for (      Long pointer : start.childPointers) {
        try {
          RStarNode childNode=storage.loadNode(pointer);
          _rangeSearch(childNode,searchRegion);
        }
 catch (        FileNotFoundException e) {
          System.err.println("String_Node_Str");
        }
      }
    }
  }
}
Program: 98388
Project: 98388
Buggy source:
private void _pointSearch(RStarNode start,SpatialPoint point){
  HyperRectangle searchRegion=new HyperRectangle(point.getCords());
  HyperRectangle intersection=start.getMBR().getIntersection(searchRegion);
  if (intersection != null) {
    if (start.isLeaf()) {
      float[] searchPoints=point.getCords();
      for (      Long pointer : root.childPointers) {
        PointDTO dto=storage.loadPoint(pointer);
        float[] candidates=dto.coords;
        boolean found=true;
        for (int i=0; i < candidates.length; i++) {
          if (candidates[i] != searchPoints[i])           found=false;
          break;
        }
        if (found) {
          _pointSearchResult=dto.oid;
        }
      }
    }
 else {
      for (      Long pointer : root.childPointers) {
        if (_pointSearchResult != -1)         break;
        try {
          RStarNode childNode=storage.loadNode(pointer);
          _pointSearch(childNode,point);
        }
 catch (        FileNotFoundException e) {
          System.err.println("String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
private void _pointSearch(RStarNode start,SpatialPoint point){
  HyperRectangle searchRegion=new HyperRectangle(point.getCords());
  HyperRectangle intersection=start.getMBR().getIntersection(searchRegion);
  if (intersection != null) {
    if (start.isLeaf()) {
      float[] searchPoints=point.getCords();
      for (      Long pointer : start.childPointers) {
        PointDTO dto=storage.loadPoint(pointer);
        float[] candidates=dto.coords;
        boolean found=true;
        for (int i=0; i < candidates.length; i++) {
          if (candidates[i] != searchPoints[i]) {
            found=false;
            break;
          }
        }
        if (found) {
          _pointSearchResult=dto.oid;
          break;
        }
      }
    }
 else {
      for (      Long pointer : start.childPointers) {
        if (_pointSearchResult != -1)         break;
        try {
          RStarNode childNode=storage.loadNode(pointer);
          _pointSearch(childNode,point);
        }
 catch (        FileNotFoundException e) {
          System.err.println("String_Node_Str" + e.getMessage());
        }
      }
    }
  }
}
Program: 98389
Project: 98389
Buggy source:
private void splitInternalNode(RStarInternal splittingNode,RStarNode newChild){
  ArrayList<Long> childPointers=splittingNode.childPointers;
  if (childPointers.size() <= 0) {
    throw new AssertionError();
  }
  ArrayList<RStarNode> children=new ArrayList<RStarNode>(childPointers.size());
  for (  long childNodeId : childPointers) {
    children.add(loadNode(childNodeId));
  }
  children.add(newChild);
  int splitAxis=chooseInternalSplitAxis(children);
  int splitPoint=chooseInternalSplitpoint(children,splitAxis);
  Object[] sorting=children.toArray();
  final SpatialComparator comp=new SpatialComparator(splitAxis,bestSortOrder);
  Arrays.sort(sorting,comp);
  splittingNode.childPointers=new ArrayList<Long>();
  RStarInternal newNode=new RStarInternal(dimension);
  for (int i=0; i < sorting.length; i++) {
    RStarNode node=(RStarNode)sorting[i];
    if (i < splitPoint) {
      splittingNode.childPointers.add(node.getNodeId());
    }
 else {
      newNode.childPointers.add(node.getNodeId());
    }
  }
  storage.saveNode(splittingNode);
  if (splittingNode.getNodeId() == rootPointer) {
    splitRoot(newChild);
  }
 else {
    newChild.setParentId(splittingNode.getParentId());
    insert(splittingNode.getParentId(),newChild);
  }
}

Fixed version (ground truth):
private void splitInternalNode(RStarInternal splittingNode,RStarNode node){
  ArrayList<Long> childPointers=splittingNode.childPointers;
  if (childPointers.size() <= 0) {
    throw new AssertionError();
  }
  ArrayList<RStarNode> children=new ArrayList<RStarNode>(childPointers.size());
  for (  long childNodeId : childPointers) {
    children.add(loadNode(childNodeId));
  }
  children.add(node);
  int splitAxis=chooseInternalSplitAxis(children);
  int splitPoint=chooseInternalSplitpoint(children,splitAxis);
  Object[] sorting=children.toArray();
  final SpatialComparator comp=new SpatialComparator(splitAxis,bestSortOrder);
  sort(sorting,comp);
  splittingNode.childPointers=new ArrayList<Long>();
  RStarInternal createdNode=new RStarInternal(dimension);
  HyperRectangle newMbr1=new HyperRectangle(dimension);
  HyperRectangle newMbr2=new HyperRectangle(dimension);
  for (int i=0; i < sorting.length; i++) {
    RStarNode childNode=(RStarNode)sorting[i];
    if (i < splitPoint) {
      splittingNode.childPointers.add(childNode.getNodeId());
      childNode.setParentId(splittingNode.getNodeId());
      newMbr1.update(childNode.getMBR());
    }
 else {
      createdNode.childPointers.add(childNode.getNodeId());
      childNode.setParentId(createdNode.getNodeId());
      newMbr2.update(childNode.getMBR());
    }
    storage.saveNode(childNode);
  }
  splittingNode.mbr=newMbr1;
  createdNode.mbr=newMbr2;
  storage.saveNode(splittingNode);
  if (splittingNode.getNodeId() == rootPointer) {
    root=splittingNode;
    splitRoot(createdNode);
  }
 else {
    createdNode.setParentId(splittingNode.getParentId());
    insert(splittingNode.getParentId(),createdNode);
  }
}
Program: 98390
Project: 98390
Buggy source:
/** 
 * searches for a spatial point in the tree and returns its oid if its found.
 * @param point the point to be searched
 * @return oid of the point if found, else -1.
 */
@Override public float pointSearch(SpatialPoint point){
  System.out.println("String_Node_Str" + point);
  _pointSearchResult=-1;
  loadRoot();
  _pointSearch(root,point);
  return _pointSearchResult;
}

Fixed version (ground truth):
/** 
 * searches for a spatial point in the tree and returns its oid if its found.
 * @param point the point to be searched
 * @return oid of the point if found, else -1.
 */
@Override public float pointSearch(SpatialPoint point){
  _pointSearchResult=-1;
  loadRoot();
  _pointSearch(root,point);
  return _pointSearchResult;
}
Program: 98391
Project: 98391
Buggy source:
/** 
 * loads Nodes from disk using their nodeId
 * @param nodeId the nodeId attribute of the Nodeto be loaded
 * @return the Node required, null uf it doesn't exist
 */
private RStarNode loadNode(long nodeId){
  if (nodeId != -1) {
    try {
      return storage.loadNode(nodeId);
    }
 catch (    FileNotFoundException e) {
      System.err.println("String_Node_Str" + storage.constructFilename(nodeId));
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * loads Nodes from disk using their nodeId
 * @param nodeId the nodeId attribute of the Nodeto be loaded
 * @return the Node required, null uf it doesn't exist
 */
private RStarNode loadNode(long nodeId){
  if (nodeId != -1) {
    try {
      if (nodeId == rootPointer) {
        loadRoot();
        return root;
      }
 else {
        return storage.loadNode(nodeId);
      }
    }
 catch (    FileNotFoundException e) {
      System.err.println("String_Node_Str" + storage.constructFilename(nodeId));
    }
  }
  return null;
}
Program: 98392
Project: 98392
Buggy source:
private void setCapacities(){
  Constants.DIMENSION=dimension;
  Constants.MAX_CHILDREN=Constants.PAGESIZE / 8;
  Constants.MIN_CHILDREN=Constants.MAX_CHILDREN / 3;
}

Fixed version (ground truth):
private void setCapacities(){
  Constants.DIMENSION=dimension;
  Constants.MAX_CHILDREN=10;
  Constants.MIN_CHILDREN=4;
}
Program: 98393
Project: 98393
Buggy source:
public void check(Player p,Location l){
  if (PortTick.tickets.containsKey(p)) {
    return;
  }
  if (p.getItemInHand().getTypeId() == 337) {
    return;
  }
  for (  NewPort n : collection) {
    if (n.insideZone(l)) {
      if (p.getItemInHand().getTypeId() == 266 && p.hasPermission("String_Node_Str")) {
        n.instaPort(p,true);
        return;
      }
      if (n.ticket()) {
        ItemStack i=p.getItemInHand();
        if (i.getTypeId() == PortManager.TICKETID) {
          if (n.instant()) {
            n.instaPort(p,false);
            p.getInventory().clear(p.getInventory().getHeldItemSlot());
            return;
          }
          if (n.isPortActivated()) {
            n.welcomePlayer(p);
            p.getInventory().clear(p.getInventory().getHeldItemSlot());
            PortTick.registerTicket(p,n);
            return;
          }
        }
      }
 else {
        if (n.instant()) {
          n.instaPort(p,false);
          return;
        }
        if (n.isPortActivated()) {
          n.welcomePlayer(p);
          PortTick.registerTicket(p,n);
          return;
        }
      }
    }
  }
}

Fixed version (ground truth):
public void check(Player p,Location l){
  if (PortTick.tickets.containsKey(p)) {
    return;
  }
  if (p.getItemInHand().getTypeId() == 337) {
    return;
  }
  for (  NewPort n : collection) {
    if (n.insideZone(l)) {
      if (p.getItemInHand().getTypeId() == 266 && p.hasPermission("String_Node_Str")) {
        n.instaPort(p,true);
        return;
      }
      if (n.ticket()) {
        ItemStack i=p.getItemInHand();
        if (i.getTypeId() == PortManager.TICKETID) {
          if (n.instant()) {
            n.instaPort(p,false);
            int newAmount=p.getInventory().getItemInHand().getAmount() - 1;
            p.getInventory().getItemInHand().setAmount(newAmount);
            return;
          }
          if (n.isPortActivated()) {
            n.welcomePlayer(p);
            int newAmount=p.getInventory().getItemInHand().getAmount() - 1;
            p.getInventory().getItemInHand().setAmount(newAmount);
            PortTick.registerTicket(p,n);
            return;
          }
        }
      }
 else {
        if (n.instant()) {
          n.instaPort(p,false);
          return;
        }
        if (n.isPortActivated()) {
          n.welcomePlayer(p);
          PortTick.registerTicket(p,n);
          return;
        }
      }
    }
  }
}
Program: 98394
Project: 98394
Buggy source:
public ENSObject parseJSON(JSONObject JSON){
  try {
    this.setBetreff(JSON.getString("String_Node_Str"));
    this.setTime(JSON.getString("String_Node_Str"));
    if (JSON.has("String_Node_Str"))     this.setText(JSON.getString("String_Node_Str"));
    UserObject von=new UserObject();
    if (JSON.has("String_Node_Str"))     von.ParseJSON(JSON.getJSONObject("String_Node_Str"));
    this.setVon(von);
    if (JSON.has("String_Node_Str"))     for (int z=0; z < JSON.getJSONArray("String_Node_Str").length(); z++) {
      UserObject an=new UserObject();
      an.ParseJSON(JSON.getJSONArray("String_Node_Str").getJSONObject(z));
      this.addAnUser(an);
    }
    if (JSON.has("String_Node_Str")) {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
 else {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
    this.setENS_id(JSON.getLong("String_Node_Str"));
    this.setTyp(JSON.getInt("String_Node_Str"));
    if (JSON.has("String_Node_Str")) {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
 else {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return this;
}

Fixed version (ground truth):
public ENSObject parseJSON(JSONObject JSON){
  try {
    this.setBetreff(JSON.getString("String_Node_Str"));
    this.setTime(JSON.getString("String_Node_Str"));
    if (JSON.has("String_Node_Str"))     this.setText(JSON.getString("String_Node_Str"));
    UserObject von=new UserObject();
    if (!JSON.isNull("String_Node_Str"))     von.ParseJSON(JSON.getJSONObject("String_Node_Str"));
    this.setVon(von);
    if (!JSON.isNull("String_Node_Str")) {
      for (int z=0; z < JSON.getJSONArray("String_Node_Str").length(); z++) {
        UserObject an=new UserObject();
        an.ParseJSON(JSON.getJSONArray("String_Node_Str").getJSONObject(z));
        this.addAnUser(an);
      }
    }
 else {
      UserObject an=new UserObject();
      this.addAnUser(an);
    }
    if (JSON.has("String_Node_Str")) {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
 else {
      this.setFlags(JSON.getInt("String_Node_Str"));
    }
    this.setENS_id(JSON.getLong("String_Node_Str"));
    this.setTyp(JSON.getInt("String_Node_Str"));
    if (JSON.has("String_Node_Str")) {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
 else {
      this.setOrdner(JSON.getInt("String_Node_Str"));
      this.setAnVon("String_Node_Str");
    }
  }
 catch (  JSONException e) {
    e.printStackTrace();
  }
  return this;
}
Program: 98395
Project: 98395
Buggy source:
public void DoError(){
}

Fixed version (ground truth):
public void DoError(){
  dialog.dismiss();
  Request.doToast("String_Node_Str",this);
}
Program: 98396
Project: 98396
Buggy source:
public void DoError(){
}

Fixed version (ground truth):
public void DoError(){
  dialog.dismiss();
  Request.doToast("String_Node_Str",this);
}
Program: 98398
Project: 98398
Buggy source:
public void DoError(){
}

Fixed version (ground truth):
public void DoError(){
  dialog.dismiss();
  Request.doToast("String_Node_Str",this);
}
Program: 98399
Project: 98399
Buggy source:
private ArrayList<GBObject> getENSlist(String JSON){
  try {
    JSONObject jsonResponse=new JSONObject(JSON);
    JSONArray GBlist=jsonResponse.getJSONObject("String_Node_Str").getJSONArray("String_Node_Str");
    ArrayList<GBObject> GBa=new ArrayList<GBObject>(GBlist.length());
    if (GBlist.length() != 0) {
      for (int i=0; i < GBlist.length(); i++) {
        JSONObject tp=GBlist.getJSONObject(i);
        GBObject GB=new GBObject();
        UserObject von=new UserObject();
        von.ParseJSON(tp.getJSONObject("String_Node_Str"));
        GB.setVon(von);
        GB.setText(tp.getString("String_Node_Str"));
        GB.setEntry_id(tp.getString("String_Node_Str"));
        GB.setTime(tp.getString("String_Node_Str"));
        GB.setAvatar(tp.getString("String_Node_Str"));
        GBa.add(GB);
      }
    }
 else {
      error=true;
      return GBa;
    }
    return GBa;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
private ArrayList<GBObject> getENSlist(String JSON){
  ArrayList<GBObject> GBa=new ArrayList<GBObject>();
  try {
    JSONObject jsonResponse=new JSONObject(JSON);
    JSONArray GBlist=jsonResponse.getJSONObject("String_Node_Str").getJSONArray("String_Node_Str");
    GBa=new ArrayList<GBObject>(GBlist.length());
    if (GBlist.length() != 0) {
      for (int i=0; i < GBlist.length(); i++) {
        JSONObject tp=GBlist.getJSONObject(i);
        GBObject GB=new GBObject();
        UserObject von=new UserObject();
        if (!tp.isNull("String_Node_Str"))         von.ParseJSON(tp.getJSONObject("String_Node_Str"));
        GB.setVon(von);
        GB.setText(tp.getString("String_Node_Str"));
        GB.setEntry_id(tp.getString("String_Node_Str"));
        GB.setTime(tp.getString("String_Node_Str"));
        GB.setAvatar(tp.getString("String_Node_Str"));
        GBa.add(GB);
      }
    }
 else {
      error=true;
      return GBa;
    }
    return GBa;
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return GBa;
}
Program: 98400
Project: 98400
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Request.config=PreferenceManager.getDefaultSharedPreferences(this);
  typ="String_Node_Str";
  if (this.getIntent().hasExtra("String_Node_Str")) {
    Bundle bundle=this.getIntent().getExtras();
    ordner=bundle.getString("String_Node_Str");
    offset=0;
  }
 else   ordner="String_Node_Str";
  con=this;
  NotificationManager mManager;
  mManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  mManager.cancel(42);
  adapter=new ENSAdapter(this,ENSArray);
  setlist(adapter);
  refresh();
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Request.config=PreferenceManager.getDefaultSharedPreferences(this);
  typ="String_Node_Str";
  if (this.getIntent().hasExtra("String_Node_Str")) {
    Bundle bundle=this.getIntent().getExtras();
    ordner=bundle.getString("String_Node_Str");
    offset=0;
  }
 else   ordner="String_Node_Str";
  NotificationManager mManager;
  mManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
  mManager.cancel(42);
  adapter=new ENSAdapter(this,ENSArray);
  setlist(adapter);
  refresh();
}