nus-yam/ex-repair huggingface dataset:
Program: 38733
Project: 38733
Buggy source:
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Post> foundSet=new HashSet<Post>();
  EnumSet<Post._Fields> dateFields=EnumSet.of(Post._Fields.posted_at_millis);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    if (dateFields.contains(field)) {
      queryValue=new Date((Long)entry.getValue()).toString();
    }
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}

Fixed version (ground truth):
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Post> foundSet=new HashSet<Post>();
  EnumSet<Post._Fields> dateFields=EnumSet.of(Post._Fields.posted_at_millis);
  EnumSet<Post._Fields> valueRequiresQuotesFields=EnumSet.of(Post._Fields.title);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateFields.contains(field)) {
        queryValue="String_Node_Str" + new Date((Long)entry.getValue()).toString() + "String_Node_Str";
      }
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  System.out.println(statementString);
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38734
Project: 38734
Buggy source:
public Set<User> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<User> foundSet=new HashSet<User>();
  EnumSet<User._Fields> dateFields=EnumSet.of(User._Fields.some_date);
  EnumSet<User._Fields> dateTimeFields=EnumSet.of(User._Fields.some_datetime);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    if (dateFields.contains(field)) {
      queryValue=new Date((Long)entry.getValue()).toString();
    }
    if (dateTimeFields.contains(field)) {
      queryValue=new Timestamp((Long)entry.getValue()).toString();
    }
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}

Fixed version (ground truth):
public Set<User> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<User> foundSet=new HashSet<User>();
  EnumSet<User._Fields> dateFields=EnumSet.of(User._Fields.some_date);
  EnumSet<User._Fields> dateTimeFields=EnumSet.of(User._Fields.some_datetime);
  EnumSet<User._Fields> valueRequiresQuotesFields=EnumSet.of(User._Fields.handle,User._Fields.bio);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateFields.contains(field)) {
        queryValue="String_Node_Str" + new Date((Long)entry.getValue()).toString() + "String_Node_Str";
      }
      if (dateTimeFields.contains(field)) {
        queryValue="String_Node_Str" + new Timestamp((Long)entry.getValue()).toString() + "String_Node_Str";
      }
      queryValue="String_Node_Str" + queryValue;
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  System.out.println(statementString);
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38735
Project: 38735
Buggy source:
public Comment create(final String content,final Integer commenter_id,final Integer commented_on_id) throws IOException ;

