Program: 19926
Project: 19926
Buggy source:
public Topic getTopicInfo(PrestoTopic topic,PrestoType type,PrestoView view,boolean readOnlyMode){
  Topic result=new Topic();
  result.setId(topic.getId());
  result.setName(topic.getName());
  if (readOnlyMode) {
    result.setReadOnlyMode(readOnlyMode);
  }
  TopicType typeInfo=getTypeInfo(type);
  boolean readOnly=readOnlyMode || type.isReadOnly();
  typeInfo.setReadOnly(readOnly);
  List<Link> typeLinks=new ArrayList<Link>();
  if (!readOnlyMode && type.isCreatable()) {
    typeLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + type.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ type.getId()));
  }
  typeInfo.setLinks(typeLinks);
  result.setType(typeInfo);
  result.setView(view.getId());
  List<Link> topicLinks=new ArrayList<Link>();
  topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + view.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()+ "String_Node_Str"+ view.getId()));
  topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + view.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()+ "String_Node_Str"+ view.getId()));
  if (type.isRemovable()) {
    topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + type.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()));
  }
  result.setLinks(topicLinks);
  List<FieldData> fields=new ArrayList<FieldData>();
  for (  PrestoFieldUsage field : type.getFields(view)) {
    if (!field.isHidden()) {
      fields.add(getFieldInfo(topic,field,readOnlyMode));
    }
  }
  result.setFields(fields);
  result.setViews(getViews(topic,type,view,readOnlyMode));
  return result;
}

Fixed version (ground truth):
public Topic getTopicInfo(PrestoTopic topic,PrestoType type,PrestoView view,boolean readOnlyMode){
  Topic result=new Topic();
  result.setId(topic.getId());
  result.setName(topic.getName());
  if (readOnlyMode) {
    result.setReadOnlyMode(readOnlyMode);
  }
  TopicType typeInfo=getTypeInfo(type);
  boolean isTypeReadOnly=readOnlyMode || type.isReadOnly();
  typeInfo.setReadOnly(isTypeReadOnly);
  List<Link> typeLinks=new ArrayList<Link>();
  if (!isTypeReadOnly && type.isCreatable()) {
    typeLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + type.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ type.getId()));
  }
  typeInfo.setLinks(typeLinks);
  result.setType(typeInfo);
  result.setView(view.getId());
  List<Link> topicLinks=new ArrayList<Link>();
  topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + view.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()+ "String_Node_Str"+ view.getId()));
  topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + view.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()+ "String_Node_Str"+ view.getId()));
  if (type.isRemovable()) {
    topicLinks.add(new Link("String_Node_Str",uriInfo.getBaseUri() + "String_Node_Str" + type.getSchemaProvider().getDatabaseId()+ "String_Node_Str"+ topic.getId()));
  }
  result.setLinks(topicLinks);
  List<FieldData> fields=new ArrayList<FieldData>();
  for (  PrestoFieldUsage field : type.getFields(view)) {
    if (!field.isHidden()) {
      fields.add(getFieldInfo(topic,field,readOnlyMode));
    }
  }
  result.setFields(fields);
  result.setViews(getViews(topic,type,view,readOnlyMode));
  return result;
}