nus-yam/ex-repair huggingface dataset:
Program: 25271
Project: 25271
Buggy source:
public static boolean rage(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().FFF()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    gmsg(playerName + Colors.Red + message);
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean rage(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().FFF()) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    String[] msg=wordWrap(player,message);
    gmsg(playerName + Colors.Red + msg[0]);
    String[] tempOut=new String[msg.length - 1];
    System.arraycopy(msg,1,tempOut,0,tempOut.length);
    for (    String str : tempOut)     gmsg(Colors.Red + str);
    return true;
  }
  return false;
}
Program: 25272
Project: 25272
Buggy source:
public static boolean quakeColors(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().quakeColors() && message.length() > 2 && vminecraftChat.lengthCheck(playerName + message)) {
    String temp="String_Node_Str";
    for (int x=0; x < message.length(); x++) {
      if (message.charAt(x) == '^' && x != message.length() - 1) {
        temp+=vminecraftChat.colorChange(message.charAt(x + 1));
        x++;
      }
 else {
        temp+=message.charAt(x);
      }
    }
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    gmsg(playerName + temp + "String_Node_Str");
    return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean quakeColors(Player player,String message){
  String playerName="String_Node_Str" + nameColor(player) + Colors.White+ "String_Node_Str";
  if (vminecraftSettings.getInstance().quakeColors() && message.length() > 2) {
    log.log(Level.INFO,"String_Node_Str" + player.getName() + "String_Node_Str"+ message);
    String[] msg=wordWrap(player,message);
    applyColors(msg);
    gmsg(playerName + msg[0]);
    String[] tempOut=new String[msg.length - 1];
    System.arraycopy(msg,1,tempOut,0,tempOut.length);
    for (    String str : tempOut)     gmsg(str);
    return true;
  }
  return false;
}
Program: 25274
Project: 25274
Buggy source:
public void disable(){
  id.a.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public void disable(){
  log.log(Level.INFO,"String_Node_Str");
}
Program: 25275
Project: 25275
Buggy source:
public void enable(){
  settings.getInstance().loadSettings();
  id.a.log(Level.INFO,"String_Node_Str");
}

Fixed version (ground truth):
public void enable(){
  settings.getInstance().loadSettings();
  log.log(Level.INFO,"String_Node_Str");
}
Program: 25279
Project: 25279
Buggy source:
public static String getXMLTextHeader(){
  String str="String_Node_Str" + eolStr;
  URL dtdURL=XMLText.class.getResource("String_Node_Str");
  String dtdStr=dtdURL.toExternalForm();
  str+=("String_Node_Str" + dtdStr + "String_Node_Str"+ eolStr);
  return str;
}

Fixed version (ground truth):
public static String getXMLTextHeader(){
  String str="String_Node_Str" + eolStr;
  return str;
}
Program: 25280
Project: 25280
Buggy source:
public static String getXMLTextHeader(){
  String str="String_Node_Str" + eolStr;
  return str;
}

Fixed version (ground truth):
public static String getXMLTextHeader(){
  String str="String_Node_Str" + eolStr;
  try {
    URL dtdURL=new URL("String_Node_Str");
    String dtdStr=dtdURL.toExternalForm();
    str+=("String_Node_Str" + dtdStr + "String_Node_Str"+ eolStr);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
  return str;
}
Program: 25282
Project: 25282
Buggy source:
/** 
 * Tests if input is prime. See also: PrimeNumberSieve
 * @param input
 * @return true if input is prime
 */
public static boolean isPrime(long input){
  if (input == 2L) {
    return true;
  }
  long limit=(long)Math.sqrt(input);
  for (long l=3; l <= limit; l+=2) {
    if (input % l == 0) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Tests if input is prime. See also: PrimeNumberSieve
 * @param input
 * @return true if input is prime
 */
public static boolean isPrime(long input){
  if (input == 2L) {
    return true;
  }
  if ((input & 1) == 0) {
    return false;
  }
  long limit=(long)Math.sqrt(input);
  for (long l=3; l <= limit; l+=2) {
    if (input % l == 0) {
      return false;
    }
  }
  return true;
}
Program: 25283
Project: 25283
Buggy source:
/** 
 * Returns the lowest cubic integer that is a permutation of (perms - 1) other cubic numbers.
 */
public long solve(int perms){
  Map<DigitCount,PermutationCount> cubes=new HashMap<DigitCount,PermutationCount>();
  for (long n=1; true; n++) {
    long nCubed=n * n * n;
    DigitCount dc=new DigitCount(nCubed);
    if (cubes.containsKey(dc)) {
      cubes.get(dc).count++;
      if (cubes.get(dc).count == perms) {
        return cubes.get(dc).lowestCube;
      }
    }
 else {
      cubes.put(dc,new PermutationCount(nCubed,1));
    }
  }
}

Fixed version (ground truth):
/** 
 * Returns the lowest cubic integer that is a permutation of (perms - 1) other cubic numbers.
 */
public long solve(int perms){
  long result=Long.MAX_VALUE;
  long lastToCheck=Long.MAX_VALUE;
  Map<DigitCount,PermutationCount> cubes=new HashMap<DigitCount,PermutationCount>();
  for (long n=1; n < lastToCheck; n++) {
    long nCubed=n * n * n;
    DigitCount dc=new DigitCount(nCubed);
    if (cubes.containsKey(dc)) {
      cubes.get(dc).count++;
      if (cubes.get(dc).count == perms) {
        if (cubes.get(dc).lowestCube < result) {
          result=cubes.get(dc).lowestCube;
          lastToCheck=(long)Math.pow(Math.pow(10,(((int)Math.log10(result)) + 1)),1.0 / 3.0);
        }
      }
    }
 else {
      cubes.put(dc,new PermutationCount(nCubed,1));
    }
  }
  return result;
}
Program: 25284
Project: 25284
Buggy source:
public static void newTimeIntervall(String timeStr){
  try {
    int i=DBConnection.statement.executeUpdate("String_Node_Str" + timeStr + "String_Node_Str");
    System.out.println("String_Node_Str" + i + "String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void newTimeIntervall(ArrayList<String> timeIntervallData){
  try {
    int i=DBConnection.statement.executeUpdate("String_Node_Str" + timeIntervallData.get(0) + "String_Node_Str"+ timeIntervallData.get(1)+ "String_Node_Str"+ timeIntervallData.get(2)+ "String_Node_Str");
    System.out.println("String_Node_Str" + i + "String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 25285
Project: 25285
Buggy source:
public static ArrayList<String> loadWorkshop(int id){
  ArrayList<String> workshopData=new ArrayList<String>();
  String idStr=Integer.toString(id);
  int count=getParticipantCount(Integer.parseInt(idStr));
  int hours=getDuration(id);
  try {
    ResultSet res=DBConnection.statement.executeQuery("String_Node_Str" + idStr);
    while (res.next()) {
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(Integer.toString(count));
      workshopData.add(Integer.toString(hours));
      id=Integer.parseInt(idStr);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return workshopData;
}

Fixed version (ground truth):
public static ArrayList<String> loadWorkshop(int id){
  ArrayList<String> workshopData=new ArrayList<String>();
  String idStr=Integer.toString(id);
  int count=getParticipantCount(Integer.parseInt(idStr));
  try {
    ResultSet res=DBConnection.statement.executeQuery("String_Node_Str" + idStr);
    while (res.next()) {
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(res.getString("String_Node_Str"));
      workshopData.add(Integer.toString(count));
      id=Integer.parseInt(idStr);
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
  return workshopData;
}
Program: 25286
Project: 25286
Buggy source:
public static void newPriceCategory(String priceCategoryStr){
  try {
    int i=DBConnection.statement.executeUpdate("String_Node_Str" + priceCategoryStr + "String_Node_Str");
    System.out.println("String_Node_Str" + i + "String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void newPriceCategory(ArrayList<String> priceCategoryData){
  try {
    int i=DBConnection.statement.executeUpdate("String_Node_Str" + priceCategoryData + "String_Node_Str");
    System.out.println("String_Node_Str" + i + "String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 25287
Project: 25287
Buggy source:
public void workShop2MainDialog(ArrayList<String> wsData){
  ui.lineEdit_Titel.setText(wsData.get(0));
  ui.lineEdit_Prof.setText(wsData.get(1));
  ui.lineEdit_Part.setText(wsData.get(2));
  ui.lineEdit_Duration.setText(wsData.get(3));
  ui.lineEdit_Price.setText(wsData.get(4));
  ui.textEdit_Description.setText(wsData.get(5));
  literature2MainDialog(wsData.get(6));
  String startDate=wsData.get(7);
  ui.dateEdit_Start.setDate(WorkshopController.dateString2QDate(startDate));
  String endDate=wsData.get(8);
  ui.dateEdit_End.setDate(WorkshopController.dateString2QDate(endDate));
  ui.lineEdit_Part.setText(wsData.get(9));
  ui.lineEdit_Duration.setText(wsData.get(10));
}

Fixed version (ground truth):
public void workShop2MainDialog(ArrayList<String> wsData){
  ui.lineEdit_Titel.setText(wsData.get(0));
  ui.lineEdit_Prof.setText(wsData.get(1));
  ui.lineEdit_Part.setText(wsData.get(2));
  ui.lineEdit_Price.setText(wsData.get(4));
  ui.textEdit_Description.setText(wsData.get(5));
  literature2MainDialog(wsData.get(6));
  String startDate=wsData.get(7);
  ui.dateEdit_Start.setDate(WorkshopController.dateString2QDate(startDate));
  String endDate=wsData.get(8);
  ui.dateEdit_End.setDate(WorkshopController.dateString2QDate(endDate));
  ui.lineEdit_Part.setText(wsData.get(9));
}
Program: 25288
Project: 25288
Buggy source:
public String getPriceCatFromNPCD(){
  String priceCategory=Integer.toString(pCImpl.mDImpl.workShopID) + "String_Node_Str" + ui.lineEdit_Category.text()+ "String_Node_Str"+ ui.lineEdit_Price.text();
  return priceCategory;
}

Fixed version (ground truth):
public ArrayList<String> getPriceCatFromNPCD(){
  ArrayList<String> priceCategoryData=new ArrayList<String>();
  priceCategoryData.add(Integer.toString(pCImpl.mDImpl.workShopID));
  priceCategoryData.add(ui.lineEdit_Category.text());
  priceCategoryData.add(ui.lineEdit_Price.text());
  return priceCategoryData;
}
Program: 25289
Project: 25289
Buggy source:
public void on_saveButton_clicked(){
  String timeStr=getPriceCatFromNPCD();
  WorkshopController.newTimeIntervall(timeStr);
  pCImpl.ui.treeWidget.clear();
  pCImpl.init();
}

Fixed version (ground truth):
public void on_saveButton_clicked(){
  pCImpl.mDImpl.NotImplYet();
}
Program: 25290
Project: 25290
Buggy source:
public void on_treeWidget_itemDoubleClicked(){
  TimeIntervalDialogImpl tIDImpl=new TimeIntervalDialogImpl(this);
  tIDImpl.show();
}

Fixed version (ground truth):
public void on_treeWidget_itemDoubleClicked(){
  timeID=0;
  QTreeWidgetItem item=ui.treeWidget.currentItem();
  ArrayList<String> timeIntervall=new ArrayList<String>();
  timeIntervall.add((String)item.data(0,0));
  timeIntervall.add((String)item.data(1,0) + "String_Node_Str" + (String)item.data(2,0));
  ArrayList<String> timeIntervallData=WorkshopController.loadTimeIntervall(mDImpl.workShopID,timeIntervall);
  TimeIntervalDialogImpl tIDImpl=new TimeIntervalDialogImpl(this);
  tIDImpl.timeInt2TID(timeIntervallData);
  tIDImpl.show();
}
Program: 25291
Project: 25291
Buggy source:
public void on_saveTimeIntervalButton_clicked(){
  String timeStr=getTimeFromTID();
  WorkshopController.newTimeIntervall(timeStr);
  sImpl.ui.treeWidget.clear();
  sImpl.init();
  int hours=WorkshopController.getDuration(sImpl.mDImpl.workShopID);
  sImpl.mDImpl.setDuration(hours);
}

Fixed version (ground truth):
public void on_saveTimeIntervalButton_clicked(){
  ArrayList<String> timeIntervallData=getTimeFromTID();
  WorkshopController.newTimeIntervall(timeIntervallData);
  sImpl.ui.treeWidget.clear();
  sImpl.init();
  int hours=WorkshopController.getDuration(sImpl.mDImpl.workShopID);
  sImpl.mDImpl.setDuration(hours);
}
Program: 25292
Project: 25292
Buggy source:
public String getTimeFromTID(){
  String dateString=WorkshopController.qDate2dateString(ui.dateEdit.date());
  String timeIntervall=Integer.toString(sImpl.mDImpl.workShopID) + "String_Node_Str" + dateString+ "String_Node_Str"+ ui.timeEdit_Start.text()+ "String_Node_Str"+ ui.timeEdit_End.text();
  return timeIntervall;
}

Fixed version (ground truth):
public ArrayList<String> getTimeFromTID(){
  ArrayList<String> timeIntervallData=new ArrayList<String>();
  String dateString=WorkshopController.qDate2dateString(ui.dateEdit.date());
  timeIntervallData.add(Integer.toString(sImpl.mDImpl.workShopID));
  timeIntervallData.add(dateString);
  timeIntervallData.add(ui.timeEdit_Start.text() + "String_Node_Str" + ui.timeEdit_End.text());
  return timeIntervallData;
}
Program: 25294
Project: 25294
Buggy source:
protected void updateFieldDependencies(SchemaClassDefinition iClass){
  Iterator<SchemaField> iterator=iClass.getFieldIterator();
  while (iterator.hasNext()) {
    SchemaField iField=iterator.next();
    String[] dependsOnList=iField.getFeature(ViewFieldFeatures.DEPENDS_ON);
    if (dependsOnList != null) {
      for (      String fieldName : dependsOnList) {
        SchemaField dependsFieldSchema=iClass.getField(fieldName);
        if (dependsFieldSchema == null)         continue;
        String[] fieldDepends=dependsFieldSchema.getFeature(ViewFieldFeatures.DEPENDS);
        Set<String> fieldDependsList=new HashSet<String>(Arrays.asList(fieldDepends));
        fieldDependsList.add(iField.getName());
        dependsFieldSchema.setFeature(ViewFieldFeatures.DEPENDS,fieldDependsList.toArray(new String[]{}));
      }
    }
  }
}

Fixed version (ground truth):
protected void updateFieldDependencies(SchemaClassDefinition iClass){
  Iterator<SchemaField> iterator=iClass.getFieldIterator();
  while (iterator.hasNext()) {
    SchemaField iField=iterator.next();
    String[] dependsOnList=iField.getFeature(ViewFieldFeatures.DEPENDS_ON);
    if (dependsOnList != null) {
      for (      String fieldName : dependsOnList) {
        SchemaField dependsFieldSchema=iClass.getField(fieldName);
        if (dependsFieldSchema == null)         continue;
        String[] fieldDepends=dependsFieldSchema.getFeature(ViewFieldFeatures.DEPENDS);
        if (fieldDepends == null)         fieldDepends=new String[0];
        Set<String> fieldDependsList=new HashSet<String>(Arrays.asList(fieldDepends));
        fieldDependsList.add(iField.getName());
        dependsFieldSchema.setFeature(ViewFieldFeatures.DEPENDS,fieldDependsList.toArray(new String[]{}));
      }
    }
  }
}
Program: 25295
Project: 25295
Buggy source:
public SchemaEventAdd(SchemaField field){
  super(field,SchemaEvent.COLLECTION_ADD_EVENT,null);
}

Fixed version (ground truth):
public SchemaEventAdd(SchemaField field){
  super(field,SchemaEvent.COLLECTION_ADD_EVENT,new ArrayList<SchemaParameter>());
}
Program: 25296
Project: 25296
Buggy source:
public SchemaEventAddInline(SchemaField field){
  super(field,COLLECTION_ADD_INLINE_EVENT,null);
}

Fixed version (ground truth):
public SchemaEventAddInline(SchemaField field){
  super(field,COLLECTION_ADD_INLINE_EVENT,new ArrayList<SchemaParameter>());
}
Program: 25297
Project: 25297
Buggy source:
public SchemaEventEdit(SchemaField field){
  super(field,SchemaEvent.COLLECTION_EDIT_EVENT,null);
}

Fixed version (ground truth):
public SchemaEventEdit(SchemaField field){
  super(field,SchemaEvent.COLLECTION_EDIT_EVENT,new ArrayList<SchemaParameter>());
}
Program: 25298
Project: 25298
Buggy source:
public SchemaEventMove(SchemaField field,String iName){
  super(field,iName,null);
}

Fixed version (ground truth):
public SchemaEventMove(SchemaField field,String iName){
  super(field,iName,new ArrayList<SchemaParameter>());
}
Program: 25299
Project: 25299
Buggy source:
public SchemaEventOpen(SchemaField field){
  super(field,"String_Node_Str",null);
}

Fixed version (ground truth):
public SchemaEventOpen(SchemaField field){
  super(field,"String_Node_Str",new ArrayList<SchemaParameter>());
}
Program: 25300
Project: 25300
Buggy source:
public SchemaEventRemove(SchemaField field){
  super(field,COLLECTION_REMOVE_EVENT,null);
}

Fixed version (ground truth):
public SchemaEventRemove(SchemaField field){
  super(field,COLLECTION_REMOVE_EVENT,new ArrayList<SchemaParameter>());
}
Program: 25301
Project: 25301
Buggy source:
public SchemaEventReset(SchemaField field){
  super(field,"String_Node_Str",null);
}

Fixed version (ground truth):
public SchemaEventReset(SchemaField field){
  super(field,"String_Node_Str",new ArrayList<SchemaParameter>());
}
Program: 25302
Project: 25302
Buggy source:
public SchemaEventView(SchemaField field){
  super(field,SchemaEvent.COLLECTION_VIEW_EVENT,null);
}

Fixed version (ground truth):
public SchemaEventView(SchemaField field){
  super(field,SchemaEvent.COLLECTION_VIEW_EVENT,new ArrayList<SchemaParameter>());
}
Program: 25303
Project: 25303
Buggy source:
/** 
 * Reload desktop configuration from file. This event is invoked when the file descriptor is changed.
 */
public void signalUpdatedFile(File iFile){
synchronized (this) {
    for (    ScreenConfiguration d : configuration.values()) {
      if (d.getFile().equals(iFile)) {
        log.warn("String_Node_Str" + iFile);
        try {
          d.load();
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + iFile.getAbsolutePath());
        }
        break;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Reload desktop configuration from file. This event is invoked when the file descriptor is changed.
 */
public void signalUpdatedFile(File iFile){
synchronized (this) {
    ScreenConfiguration d=configuration.get(iFile.getName());
    if (d != null) {
      if (d.getFile().equals(iFile)) {
        log.warn("String_Node_Str" + iFile);
        try {
          d.load();
        }
 catch (        Exception e) {
          log.error("String_Node_Str" + iFile.getAbsolutePath());
        }
      }
    }
  }
}
Program: 25304
Project: 25304
Buggy source:
/** 
 * Return the final value of the wrapper
 * @throws Exception , IllegalAccessException, InvocationTargetException
 */
@ViewField(visible=AnnotationConstants.FALSE) public Object getFinalValue() throws Exception, IllegalAccessException, InvocationTargetException {
  if (value != null && value.trim() != "String_Node_Str") {
    if (formatter == null) {
      return typeClass.getConstructor(new Class[]{String.class}).newInstance(new Object[]{value});
    }
 else {
      return formatter.parseObject(value);
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Return the final value of the wrapper
 * @throws Exception , IllegalAccessException, InvocationTargetException
 */
@ViewField(visible=AnnotationConstants.FALSE) public Object getFinalValue() throws Exception, IllegalAccessException, InvocationTargetException {
  if (value != null && "String_Node_Str".equals(value.trim())) {
    if (formatter == null) {
      return typeClass.getConstructor(new Class[]{String.class}).newInstance(new Object[]{value});
    }
 else {
      return formatter.parseObject(value);
    }
  }
 else {
    return null;
  }
}
Program: 25305
Project: 25305
Buggy source:
/** 
 * Parse a value of String type and convert to schemaField specified type, with schemaField specific format.
 * @param value to parse.
 * @param schemaField with the parse settings.
 * @return the value parsed.
 */
public static Object parse(Object value,SchemaField schemaField){
  if (!(value instanceof String))   return value;
  String stringValue=(String)value;
  Object result=value;
  SchemaClass fieldType=schemaField.getType().getSchemaClass();
  if (value != null && !stringValue.isEmpty()) {
    if (fieldType.isAssignableAs(Roma.schema().getSchemaClass(Number.class))) {
      NumberFormat format=FormatHelper.getNumberFormat(schemaField);
      try {
        result=format.parse(stringValue);
      }
 catch (      ParseException e) {
        throw new RuntimeException("String_Node_Str" + schemaField.getName() + "String_Node_Str"+ format,e);
      }
    }
 else     if (fieldType.isAssignableAs(Roma.schema().getSchemaClass(Date.class))) {
      DateFormat format=FormatHelper.getDateFormat(schemaField);
      try {
        result=format.parse(stringValue);
      }
 catch (      ParseException e) {
        throw new RuntimeException("String_Node_Str" + schemaField.getName() + "String_Node_Str"+ format,e);
      }
    }
 else {
      result=decodeHtml(stringValue);
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Parse a value of String type and convert to schemaField specified type, with schemaField specific format.
 * @param value to parse.
 * @param schemaField with the parse settings.
 * @return the value parsed.
 */
public static Object parse(Object value,SchemaField schemaField){
  if (!(value instanceof String))   return value;
  String stringValue=(String)value;
  Object result=value;
  SchemaClass fieldType=schemaField.getType().getSchemaClass();
  if (value != null) {
    if (fieldType.isAssignableAs(Roma.schema().getSchemaClass(Number.class))) {
      if (!stringValue.isEmpty()) {
        NumberFormat format=FormatHelper.getNumberFormat(schemaField);
        try {
          result=format.parse(stringValue);
        }
 catch (        ParseException e) {
          throw new RuntimeException("String_Node_Str" + schemaField.getName() + "String_Node_Str"+ format,e);
        }
      }
 else       result=null;
    }
 else     if (fieldType.isAssignableAs(Roma.schema().getSchemaClass(Date.class))) {
      if (!stringValue.isEmpty()) {
        DateFormat format=FormatHelper.getDateFormat(schemaField);
        try {
          result=format.parse(stringValue);
        }
 catch (        ParseException e) {
          throw new RuntimeException("String_Node_Str" + schemaField.getName() + "String_Node_Str"+ format,e);
        }
      }
 else       result=null;
    }
 else {
      result=decodeHtml(stringValue);
    }
  }
  return result;
}
Program: 25307
Project: 25307
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
@Override public void setName(String name){
  this.name=name;
}
Program: 25308
Project: 25308
Buggy source:
@OneToMany(mapped="String_Node_Str") public List<CommunicationItem> getCommunicationItems(){
  return communicationItems;
}

Fixed version (ground truth):
@OneToMany(mappedBy="String_Node_Str") @Override public List<CommunicationItem> getCommunicationItems(){
  return communicationItems;
}
Program: 25309
Project: 25309
Buggy source:
public void setCommunicationItems(List<CommunicationItem> communicationItems){
  this.communicationItems=communicationItems;
}

Fixed version (ground truth):
@Override public void setCommunicationItems(List<CommunicationItem> communicationItems){
  this.communicationItems=communicationItems;
}
Program: 25310
Project: 25310
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return name;
}
Program: 25311
Project: 25311
Buggy source:
public void setAddress(Address address){
  this.address=address;
}

Fixed version (ground truth):
@Override public void setAddress(Address address){
  this.address=address;
}
Program: 25312
Project: 25312
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25313
Project: 25313
Buggy source:
public Address getAddress(){
  return address;
}

Fixed version (ground truth):
@Override public Address getAddress(){
  return address;
}
Program: 25314
Project: 25314
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25315
Project: 25315
Buggy source:
@OneToMany(mappedBy="String_Node_Str") public List<Move> getMoves(){
  return moves;
}

Fixed version (ground truth):
@OneToMany(mappedBy="String_Node_Str") @Override public List<Move> getMoves(){
  return moves;
}
Program: 25316
Project: 25316
Buggy source:
public void setMoves(List<Move> moves){
  this.moves=moves;
}

Fixed version (ground truth):
@Override public void setMoves(List<Move> moves){
  this.moves=moves;
}
Program: 25317
Project: 25317
Buggy source:
public void setAddress1(String address1){
  this.address1=address1;
}

Fixed version (ground truth):
@Override public void setAddress1(String address1){
  this.address1=address1;
}
Program: 25318
Project: 25318
Buggy source:
public String getAddress2(){
  return address2;
}

Fixed version (ground truth):
@Override public String getAddress2(){
  return address2;
}
Program: 25319
Project: 25319
Buggy source:
public void setZipCode(String zipCode){
  this.zipCode=zipCode;
}

Fixed version (ground truth):
@Override public void setZipCode(String zipCode){
  this.zipCode=zipCode;
}
Program: 25320
Project: 25320
Buggy source:
public String getState(){
  return state;
}

Fixed version (ground truth):
@Override public String getState(){
  return state;
}
Program: 25321
Project: 25321
Buggy source:
public String getZipCode(){
  return zipCode;
}

Fixed version (ground truth):
@Override public String getZipCode(){
  return zipCode;
}
Program: 25322
Project: 25322
Buggy source:
public String getAddress1(){
  return address1;
}

Fixed version (ground truth):
@Override public String getAddress1(){
  return address1;
}
Program: 25323
Project: 25323
Buggy source:
public void setCity(String city){
  this.city=city;
}

Fixed version (ground truth):
@Override public void setCity(String city){
  this.city=city;
}
Program: 25324
Project: 25324
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25325
Project: 25325
Buggy source:
public void setState(String state){
  this.state=state;
}

Fixed version (ground truth):
@Override public void setState(String state){
  this.state=state;
}
Program: 25326
Project: 25326
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25327
Project: 25327
Buggy source:
public void setAddress2(String address2){
  this.address2=address2;
}

Fixed version (ground truth):
@Override public void setAddress2(String address2){
  this.address2=address2;
}
Program: 25328
Project: 25328
Buggy source:
public String getCity(){
  return city;
}

Fixed version (ground truth):
@Override public String getCity(){
  return city;
}
Program: 25329
Project: 25329
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
@Override public void setName(String name){
  this.name=name;
}
Program: 25330
Project: 25330
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return name;
}
Program: 25331
Project: 25331
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25332
Project: 25332
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25333
Project: 25333
Buggy source:
@OneToMany(mappedBy="String_Node_Str") public List<Move> getMoves(){
  return moves;
}

Fixed version (ground truth):
@OneToMany(mappedBy="String_Node_Str") @Override public List<Move> getMoves(){
  return moves;
}
Program: 25334
Project: 25334
Buggy source:
public void setMoves(List<Move> moves){
  this.moves=moves;
}

Fixed version (ground truth):
@Override public void setMoves(List<Move> moves){
  this.moves=moves;
}
Program: 25335
Project: 25335
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
@Override public void setName(String name){
  this.name=name;
}
Program: 25336
Project: 25336
Buggy source:
public String getValue(){
  return value;
}

Fixed version (ground truth):
@Override public String getValue(){
  return value;
}
Program: 25337
Project: 25337
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return name;
}
Program: 25338
Project: 25338
Buggy source:
public void setValue(String value){
  this.value=value;
}

Fixed version (ground truth):
@Override public void setValue(String value){
  this.value=value;
}
Program: 25339
Project: 25339
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25340
Project: 25340
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25341
Project: 25341
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
@Override public void setName(String name){
  this.name=name;
}
Program: 25342
Project: 25342
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return name;
}
Program: 25343
Project: 25343
Buggy source:
public String getTimeZone(){
  return timeZone;
}

Fixed version (ground truth):
@Override public String getTimeZone(){
  return timeZone;
}
Program: 25344
Project: 25344
Buggy source:
public void setTimeZone(String timeZone){
  this.timeZone=timeZone;
}

Fixed version (ground truth):
@Override public void setTimeZone(String timeZone){
  this.timeZone=timeZone;
}
Program: 25345
Project: 25345
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25346
Project: 25346
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25347
Project: 25347
Buggy source:
public String getDimensions(){
  return dimensions;
}

Fixed version (ground truth):
@Override public String getDimensions(){
  return dimensions;
}
Program: 25348
Project: 25348
Buggy source:
public int getCubicFeet(){
  return cubicFeet;
}

Fixed version (ground truth):
@Override public int getCubicFeet(){
  return cubicFeet;
}
Program: 25349
Project: 25349
Buggy source:
public void setCubicFeet(int cubicFeet){
  this.cubicFeet=cubicFeet;
}

Fixed version (ground truth):
@Override public void setCubicFeet(int cubicFeet){
  this.cubicFeet=cubicFeet;
}
Program: 25350
Project: 25350
Buggy source:
public void setDimensions(String dimensions){
  this.dimensions=dimensions;
}

Fixed version (ground truth):
@Override public void setDimensions(String dimensions){
  this.dimensions=dimensions;
}
Program: 25351
Project: 25351
Buggy source:
public void setId(int id){
  this.id=id;
}

Fixed version (ground truth):
@Override public void setId(int id){
  this.id=id;
}
Program: 25352
Project: 25352
Buggy source:
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) public int getId(){
  return id;
}

Fixed version (ground truth):
@Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Override public int getId(){
  return id;
}
Program: 25353
Project: 25353
Buggy source:
public void setDescription(String description){
  this.description=description;
}

Fixed version (ground truth):
@Override public void setDescription(String description){
  this.description=description;
}
Program: 25354
Project: 25354
Buggy source:
public String getDescription(){
  return description;
}

Fixed version (ground truth):
@Override public String getDescription(){
  return description;
}
Program: 25355
Project: 25355
Buggy source:
public void doPhysics(World world,int i,int j,int k,int l){
  if (!world.isStatic) {
    int i1=world.getData(i,j,k);
    boolean flag=this.canPlace(world,i,j,k);
    if (!flag) {
      this.a_(world,i,j,k,i1);
      world.setTypeId(i,j,k,0);
    }
 else {
      if ((Block.byId[l] != null && Block.byId[l].isPowerSource()) || Block.DIODE_OFF.id == l || Block.DIODE_ON.id == l)       this.g(world,i,j,k);
    }
    super.doPhysics(world,i,j,k,l);
  }
}

Fixed version (ground truth):
public void doPhysics(World world,int i,int j,int k,int l){
  if (!world.isStatic) {
    int i1=world.getData(i,j,k);
    boolean flag=this.canPlace(world,i,j,k);
    if (!flag) {
      this.a_(world,i,j,k,i1);
      world.setTypeId(i,j,k,0);
    }
 else {
      this.g(world,i,j,k);
    }
    super.doPhysics(world,i,j,k,l);
  }
}
Program: 25356
Project: 25356
Buggy source:
public WorldServer a(int i){
  return i == -1 ? this.worlds.get(1) : this.worlds.get(0);
}

Fixed version (ground truth):
public WorldServer a(int i){
  for (  WorldServer world : worlds) {
    if (world.dimension == i) {
      return world;
    }
  }
  return worlds.get(0);
}
Program: 25357
Project: 25357
Buggy source:
public ServerConfigurationManager(MinecraftServer minecraftserver){
  minecraftserver.server=new CraftServer(minecraftserver,this);
  minecraftserver.console=new ColouredConsoleSender(minecraftserver.server);
  cserver=minecraftserver.server;
  this.server=minecraftserver;
  this.j=minecraftserver.a("String_Node_Str");
  this.k=minecraftserver.a("String_Node_Str");
  this.l=minecraftserver.a("String_Node_Str");
  this.m=minecraftserver.a("String_Node_Str");
  int i=minecraftserver.propertyManager.getInt("String_Node_Str",10);
  this.d[0]=new PlayerManager(minecraftserver,0,i);
  this.d[1]=new PlayerManager(minecraftserver,-1,i);
  this.maxPlayers=minecraftserver.propertyManager.getInt("String_Node_Str",20);
  this.o=minecraftserver.propertyManager.getBoolean("String_Node_Str",false);
  this.g();
  this.i();
  this.k();
  this.m();
  this.h();
  this.j();
  this.l();
  this.n();
}

Fixed version (ground truth):
public ServerConfigurationManager(MinecraftServer minecraftserver){
  minecraftserver.server=new CraftServer(minecraftserver,this);
  minecraftserver.console=new ColouredConsoleSender(minecraftserver.server);
  cserver=minecraftserver.server;
  this.server=minecraftserver;
  this.j=minecraftserver.a("String_Node_Str");
  this.k=minecraftserver.a("String_Node_Str");
  this.l=minecraftserver.a("String_Node_Str");
  this.m=minecraftserver.a("String_Node_Str");
  int i=minecraftserver.propertyManager.getInt("String_Node_Str",10);
  this.maxPlayers=minecraftserver.propertyManager.getInt("String_Node_Str",20);
  this.o=minecraftserver.propertyManager.getBoolean("String_Node_Str",false);
  this.g();
  this.i();
  this.k();
  this.m();
  this.h();
  this.j();
  this.l();
  this.n();
}
Program: 25358
Project: 25358
Buggy source:
public WorldServer(MinecraftServer minecraftserver,IDataManager idatamanager,String s,int i,long j){
  super(idatamanager,s,j,WorldProvider.a(i));
  this.server=minecraftserver;
  this.dimension=i;
  this.cserver=minecraftserver.server;
  this.world=new CraftWorld(this);
  this.pvpMode=minecraftserver.pvpMode;
}

Fixed version (ground truth):
public WorldServer(MinecraftServer minecraftserver,IDataManager idatamanager,String s,int i,long j){
  super(idatamanager,s,j,WorldProvider.a(i));
  this.server=minecraftserver;
  this.dimension=i;
  this.cserver=minecraftserver.server;
  this.world=new CraftWorld(this);
  this.pvpMode=minecraftserver.pvpMode;
  this.manager=new PlayerManager(minecraftserver,dimension,minecraftserver.propertyManager.getInt("String_Node_Str",10));
}
Program: 25360
Project: 25360
Buggy source:
public boolean dispatchCommand(CommandSender sender,String commandLine){
  if (commandMap.dispatch(sender,commandLine)) {
    return true;
  }
  if (!sender.isOp()) {
    return false;
  }
  return console.consoleCommandHandler.handle(new ServerCommand(commandLine,new ServerCommandListener(sender)));
}

Fixed version (ground truth):
public boolean dispatchCommand(CommandSender sender,String commandLine){
  if (commandMap.dispatch(sender,commandLine)) {
    return true;
  }
  if (!sender.isOp()) {
    return false;
  }
  return console.consoleCommandHandler.handle(new ServerCommand(commandLine,(ICommandListener)new ServerCommandListener(sender)));
}
Program: 25361
Project: 25361
Buggy source:
@Override public boolean teleport(Location location){
  WorldServer oldWorld=((CraftWorld)getWorld()).getHandle();
  WorldServer newWorld=((CraftWorld)location.getWorld()).getHandle();
  ServerConfigurationManager manager=server.getHandle();
  EntityPlayer entity=getHandle();
  if (oldWorld != newWorld) {
    entity.dimension=newWorld.dimension;
    entity.netServerHandler.sendPacket(new Packet9Respawn((byte)entity.dimension));
    oldWorld.removeEntity(entity);
    entity.dead=false;
    if (entity.Q()) {
      newWorld.addEntity(entity);
      entity.setPositionRotation(location.getX(),location.getY(),location.getZ(),location.getYaw(),location.getPitch());
      newWorld.entityJoinedWorld(entity,false);
    }
    manager.a(entity);
    entity.netServerHandler.a(location.getX(),location.getY(),location.getZ(),location.getYaw(),location.getPitch());
    entity.a((World)newWorld);
    manager.a(entity,newWorld);
    entity.a(entity.defaultContainer);
    return true;
  }
 else {
    return entity.netServerHandler.teleport(location);
  }
}

Fixed version (ground truth):
@Override public boolean teleport(Location location){
  WorldServer oldWorld=((CraftWorld)getWorld()).getHandle();
  WorldServer newWorld=((CraftWorld)location.getWorld()).getHandle();
  ServerConfigurationManager manager=server.getHandle();
  EntityPlayer entity=getHandle();
  if (oldWorld != newWorld) {
    entity.dimension=newWorld.dimension;
    entity.netServerHandler.sendPacket(new Packet9Respawn((byte)location.getWorld().getEnvironment().getId()));
    oldWorld.removeEntity(entity);
    entity.dead=false;
    entity.setPositionRotation(location.getX(),location.getY(),location.getZ(),location.getYaw(),location.getPitch());
    if (entity.Q()) {
      oldWorld.entityJoinedWorld(entity,false);
      newWorld.addEntity(entity);
      entity.setPositionRotation(location.getX(),location.getY(),location.getZ(),location.getYaw(),location.getPitch());
      newWorld.entityJoinedWorld(entity,false);
    }
    manager.a(entity);
    entity.netServerHandler.a(location.getX(),location.getY(),location.getZ(),location.getYaw(),location.getPitch());
    entity.a((World)newWorld);
    manager.a(entity,newWorld);
    entity.a(entity.defaultContainer);
    return true;
  }
 else {
    return entity.netServerHandler.teleport(location);
  }
}
Program: 25363
Project: 25363
Buggy source:
public boolean teleport(Location dest){
  Player player=getPlayer();
  Location from=player.getLocation();
  Location to=dest.clone();
  PlayerTeleportEvent event=new PlayerTeleportEvent(player,from,to);
  server.getPluginManager().callEvent(event);
  from=event.getFrom();
  to=event.isCancelled() ? from : event.getTo();
  double d0, d1, d2;
  float f, f1;
  d0=to.getX();
  d1=to.getY();
  d2=to.getZ();
  f=to.getYaw();
  f1=to.getPitch();
  this.m=false;
  this.x=d0;
  this.y=d1;
  this.z=d2;
  this.player.setLocation(d0,d1,d2,f,f1);
  this.player.netServerHandler.sendPacket(new Packet13PlayerLookMove(d0,d1 + 1.6200000047683716D,d1,d2,f,f1,false));
  return !event.isCancelled();
}

Fixed version (ground truth):
public boolean teleport(Location dest){
  Player player=getPlayer();
  Location from=player.getLocation();
  Location to=dest.clone();
  PlayerTeleportEvent event=new PlayerTeleportEvent(player,from,to);
  server.getPluginManager().callEvent(event);
  from=event.getFrom();
  to=event.isCancelled() ? from : event.getTo();
  double d0, d1, d2;
  float f, f1;
  d0=to.getX();
  d1=to.getY();
  d2=to.getZ();
  f=to.getYaw();
  f1=to.getPitch();
  if (Float.isNaN(f)) {
    f=0;
  }
  if (Float.isNaN(f1)) {
    f1=0;
  }
  this.m=false;
  this.x=d0;
  this.y=d1;
  this.z=d2;
  this.player.setLocation(d0,d1,d2,f,f1);
  this.player.netServerHandler.sendPacket(new Packet13PlayerLookMove(d0,d1 + 1.6200000047683716D,d1,d2,f,f1,false));
  return !event.isCancelled();
}
Program: 25364
Project: 25364
Buggy source:
private void a(World world,int i,int j,int k,int l,Random random){
  int i1=this.b[world.getTypeId(i,j,k)];
  if (random.nextInt(l) < i1) {
    boolean flag=world.getTypeId(i,j,k) == Block.TNT.id;
    Server server=((WorldServer)world).getServer();
    CraftWorld cworld=((WorldServer)world).getWorld();
    org.bukkit.block.Block theBlock=cworld.getBlockAt(i,j,k);
    BlockBurnEvent event=new BlockBurnEvent(theBlock);
    server.getPluginManager().callEvent(event);
    if (event.isCancelled()) {
      return;
    }
    if (random.nextInt(2) == 0) {
      world.setTypeId(i,j,k,this.id);
    }
 else {
      world.setTypeId(i,j,k,0);
    }
    if (flag) {
      Block.TNT.postBreak(world,i,j,k,0);
    }
  }
}

Fixed version (ground truth):
private void a(World world,int i,int j,int k,int l,Random random){
  int i1=this.b[world.getTypeId(i,j,k)];
  if (random.nextInt(l) < i1) {
    boolean flag=world.getTypeId(i,j,k) == Block.TNT.id;
    Server server=((WorldServer)world).getServer();
    CraftWorld cworld=((WorldServer)world).getWorld();
    org.bukkit.block.Block theBlock=cworld.getBlockAt(i,j,k);
    BlockBurnEvent event=new BlockBurnEvent(theBlock);
    server.getPluginManager().callEvent(event);
    if (event.isCancelled()) {
      return;
    }
    if (random.nextInt(2) == 0 && !world.q(i,j,k)) {
      world.setTypeId(i,j,k,this.id);
    }
 else {
      world.setTypeId(i,j,k,0);
    }
    if (flag) {
      Block.TNT.postBreak(world,i,j,k,0);
    }
  }
}
Program: 25365
Project: 25365
Buggy source:
public boolean d(){
  return false;
}

Fixed version (ground truth):
public AxisAlignedBB d(World world,int i,int j,int k){
  return null;
}
Program: 25366
Project: 25366
Buggy source:
public void sendPacket(Packet packet){
  if (packet instanceof Packet6SpawnPosition) {
    Packet6SpawnPosition packet6=(Packet6SpawnPosition)packet;
    this.player.compassTarget=new Location(getPlayer().getWorld(),packet6.x,packet6.y,packet6.z);
  }
  this.networkManager.a(packet);
  this.g=this.f;
}

Fixed version (ground truth):
public void sendPacket(Packet packet){
  if (packet instanceof Packet6SpawnPosition) {
    Packet6SpawnPosition packet6=(Packet6SpawnPosition)packet;
    this.player.compassTarget=new Location(getPlayer().getWorld(),packet6.x,packet6.y,packet6.z);
  }
 else   if (packet instanceof Packet3Chat) {
    String message=((Packet3Chat)packet).a;
    for (    final String line : TextWrapper.wrapText(message)) {
      this.networkManager.a(new Packet3Chat(line));
    }
    packet=null;
  }
  if (packet != null)   this.networkManager.a(packet);
  this.g=this.f;
}
Program: 25367
Project: 25367
Buggy source:
public static String[] wrapText(final String text){
  final StringBuilder out=new StringBuilder();
  char colorChar='f';
  int lineWidth=0;
  int lineCount=0;
  boolean hasColored=true;
  for (int i=0; i < text.length(); i++) {
    char ch=text.charAt(i);
    if (ch == '\u00A7' && i < text.length() - 1) {
      colorChar=text.charAt(++i);
      hasColored=false;
      continue;
    }
 else     if (ch >= characterWidths.length) {
      ch=(char)(characterWidths.length - 1);
    }
    final int width=characterWidths[(int)ch];
    if (lineWidth + width >= CHAT_WINDOW_WIDTH) {
      out.append('\n');
      lineCount++;
      if (colorChar != 'f') {
        out.append('\u00A7');
        out.append(colorChar);
      }
      out.append(ch);
      lineWidth=width;
    }
 else {
      if (!hasColored) {
        out.append('\u00A7');
        out.append(colorChar);
        hasColored=true;
      }
      out.append(ch);
      lineWidth+=width;
    }
  }
  String result=out.toString();
  if (pattern.matcher(result).find())   return result.split("String_Node_Str");
  if (lineCount > 0)   result.replace("String_Node_Str","String_Node_Str");
  return new String[]{result};
}

Fixed version (ground truth):
public static String[] wrapText(final String text){
  final StringBuilder out=new StringBuilder();
  char colorChar='f';
  int lineWidth=0;
  int lineLenght=0;
  for (int i=0; i < text.length(); i++) {
    char ch=text.charAt(i);
    if (ch == COLOR_CHAR && i < text.length() - 1) {
      if (lineLenght + 2 > CHAT_STRING_LENGTH) {
        out.append('\n');
        lineLenght=0;
        if (colorChar != 'f') {
          out.append(COLOR_CHAR).append(colorChar);
          lineLenght+=2;
        }
      }
      colorChar=text.charAt(++i);
      out.append(COLOR_CHAR).append(colorChar);
      lineLenght+=2;
      continue;
    }
    int index=allowedChars.indexOf(ch);
    if (index == -1) {
      continue;
    }
 else {
      index+=32;
    }
    final int width=characterWidths[index];
    if (lineLenght + 1 > CHAT_STRING_LENGTH || lineWidth + width >= CHAT_WINDOW_WIDTH) {
      out.append('\n');
      lineLenght=0;
      if (colorChar != 'f') {
        out.append(COLOR_CHAR).append(colorChar);
        lineLenght+=2;
      }
      lineWidth=width;
    }
 else {
      lineWidth+=width;
    }
    out.append(ch);
    lineLenght++;
  }
  return out.toString().split("String_Node_Str");
}
Program: 25368
Project: 25368
Buggy source:
public void sendMessage(String message){
  for (  final String line : TextWrapper.wrapText(message)) {
    getHandle().netServerHandler.sendPacket(new Packet3Chat(line));
  }
}

Fixed version (ground truth):
public void sendMessage(String message){
  this.sendRawMessage(message);
}
Program: 25369
Project: 25369
Buggy source:
public HashMap<Integer,ItemStack> all(ItemStack item){
  HashMap<Integer,ItemStack> slots=new HashMap<Integer,ItemStack>();
  ItemStack[] inventory=getContents();
  for (int i=0; i < inventory.length; i++) {
    if (item.equals(inventory[i])) {
      slots.put(i,inventory[i]);
    }
  }
  return slots;
}

Fixed version (ground truth):
public HashMap<Integer,ItemStack> all(ItemStack item){
  HashMap<Integer,ItemStack> slots=new HashMap<Integer,ItemStack>();
  if (item != null) {
    ItemStack[] inventory=getContents();
    for (int i=0; i < inventory.length; i++) {
      if (item.equals(inventory[i])) {
        slots.put(i,inventory[i]);
      }
    }
  }
  return slots;
}