nus-yam/ex-repair huggingface dataset:
Program: 63437
Project: 63437
Buggy source:
private void createSessionAndGenerateException(LogFactory mockLogFactory) throws ConfigError, FieldConvertError {
  SessionSettings settings=new SessionSettings();
  settings.setString(Session.SETTING_START_DAY,"String_Node_Str");
  settings.setString(Session.SETTING_START_TIME,"String_Node_Str");
  settings.setString(Session.SETTING_END_DAY,"String_Node_Str");
  settings.setString(Session.SETTING_END_TIME,"String_Node_Str");
  SessionID sessionID=new SessionID("String_Node_Str","String_Node_Str","String_Node_Str");
  SessionSchedule schedule=new SessionSchedule(settings,sessionID);
  new Session(null,new MessageStoreFactory(){
    public MessageStore create(    SessionID sessionID){
      try {
        return new MemoryStore(){
          public Date getCreationTime() throws IOException {
            throw new IOException("String_Node_Str");
          }
        }
;
      }
 catch (      IOException e) {
        return null;
      }
    }
  }
,null,null,schedule,mockLogFactory,null,0);
}

Fixed version (ground truth):
private void createSessionAndGenerateException(LogFactory mockLogFactory) throws ConfigError, FieldConvertError {
  SessionSettings settings=new SessionSettings();
  settings.setString(Session.SETTING_START_TIME,"String_Node_Str");
  settings.setString(Session.SETTING_END_TIME,"String_Node_Str");
  SessionID sessionID=new SessionID("String_Node_Str","String_Node_Str","String_Node_Str");
  SessionSchedule schedule=new SessionSchedule(settings,sessionID);
  new Session(null,new MessageStoreFactory(){
    public MessageStore create(    SessionID sessionID){
      try {
        return new MemoryStore(){
          public Date getCreationTime() throws IOException {
            throw new IOException("String_Node_Str");
          }
        }
;
      }
 catch (      IOException e) {
        return null;
      }
    }
  }
,null,null,schedule,mockLogFactory,null,0);
}
Program: 63438
Project: 63438
Buggy source:
private ObjectName createSessionName(Session session) throws MalformedObjectNameException {
  TreeMap properties=new TreeMap();
  properties.put("String_Node_Str","String_Node_Str");
  SessionID sessionID=session.getSessionID();
  ObjectNameFactory nameFactory=new ObjectNameFactory();
  nameFactory.addProperty("String_Node_Str","String_Node_Str");
  addSessionIdProperties(sessionID,nameFactory);
  String sessionQualifier=sessionID.getSessionQualifier();
  if (!"String_Node_Str".equals(sessionQualifier)) {
    nameFactory.addProperty("String_Node_Str",sessionQualifier);
  }
  return nameFactory.createName();
}

Fixed version (ground truth):
private ObjectName createSessionName(Session session) throws MalformedObjectNameException {
  TreeMap properties=new TreeMap();
  properties.put("String_Node_Str","String_Node_Str");
  SessionID sessionID=session.getSessionID();
  ObjectNameFactory nameFactory=new ObjectNameFactory();
  nameFactory.addProperty("String_Node_Str","String_Node_Str");
  addSessionIdProperties(sessionID,nameFactory);
  return nameFactory.createName();
}
Program: 63439
Project: 63439
Buggy source:
private void addSessionIdProperties(SessionID sessionID,ObjectNameFactory nameFactory){
  nameFactory.addProperty("String_Node_Str",sessionID.getBeginString());
  nameFactory.addProperty("String_Node_Str",sessionID.getSenderCompID());
  nameFactory.addProperty("String_Node_Str",sessionID.getTargetCompID());
  nameFactory.addProperty("String_Node_Str",sessionID.getSessionQualifier());
}