Fixed version (ground truth):
public Comment create(final long created_at) throws IOException ;
Program: 38736
Project: 38736
Buggy source:
public void set(PreparedStatement stmt) throws SQLException {
  if (content == null) {
    stmt.setNull(1,java.sql.Types.CHAR);
  }
 else {
    stmt.setString(1,content);
  }
  if (commenter_id == null) {
    stmt.setNull(2,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(2,commenter_id);
  }
  if (commented_on_id == null) {
    stmt.setNull(3,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(3,commented_on_id);
  }
}

Fixed version (ground truth):
public void set(PreparedStatement stmt) throws SQLException {
  stmt.setTimestamp(1,new Timestamp(created_at));
}
Program: 38737
Project: 38737
Buggy source:
public Comment create(final String content,final Integer commenter_id,final Integer commented_on_id) throws IOException {
  int __id=realCreate(new AttrSetter(){
    public void set(    PreparedStatement stmt) throws SQLException {
      if (content == null) {
        stmt.setNull(1,java.sql.Types.CHAR);
      }
 else {
        stmt.setString(1,content);
      }
      if (commenter_id == null) {
        stmt.setNull(2,java.sql.Types.INTEGER);
      }
 else {
        stmt.setInt(2,commenter_id);
      }
      if (commented_on_id == null) {
        stmt.setNull(3,java.sql.Types.INTEGER);
      }
 else {
        stmt.setInt(3,commented_on_id);
      }
    }
  }
,getInsertStatement(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")));
  Comment newInst=new Comment(__id,content,commenter_id,commented_on_id,databases);
  cachedById.put(__id,newInst);
  clearForeignKeyCache();
  return newInst;
}

Fixed version (ground truth):
public Comment create(final long created_at) throws IOException {
  int __id=realCreate(new AttrSetter(){
    public void set(    PreparedStatement stmt) throws SQLException {
      stmt.setTimestamp(1,new Timestamp(created_at));
    }
  }
,getInsertStatement(Arrays.asList("String_Node_Str")));
  Comment newInst=new Comment(__id,null,null,null,created_at,databases);
  cachedById.put(__id,newInst);
  clearForeignKeyCache();
  return newInst;
}
Program: 38738
Project: 38738
Buggy source:
@Override protected void setAttrs(Comment model,PreparedStatement stmt) throws SQLException {
  if (model.getContent() == null) {
    stmt.setNull(1,java.sql.Types.CHAR);
  }
 else {
    stmt.setString(1,model.getContent());
  }
  if (model.getCommenterId() == null) {
    stmt.setNull(2,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(2,model.getCommenterId());
  }
  if (model.getCommentedOnId() == null) {
    stmt.setNull(3,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(3,model.getCommentedOnId());
  }
  stmt.setLong(4,model.getId());
}

Fixed version (ground truth):
@Override protected void setAttrs(Comment model,PreparedStatement stmt) throws SQLException {
  if (model.getContent() == null) {
    stmt.setNull(1,java.sql.Types.CHAR);
  }
 else {
    stmt.setString(1,model.getContent());
  }
  if (model.getCommenterId() == null) {
    stmt.setNull(2,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(2,model.getCommenterId());
  }
  if (model.getCommentedOnId() == null) {
    stmt.setNull(3,java.sql.Types.INTEGER);
  }
 else {
    stmt.setInt(3,model.getCommentedOnId());
  }
{
    stmt.setTimestamp(4,new Timestamp(model.getCreatedAt()));
  }
  stmt.setLong(5,model.getId());
}
Program: 38739
Project: 38739
Buggy source:
@Override protected Comment instanceFromResultSet(ResultSet rs) throws SQLException {
  return new Comment(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),getIntOrNull(rs,"String_Node_Str"),getIntOrNull(rs,"String_Node_Str"),databases);
}

Fixed version (ground truth):
@Override protected Comment instanceFromResultSet(ResultSet rs) throws SQLException {
  return new Comment(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),getIntOrNull(rs,"String_Node_Str"),getIntOrNull(rs,"String_Node_Str"),getDateAsLong(rs,"String_Node_Str"),databases);
}
Program: 38740
Project: 38740
Buggy source:
public BaseCommentPersistenceImpl(BaseDatabaseConnection conn,IDatabases databases){
  super(conn,"String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"));
  this.databases=databases;
}

Fixed version (ground truth):
public BaseCommentPersistenceImpl(BaseDatabaseConnection conn,IDatabases databases){
  super(conn,"String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  this.databases=databases;
}
Program: 38741
Project: 38741
Buggy source:
public Comment create(final String content,final Integer commenter_id,final Integer commented_on_id) throws IOException {
  int __id=curId.getAndIncrement();
  Comment newInst=new Comment(__id,content,commenter_id,commented_on_id,databases);
  records.put(__id,newInst);
  clearForeignKeyCache();
  return newInst;
}

Fixed version (ground truth):
public Comment create(final long created_at) throws IOException {
  int __id=curId.getAndIncrement();
  Comment newInst=new Comment(__id,null,null,null,created_at,databases);
  records.put(__id,newInst);
  clearForeignKeyCache();
  return newInst;
}
Program: 38742
Project: 38742
Buggy source:
public Comment(Comment other){
  super(other.getId());
  this.__content=other.getContent();
  this.__commenter_id=other.getCommenterId();
  this.__commented_on_id=other.getCommentedOnId();
}

Fixed version (ground truth):
public Comment(Comment other){
  super(other.getId());
  this.__content=other.getContent();
  this.__commenter_id=other.getCommenterId();
  this.__commented_on_id=other.getCommentedOnId();
  this.__created_at=other.getCreatedAt();
}
Program: 38743
Project: 38743
Buggy source:
public void setField(_Fields field,Object value){
switch (field) {
case content:
    setContent((String)value);
  break;
case commenter_id:
setCommenterId((Integer)value);
break;
case commented_on_id:
setCommentedOnId((Integer)value);
break;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public void setField(_Fields field,Object value){
switch (field) {
case content:
    setContent((String)value);
  break;
case commenter_id:
setCommenterId((Integer)value);
break;
case commented_on_id:
setCommentedOnId((Integer)value);
break;
case created_at:
setCreatedAt((Long)value);
break;
}
throw new IllegalStateException("String_Node_Str" + field);
}
Program: 38744
Project: 38744
Buggy source:
public Object getField(_Fields field){
switch (field) {
case content:
    return getContent();
case commenter_id:
  return getCommenterId();
case commented_on_id:
return getCommentedOnId();
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public Object getField(_Fields field){
switch (field) {
case content:
    return getContent();
case commenter_id:
  return getCommenterId();
case commented_on_id:
return getCommentedOnId();
case created_at:
return getCreatedAt();
}
throw new IllegalStateException("String_Node_Str" + field);
}
Program: 38745
Project: 38745
Buggy source:
public Object getDefaultValue(_Fields field){
switch (field) {
case content:
    return null;
case commenter_id:
  return null;
case commented_on_id:
return null;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public Object getDefaultValue(_Fields field){
switch (field) {
case content:
    return null;
case commenter_id:
  return null;
case commented_on_id:
return null;
case created_at:
return 28800000;
}
throw new IllegalStateException("String_Node_Str" + field);
}
Program: 38746
Project: 38746
Buggy source:
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + __content + "String_Node_Str"+ __commenter_id+ "String_Node_Str"+ __commented_on_id+ "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + __content + "String_Node_Str"+ __commenter_id+ "String_Node_Str"+ __commented_on_id+ "String_Node_Str"+ __created_at+ "String_Node_Str";
}
Program: 38747
Project: 38747
Buggy source:
public void setField(_Fields field,Object value){
switch (field) {
case content:
    setContent((String)value);
  break;
case commenter_id:
setCommenterId((Integer)value);
break;
case commented_on_id:
setCommentedOnId((Integer)value);
break;
case created_at:
setCreatedAt((Long)value);
break;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public void setField(_Fields field,Object value){
switch (field) {
case content:
    setContent((String)value);
  break;
case commenter_id:
setCommenterId((Integer)value);
break;
case commented_on_id:
setCommentedOnId((Integer)value);
break;
case created_at:
setCreatedAt((Long)value);
break;
default :
throw new IllegalStateException("String_Node_Str" + field);
}
}
Program: 38748
Project: 38748
Buggy source:
public void setField(_Fields field,Object value){
switch (field) {
case user_id:
    setUserId((Integer)value);
  break;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public void setField(_Fields field,Object value){
switch (field) {
case user_id:
    setUserId((Integer)value);
  break;
default :
throw new IllegalStateException("String_Node_Str" + field);
}
}
Program: 38749
Project: 38749
Buggy source:
public void setField(_Fields field,Object value){
switch (field) {
case title:
    setTitle((String)value);
  break;
case posted_at_millis:
setPostedAtMillis((Long)value);
break;
case user_id:
setUserId((Integer)value);
break;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public void setField(_Fields field,Object value){
switch (field) {
case title:
    setTitle((String)value);
  break;
case posted_at_millis:
setPostedAtMillis((Long)value);
break;
case user_id:
setUserId((Integer)value);
break;
default :
throw new IllegalStateException("String_Node_Str" + field);
}
}
Program: 38750
Project: 38750
Buggy source:
public void setField(_Fields field,Object value){
switch (field) {
case handle:
    setHandle((String)value);
  break;
case created_at_millis:
setCreatedAtMillis((Long)value);
break;
case num_posts:
setNumPosts((Integer)value);
break;
case some_date:
setSomeDate((Long)value);
break;
case some_datetime:
setSomeDatetime((Long)value);
break;
case bio:
setBio((String)value);
break;
case some_binary:
setSomeBinary((byte[])value);
break;
case some_float:
setSomeFloat((Double)value);
break;
case some_boolean:
setSomeBoolean((Boolean)value);
break;
}
throw new IllegalStateException("String_Node_Str" + field);
}

Fixed version (ground truth):
public void setField(_Fields field,Object value){
switch (field) {
case handle:
    setHandle((String)value);
  break;
case created_at_millis:
setCreatedAtMillis((Long)value);
break;
case num_posts:
setNumPosts((Integer)value);
break;
case some_date:
setSomeDate((Long)value);
break;
case some_datetime:
setSomeDatetime((Long)value);
break;
case bio:
setBio((String)value);
break;
case some_binary:
setSomeBinary((byte[])value);
break;
case some_float:
setSomeFloat((Double)value);
break;
case some_boolean:
setSomeBoolean((Boolean)value);
break;
default :
throw new IllegalStateException("String_Node_Str" + field);
}
}
Program: 38751
Project: 38751
Buggy source:
private void executeQuery(Set<T> foundSet,StringBuilder statementString) throws IOException {
  PreparedStatement stmt=conn.getPreparedStatement(statementString.toString());
  ResultSet rs=null;
  try {
    rs=stmt.executeQuery();
    while (rs.next()) {
      T inst=instanceFromResultSet(rs);
      foundSet.add(inst);
      if (useCache) {
        cachedById.put(inst.getId(),inst);
      }
    }
  }
 catch (  SQLException e) {
    throw new IOException(e);
  }
 finally {
    try {
      if (rs != null) {
        rs.close();
      }
      stmt.close();
    }
 catch (    SQLException e) {
      throw new IOException(e);
    }
  }
}

Fixed version (ground truth):
protected void executeQuery(Set<T> foundSet,StringBuilder statementString) throws IOException {
  PreparedStatement stmt=conn.getPreparedStatement(statementString.toString());
  ResultSet rs=null;
  try {
    rs=stmt.executeQuery();
    while (rs.next()) {
      T inst=instanceFromResultSet(rs);
      foundSet.add(inst);
      if (useCache) {
        cachedById.put(inst.getId(),inst);
      }
    }
  }
 catch (  SQLException e) {
    throw new IOException(e);
  }
 finally {
    try {
      if (rs != null) {
        rs.close();
      }
      stmt.close();
    }
 catch (    SQLException e) {
      throw new IOException(e);
    }
  }
}
Program: 38752
Project: 38752
Buggy source:
protected Set<T> realFind(Map fieldsMap) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  for (  T t : records.values()) {
    for (    Map.Entry<Enum,Object> e : ((Map<Enum,Object>)fieldsMap).entrySet()) {
      if (t.getField(e.getKey().name()).equals(e.getValue())) {
        foundSet.add(t);
      }
    }
  }
  return foundSet;
}

Fixed version (ground truth):
protected Set<T> realFind(Map fieldsMap) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  for (  T t : records.values()) {
    for (    Map.Entry<Enum,Object> e : ((Map<Enum,Object>)fieldsMap).entrySet()) {
      if (e.getValue().equals(t.getField(e.getKey().name()))) {
        foundSet.add(t);
      }
    }
  }
  return foundSet;
}
Program: 38753
Project: 38753
Buggy source:
public Set<Comment> find(Map<Enum,Object> fieldsMap) throws IOException {
  return super.realFind(fieldsMap);
}

Fixed version (ground truth):
public Set<Comment> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Comment> foundSet=new HashSet<Comment>();
  EnumSet<Comment._Fields> dateTimeFields=EnumSet.of(Comment._Fields.created_at);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    if (dateTimeFields.contains(field)) {
      queryValue=new Timestamp((Long)entry.getValue()).toString();
    }
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38754
Project: 38754
Buggy source:
public Set<Image> find(Map<Enum,Object> fieldsMap) throws IOException {
  return super.realFind(fieldsMap);
}

Fixed version (ground truth):
public Set<Image> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Image> foundSet=new HashSet<Image>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38755
Project: 38755
Buggy source:
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  return super.realFind(fieldsMap);
}

Fixed version (ground truth):
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Post> foundSet=new HashSet<Post>();
  EnumSet<Post._Fields> dateFields=EnumSet.of(Post._Fields.posted_at_millis);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    if (dateFields.contains(field)) {
      queryValue=new Date((Long)entry.getValue()).toString();
    }
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38756
Project: 38756
Buggy source:
public Set<User> find(Map<Enum,Object> fieldsMap) throws IOException {
  return super.realFind(fieldsMap);
}

Fixed version (ground truth):
public Set<User> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<User> foundSet=new HashSet<User>();
  EnumSet<User._Fields> dateFields=EnumSet.of(User._Fields.some_date);
  EnumSet<User._Fields> dateTimeFields=EnumSet.of(User._Fields.some_datetime);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    String queryValue=entry.getValue().toString();
    if (dateFields.contains(field)) {
      queryValue=new Date((Long)entry.getValue()).toString();
    }
    if (dateTimeFields.contains(field)) {
      queryValue=new Timestamp((Long)entry.getValue()).toString();
    }
    statementString.append(field + "String_Node_Str" + queryValue+ "String_Node_Str");
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38757
Project: 38757
Buggy source:
public Set<Comment> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Comment> foundSet=new HashSet<Comment>();
  EnumSet<Comment._Fields> dateTimeFields=EnumSet.of(Comment._Fields.created_at);
  EnumSet<Comment._Fields> valueRequiresQuotesFields=EnumSet.of(Comment._Fields.content);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateTimeFields.contains(field)) {
        queryValue="String_Node_Str" + new Timestamp((Long)entry.getValue()).toString() + "String_Node_Str";
      }
      queryValue="String_Node_Str" + queryValue;
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  System.out.println(statementString);
  executeQuery(foundSet,statementString);
  return foundSet;
}

Fixed version (ground truth):
public Set<Comment> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Comment> foundSet=new HashSet<Comment>();
  EnumSet<Comment._Fields> dateTimeFields=EnumSet.of(Comment._Fields.created_at);
  EnumSet<Comment._Fields> valueRequiresQuotesFields=EnumSet.of(Comment._Fields.content);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateTimeFields.contains(field)) {
        queryValue="String_Node_Str" + new Timestamp((Long)entry.getValue()).toString() + "String_Node_Str";
      }
      queryValue="String_Node_Str" + queryValue;
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38758
Project: 38758
Buggy source:
public Set<Image> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Image> foundSet=new HashSet<Image>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  System.out.println(statementString);
  executeQuery(foundSet,statementString);
  return foundSet;
}

Fixed version (ground truth):
public Set<Image> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Image> foundSet=new HashSet<Image>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      queryValue="String_Node_Str" + queryValue;
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38759
Project: 38759
Buggy source:
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Post> foundSet=new HashSet<Post>();
  EnumSet<Post._Fields> dateFields=EnumSet.of(Post._Fields.posted_at_millis);
  EnumSet<Post._Fields> valueRequiresQuotesFields=EnumSet.of(Post._Fields.title);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateFields.contains(field)) {
        queryValue="String_Node_Str" + new Date((Long)entry.getValue()).toString() + "String_Node_Str";
      }
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  System.out.println(statementString);
  executeQuery(foundSet,statementString);
  return foundSet;
}

Fixed version (ground truth):
public Set<Post> find(Map<Enum,Object> fieldsMap) throws IOException {
  Set<Post> foundSet=new HashSet<Post>();
  EnumSet<Post._Fields> dateFields=EnumSet.of(Post._Fields.posted_at_millis);
  EnumSet<Post._Fields> valueRequiresQuotesFields=EnumSet.of(Post._Fields.title);
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  StringBuilder statementString=new StringBuilder();
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  statementString.append("String_Node_Str");
  Iterator<Map.Entry<Enum,Object>> iter=fieldsMap.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry<Enum,Object> entry=iter.next();
    Enum field=entry.getKey();
    Object value=entry.getValue();
    String queryValue;
    if (value != null) {
      queryValue=entry.getValue().toString();
      if (valueRequiresQuotesFields.contains(field))       queryValue="String_Node_Str" + queryValue + "String_Node_Str";
      if (dateFields.contains(field)) {
        queryValue="String_Node_Str" + new Date((Long)entry.getValue()).toString() + "String_Node_Str";
      }
      queryValue="String_Node_Str" + queryValue;
    }
 else {
      queryValue="String_Node_Str";
    }
    statementString.append(field + queryValue);
    if (iter.hasNext()) {
      statementString.append("String_Node_Str");
    }
  }
  statementString.append("String_Node_Str");
  executeQuery(foundSet,statementString);
  return foundSet;
}
Program: 38760
Project: 38760
Buggy source:
protected Set<T> realFind(Set<Integer> ids,Map fieldsMap) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  for (  T record : records.values()) {
    boolean allMatch=true;
    for (    Map.Entry<Enum,Object> e : ((Map<Enum,Object>)fieldsMap).entrySet()) {
      Object searchedForValue=e.getValue();
      Object existingValue=record.getField(e.getKey().name());
      if (ids != null && !ids.contains(record.getId())) {
        allMatch=false;
      }
      if (existingValue == null) {
        if (searchedForValue != null)         allMatch=false;
      }
 else       if (!existingValue.equals(searchedForValue)) {
        allMatch=false;
      }
      if (allMatch)       foundSet.add(record);
    }
  }
  return foundSet;
}

Fixed version (ground truth):
protected Set<T> realFind(Set<Integer> ids,Map fieldsMap) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  if (fieldsMap == null || fieldsMap.isEmpty()) {
    return foundSet;
  }
  for (  T record : records.values()) {
    boolean allMatch=true;
    for (    Map.Entry<Enum,Object> e : ((Map<Enum,Object>)fieldsMap).entrySet()) {
      Object searchedForValue=e.getValue();
      Object existingValue=record.getField(e.getKey().name());
      if (ids != null && !ids.contains(record.getId())) {
        allMatch=false;
      }
      if (existingValue == null) {
        if (searchedForValue != null)         allMatch=false;
      }
 else       if (!existingValue.equals(searchedForValue)) {
        allMatch=false;
      }
    }
    if (allMatch)     foundSet.add(record);
  }
  return foundSet;
}
Program: 38761
Project: 38761
Buggy source:
public User(User other){
  super(other.getId());
  this.__handle=other.getHandle();
  this.__created_at_millis=other.getCreatedAtMillis();
  this.__num_posts=other.getNumPosts();
  this.__some_date=other.getSomeDate();
  this.__some_datetime=other.getSomeDatetime();
  this.__bio=other.getBio();
  this.__some_binary=other.getSomeBinary();
  this.__some_float=other.getSomeFloat();
  this.__some_boolean=other.isSomeBoolean();
}

Fixed version (ground truth):
public User(User other){
  super(other.getId());
  this.__handle=other.getHandle();
  this.__created_at_millis=other.getCreatedAtMillis();
  this.__num_posts=other.getNumPosts();
  this.__some_date=other.getSomeDate();
  this.__some_datetime=other.getSomeDatetime();
  this.__bio=other.getBio();
  this.__some_binary=copyBinary(other.getSomeBinary());
  this.__some_float=other.getSomeFloat();
  this.__some_boolean=other.isSomeBoolean();
}
Program: 38762
Project: 38762
Buggy source:
public DatabasesImpl(){
  Map env_info;
  try {
    env_info=(Map)YAML.load(new FileReader("String_Node_Str"));
  }
 catch (  FileNotFoundException e) {
    throw new RuntimeException(e);
  }
  Boolean use_mock=(Boolean)env_info.get("String_Node_Str");
  if (use_mock != null && use_mock) {
    this.database1=new MockDatabase1Impl(this);
  }
 else {
    this.database1=new Database1Impl(new DatabaseConnection("String_Node_Str"),this);
  }
}

Fixed version (ground truth):
public DatabasesImpl(){
  Map env_info;
  try {
    env_info=(Map)YAML.load(new FileReader("String_Node_Str"));
  }
 catch (  FileNotFoundException e) {
    throw new RuntimeException(e);
  }
  Boolean use_mock=(Boolean)env_info.get("String_Node_Str");
  if (use_mock != null && use_mock) {
    this.database1=mockDatabases.getDatabase1();
  }
 else {
    this.database1=new Database1Impl(new DatabaseConnection("String_Node_Str"),this);
  }
}
Program: 38763
Project: 38763
Buggy source:
public Set<T> find(Set<Integer> ids) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  Set<Integer> notCachedIds=new HashSet<Integer>();
  for (  Integer id : ids) {
    T model=cachedById.get(id);
    if (model != null) {
      foundSet.add(model);
    }
 else {
      notCachedIds.add(id);
    }
  }
  if (!notCachedIds.isEmpty()) {
    StringBuilder statementString=new StringBuilder();
    statementString.append("String_Node_Str");
    statementString.append(tableName);
    statementString.append("String_Node_Str");
    Iterator<Integer> iter=notCachedIds.iterator();
    while (iter.hasNext()) {
      Integer obj=iter.next();
      statementString.append(obj.toString());
      if (iter.hasNext()) {
        statementString.append("String_Node_Str");
      }
    }
    statementString.append("String_Node_Str");
    PreparedStatement stmt=conn.getPreparedStatement("String_Node_Str" + tableName + "String_Node_Str"+ "String_Node_Str");
    ResultSet rs=null;
    try {
      rs=stmt.executeQuery();
      while (rs.next()) {
        T inst=instanceFromResultSet(rs);
        cachedById.put(inst.getId(),inst);
        foundSet.add(inst);
      }
    }
 catch (    SQLException e) {
      throw new IOException(e);
    }
 finally {
      try {
        if (rs != null) {
          rs.close();
        }
        stmt.close();
      }
 catch (      SQLException e) {
        throw new IOException(e);
      }
    }
  }
  return foundSet;
}

Fixed version (ground truth):
public Set<T> find(Set<Integer> ids) throws IOException {
  Set<T> foundSet=new HashSet<T>();
  Set<Integer> notCachedIds=new HashSet<Integer>();
  for (  Integer id : ids) {
    T model=cachedById.get(id);
    if (model != null) {
      foundSet.add(model);
    }
 else {
      notCachedIds.add(id);
    }
  }
  if (!notCachedIds.isEmpty()) {
    StringBuilder statementString=new StringBuilder();
    statementString.append("String_Node_Str");
    statementString.append(tableName);
    statementString.append("String_Node_Str");
    Iterator<Integer> iter=notCachedIds.iterator();
    while (iter.hasNext()) {
      Integer obj=iter.next();
      statementString.append(obj.toString());
      if (iter.hasNext()) {
        statementString.append("String_Node_Str");
      }
    }
    statementString.append("String_Node_Str");
    PreparedStatement stmt=conn.getPreparedStatement(statementString.toString());
    ResultSet rs=null;
    try {
      rs=stmt.executeQuery();
      while (rs.next()) {
        T inst=instanceFromResultSet(rs);
        cachedById.put(inst.getId(),inst);
        foundSet.add(inst);
      }
    }
 catch (    SQLException e) {
      throw new IOException(e);
    }
 finally {
      try {
        if (rs != null) {
          rs.close();
        }
        stmt.close();
      }
 catch (      SQLException e) {
        throw new IOException(e);
      }
    }
  }
  return foundSet;
}
Program: 38765
Project: 38765
Buggy source:
/** 
 * Returns the type of portal that was used. <p/> This will be Legacy for MV1 style portals and Normal for Portals that use the swirly purple goo.
 * @return A {@link PortalType}
 */
public PortalType getPortalType(){
  if (this.travelAgent == null) {
    return PortalType.Legacy;
  }
  return PortalType.Legacy;
}

Fixed version (ground truth):
/** 
 * Returns the type of portal that was used. This will be Legacy for MV1 style portals and Normal for Portals that use the swirly purple goo.
 * @return A {@link PortalType}
 */
public PortalType getPortalType(){
  if (this.travelAgent == null) {
    return PortalType.Legacy;
  }
  return PortalType.Legacy;
}
Program: 38766
Project: 38766
Buggy source:
private void removeFromWorldChunkPortals(MultiverseWorld world,MVPortal portal){
  Map<Integer,Collection<MVPortal>> chunksToPortals=this.worldChunkPortals.get(world);
  PortalLocation location=portal.getLocation();
  Vector min=location.getMinimum();
  Vector max=location.getMaximum();
  int c1x=blockToChunk(min.getBlockX()), c1z=blockToChunk(min.getBlockZ());
  int c2x=blockToChunk(max.getBlockX()), c2z=blockToChunk(max.getBlockZ());
  for (int cx=c1x; cx <= c2x; cx++) {
    for (int cz=c1z; cz <= c2z; cz++) {
      Integer hashCode=hashChunk(cx,cz);
      chunksToPortals.get(hashCode).remove(portal);
    }
  }
}

Fixed version (ground truth):
private void removeFromWorldChunkPortals(MultiverseWorld world,MVPortal portal){
  Map<Integer,Collection<MVPortal>> chunksToPortals=this.worldChunkPortals.get(world);
  if (chunksToPortals == null) {
    return;
  }
  PortalLocation location=portal.getLocation();
  Vector min=location.getMinimum();
  Vector max=location.getMaximum();
  int c1x=blockToChunk(min.getBlockX()), c1z=blockToChunk(min.getBlockZ());
  int c2x=blockToChunk(max.getBlockX()), c2z=blockToChunk(max.getBlockZ());
  for (int cx=c1x; cx <= c2x; cx++) {
    for (int cz=c1z; cz <= c2z; cz++) {
      Integer hashCode=hashChunk(cx,cz);
      chunksToPortals.get(hashCode).remove(portal);
    }
  }
}
Program: 38769
Project: 38769
Buggy source:
private void performTeleport(PlayerMoveEvent event,PortalPlayerSession ps,MVDestination d){
  SafeTTeleporter playerTeleporter=new SafeTTeleporter(this.plugin.getCore());
  TeleportResult result=playerTeleporter.safelyTeleport(event.getPlayer(),event.getPlayer(),d);
  if (result == TeleportResult.SUCCESS) {
    ps.playerDidTeleport(event.getTo());
    ps.setTeleportTime(new Date());
  }
}

Fixed version (ground truth):
private void performTeleport(PlayerMoveEvent event,PortalPlayerSession ps,MVDestination d){
  SafeTTeleporter playerTeleporter=this.plugin.getCore().getSafeTTeleporter();
  TeleportResult result=playerTeleporter.safelyTeleport(event.getPlayer(),event.getPlayer(),d);
  if (result == TeleportResult.SUCCESS) {
    ps.playerDidTeleport(event.getTo());
    ps.setTeleportTime(new Date());
  }
}
Program: 38771
Project: 38771
Buggy source:
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  this.plugin.getPortalSession(event.getPlayer()).playerDidTeleport();
  super.onPlayerTeleport(event);
}

Fixed version (ground truth):
@Override public void onPlayerTeleport(PlayerTeleportEvent event){
  PortalPlayerSession ps=this.plugin.getPortalSession(event.getPlayer());
  ps.playerDidTeleport(event.getTo());
  super.onPlayerTeleport(event);
}
Program: 38772
Project: 38772
Buggy source:
@Override public void onPlayerMove(PlayerMoveEvent event){
  Player p=event.getPlayer();
  Location loc=p.getLocation();
  PortalPlayerSession ps=this.plugin.getPortalSession(event.getPlayer());
  ps.setStaleLocation(loc);
  if (ps.isStaleLocation()) {
    return;
  }
  MVPortal portal=ps.getStandingInPortal();
  if (portal != null && ps.doTeleportPlayer() && !this.showDebugInfo(event.getPlayer(),portal)) {
    Destination d=portal.getDestination();
    Location l=d.getLocation();
    Vector v=event.getPlayer().getVelocity();
    System.out.print("String_Node_Str" + v.toString());
    System.out.print("String_Node_Str" + event.getPlayer().getFallDistance());
    event.getPlayer().setFallDistance(0);
    if (d instanceof InvalidDestination) {
      System.out.print("String_Node_Str");
      return;
    }
    ps.playerDidTeleport();
    event.getPlayer().teleport(l);
  }
}

Fixed version (ground truth):
@Override public void onPlayerMove(PlayerMoveEvent event){
  Player p=event.getPlayer();
  Location loc=p.getLocation();
  PortalPlayerSession ps=this.plugin.getPortalSession(event.getPlayer());
  ps.setStaleLocation(loc,Type.PLAYER_MOVE);
  if (ps.isStaleLocation()) {
    return;
  }
  MVPortal portal=ps.getStandingInPortal();
  if (portal != null && ps.doTeleportPlayer(Type.PLAYER_MOVE) && !ps.showDebugInfo()) {
    Destination d=portal.getDestination();
    if (d == null) {
      return;
    }
    Location l=d.getLocation();
    event.getPlayer().setFallDistance(0);
    if (d instanceof InvalidDestination) {
      return;
    }
    ps.playerDidTeleport(event.getTo());
    event.getPlayer().teleport(l);
  }
}
Program: 38773
Project: 38773
Buggy source:
private boolean teleportVehicle(Vehicle v,Player p){
  MVPortal portal=this.plugin.getPortalManager().isPortal(p,v.getLocation());
  if (portal != null) {
    System.out.print("String_Node_Str");
    Destination d=portal.getDestination();
    Location l=d.getLocation();
    Vector vec=p.getVelocity();
    System.out.print("String_Node_Str" + vec.toString());
    System.out.print("String_Node_Str" + p.getFallDistance());
    p.setFallDistance(0);
    if (d instanceof InvalidDestination) {
      System.out.print("String_Node_Str");
      return false;
    }
    v.teleport(l);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean teleportVehicle(Player p,Vehicle v,Location to){
  PortalPlayerSession ps=this.plugin.getPortalSession(p);
  MVPortal portal=ps.getStandingInPortal();
  if (portal != null && ps.doTeleportPlayer(Type.VEHICLE_MOVE) && !ps.showDebugInfo()) {
    Destination d=portal.getDestination();
    if (d == null) {
      return false;
    }
    Location l=d.getLocation();
    p.setFallDistance(0);
    if (d instanceof InvalidDestination) {
      return false;
    }
    ps.playerDidTeleport(l);
    v.teleport(l);
    return true;
  }
  return false;
}
Program: 38774
Project: 38774
Buggy source:
@Override public void onVehicleMove(VehicleMoveEvent event){
  if (event.getVehicle().getPassenger() instanceof Player) {
    System.out.print("String_Node_Str");
    Vehicle v=event.getVehicle();
    Player p=(Player)v.getPassenger();
    teleportVehicle(v,p);
  }
}

Fixed version (ground truth):
@Override public void onVehicleMove(VehicleMoveEvent event){
  if (event.getVehicle().getPassenger() instanceof Player) {
    Vehicle v=event.getVehicle();
    Player p=(Player)v.getPassenger();
    PortalPlayerSession ps=this.plugin.getPortalSession(p);
    ps.setStaleLocation(v.getLocation(),Type.VEHICLE_MOVE);
    if (ps.isStaleLocation()) {
      return;
    }
    teleportVehicle(p,v,event.getTo());
  }
}
Program: 38775
Project: 38775
Buggy source:
public boolean setDestination(String destinationString){
  this.destination=this.plugin.getCore().getDestinationFactory().getDestination(destinationString);
  if (this.destination instanceof InvalidDestination) {
    this.plugin.getCore().log(Level.WARNING,"String_Node_Str" + this.name + "String_Node_Str");
    return false;
  }
  this.config.setProperty(this.portalConfigString + "String_Node_Str",this.destination.toString());
  this.config.save();
  return true;
}

Fixed version (ground truth):
public boolean setDestination(String destinationString){
  this.plugin.getCore().log(Level.WARNING,destinationString);
  this.destination=this.plugin.getCore().getDestinationFactory().getDestination(destinationString);
  if (this.destination instanceof InvalidDestination) {
    this.plugin.getCore().log(Level.WARNING,"String_Node_Str" + this.name + "String_Node_Str");
    return false;
  }
  this.config.setProperty(this.portalConfigString + "String_Node_Str",this.destination.toString());
  this.config.save();
  return true;
}
Program: 38776
Project: 38776
Buggy source:
public MVPortal(MultiversePortals instance,String name,String owner,PortalLocation location){
  this(instance,name);
  this.setOwner(owner);
  this.setPortalLocation(location);
  System.out.print(this.plugin.getServer().getPluginManager().getPermission("String_Node_Str" + this.getName()));
}

Fixed version (ground truth):
public MVPortal(MultiversePortals instance,String name,String owner,PortalLocation location){
  this(instance,name);
  this.setOwner(owner);
  this.setPortalLocation(location);
}