nus-yam/ex-repair huggingface dataset:
Program: 65348
Project: 65348
Buggy source:
/** 
 * Changes the state of this context to use the given subquery. Once the subquery is created and populated,   {@link #disposeSubQueryContext()} has to be called.
 * @param currentQuery The parsed tree representation of the subquery that will become thecurrent  {@link DatabaseQuery}
 * @param query The {@link ReportQuery} for the subquery
 * @see #disposeSubQueryContext()
 */
void newSubQueryContext(org.eclipse.persistence.jpa.jpql.parser.Expression currentQuery,ReportQuery query){
  currentContext=new JPQLQueryContext(currentContext,currentQuery,query);
}

Fixed version (ground truth):
/** 
 * Changes the state of this context to use the given subquery. Once the subquery is created and populated,   {@link #disposeSubqueryContext()} has to be called.
 * @param currentQuery The parsed tree representation of the subquery that will become thecurrent  {@link DatabaseQuery}
 * @param query The {@link ReportQuery} for the subquery
 * @see #disposeSubqueryContext()
 */
void newSubQueryContext(org.eclipse.persistence.jpa.jpql.parser.Expression currentQuery,ReportQuery query){
  currentContext=new JPQLQueryContext(currentContext,currentQuery,query);
}
Program: 65349
Project: 65349
Buggy source:
/** 
 * Returns the type, if it can be determined, of the input parameter.
 * @param typeVisitor The visitor used to calculate the type of the {@link Expression} that wasfound to have the closest type of the input parameter
 * @return Either the closed type or {@link Object} if it can't be determined
 */
Class<?> getType(){
  if (ignoreType) {
    return Object.class;
  }
  if (expression == null) {
    if (type == null) {
      type=Object.class;
    }
    return type;
  }
  return queryContext.getType(expression);
}

Fixed version (ground truth):
/** 
 * Returns the type, if it can be determined, of the input parameter.
 * @return Either the closed type or {@link Object} if it can't be determined
 */
Class<?> getType(){
  if (ignoreType) {
    return Object.class;
  }
  if (expression == null) {
    if (type == null) {
      type=Object.class;
    }
    return type;
  }
  return queryContext.getType(expression);
}
Program: 65350
Project: 65350
Buggy source:
/** 
 * Creates a new <code>ParameterTypeVisitor</code>.
 * @param query The external form representing the JPQL query
 */
ParameterTypeVisitor(JPQLQueryContext queryContext){
  super();
  this.queryContext=queryContext;
}

Fixed version (ground truth):
/** 
 * Creates a new <code>ParameterTypeVisitor</code>.
 * @param queryContext The context used to query information about the application metadata andcached information
 */
ParameterTypeVisitor(JPQLQueryContext queryContext){
  super();
  this.queryContext=queryContext;
}
Program: 65351
Project: 65351
Buggy source:
/** 
 * INTERNAL:
 */