Fixed version (ground truth):
private void addSessionIdProperties(SessionID sessionID,ObjectNameFactory nameFactory){
  nameFactory.addProperty("String_Node_Str",sessionID.getBeginString());
  nameFactory.addProperty("String_Node_Str",sessionID.getSenderCompID());
  nameFactory.addProperty("String_Node_Str",sessionID.getTargetCompID());
  String sessionQualifier=sessionID.getSessionQualifier();
  if (!"String_Node_Str".equals(sessionQualifier)) {
    nameFactory.addProperty("String_Node_Str",sessionQualifier);
  }
}
Program: 63441
Project: 63441
Buggy source:
public void testMessageGroupCountValidation() throws InvalidMessage, Exception {
  String data="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  Message message=new Message();
  DataDictionary dd=DataDictionaryTest.getDictionary();
  message.fromString(data,dd,true);
  try {
    dd.validate(message);
    fail("String_Node_Str");
  }
 catch (  FieldException e) {
    String emsg=e.getMessage();
    assertNotNull("String_Node_Str",emsg);
    assertTrue(emsg.startsWith("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void testMessageGroupCountValidation() throws Exception {
  String data="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  Message message=new Message();
  DataDictionary dd=DataDictionaryTest.getDictionary();
  message.fromString(data,dd,true);
  try {
    dd.validate(message);
    fail("String_Node_Str");
  }
 catch (  FieldException e) {
    String emsg=e.getMessage();
    assertNotNull("String_Node_Str",emsg);
    assertTrue(emsg.startsWith("String_Node_Str"));
  }
}
Program: 63442
Project: 63442
Buggy source:
private boolean isSameWeeklySession(Calendar timestamp1,Calendar timestamp2){
  if (!isWeeklySessionTime(timestamp1) || !isWeeklySessionTime(timestamp2)) {
    return false;
  }
  if (timestamp1.equals(timestamp2)) {
    return true;
  }
  int time1Range=timestamp1.get(Calendar.DAY_OF_WEEK) - startDay;
  int time2Range=timestamp2.get(Calendar.DAY_OF_WEEK) - startDay;
  if (time1Range == 0) {
    Calendar timeOnly=getTimeOnly(timestamp1,calendar1);
    if (timeOnly.before(startTime)) {
      time1Range=7;
    }
  }
  if (time2Range == 0) {
    Calendar timeOnly=getTimeOnly(timestamp2,calendar2);
    if (timeOnly.before(startTime)) {
      time2Range=7;
    }
  }
  timestamp1=(Calendar)timestamp1.clone();
  timestamp1.add(Calendar.DATE,-1 * time1Range);
  timestamp2=(Calendar)timestamp2.clone();
  timestamp2.add(Calendar.DATE,-1 * time2Range);
  return timestamp1.get(Calendar.YEAR) == timestamp2.get(Calendar.YEAR) && timestamp1.get(Calendar.DAY_OF_YEAR) == timestamp2.get(Calendar.DAY_OF_YEAR);
}

Fixed version (ground truth):
private boolean isSameWeeklySession(Calendar timestamp1,Calendar timestamp2){
  if (!isWeeklySessionTime(timestamp1) || !isWeeklySessionTime(timestamp2)) {
    return false;
  }
  long day1=timestamp1.getTimeInMillis() / 86400000L;
  long day2=timestamp2.getTimeInMillis() / 86400000L;
  return Math.abs(day1 - day2) < 7;
}
Program: 63443
Project: 63443
Buggy source:
public void testIsSameSessionWithDay() throws Exception {
  SessionSchedule schedule=new SessionSchedule(getUtcTime(3,0,0).getTime(),getUtcTime(18,0,0).getTime(),2,5);
  Calendar t1=getUtcTimeStamp(2004,6,27,3,0,0);
  Calendar t2=getUtcTimeStamp(2004,6,25,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,31,3,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,27,3,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,26,10,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,27,10,0,0);
  t2=getUtcTimeStamp(2004,6,29,2,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,27,10,0,0);
  t2=getUtcTimeStamp(2004,6,20,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,27,2,0,0);
  t2=getUtcTimeStamp(2004,6,20,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,26,2,0,0);
  t2=getUtcTimeStamp(2004,6,19,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
}

Fixed version (ground truth):
public void testIsSameSessionWithDay() throws Exception {
  SessionSchedule schedule=new SessionSchedule(getUtcTime(3,0,0).getTime(),getUtcTime(18,0,0).getTime(),2,5);
  Calendar t1=getUtcTimeStamp(2004,6,27,3,0,0);
  Calendar t2=getUtcTimeStamp(2004,6,25,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,31,3,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,27,3,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,26,10,0,0);
  t2=getUtcTimeStamp(2004,6,27,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,27,10,0,0);
  t2=getUtcTimeStamp(2004,6,29,2,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2004,6,27,10,0,0);
  t2=getUtcTimeStamp(2004,6,20,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,27,2,0,0);
  t2=getUtcTimeStamp(2004,6,20,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  t1=getUtcTimeStamp(2004,6,26,2,0,0);
  t2=getUtcTimeStamp(2004,6,19,3,0,0);
  doIsSameSessionTest(schedule,t1,t2,false);
  Calendar startTime=getUtcTime(0,5,0);
  Calendar endTime=getUtcTime(23,45,0);
  int startDay=1;
  int endDay=7;
  schedule=new SessionSchedule(startTime.getTime(),endTime.getTime(),startDay,endDay);
  t1=getUtcTimeStamp(2006,4,4,0,0,0);
  t2=getUtcTimeStamp(2006,4,3,1,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2006,10,30,1,0,0);
  t2=getUtcTimeStamp(2006,10,31,1,0,0);
  doIsSameSessionTest(schedule,t1,t2,true);
  t1=getUtcTimeStamp(2006,12,31,10,10,10);
  t2=getUtcTimeStamp(2007,1,1,10,10,10);
  doIsSameSessionTest(schedule,t1,t2,true);
}
Program: 63444
Project: 63444
Buggy source:
int[] getOrderedFields(){
  if (orderedFieldsArray != null) {
    return orderedFieldsArray;
  }
  orderedFieldsArray=new int[orderedFields.size()];
  for (int i=0; i < orderedFields.size(); i++) {
    orderedFieldsArray[i]=((Integer)orderedFields.get(i)).intValue();
  }
  return orderedFieldsArray;
}

Fixed version (ground truth):
int[] getOrderedFields(){
  if (orderedFieldsArray == null) {
    orderedFieldsArray=new int[fields.size()];
    Iterator fieldItr=fields.iterator();
    int i=0;
    while (fieldItr.hasNext()) {
      orderedFieldsArray[i++]=((Integer)fieldItr.next()).intValue();
    }
  }
  return orderedFieldsArray;
}
Program: 63445
Project: 63445
Buggy source:
private void copyFrom(DataDictionary rhs){
  hasVersion=rhs.hasVersion;
  beginString=rhs.beginString;
  checkFieldsOutOfOrder=rhs.checkFieldsOutOfOrder;
  checkFieldsHaveValues=rhs.checkFieldsHaveValues;
  checkUserDefinedFields=rhs.checkUserDefinedFields;
  copyMap(messageFields,rhs.messageFields);
  copyMap(requiredFields,rhs.requiredFields);
  copyCollection(messages,rhs.messages);
  copyCollection(fields,rhs.fields);
  copyCollection(orderedFields,rhs.orderedFields);
  if (rhs.orderedFieldsArray != null) {
    orderedFieldsArray=new int[rhs.orderedFieldsArray.length];
    for (int i=0; i < rhs.orderedFieldsArray.length; i++) {
      orderedFieldsArray[i]=rhs.orderedFieldsArray[i];
    }
  }
  copyMap(headerFields,rhs.headerFields);
  copyMap(trailerFields,rhs.trailerFields);
  copyMap(fieldTypes,rhs.fieldTypes);
  copyMap(fieldValues,rhs.fieldValues);
  copyMap(fieldNames,rhs.fieldNames);
  copyMap(names,rhs.names);
  copyMap(valueNames,rhs.valueNames);
  copyMap(groups,rhs.groups);
  copyMap(components,rhs.components);
}

Fixed version (ground truth):
private void copyFrom(DataDictionary rhs){
  hasVersion=rhs.hasVersion;
  beginString=rhs.beginString;
  checkFieldsOutOfOrder=rhs.checkFieldsOutOfOrder;
  checkFieldsHaveValues=rhs.checkFieldsHaveValues;
  checkUserDefinedFields=rhs.checkUserDefinedFields;
  copyMap(messageFields,rhs.messageFields);
  copyMap(requiredFields,rhs.requiredFields);
  copyCollection(messages,rhs.messages);
  copyCollection(fields,rhs.fields);
  copyMap(headerFields,rhs.headerFields);
  copyMap(trailerFields,rhs.trailerFields);
  copyMap(fieldTypes,rhs.fieldTypes);
  copyMap(fieldValues,rhs.fieldValues);
  copyMap(fieldNames,rhs.fieldNames);
  copyMap(names,rhs.names);
  copyMap(valueNames,rhs.valueNames);
  copyMap(groups,rhs.groups);
  copyMap(components,rhs.components);
}
Program: 63446
Project: 63446
Buggy source:
private void setGroupCount(int countTag,int groupSize){
  try {
    IntField count;
    if (groupSize == 1) {
      count=new IntField(countTag,1);
      setField(countTag,count);
    }
 else {
      count=getIntField(countTag);
    }
    count.setValue(groupSize);
  }
 catch (  FieldNotFound e) {
    throw new RuntimeError(e);
  }
}

Fixed version (ground truth):
private void setGroupCount(int countTag,int groupSize){
  try {
    StringField count;
    if (groupSize == 1) {
      count=new StringField(countTag,"String_Node_Str");
      setField(countTag,count);
    }
 else {
      count=getField(countTag);
    }
    count.setValue(Integer.toString(groupSize));
  }
 catch (  FieldNotFound e) {
    throw new RuntimeError(e);
  }
}
Program: 63447
Project: 63447
Buggy source:
private void parseGroup(StringField field,DataDictionary dd,FieldMap parent) throws InvalidMessage {
  DataDictionary.GroupInfo rg=dd.getGroup(getMsgType(),field.getField());
  int groupField=field.getField();
  int firstField=rg.getDelimeterField();
  boolean firstFieldFound=false;
  Group group=null;
  boolean inGroupParse=true;
  while (inGroupParse) {
    field=extractField(group,dd);
    if (field.getTag() == firstField) {
      if (group != null) {
        parent.addGroup(group);
      }
      group=new Group(groupField,firstField);
      group.setField(field);
      firstFieldFound=true;
    }
 else {
      if (rg.getDataDictionary().isGroup(getMsgType(),field.getField())) {
        if (firstFieldFound) {
          parseGroup(field,rg.getDataDictionary(),group);
        }
 else {
          throw new InvalidMessage("String_Node_Str" + groupField + "String_Node_Str"+ firstField);
        }
      }
 else {
        if (rg.getDataDictionary().isField(field.getTag())) {
          group.setField(field);
        }
 else {
          if (group != null) {
            parent.addGroup(group);
          }
          pushBack(field);
          inGroupParse=false;
        }
      }
    }
  }
}

Fixed version (ground truth):
private void parseGroup(StringField field,DataDictionary dd,FieldMap parent) throws InvalidMessage {
  DataDictionary.GroupInfo rg=dd.getGroup(getMsgType(),field.getField());
  int groupCountTag=field.getField();
  parent.setField(groupCountTag,field);
  int firstField=rg.getDelimeterField();
  boolean firstFieldFound=false;
  Group group=null;
  boolean inGroupParse=true;
  while (inGroupParse) {
    field=extractField(group,dd);
    if (field.getTag() == firstField) {
      if (group != null) {
        parent.addGroup(group);
      }
      group=new Group(groupCountTag,firstField,rg.getDataDictionary().getOrderedFields());
      group.setField(field);
      firstFieldFound=true;
    }
 else {
      if (rg.getDataDictionary().isGroup(getMsgType(),field.getField())) {
        if (firstFieldFound) {
          parseGroup(field,rg.getDataDictionary(),group);
        }
 else {
          throw new InvalidMessage("String_Node_Str" + groupCountTag + "String_Node_Str"+ firstField);
        }
      }
 else {
        if (rg.getDataDictionary().isField(field.getTag())) {
          group.setField(field);
        }
 else {
          if (group != null) {
            parent.addGroup(group);
          }
          pushBack(field);
          inGroupParse=false;
        }
      }
    }
  }
}
Program: 63448
Project: 63448
Buggy source:
/** 
 * @deprecated Use getFieldTag 
 * @return
 */
public int field(){
  return getFieldTag();
}

Fixed version (ground truth):
/** 
 * @deprecated Use getFieldTag 
 * @return the field's tag number
 */
public int field(){
  return getFieldTag();
}
Program: 63449
Project: 63449
Buggy source:
/** 
 * Create factory with explicit control of message categories.
 * @param incoming if true, log incoming messages
 * @param outgoing if true, log outgoing messages
 * @param events if true, log events
 * @param heartBeats if true, log heart beat messages (the default)
 */
public ScreenLogFactory(boolean incoming,boolean outgoing,boolean events,boolean logHeartBeats){
  this.incoming=incoming;
  this.outgoing=outgoing;
  this.events=events;
  this.heartBeats=logHeartBeats;
}

Fixed version (ground truth):
/** 
 * Create factory with explicit control of message categories.
 * @param incoming if true, log incoming messages
 * @param outgoing if true, log outgoing messages
 * @param events if true, log events
 * @param logHeartBeats if true, log heart beat messages (the default)
 */
public ScreenLogFactory(boolean incoming,boolean outgoing,boolean events,boolean logHeartBeats){
  this.incoming=incoming;
  this.outgoing=outgoing;
  this.events=events;
  this.heartBeats=logHeartBeats;
}
Program: 63450
Project: 63450
Buggy source:
private boolean isSameDailySession(Calendar timestamp1,Calendar timestamp2){
  if (!isDailySessionTime(timestamp1) || !isDailySessionTime(timestamp2)) {
    return false;
  }
  if (timestamp1.equals(timestamp2)) {
    return true;
  }
  Calendar date1=getDateOnly(timestamp1,calendar1);
  Calendar date2=getDateOnly(timestamp2,calendar2);
  if (startTime.before(endTime) || startTime.equals(endTime)) {
    return date1.equals(date2);
  }
 else {
    return Math.abs(timestamp1.getTimeInMillis() - timestamp2.getTimeInMillis()) < ONE_DAY_IN_MILLIS;
  }
}

Fixed version (ground truth):
private boolean isSameDailySession(Calendar timestamp1,Calendar timestamp2){
  if (!isDailySessionTime(timestamp1) || !isDailySessionTime(timestamp2)) {
    return false;
  }
  if (timestamp1.equals(timestamp2)) {
    return true;
  }
  Calendar date1=getDateOnly(timestamp1,calendar1);
  Calendar date2=getDateOnly(timestamp2,calendar2);
  if (startTime.before(endTime) || startTime.equals(endTime)) {
    return date1.equals(date2);
  }
 else {
    long sessionLength=ONE_DAY_IN_MILLIS - (startTime.getTimeInMillis() - endTime.getTimeInMillis());
    long timeInMillis1=timestamp1.getTimeInMillis();
    long timeInMillis2=timestamp2.getTimeInMillis();
    if (timestamp1.after(timestamp2)) {
      long delta=getTimeOnly(timestamp2,calendar1).getTimeInMillis() - startTime.getTimeInMillis();
      if (delta < 0) {
        delta=ONE_DAY_IN_MILLIS + delta;
      }
      return (timeInMillis1 - timeInMillis2) < (sessionLength - delta);
    }
 else {
      return (timeInMillis2 - timeInMillis1) < sessionLength;
    }
  }
}
Program: 63451
Project: 63451
Buggy source:
private void doIsSameSessionTest(SessionSchedule schedule,Calendar time1,Calendar time2,boolean isSameSession){
  assertEquals("String_Node_Str",schedule.isSameSession(time1,time2),isSameSession);
  assertEquals("String_Node_Str",schedule.isSameSession(time2,time1),isSameSession);
}

Fixed version (ground truth):
private void doIsSameSessionTest(SessionSchedule schedule,Calendar time1,Calendar time2,boolean isSameSession){
  assertEquals("String_Node_Str",isSameSession,schedule.isSameSession(time1,time2));
  assertEquals("String_Node_Str",isSameSession,schedule.isSameSession(time2,time1));
}
Program: 63453
Project: 63453
Buggy source:
private Token getToken(InputStream inputStream) throws IOException {
  if (ch == '\0') {
    ch=nextCharacter(inputStream);
  }
  skipWhitespace(inputStream);
  if (isLabelCharacter(ch)) {
    sb.setLength(0);
    do {
      sb.append(ch);
      ch=nextCharacter(inputStream);
    }
 while (isLabelCharacter(ch));
    return new Token(ID_TOKEN,sb.toString());
  }
 else   if (ch == '=') {
    ch=nextCharacter(inputStream);
    skipWhitespace(inputStream);
    if (isValueCharacter(ch)) {
      sb.setLength(0);
      do {
        sb.append(ch);
        ch=nextCharacter(inputStream);
      }
 while (isValueCharacter(ch));
      return new Token(VALUE_TOKEN,sb.toString().trim());
    }
  }
 else   if (ch == '[') {
    ch=nextCharacter(inputStream);
    Token id=getToken(inputStream);
    ch=nextCharacter(inputStream);
    return new Token(SECTION_TOKEN,id.getValue());
  }
 else   if (ch == '#') {
    do {
      ch=nextCharacter(inputStream);
    }
 while (!isNewLineCharacter(ch));
    return getToken(inputStream);
  }
  return null;
}

Fixed version (ground truth):
private Token getToken(InputStream inputStream) throws IOException {
  if (ch == '\0') {
    ch=nextCharacter(inputStream);
  }
  skipWhitespace(inputStream);
  if (isLabelCharacter(ch)) {
    sb.setLength(0);
    do {
      sb.append(ch);
      ch=nextCharacter(inputStream);
    }
 while (isLabelCharacter(ch));
    return new Token(ID_TOKEN,sb.toString());
  }
 else   if (ch == '=') {
    ch=nextCharacter(inputStream);
    sb.setLength(0);
    if (isValueCharacter(ch)) {
      do {
        sb.append(ch);
        ch=nextCharacter(inputStream);
      }
 while (isValueCharacter(ch));
    }
    return new Token(VALUE_TOKEN,sb.toString().trim());
  }
 else   if (ch == '[') {
    ch=nextCharacter(inputStream);
    Token id=getToken(inputStream);
    ch=nextCharacter(inputStream);
    return new Token(SECTION_TOKEN,id.getValue());
  }
 else   if (ch == '#') {
    do {
      ch=nextCharacter(inputStream);
    }
 while (!isNewLineCharacter(ch));
    return getToken(inputStream);
  }
  return null;
}
Program: 63454
Project: 63454
Buggy source:
private SessionSettings setUpSession(String extra) throws ConfigError {
  String data=new String();
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  if (extra != null) {
    data+=extra;
  }
  ByteArrayInputStream cfg=new ByteArrayInputStream(data.getBytes());
  SessionSettings settings=new SessionSettings(cfg);
  return settings;
}

Fixed version (ground truth):
private SessionSettings setUpSession(String extra) throws ConfigError {
  String data=new String();
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  if (extra != null) {
    data+=extra;
  }
  ByteArrayInputStream cfg=new ByteArrayInputStream(data.getBytes());
  SessionSettings settings=new SessionSettings(cfg);
  return settings;
}
Program: 63455
Project: 63455
Buggy source:
private String insertTimes(String message){
  Matcher matcher=TIME_PATTERN.matcher(message);
  while (matcher.find()) {
    long offset=0;
    if (matcher.group(2) != null) {
      offset=Long.parseLong(matcher.group(2)) * 1000L;
      if (matcher.group(2).equals("String_Node_Str")) {
        offset*=-1;
      }
    }
    String beginString=message.substring(2,9);
    boolean includeMillis=beginString.compareTo(FixVersions.BEGINSTRING_FIX42) >= 0;
    message=matcher.replaceFirst(UtcTimestampConverter.convert(new Date(System.currentTimeMillis() + (offset * 1000)),includeMillis));
    matcher=TIME_PATTERN.matcher(message);
  }
  return message;
}

Fixed version (ground truth):
private String insertTimes(String message){
  Matcher matcher=TIME_PATTERN.matcher(message);
  while (matcher.find()) {
    long offset=0;
    if (matcher.group(2) != null) {
      offset=Long.parseLong(matcher.group(2)) * 1000L;
      if (matcher.group(2).equals("String_Node_Str")) {
        offset*=-1;
      }
    }
    String beginString=message.substring(2,9);
    boolean includeMillis=beginString.compareTo(FixVersions.BEGINSTRING_FIX42) >= 0;
    message=matcher.replaceFirst(UtcTimestampConverter.convert(new Date(System.currentTimeMillis() + offset),includeMillis));
    matcher=TIME_PATTERN.matcher(message);
  }
  return message;
}
Program: 63456
Project: 63456
Buggy source:
/** 
 * Get the field tag given a field name.
 * @param name the field name
 * @return the tag
 */
public int getFieldTag(String name){
  Integer tag=(Integer)fieldNames.get(name);
  return tag != null ? tag.intValue() : -1;
}

Fixed version (ground truth):
/** 
 * Get the field tag given a field name.
 * @param name the field name
 * @return the tag
 */
public int getFieldTag(String name){
  Integer tag=(Integer)names.get(name);
  return tag != null ? tag.intValue() : -1;
}
Program: 63457
Project: 63457
Buggy source:
private boolean isLabelCharacter(char ch){
  return (byte)ch != -1 && "String_Node_Str".indexOf(ch) == -1;
}

Fixed version (ground truth):
private boolean isLabelCharacter(char ch){
  return !isEndOfStream(ch) && "String_Node_Str".indexOf(ch) == -1;
}
Program: 63458
Project: 63458
Buggy source:
private boolean isValueCharacter(char ch){
  return (byte)ch != -1 && "String_Node_Str".indexOf(ch) == -1;
}

Fixed version (ground truth):
private boolean isValueCharacter(char ch){
  return !isEndOfStream(ch) && !isNewLineCharacter(ch);
}
Program: 63459
Project: 63459
Buggy source:
private Token getToken(InputStream inputStream) throws IOException {
  if (ch == '\0') {
    ch=nextCharacter(inputStream);
  }
  skipWhitespace(inputStream);
  if (isLabelCharacter(ch)) {
    sb.setLength(0);
    do {
      sb.append(ch);
      ch=nextCharacter(inputStream);
    }
 while (isLabelCharacter(ch));
    return new Token(ID_TOKEN,sb.toString());
  }
 else   if (ch == '=') {
    ch=nextCharacter(inputStream);
    skipWhitespace(inputStream);
    if (isValueCharacter(ch)) {
      sb.setLength(0);
      do {
        sb.append(ch);
        ch=nextCharacter(inputStream);
      }
 while (isValueCharacter(ch));
      return new Token(VALUE_TOKEN,sb.toString());
    }
  }
 else   if (ch == '[') {
    ch=nextCharacter(inputStream);
    Token id=getToken(inputStream);
    ch=nextCharacter(inputStream);
    return new Token(SECTION_TOKEN,id.getValue());
  }
 else   if (ch == '#') {
    do {
      ch=nextCharacter(inputStream);
    }
 while ("String_Node_Str".indexOf(ch) == -1);
    return getToken(inputStream);
  }
  return null;
}

Fixed version (ground truth):
private Token getToken(InputStream inputStream) throws IOException {
  if (ch == '\0') {
    ch=nextCharacter(inputStream);
  }
  skipWhitespace(inputStream);
  if (isLabelCharacter(ch)) {
    sb.setLength(0);
    do {
      sb.append(ch);
      ch=nextCharacter(inputStream);
    }
 while (isLabelCharacter(ch));
    return new Token(ID_TOKEN,sb.toString());
  }
 else   if (ch == '=') {
    ch=nextCharacter(inputStream);
    skipWhitespace(inputStream);
    if (isValueCharacter(ch)) {
      sb.setLength(0);
      do {
        sb.append(ch);
        ch=nextCharacter(inputStream);
      }
 while (isValueCharacter(ch));
      return new Token(VALUE_TOKEN,sb.toString());
    }
  }
 else   if (ch == '[') {
    ch=nextCharacter(inputStream);
    Token id=getToken(inputStream);
    ch=nextCharacter(inputStream);
    return new Token(SECTION_TOKEN,id.getValue());
  }
 else   if (ch == '#') {
    do {
      ch=nextCharacter(inputStream);
    }
 while (!isNewLineCharacter(ch));
    return getToken(inputStream);
  }
  return null;
}
Program: 63460
Project: 63460
Buggy source:
private SessionSettings setUpSession(String extra) throws ConfigError {
  String data=new String();
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  if (extra != null) {
    data+=extra;
  }
  ByteArrayInputStream cfg=new ByteArrayInputStream(data.getBytes());
  SessionSettings settings=new SessionSettings(cfg);
  return settings;
}

Fixed version (ground truth):
private SessionSettings setUpSession(String extra) throws ConfigError {
  String data=new String();
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  data+="String_Node_Str";
  if (extra != null) {
    data+=extra;
  }
  ByteArrayInputStream cfg=new ByteArrayInputStream(data.getBytes());
  SessionSettings settings=new SessionSettings(cfg);
  return settings;
}
Program: 63462
Project: 63462
Buggy source:
private static boolean startsWith(ByteBuffer buffer,int bufferOffset,byte[] data){
  for (int dataOffset=0, bufferLimit=buffer.limit() - data.length + 1; dataOffset < data.length && bufferOffset < bufferLimit; dataOffset++, bufferOffset++) {
    if (buffer.get(bufferOffset) != data[dataOffset] && data[dataOffset] != '?') {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private static boolean startsWith(ByteBuffer buffer,int bufferOffset,byte[] data){
  if (bufferOffset + data.length > buffer.limit()) {
    return false;
  }
  for (int dataOffset=0, bufferLimit=buffer.limit() - data.length + 1; dataOffset < data.length && bufferOffset < bufferLimit; dataOffset++, bufferOffset++) {
    if (buffer.get(bufferOffset) != data[dataOffset] && data[dataOffset] != '?') {
      return false;
    }
  }
  return true;
}
Program: 63463
Project: 63463
Buggy source:
public void testSplitMessage() throws Exception {
  ByteBuffer buffer=ByteBuffer.allocate(1024);
  String data="String_Node_Str";
  buffer.put(data.substring(0,15).getBytes());
  buffer.flip();
  Message message=FIXMessageData.RECOGNIZER.recognize(buffer);
  assertNotNull("String_Node_Str",message);
  buffer.compact();
  buffer.put(data.substring(15,data.length()).getBytes());
  buffer.flip();
  assertMessageFound(buffer,data);
}

Fixed version (ground truth):
public void testSplitMessage() throws Exception {
  String data="String_Node_Str";
  for (int i=1; i < data.length(); i++) {
    doSplitMessageTest(i,data);
  }
}
Program: 63464
Project: 63464
Buggy source:
public void start() throws ConfigError, RuntimeError {
  initialize(false);
  onStart();
}

Fixed version (ground truth):
public void start() throws ConfigError, RuntimeError {
  initialize(isHandlingMessageInCallingThread());
  onStart();
}
Program: 63465
Project: 63465
Buggy source:
public int compare(Object o1,Object o2){
  Integer tag1=(Integer)o1;
  Integer tag2=(Integer)o2;
  int index1=indexOf(tag1.intValue(),fieldOrder);
  int index2=indexOf(tag2.intValue(),fieldOrder);
  return index1 != index2 ? (index1 < index2 ? -1 : 1) : 0;
}

Fixed version (ground truth):
public int compare(Object o1,Object o2){
  Integer tag1=(Integer)o1;
  Integer tag2=(Integer)o2;
  int index1=indexOf(tag1.intValue(),fieldOrder);
  int index2=indexOf(tag2.intValue(),fieldOrder);
  if ((index1 != Integer.MAX_VALUE) && (index2 != Integer.MAX_VALUE)) {
    return index1 != index2 ? (index1 < index2 ? -1 : 1) : 0;
  }
 else {
    return -1;
  }
}
Program: 63466
Project: 63466
Buggy source:
public void addGroup(Group group){
  getGroups(group.getFieldTag()).add(new Group(group));
}

Fixed version (ground truth):
public void addGroup(Group group){
  getGroups(group.getFieldTag()).add(new Group(group));
  group.clear();
}
Program: 63467
Project: 63467
Buggy source:
public boolean set(int sequence,String message) throws IOException {
  msgFile.seek(msgFile.length());
  headerFile.seek(headerFile.length());
  long offset=msgFile.getFilePointer();
  if (offset > 0) {
    headerFile.write(' ');
  }
  int size=message.length();
  messageIndex.put(new Integer(sequence),new long[]{offset,size});
  headerFile.write((Integer.toString(sequence) + "String_Node_Str" + Long.toString(offset)+ "String_Node_Str"+ Integer.toString(size)).getBytes());
  msgFile.write(message.getBytes());
  return true;
}

Fixed version (ground truth):
public boolean set(int sequence,String message) throws IOException {
  msgFile.seek(msgFile.length());
  headerFile.seek(headerFile.length());
  long offset=msgFile.getFilePointer();
  StringBuffer headerBuffer=new StringBuffer();
  if (offset > 0) {
    headerBuffer.append(' ');
  }
  int size=message.length();
  messageIndex.put(new Long(sequence),new long[]{offset,size});
  headerBuffer.append(sequence);
  headerBuffer.append("String_Node_Str");
  headerBuffer.append(offset);
  headerBuffer.append("String_Node_Str");
  headerBuffer.append(size);
  headerFile.write(headerBuffer.toString().getBytes());
  msgFile.write(message.getBytes());
  return true;
}
Program: 63468
Project: 63468
Buggy source:
private String getMessage(int i) throws IOException {
  long[] offsetAndSize=(long[])messageIndex.get(new Integer(i));
  String message=null;
  if (offsetAndSize != null) {
    msgFile.seek(offsetAndSize[0]);
    byte[] data=new byte[(int)offsetAndSize[1]];
    msgFile.read(data);
    message=new String(data);
  }
  return message;
}

Fixed version (ground truth):
private String getMessage(int i) throws IOException {
  long[] offsetAndSize=(long[])messageIndex.get(new Long(i));
  String message=null;
  if (offsetAndSize != null) {
    msgFile.seek(offsetAndSize[0]);
    byte[] data=new byte[(int)offsetAndSize[1]];
    msgFile.read(data);
    message=new String(data);
  }
  return message;
}
Program: 63470
Project: 63470
Buggy source:
private void handleError(ByteBuffer buffer,String text,boolean disconnect) throws MessageParseException {
  int newOffset=bodyStartPosition + bodyLength;
  int nextHeader=indexOf(buffer,newOffset,headerBytes);
  if (nextHeader != -1) {
    buffer.position(nextHeader);
  }
 else {
    buffer.position(buffer.limit());
  }
  position=0;
  state=SEEKING_HEADER;
  session.getLog().onEvent(text);
  if (disconnect) {
    throw new MessageParseException(text + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void handleError(ByteBuffer buffer,String text,boolean disconnect) throws MessageParseException {
  int newOffset=bodyStartPosition + bodyLength;
  int nextHeader=indexOf(buffer,newOffset,headerBytes);
  if (nextHeader != -1) {
    buffer.position(nextHeader);
  }
 else {
    buffer.position(buffer.limit());
  }
  position=0;
  state=SEEKING_HEADER;
  if (session != null) {
    session.getLog().onEvent(text);
  }
 else {
    log.error(text);
  }
  if (disconnect) {
    throw new MessageParseException(text + "String_Node_Str");
  }
}
Program: 63471
Project: 63471
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public Entry<K,V> next(){
  if (current == null)   throw new NoSuchElementException();
  String[] properties=mObject.propertyNames();
  Entry<K,V> entry=null;
  int i=0;
  for (; i < properties.length; i++) {
    if (current.equals(properties[i])) {
      final Object key=properties[i];
      entry=new Entry<K,V>(){
        @Override public K getKey(){
          return (K)key;
        }
        @Override public V getValue(){
          return get(key);
        }
        @Override public V setValue(        V object){
          return put((K)key,object);
        }
      }
;
      break;
    }
  }
  if (i + 1 < properties.length)   current=properties[i + 1];
 else   current=null;
  if (entry != null)   return entry;
 else   throw new NoSuchElementException();
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Entry<String,V> next(){
  if (current == null)   throw new NoSuchElementException();
  String[] properties=mObject.propertyNames();
  Entry<String,V> entry=null;
  int i=0;
  for (; i < properties.length; i++) {
    if (current.equals(properties[i])) {
      final Object key=properties[i];
      entry=new Entry<String,V>(){
        @Override public String getKey(){
          return (String)key;
        }
        @Override public V getValue(){
          return get(key);
        }
        @Override public V setValue(        V object){
          return put((String)key,object);
        }
      }
;
      break;
    }
  }
  if (i + 1 < properties.length)   current=properties[i + 1];
 else   current=null;
  if (entry != null)   return entry;
 else   throw new NoSuchElementException();
}
Program: 63472
Project: 63472
Buggy source:
@Override public K getKey(){
  return (K)key;
}

Fixed version (ground truth):
@Override public String getKey(){
  return (String)key;
}
Program: 63473
Project: 63473
Buggy source:
/** 
 * @see java.util.Map#entrySet()
 */
@Override public @NonNull Set<Entry<K,V>> entrySet(){
  return new AbstractSet<Entry<K,V>>(){
    @Override public @NonNull Iterator<Entry<K,V>> iterator(){
      return new SetIterator();
    }
    @Override public int size(){
      return mObject.propertyNames().length;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#entrySet()
 * @since 3.0
 */
@Override public @NonNull Set<Entry<String,V>> entrySet(){
  return new AbstractSet<Entry<String,V>>(){
    @Override public @NonNull Iterator<Entry<String,V>> iterator(){
      return new SetIterator();
    }
    @Override public int size(){
      return mObject.propertyNames().length;
    }
  }
;
}
Program: 63474
Project: 63474
Buggy source:
/** 
 * @see java.util.Map#containsKey(java.lang.Object)
 */
@Override public boolean containsKey(final Object key){
  return mObject.hasProperty(key.toString());
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#containsKey(java.lang.Object)
 * @since 3.0
 */
@Override public boolean containsKey(final Object key){
  return mObject.hasProperty(key.toString());
}
Program: 63475
Project: 63475
Buggy source:
/** 
 * @see java.util.Map#values()
 */
@Override public @NonNull Collection<V> values(){
  return new AbstractList<V>(){
    @Override public V get(    final int index){
      String[] propertyNames=mObject.propertyNames();
      if (index > propertyNames.length) {
        throw new IndexOutOfBoundsException();
      }
      return JSMap.this.get(propertyNames[index]);
    }
    @Override public int size(){
      return mObject.propertyNames().length;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#values()
 * @since 3.0
 */
@Override public @NonNull Collection<V> values(){
  return new AbstractList<V>(){
    @Override public V get(    final int index){
      String[] propertyNames=mObject.propertyNames();
      if (index > propertyNames.length) {
        throw new IndexOutOfBoundsException();
      }
      return JSMap.this.get(propertyNames[index]);
    }
    @Override public int size(){
      return mObject.propertyNames().length;
    }
    @Override public boolean contains(    Object val){
      return containsValue(val);
    }
  }
;
}
Program: 63476
Project: 63476
Buggy source:
/** 
 * @see java.util.Map#isEmpty()
 */
@Override public boolean isEmpty(){
  return size() == 0;
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#isEmpty()
 * @since 3.0
 */
@Override public boolean isEmpty(){
  return size() == 0;
}
Program: 63477
Project: 63477
Buggy source:
/** 
 * @see java.util.Map#clear()
 */
@Override public void clear(){
  for (  String prop : mObject.propertyNames()) {
    mObject.deleteProperty(prop);
  }
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#clear()
 * @since 3.0
 */
@Override public void clear(){
  for (  String prop : mObject.propertyNames()) {
    mObject.deleteProperty(prop);
  }
}
Program: 63478
Project: 63478
Buggy source:
public JSMap(JSContext context,Class<V> cls){
  mObject=new JSObject(context);
  mType=cls;
}

Fixed version (ground truth):
/** 
 * Creates a new Map object and underlying JSObject with no initial properties. Assumes value class of type 'cls'. Example: <code> java.util.Map<String,Double> jsmap = new JSMap<String,Double>(context,Double.class) </code>
 * @param context  The JSContext in which to create the object
 * @param cls      The class of the component Values; must match template
 * @since 3.0
 */
public JSMap(JSContext context,Class<V> cls){
  mObject=new JSObject(context);
  mType=cls;
}
Program: 63479
Project: 63479
Buggy source:
/** 
 * @see java.util.Map#containsValue(java.lang.Object)
 */
@Override public boolean containsValue(final Object value){
  String[] properties=mObject.propertyNames();
  for (  String key : properties) {
    if (mObject.property(key).equals(value))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#containsValue(java.lang.Object)
 * @since 3.0
 */
@Override public boolean containsValue(final Object value){
  String[] properties=mObject.propertyNames();
  for (  String key : properties) {
    if (mObject.property(key).equals(value))     return true;
  }
  return false;
}
Program: 63480
Project: 63480
Buggy source:
/** 
 * @see java.util.Map#put(java.lang.Object,java.lang.Object)
 */
@Override public V put(final K key,final V value){
  final V oldValue=get(key);
  mObject.property(key.toString(),value);
  return oldValue;
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#put(java.lang.Object,java.lang.Object)
 * @since 3.0
 */
@Override public V put(final String key,final V value){
  final V oldValue=get(key);
  mObject.property(key,value);
  return oldValue;
}
Program: 63481
Project: 63481
Buggy source:
@Override public void remove(){
  Entry<K,V> entry=next();
  mObject.deleteProperty(entry.getKey().toString());
}

Fixed version (ground truth):
@Override public void remove(){
  Entry<String,V> entry=next();
  mObject.deleteProperty(entry.getKey());
}
Program: 63482
Project: 63482
Buggy source:
@Override public @NonNull Iterator<Entry<K,V>> iterator(){
  return new SetIterator();
}

Fixed version (ground truth):
@Override public @NonNull Iterator<Entry<String,V>> iterator(){
  return new SetIterator();
}
Program: 63483
Project: 63483
Buggy source:
/** 
 * @see java.util.Map#putAll(java.util.Map)
 */
@Override public void putAll(final @NonNull Map<? extends K,? extends V> map){
  for (  K key : map.keySet()) {
    put(key,map.get(key));
  }
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#putAll(java.util.Map)
 * @since 3.0
 */
@Override public void putAll(final @NonNull Map<? extends String,? extends V> map){
  for (  String key : map.keySet()) {
    put(key,map.get(key));
  }
}
Program: 63484
Project: 63484
Buggy source:
@Override public V setValue(V object){
  return put((K)key,object);
}

Fixed version (ground truth):
@Override public V setValue(V object){
  return put((String)key,object);
}
Program: 63485
Project: 63485
Buggy source:
/** 
 * @see java.util.Map#keySet()
 */
@Override @SuppressWarnings("String_Node_Str") public @NonNull Set keySet(){
  return new HashSet(Arrays.asList(mObject.propertyNames()));
}

Fixed version (ground truth):
/** 
 * @see java.util.Map#keySet()
 * @since 3.0
 */
@Override @SuppressWarnings("String_Node_Str") public @NonNull Set keySet(){
  return new HashSet(Arrays.asList(mObject.propertyNames()));
}
Program: 63486
Project: 63486
Buggy source:
public JSObject getJSObject(){
  return mObject;
}

Fixed version (ground truth):
/** 
 * Gets the underlying JSObject for this map
 * @return the underlying JSObject
 * @since 3.0
 */
public JSObject getJSObject(){
  return mObject;
}
Program: 63487
Project: 63487
Buggy source:
/** 
 * If an exception handler is set, calls the exception handler, otherwise throws the JSException.
 * @param exception The JSException to be thrown
 */
public void throwJSException(JSException exception) throws JSException {
  if (exceptionHandler == null) {
    throw exception;
  }
 else {
    exceptionHandler.handle(exception);
  }
}

Fixed version (ground truth):
/** 
 * If an exception handler is set, calls the exception handler, otherwise throws the JSException.
 * @param exception The JSException to be thrown
 */
public void throwJSException(JSException exception) throws JSException {
  if (exceptionHandler == null) {
    throw exception;
  }
 else {
    IJSExceptionHandler temp=exceptionHandler;
    exceptionHandler=null;
    temp.handle(exception);
    exceptionHandler=temp;
  }
}
Program: 63488
Project: 63488
Buggy source:
@Override protected void finalize() throws Throwable {
  if (ctx != null)   release(ctx);
  super.finalize();
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  if (ctx != null) {
    release(ctx);
    finalizeContext(ctx);
  }
  super.finalize();
}
Program: 63489
Project: 63489
Buggy source:
@Override public void alert(String msg){
  CharSequence text=msg.toString();
  int duration=Toast.LENGTH_LONG;
  Toast toast=Toast.makeText(androidCtx,text,duration);
  toast.show();
}

Fixed version (ground truth):
@Override public void alert(String msg){
  final String message=msg;
  Handler handler=new Handler(Looper.getMainLooper());
  handler.post(new Runnable(){
    @Override public void run(){
      CharSequence text=message.toString();
      int duration=Toast.LENGTH_LONG;
      Toast toast=Toast.makeText(androidCtx,text,duration);
      toast.show();
    }
  }
);
}
Program: 63490
Project: 63490
Buggy source:
@Override public void log(String msg){
  log=log.concat(msg);
  log=log.concat("String_Node_Str");
  tv.setText(log);
}

Fixed version (ground truth):
@Override public void log(String msg){
  final String message=msg;
  Handler handler=new Handler(Looper.getMainLooper());
  handler.post(new Runnable(){
    @Override public void run(){
      log=log.concat(message);
      log=log.concat("String_Node_Str");
      tv.setText(log);
    }
  }
);
}
Program: 63492
Project: 63492
Buggy source:
@Override public void onPause(){
  ;
  mMediaPlayer.pause();
  super.onPause();
}

Fixed version (ground truth):
@Override public void onPause(){
  super.onPause();
  mMediaPlayer.pause();
}
Program: 63493
Project: 63493
Buggy source:
@Override public void onResume(){
  mMediaPlayer.start();
  super.onResume();
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  mMediaPlayer.start();
}
Program: 63496
Project: 63496
Buggy source:
private GfyMetadata(Parcel in){
  this.mGfyItem=in.readParcelable(((Object)mGfyItem).getClass().getClassLoader());
}

Fixed version (ground truth):
private GfyMetadata(Parcel in){
  this.mGfyItem=in.readParcelable(GfyItem.class.getClassLoader());
}
Program: 63497
Project: 63497
Buggy source:
public Object getEmitter(){
  return emitter.get();
}

Fixed version (ground truth):
public Object getEmitter(){
  return emitter != null ? emitter.get() : null;
}