protected void writeValue(String value){
  try {
    char[] chars=value.toCharArray();
    for (int x=0, charsSize=chars.length; x < charsSize; x++) {
      char character=chars[x];
switch (character) {
case '"':
{
          writer.write("String_Node_Str");
          break;
        }
case '\b':
{
        writer.write("String_Node_Str");
        writer.write("String_Node_Str");
        break;
      }
case '\f':
{
      writer.write("String_Node_Str");
      writer.write("String_Node_Str");
      break;
    }
case '\n':
{
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    break;
  }
case '\r':
{
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  break;
}
case '\t':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
case '\\':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
default :
{
if (Character.isISOControl(character)) {
writer.write("String_Node_Str");
String hex=Integer.toHexString(character).toUpperCase();
for (int i=hex.length(); i < 4; i++) {
writer.write("String_Node_Str");
}
writer.write(hex);
}
 else {
writer.write(character);
}
}
}
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected void writeValue(String value){
  try {
    char[] chars=value.toCharArray();
    for (int x=0, charsSize=chars.length; x < charsSize; x++) {
      char character=chars[x];
switch (character) {
case '"':
{
          writer.write("String_Node_Str");
          break;
        }
case '\b':
{
        writer.write("String_Node_Str");
        writer.write("String_Node_Str");
        break;
      }
case '\f':
{
      writer.write("String_Node_Str");
      writer.write("String_Node_Str");
      break;
    }
case '\n':
{
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    break;
  }
case '\r':
{
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  break;
}
case '\t':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
case '\\':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
default :
{
if (Character.isISOControl(character) || !encoder.canEncode(character)) {
writer.write("String_Node_Str");
String hex=Integer.toHexString(character).toUpperCase();
for (int i=hex.length(); i < 4; i++) {
writer.write("String_Node_Str");
}
writer.write(hex);
}
 else {
writer.write(character);
}
}
}
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
Program: 65352
Project: 65352
Buggy source:
/** 
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller){
  super.setMarshaller(marshaller);
  attributePrefix=marshaller.getAttributePrefix();
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void setMarshaller(XMLMarshaller marshaller){
  super.setMarshaller(marshaller);
  attributePrefix=marshaller.getAttributePrefix();
  encoder=Charset.forName(marshaller.getEncoding()).newEncoder();
}
Program: 65353
Project: 65353
Buggy source:
/** 
 * INTERNAL:
 */
protected void writeValue(String value,boolean isAttribute,Writer writer){
  CharacterEscapeHandler escapeHandler=null;
  if (marshaller != null) {
    escapeHandler=marshaller.getCharacterEscapeHandler();
  }
  if (escapeHandler != null) {
    try {
      escapeHandler.escape(value.toCharArray(),0,value.length(),isAttribute,writer);
    }
 catch (    IOException e) {
      throw XMLMarshalException.marshalException(e);
    }
    return;
  }
  try {
    if (value.indexOf('"') > -1 || value.indexOf('&') > -1 || value.indexOf('<') > -1) {
      char[] chars=value.toCharArray();
      for (int x=0, charsSize=chars.length; x < charsSize; x++) {
        char character=chars[x];
switch (character) {
case '&':
{
            writer.write("String_Node_Str");
            break;
          }
case '<':
{
          writer.write("String_Node_Str");
          break;
        }
case '"':
{
        writer.write("String_Node_Str");
        break;
      }
default :
    writer.write(character);
}
}
}
 else {
writer.write(value);
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected void writeValue(String value,boolean isAttribute,Writer writer){
  CharacterEscapeHandler escapeHandler=null;
  if (marshaller != null) {
    escapeHandler=marshaller.getCharacterEscapeHandler();
  }
  if (escapeHandler != null) {
    try {
      escapeHandler.escape(value.toCharArray(),0,value.length(),isAttribute,writer);
    }
 catch (    IOException e) {
      throw XMLMarshalException.marshalException(e);
    }
    return;
  }
  try {
    if (encoder.maxBytesPerChar() < 4 || value.indexOf('"') > -1 || value.indexOf('&') > -1 || value.indexOf('<') > -1) {
      char[] chars=value.toCharArray();
      for (int x=0, charsSize=chars.length; x < charsSize; x++) {
        char character=chars[x];
switch (character) {
case '&':
{
            writer.write("String_Node_Str");
            break;
          }
case '<':
{
          writer.write("String_Node_Str");
          break;
        }
case '"':
{
        writer.write("String_Node_Str");
        break;
      }
default :
    if (encoder.canEncode(character)) {
      writer.write(character);
    }
 else {
      writer.write("String_Node_Str");
      writer.write(String.valueOf((int)character));
      writer.write(';');
    }
}
}
}
 else {
writer.write(value);
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
Program: 65354
Project: 65354
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void visit(ValueExpression expression){
  this.expression=expression;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void visit(WhenClause expression){
  super.visit(expression);
}
Program: 65355
Project: 65355
Buggy source:
private void visitCompoundExpression(CompoundExpression expression){
  Expression leftExpression=expression.getLeftExpression();
  Expression rightExpression=expression.getRightExpression();
  if (leftExpression.isAncestor(inputParameter)) {
    if (currentExpression == null) {
      currentExpression=expression;
      rightExpression.accept(this);
      currentExpression=null;
    }
 else {
      type=null;
      ignoreType=true;
      expression=null;
    }
  }
 else   if (rightExpression.isAncestor(inputParameter)) {
    if (currentExpression == null) {
      currentExpression=expression;
      leftExpression.accept(this);
      currentExpression=null;
    }
 else {
      type=null;
      ignoreType=true;
      expression=null;
    }
  }
 else {
    super.visit(expression);
  }
}

Fixed version (ground truth):
private void visitCompoundExpression(CompoundExpression expression){
  visitDoubleExpressions(expression,expression.getLeftExpression(),expression.getRightExpression(),true);
}
Program: 65356
Project: 65356
Buggy source:
@Override public void endCollection(){
  try {
    if (levels.size() == 1) {
      writer.write(']');
    }
 else {
      Level position=levels.peek();
      if (position != null && position.isCollection() && !position.isEmptyCollection()) {
        writer.write(']');
      }
      levels.peek().setCollection(false);
    }
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
@Override public void endCollection(){
  try {
    if (levels.size() == 1) {
      writer.write(']');
    }
 else {
      Level position=levels.peek();
      if (position != null && position.isCollection() && !position.isEmptyCollection()) {
        writer.write(']');
      }
    }
    levels.peek().setCollection(false);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 65357
Project: 65357
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(MappedInnerClassTestCases.class);
  suite.addTestSuite(MappedInnerClassNoneTestCases.class);
  suite.addTestSuite(UnmappedInnerClassTestCases.class);
  suite.addTestSuite(InnerClassNotInContextTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(MappedInnerClassTestCases.class);
  suite.addTestSuite(MappedInnerClassNoneTestCases.class);
  suite.addTestSuite(UnmappedInnerClassTestCases.class);
  suite.addTestSuite(InnerClassNotInContextTestCases.class);
  suite.addTestSuite(UnreferencedInnerClassTestCases.class);
  return suite;
}
Program: 65358
Project: 65358
Buggy source:
/** 
 * Adds additional classes to the given List, from inner classes,
 * @XmlRegistry or @XmlSeeAlso.
 * @param javaClass
 * @param classesToProcess
 */
private void processClass(JavaClass javaClass,ArrayList<JavaClass> classesToProcess){
  if (shouldGenerateTypeInfo(javaClass)) {
    if (isXmlRegistry(javaClass)) {
      this.processObjectFactory(javaClass,classesToProcess);
    }
 else {
      classesToProcess.add(javaClass);
      TypeInfo info=typeInfo.get(javaClass.getQualifiedName());
      if (info != null && info.isSetXmlSeeAlso()) {
        for (        String jClassName : info.getXmlSeeAlso()) {
          classesToProcess.add(helper.getJavaClass(jClassName));
        }
      }
      for (Iterator<JavaClass> jClassIt=javaClass.getDeclaredClasses().iterator(); jClassIt.hasNext(); ) {
        JavaClass innerClass=jClassIt.next();
        if (Modifier.isStatic(innerClass.getModifiers())) {
          if (shouldGenerateTypeInfo(innerClass)) {
            CompilerHelper.addClassToClassLoader(innerClass,helper.getClassLoader());
            TypeInfo tInfo=typeInfo.get(innerClass.getQualifiedName());
            if ((tInfo != null && !tInfo.isTransient()) || !helper.isAnnotationPresent(innerClass,XmlTransient.class)) {
              classesToProcess.add(innerClass);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds additional classes to the given List, from inner classes,
 * @XmlRegistry or @XmlSeeAlso.
 * @param javaClass
 * @param classesToProcess
 */
private void processClass(JavaClass javaClass,ArrayList<JavaClass> classesToProcess){
  if (shouldGenerateTypeInfo(javaClass)) {
    if (isXmlRegistry(javaClass)) {
      this.processObjectFactory(javaClass,classesToProcess);
    }
 else {
      classesToProcess.add(javaClass);
      TypeInfo info=typeInfo.get(javaClass.getQualifiedName());
      if (info != null && info.isSetXmlSeeAlso()) {
        for (        String jClassName : info.getXmlSeeAlso()) {
          classesToProcess.add(helper.getJavaClass(jClassName));
        }
      }
    }
  }
}
Program: 65359
Project: 65359
Buggy source:
public MapValueAttributeAccessor(AttributeAccessor nestedAccessor,ContainerPolicy cp,Class generatedEntryClass,String mapClassName){
  this.nestedAccessor=nestedAccessor;
  this.mapClassName=mapClassName;
  this.containerPolicy=cp;
  this.generatedEntryClass=generatedEntryClass;
}

Fixed version (ground truth):
public MapValueAttributeAccessor(AttributeAccessor nestedAccessor,ContainerPolicy cp,Class generatedEntryClass,String mapClassName,ClassLoader classLoader){
  this.nestedAccessor=nestedAccessor;
  this.mapClassName=mapClassName;
  this.containerPolicy=cp;
  this.generatedEntryClass=generatedEntryClass;
  this.classLoader=classLoader;
}
Program: 65360
Project: 65360
Buggy source:
public void initializeAttributes(Class theJavaClass) throws DescriptorException {
  nestedAccessor.initializeAttributes(theJavaClass);
  if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
 else   if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
 else   if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
  try {
    mapClass=PrivilegedAccessHelper.getClassForName(mapClassName);
  }
 catch (  ClassNotFoundException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}

Fixed version (ground truth):
public void initializeAttributes(Class theJavaClass) throws DescriptorException {
  nestedAccessor.initializeAttributes(theJavaClass);
  if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
 else   if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
 else   if (mapClassName.equals("String_Node_Str")) {
    mapClassName="String_Node_Str";
  }
  try {
    mapClass=PrivilegedAccessHelper.getClassForName(mapClassName,true,classLoader);
  }
 catch (  ClassNotFoundException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}
Program: 65361
Project: 65361
Buggy source:
public XMLCompositeCollectionMapping generateMapMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLCompositeCollectionMapping mapping=new XMLCompositeCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  initializeXMLContainerMapping(mapping);
  XMLField field=getXPathForField(property,namespaceInfo,false);
  JavaClass descriptorClass=helper.getJavaClass(descriptor.getJavaClassName());
  JavaClass mapValueClass=helper.getJavaClass(MapValue.class);
  if (mapValueClass.isAssignableFrom(descriptorClass)) {
    mapping.setXPath("String_Node_Str");
  }
 else {
    mapping.setXPath(field.getXPath() + "String_Node_Str");
  }
  Class generatedClass=generateMapEntryClassAndDescriptor(property,descriptor.getNonNullNamespaceResolver());
  mapping.setReferenceClass(generatedClass);
  String mapClassName=property.getType().getRawName();
  mapping.useCollectionClass(ArrayList.class);
  mapping.setAttributeAccessor(new MapValueAttributeAccessor(mapping.getAttributeAccessor(),mapping.getContainerPolicy(),generatedClass,mapClassName));
  return mapping;
}

Fixed version (ground truth):
public XMLCompositeCollectionMapping generateMapMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLCompositeCollectionMapping mapping=new XMLCompositeCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  initializeXMLContainerMapping(mapping);
  XMLField field=getXPathForField(property,namespaceInfo,false);
  JavaClass descriptorClass=helper.getJavaClass(descriptor.getJavaClassName());
  JavaClass mapValueClass=helper.getJavaClass(MapValue.class);
  if (mapValueClass.isAssignableFrom(descriptorClass)) {
    mapping.setXPath("String_Node_Str");
  }
 else {
    mapping.setXPath(field.getXPath() + "String_Node_Str");
  }
  Class generatedClass=generateMapEntryClassAndDescriptor(property,descriptor.getNonNullNamespaceResolver());
  mapping.setReferenceClass(generatedClass);
  String mapClassName=property.getType().getRawName();
  mapping.useCollectionClass(ArrayList.class);
  mapping.setAttributeAccessor(new MapValueAttributeAccessor(mapping.getAttributeAccessor(),mapping.getContainerPolicy(),generatedClass,mapClassName,helper.getClassLoader()));
  return mapping;
}
Program: 65362
Project: 65362
Buggy source:
/** 
 * INTERNAL:
 */
protected void writeValue(String value){
  try {
    char[] chars=value.toCharArray();
    for (int x=0, charsSize=chars.length; x < charsSize; x++) {
      char character=chars[x];
switch (character) {
case '"':
{
          writer.write("String_Node_Str");
          break;
        }
case '\b':
{
        writer.write("String_Node_Str");
        writer.write("String_Node_Str");
        break;
      }
case '\f':
{
      writer.write("String_Node_Str");
      writer.write("String_Node_Str");
      break;
    }
case '\n':
{
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    break;
  }
case '\r':
{
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  break;
}
case '\t':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
case '\\':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
case '/':
{
writer.write("String_Node_Str");
break;
}
default :
{
if (Character.isISOControl(character)) {
writer.write("String_Node_Str");
String hex=Integer.toHexString(character).toUpperCase();
for (int i=hex.length(); i < 4; i++) {
writer.write("String_Node_Str");
}
writer.write(hex);
}
 else {
writer.write(character);
}
}
}
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
protected void writeValue(String value){
  try {
    char[] chars=value.toCharArray();
    for (int x=0, charsSize=chars.length; x < charsSize; x++) {
      char character=chars[x];
switch (character) {
case '"':
{
          writer.write("String_Node_Str");
          break;
        }
case '\b':
{
        writer.write("String_Node_Str");
        writer.write("String_Node_Str");
        break;
      }
case '\f':
{
      writer.write("String_Node_Str");
      writer.write("String_Node_Str");
      break;
    }
case '\n':
{
    writer.write("String_Node_Str");
    writer.write("String_Node_Str");
    break;
  }
case '\r':
{
  writer.write("String_Node_Str");
  writer.write("String_Node_Str");
  break;
}
case '\t':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
case '\\':
{
writer.write("String_Node_Str");
writer.write("String_Node_Str");
break;
}
default :
{
if (Character.isISOControl(character)) {
writer.write("String_Node_Str");
String hex=Integer.toHexString(character).toUpperCase();
for (int i=hex.length(); i < 4; i++) {
writer.write("String_Node_Str");
}
writer.write(hex);
}
 else {
writer.write(character);
}
}
}
}
}
 catch (IOException e) {
throw XMLMarshalException.marshalException(e);
}
}
Program: 65364
Project: 65364
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  Object value=unmarshalRecord.getCharacters().toString();
  boolean isCDATA=unmarshalRecord.isBufferCDATA();
  unmarshalRecord.resetStringBuffer();
  XMLField toWrite=xmlField;
  if (xmlField.isCDATA() != isCDATA) {
    toWrite=new XMLField(xmlField.getName());
    toWrite.setNamespaceResolver(xmlField.getNamespaceResolver());
    toWrite.setIsCDATA(isCDATA);
  }
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=xmlField.convertValueBasedOnSchemaType(value,xmlConversionManager,unmarshalRecord);
  }
  if (null == unmarshalRecord.getTransformationRecord()) {
    unmarshalRecord.setTransformationRecord(new XMLTransformationRecord("String_Node_Str",unmarshalRecord));
  }
  unmarshalRecord.getTransformationRecord().put(toWrite,value);
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  Object value=unmarshalRecord.getCharacters().toString();
  boolean isCDATA=unmarshalRecord.isBufferCDATA();
  unmarshalRecord.resetStringBuffer();
  XMLField toWrite=xmlField;
  if (xmlField.isCDATA() != isCDATA) {
    toWrite=new XMLField(xmlField.getName());
    toWrite.setNamespaceResolver(xmlField.getNamespaceResolver());
    toWrite.setIsCDATA(isCDATA);
  }
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,xmlConversionManager,unmarshalRecord);
  }
  if (null == unmarshalRecord.getTransformationRecord()) {
    unmarshalRecord.setTransformationRecord(new XMLTransformationRecord("String_Node_Str",unmarshalRecord));
  }
  unmarshalRecord.getTransformationRecord().put(toWrite,value);
}
Program: 65365
Project: 65365
Buggy source:
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  Object objectValue=xmlField.convertValueBasedOnSchemaType(value,xmlConversionManager,unmarshalRecord);
  if (null == unmarshalRecord.getTransformationRecord()) {
    unmarshalRecord.setTransformationRecord(new XMLTransformationRecord("String_Node_Str",unmarshalRecord));
  }
  unmarshalRecord.getTransformationRecord().put(xmlField,objectValue);
}

Fixed version (ground truth):
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  Object objectValue=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,xmlConversionManager,unmarshalRecord);
  if (null == unmarshalRecord.getTransformationRecord()) {
    unmarshalRecord.setTransformationRecord(new XMLTransformationRecord("String_Node_Str",unmarshalRecord));
  }
  unmarshalRecord.getTransformationRecord().put(xmlField,objectValue);
}
Program: 65366
Project: 65366
Buggy source:
/** 
 * Handle attribute operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's map of target primary key values - based on the target key field name.  Note  that if a reference already exists for the xmlCollectionReferenceMapping's  source object instance, we will simply add to the target pk value list.   The Reference object is stored on the ReferenceResolver associated with  the UnmarshalRecord's session.
 */
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  if (value != null) {
    Object realValue=xmlField.convertValueBasedOnSchemaType(value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
    xmlCollectionReferenceMapping.buildReference(unmarshalRecord,xmlField,realValue,unmarshalRecord.getSession());
  }
}

Fixed version (ground truth):
/** 
 * Handle attribute operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's map of target primary key values - based on the target key field name.  Note  that if a reference already exists for the xmlCollectionReferenceMapping's  source object instance, we will simply add to the target pk value list.   The Reference object is stored on the ReferenceResolver associated with  the UnmarshalRecord's session.
 */
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  if (value != null) {
    Object realValue=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
    xmlCollectionReferenceMapping.buildReference(unmarshalRecord,xmlField,realValue,unmarshalRecord.getSession());
  }
}
Program: 65369
Project: 65369
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  unmarshalRecord.removeNullCapableValue(this);
  XMLField xmlField=(XMLField)xmlDirectMapping.getField();
  if (!xmlField.getLastXPathFragment().nameIsText()) {
    return;
  }
  Object value;
  if (unmarshalRecord.getCharacters().length() == 0) {
    value=this.getMapping().getNullValue();
  }
 else {
    value=unmarshalRecord.getCharacters().toString();
  }
  unmarshalRecord.resetStringBuffer();
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=xmlField.convertValueBasedOnSchemaType(value,xmlConversionManager,unmarshalRecord);
  }
  Object convertedValue=xmlDirectMapping.getAttributeValue(value,unmarshalRecord.getSession(),unmarshalRecord);
  unmarshalRecord.setAttributeValue(convertedValue,xmlDirectMapping);
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  unmarshalRecord.removeNullCapableValue(this);
  XMLField xmlField=(XMLField)xmlDirectMapping.getField();
  if (!xmlField.getLastXPathFragment().nameIsText()) {
    return;
  }
  Object value;
  if (unmarshalRecord.getCharacters().length() == 0) {
    value=this.getMapping().getNullValue();
  }
 else {
    value=unmarshalRecord.getCharacters().toString();
  }
  unmarshalRecord.resetStringBuffer();
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,xmlConversionManager,unmarshalRecord);
  }
  Object convertedValue=xmlDirectMapping.getAttributeValue(value,unmarshalRecord.getSession(),unmarshalRecord);
  unmarshalRecord.setAttributeValue(convertedValue,xmlDirectMapping);
}
Program: 65370
Project: 65370
Buggy source:
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  unmarshalRecord.removeNullCapableValue(this);
  XMLField xmlField=(XMLField)xmlDirectMapping.getField();
  Object realValue=xmlField.convertValueBasedOnSchemaType(value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
  Object convertedValue=xmlDirectMapping.getAttributeValue(realValue,unmarshalRecord.getSession(),unmarshalRecord);
  xmlDirectMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(),convertedValue);
}

Fixed version (ground truth):
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  unmarshalRecord.removeNullCapableValue(this);
  XMLField xmlField=(XMLField)xmlDirectMapping.getField();
  Object realValue=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
  Object convertedValue=xmlDirectMapping.getAttributeValue(realValue,unmarshalRecord.getSession(),unmarshalRecord);
  xmlDirectMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(),convertedValue);
}
Program: 65371
Project: 65371
Buggy source:
/** 
 * Handle endElement operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's list of target primary key values.  Note that if a reference already exists  for the xmlObjectReferenceMapping's source object instance, we will simply add to the target pk value list.  The Reference object will  is stored on the ReferenceResolver associated with the UnmarshalRecord's session.
 */
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  if (!xmlField.getLastXPathFragment().nameIsText()) {
    return;
  }
  Object value=unmarshalRecord.getCharacters().toString();
  unmarshalRecord.resetStringBuffer();
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=xmlField.convertValueBasedOnSchemaType(value,xmlConversionManager,unmarshalRecord);
  }
  xmlObjectReferenceMapping.buildReference(unmarshalRecord,xmlField,value,unmarshalRecord.getSession());
}

Fixed version (ground truth):
/** 
 * Handle endElement operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's list of target primary key values.  Note that if a reference already exists  for the xmlObjectReferenceMapping's source object instance, we will simply add to the target pk value list.  The Reference object will  is stored on the ReferenceResolver associated with the UnmarshalRecord's session.
 */
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  if (!xmlField.getLastXPathFragment().nameIsText()) {
    return;
  }
  Object value=unmarshalRecord.getCharacters().toString();
  unmarshalRecord.resetStringBuffer();
  XMLConversionManager xmlConversionManager=(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager();
  if (unmarshalRecord.getTypeQName() != null) {
    Class typeClass=xmlField.getJavaClass(unmarshalRecord.getTypeQName());
    value=xmlConversionManager.convertObject(value,typeClass,unmarshalRecord.getTypeQName());
  }
 else {
    value=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,xmlConversionManager,unmarshalRecord);
  }
  xmlObjectReferenceMapping.buildReference(unmarshalRecord,xmlField,value,unmarshalRecord.getSession());
}
Program: 65372
Project: 65372
Buggy source:
/** 
 * Handle attribute operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's list of target primary key values.  Note that if a reference already exists  for the xmlObjectReferenceMapping's source object instance, we will simply add to the target pk value list.  The Reference object will  is stored on the ReferenceResolver associated with the UnmarshalRecord's session.
 */
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  if (value != null) {
    Object realValue=xmlField.convertValueBasedOnSchemaType(value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
    xmlObjectReferenceMapping.buildReference(unmarshalRecord,xmlField,realValue,unmarshalRecord.getSession());
  }
}

Fixed version (ground truth):
/** 
 * Handle attribute operation.  Here we will create and populate an  org.eclipse.persistence.internal.oxm.Reference instance to be used during  the mapping resolution stage.  In particular, the primary key value for this element will be added to the Reference object's list of target primary key values.  Note that if a reference already exists  for the xmlObjectReferenceMapping's source object instance, we will simply add to the target pk value list.  The Reference object will  is stored on the ReferenceResolver associated with the UnmarshalRecord's session.
 */
public void attribute(UnmarshalRecord unmarshalRecord,String namespaceURI,String localName,String value){
  if (value != null) {
    Object realValue=unmarshalRecord.getXMLReader().convertValueBasedOnSchemaType(xmlField,value,(XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager(),unmarshalRecord);
    xmlObjectReferenceMapping.buildReference(unmarshalRecord,xmlField,realValue,unmarshalRecord.getSession());
  }
}
Program: 65373
Project: 65373
Buggy source:
/** 
 * INTERNAL:
 */
public Object convertValueBasedOnSchemaType(Object value,XMLConversionManager xmlConversionManager,XMLRecord record){
  if (getSchemaType() != null) {
    if (XMLConstants.QNAME_QNAME.equals(getSchemaType())) {
      return xmlConversionManager.buildQNameFromString((String)value,record);
    }
 else {
      Class fieldType=getType();
      if (fieldType == null) {
        fieldType=getJavaClass(getSchemaType());
      }
      return xmlConversionManager.convertObject(value,fieldType,getSchemaType());
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Called from DOMRecord and XMLReader.  MappingNodeValues call XMLReader which calls this method so that other XMLReader subclasses can override.
 */
public Object convertValueBasedOnSchemaType(Object value,XMLConversionManager xmlConversionManager,XMLRecord record){
  if (getSchemaType() != null) {
    if (XMLConstants.QNAME_QNAME.equals(getSchemaType())) {
      return xmlConversionManager.buildQNameFromString((String)value,record);
    }
 else {
      Class fieldType=getType();
      if (fieldType == null) {
        fieldType=getJavaClass(getSchemaType());
      }
      return xmlConversionManager.convertObject(value,fieldType,getSchemaType());
    }
  }
  return value;
}
Program: 65374
Project: 65374
Buggy source:
/** 
 * Set the element name.  This method will parse the qualified name in an attempt to set the localName fields.  ie: this could be  set to "someLocalName" or "somePrefix:someLocalName"
 * @param name the new local name
 */
public void setLocalName(String name){
  int colonIdx=name.indexOf(XMLConstants.COLON);
  if (colonIdx > -1) {
    this.localName=name.substring(colonIdx + 1);
  }
 else {
    this.localName=name;
  }
}

Fixed version (ground truth):
/** 
 * Set the element name.  This method will parse the qualified name in an attempt to set the localName fields.  ie: this could be  set to "someLocalName" or "somePrefix:someLocalName"
 * @param name the new local name
 */
public void setLocalName(String name){
  if (null == name) {
    this.localName=XMLConstants.EMPTY_STRING;
    return;
  }
  int colonIdx=name.indexOf(XMLConstants.COLON);
  if (colonIdx > -1) {
    this.localName=name.substring(colonIdx + 1);
  }
 else {
    this.localName=name;
  }
}
Program: 65375
Project: 65375
Buggy source:
/** 
 * Creates a new <code>AbstractModifyAllQueryBuilder</code>.
 * @param queryContext The context used to query information about the application metadata andcached information
 */
AbstractModifyAllQueryBuilder(JPQLQueryContext queryContext){
  super();
  this.queryContext=queryContext;
}

Fixed version (ground truth):
/** 
 * Creates a new <code>AbstractModifyAllQueryBuilder</code>.
 * @param queryContext The context used to query information about the application metadata andcached information
 * @param query The {@link ModifyAllQuery} to populate by using this visitor to visit the parsedtree representation of the JPQL query
 */
AbstractModifyAllQueryBuilder(JPQLQueryContext queryContext,ModifyAllQuery query){
  super();
  this.query=query;
  this.queryContext=queryContext;
}
Program: 65376
Project: 65376
Buggy source:
/** 
 * Returns the <b>JOIN</b> expressions that were part of the range variable declaration in the ordered they were parsed.
 * @return The ordered list of <b>JOIN</b> expressions or an empty collection if none waspresent
 */
public List<Join> getJoins(){
  return (joins == null) ? Collections.<Join>emptyList() : joins;
}

Fixed version (ground truth):
/** 
 * Returns the <b>JOIN</b> expressions that were part of the range variable declaration in the ordered they were parsed.
 * @return The ordered list of <b>JOIN</b> expressions or an empty collection if none was present
 */
public List<Join> getJoins(){
  return (joins == null) ? Collections.<Join>emptyList() : joins;
}
Program: 65377
Project: 65377
Buggy source:
void visitAbstractSelectStatement(AbstractSelectStatement expression){
  expression.getFromClause().accept(this);
  expression.getSelectClause().accept(this);
  if (expression.hasWhereClause()) {
    expression.getWhereClause().accept(this);
  }
  if (expression.hasGroupByClause()) {
    expression.getGroupByClause().accept(this);
  }
  if (expression.hasHavingClause()) {
    expression.getHavingClause().accept(this);
  }
}

Fixed version (ground truth):
void visitAbstractSelectStatement(AbstractSelectStatement expression){
  expression.getFromClause().accept(this);
  expression.getSelectClause().accept(this);
  if (expression.hasWhereClause()) {
    expression.getWhereClause().accept(this);
  }
}
Program: 65378
Project: 65378
Buggy source:
/** 
 * Creates a new <code>ReadAllQueryVisitor</code>.
 * @param queryContext The context used to query information about the application metadata andcached information
 */
AbstractReadAllQueryVisitor(JPQLQueryContext queryContext){
  super();
  this.queryContext=queryContext;
}

Fixed version (ground truth):
/** 
 * Creates a new <code>ReadAllQueryVisitor</code>.
 * @param queryContext The context used to query information about the application metadata andcached information
 */
AbstractReadAllQueryVisitor(JPQLQueryContext queryContext,ObjectLevelReadQuery query){
  super();
  this.query=query;
  this.queryContext=queryContext;
}
Program: 65379
Project: 65379
Buggy source:
void visitAbstractSelectClause(AbstractSelectClause expression){
  if (expression.hasDistinct() && !hasNotCountFunction(expression)) {
    query.useDistinct();
  }
  boolean buildNullForNullPK=hasOneToOneSelected(expression);
  query.setShouldBuildNullForNullPk(buildNullForNullPK);
}

Fixed version (ground truth):
void visitAbstractSelectClause(AbstractSelectClause expression){
  if (expression.hasDistinct()) {
    CountFunctionVisitor visitor=new CountFunctionVisitor();
    expression.accept(visitor);
    if (!visitor.hasCountFunction) {
      query.useDistinct();
    }
  }
  OneToOneSelectedVisitor visitor=new OneToOneSelectedVisitor();
  expression.accept(visitor);
  query.setShouldBuildNullForNullPk(visitor.oneToOneSelected);
}
Program: 65380
Project: 65380
Buggy source:
void visitAbstractFromClause(AbstractFromClause expression){
  Expression baseExpression=queryContext.getBaseExpression();
  ExpressionBuilder expressionBuilder=baseExpression.getBuilder();
  query.setExpressionBuilder(expressionBuilder);
  if (query.getReferenceClass() == null) {
    query.setReferenceClass(expressionBuilder.getQueryClass());
    query.changeDescriptor(queryContext.getSession());
  }
}

Fixed version (ground truth):
void visitAbstractFromClause(AbstractFromClause expression){
  Expression baseExpression=queryContext.getBaseExpression();
  ExpressionBuilder expressionBuilder=baseExpression.getBuilder();
  query.setExpressionBuilder(expressionBuilder);
  if (query.getReferenceClass() == null) {
    query.setReferenceClass(expressionBuilder.getQueryClass());
    query.changeDescriptor(queryContext.getSession());
  }
  JoinVisitor visitor=new JoinVisitor();
  expression.accept(visitor);
}
Program: 65381
Project: 65381
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void visit(OrderByItem expression){
  Expression queryExpression=queryContext.buildExpression(expression.getExpression());
  if (expression.getOrdering() == Ordering.DESC) {
    query.addOrdering(queryExpression.descending());
  }
 else   if (expression.getOrdering() == Ordering.ASC) {
    query.addOrdering(queryExpression.ascending());
  }
 else {
    query.addOrdering(queryExpression);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void visit(ValueExpression expression){
  oneToOneSelected=true;
}
Program: 65382
Project: 65382
Buggy source:
private Object buildFragment(Property property,SDODataObject parentObject,SDODataObject value){
  XMLPlatform xmlPlatform=XMLPlatformFactory.getInstance().getXMLPlatform();
  XMLMarshaller xmlMarshaller=((SDOXMLHelper)helperContext.getXMLHelper()).getXmlMarshaller();
  Document doc=xmlPlatform.createDocument();
  XMLRoot root=new XMLRoot();
  root.setObject(value);
  root.setLocalName(property.getName());
  if (((SDOProperty)property).isNamespaceQualified()) {
    root.setNamespaceURI(parentObject.getType().getURI());
  }
  xmlMarshaller.marshal(root,doc);
  return doc.getDocumentElement();
}

Fixed version (ground truth):
private Object buildFragment(Property property,SDODataObject parentObject,SDODataObject value){
  XMLPlatform xmlPlatform=XMLPlatformFactory.getInstance().getXMLPlatform();
  XMLMarshaller xmlMarshaller=((SDOXMLHelper)helperContext.getXMLHelper()).getXmlContext().createMarshaller();
  Document doc=xmlPlatform.createDocument();
  XMLRoot root=new XMLRoot();
  root.setObject(value);
  root.setLocalName(property.getName());
  if (((SDOProperty)property).isNamespaceQualified()) {
    root.setNamespaceURI(parentObject.getType().getURI());
  }
  xmlMarshaller.marshal(root,doc);
  return doc.getDocumentElement();
}
Program: 65384
Project: 65384
Buggy source:
public Object getProperty(String key) throws PropertyException {
  if (key == null) {
    throw new IllegalArgumentException();
  }
 else   if (JAXB_FORMATTED_OUTPUT.equals(key)) {
    return xmlMarshaller.isFormattedOutput();
  }
 else   if (JAXB_ENCODING.equals(key)) {
    return xmlMarshaller.getEncoding();
  }
 else   if (JAXB_SCHEMA_LOCATION.equals(key)) {
    return xmlMarshaller.getSchemaLocation();
  }
 else   if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(key)) {
    return xmlMarshaller.getNoNamespaceSchemaLocation();
  }
 else   if (XMLConstants.JAXB_FRAGMENT.equals(key)) {
    return xmlMarshaller.isFragment();
  }
 else   if (JAXBContext.MEDIA_TYPE.equals(key)) {
    return xmlMarshaller.getMediaType().getName();
  }
  throw new PropertyException(key);
}

Fixed version (ground truth):
public Object getProperty(String key) throws PropertyException {
  if (key == null) {
    throw new IllegalArgumentException();
  }
 else   if (JAXB_FORMATTED_OUTPUT.equals(key)) {
    return xmlMarshaller.isFormattedOutput();
  }
 else   if (JAXB_ENCODING.equals(key)) {
    return xmlMarshaller.getEncoding();
  }
 else   if (JAXB_SCHEMA_LOCATION.equals(key)) {
    return xmlMarshaller.getSchemaLocation();
  }
 else   if (JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(key)) {
    return xmlMarshaller.getNoNamespaceSchemaLocation();
  }
 else   if (XMLConstants.JAXB_FRAGMENT.equals(key)) {
    return xmlMarshaller.isFragment();
  }
 else   if (JAXBContext.MEDIA_TYPE.equals(key)) {
    return xmlMarshaller.getMediaType().getName();
  }
 else   if (NAMESPACE_PREFIX_MAPPER.equals(key)) {
    return xmlMarshaller.getNamespacePrefixMapper();
  }
 else   if (INDENT_STRING.equals(key) || SUN_INDENT_STRING.equals(key) || SUN_JSE_INDENT_STRING.equals(key)) {
    return xmlMarshaller.getIndentString();
  }
 else   if (CHARACTER_ESCAPE_HANDLER.equals(key)) {
    return xmlMarshaller.getCharacterEscapeHandler();
  }
 else   if (XML_DECLARATION.equals(key)) {
    return !xmlMarshaller.isFragment();
  }
 else   if (JAXBContext.JSON_ATTRIBUTE_PREFIX.equals(key)) {
    return xmlMarshaller.getAttributePrefix();
  }
 else   if (JAXBContext.JSON_INCLUDE_ROOT.equals(key)) {
    return xmlMarshaller.isIncludeRoot();
  }
 else   if (JAXBContext.JSON_VALUE_WRAPPER.equals(key)) {
    return xmlMarshaller.getValueWrapper();
  }
 else   if (SUN_CHARACTER_ESCAPE_HANDLER.equals(key) || SUN_JSE_CHARACTER_ESCAPE_HANDLER.equals(key)) {
    if (xmlMarshaller.getCharacterEscapeHandler() instanceof CharacterEscapeHandlerWrapper) {
      CharacterEscapeHandlerWrapper wrapper=(CharacterEscapeHandlerWrapper)xmlMarshaller.getCharacterEscapeHandler();
      return wrapper.getHandler();
    }
    return xmlMarshaller.getCharacterEscapeHandler();
  }
 else   if (SUN_NAMESPACE_PREFIX_MAPPER.equals(key) || SUN_JSE_NAMESPACE_PREFIX_MAPPER.equals(key)) {
    NamespacePrefixMapperWrapper wrapper=(NamespacePrefixMapperWrapper)xmlMarshaller.getNamespacePrefixMapper();
    return wrapper.getPrefixMapper();
  }
  throw new PropertyException(key);
}
Program: 65385
Project: 65385
Buggy source:
private String tab(){
  if (tab == null) {
    tab=getMarshaller().getIndentString();
  }
  return tab;
}

Fixed version (ground truth):
private byte[] tab(){
  if (tab == null) {
    String sTab=getMarshaller().getIndentString();
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    writeValue(sTab,true,false,baos);
    tab=baos.toByteArray();
  }
  return tab;
}
Program: 65386
Project: 65386
Buggy source:
private void outputStreamWriteTab(){
  for (int x=0; x < numberOfTabs; x++) {
    writeValue(tab(),true);
  }
}

Fixed version (ground truth):
private void outputStreamWriteTab(){
  for (int x=0; x < numberOfTabs; x++) {
    outputStreamWrite(tab());
  }
}