nus-yam/ex-repair huggingface dataset:
Program: 51173
Project: 51173
Buggy source:
private JsonXmlStreamWriter(Writer writer,JSONConfiguration config){
  this.mainWriter=writer;
  this.stripRoot=config.isRootUnwrapping();
  if (null != config.getArrays()) {
    this.arrayElementNames.addAll(config.getArrays());
  }
  if (null != config.getNonStrings()) {
    this.nonStringElementNames.addAll(config.getNonStrings());
  }
  if (null != config.getXml2JsonNs()) {
    this.xml2JsonNs.putAll(config.getXml2JsonNs());
  }
  processingStack.add(createProcessingState());
  depth=0;
}

Fixed version (ground truth):
private JsonXmlStreamWriter(Writer writer,JSONConfiguration config){
  this.mainWriter=writer;
  this.stripRoot=config.isRootUnwrapping();
  this.nsSeparator=config.getNsSeparator();
  if (null != config.getArrays()) {
    this.arrayElementNames.addAll(config.getArrays());
  }
  if (null != config.getNonStrings()) {
    this.nonStringElementNames.addAll(config.getNonStrings());
  }
  if (null != config.getXml2JsonNs()) {
    this.xml2JsonNs.putAll(config.getXml2JsonNs());
  }
  processingStack.add(createProcessingState());
  depth=0;
}
Program: 51174
Project: 51174
Buggy source:
private String getEffectiveName(String namespaceURI,String localName){
  if ((namespaceURI != null) && xml2JsonNs.containsKey(namespaceURI)) {
    return String.format("String_Node_Str",xml2JsonNs.get(namespaceURI),localName);
  }
 else {
    return localName;
  }
}

Fixed version (ground truth):
private String getEffectiveName(String namespaceURI,String localName){
  if ((namespaceURI != null) && xml2JsonNs.containsKey(namespaceURI)) {
    return String.format("String_Node_Str",xml2JsonNs.get(namespaceURI),nsSeparator,localName);
  }
 else {
    return localName;
  }
}
Program: 51175
Project: 51175
Buggy source:
public synchronized void start(BundleContext bundleContext) throws Exception {
  this.bundleContext=bundleContext;
  debugPrintln("String_Node_Str");
  debugPrintln("String_Node_Str");
  ServiceFinder.setIteratorProvider(new OsgiServiceFinder());
  debugPrintln("String_Node_Str");
  bundleContext.addBundleListener(this);
  debugPrintln("String_Node_Str");
  for (  Bundle bundle : bundleContext.getBundles()) {
    if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) {
      register(bundle);
    }
  }
  debugPrintln("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void start(final BundleContext bundleContext) throws Exception {
  this.bundleContext=bundleContext;
  debugPrintln("String_Node_Str");
  debugPrintln("String_Node_Str");
  PackageNamesScanner.setPackageURLProvider(new PackageNamesScanner.PackageURLProvider(){
    @Override public Enumeration<URL> getPackageURLs(    ClassLoader cl,    String pkgName) throws IOException {
      List<URL> result=new LinkedList<URL>();
      for (      Bundle b : bundleContext.getBundles()) {
        Enumeration<URL> e=(Enumeration<URL>)b.findEntries(pkgName,"String_Node_Str",false);
        if (e != null) {
          result.addAll(Collections.list(e));
        }
      }
      return Collections.enumeration(result);
    }
  }
);
  OsgiLocator.register(UriSchemeScanner.class.getName(),new Callable<List<Class>>(){
    @Override public List<Class> call() throws Exception {
      List<Class> result=new LinkedList<Class>();
      result.add(BundleSchemeScanner.class);
      return result;
    }
  }
);
  debugPrintln("String_Node_Str");
  ServiceFinder.setIteratorProvider(new OsgiServiceFinder());
  debugPrintln("String_Node_Str");
  bundleContext.addBundleListener(this);
  debugPrintln("String_Node_Str");
  for (  Bundle bundle : bundleContext.getBundles()) {
    if (bundle.getState() == Bundle.RESOLVED || bundle.getState() == Bundle.STARTING || bundle.getState() == Bundle.ACTIVE || bundle.getState() == Bundle.STOPPING) {
      register(bundle);
    }
  }
  debugPrintln("String_Node_Str");
}
Program: 51176
Project: 51176
Buggy source:
/** 
 * Scan from a set of packages using declared class loader.
 * @param classloader the class loader to load classes from.
 * @param packages an array of package names.
 */
public PackageNamesScanner(final ClassLoader classloader,final String[] packages){
  this.packages=packages;
  this.classloader=classloader;
  this.scanners=new HashMap<String,UriSchemeScanner>();
  add(new JarZipSchemeScanner());
  add(new FileSchemeScanner());
  add(new VfsSchemeScanner());
}

Fixed version (ground truth):
/** 
 * Scan from a set of packages using declared class loader.
 * @param classloader the class loader to load classes from.
 * @param packages an array of package names.
 */
public PackageNamesScanner(final ClassLoader classloader,final String[] packages){
  this.packages=packages;
  this.classloader=classloader;
  this.scanners=new HashMap<String,UriSchemeScanner>();
  add(new JarZipSchemeScanner());
  add(new FileSchemeScanner());
  add(new VfsSchemeScanner());
  for (  UriSchemeScanner s : ServiceFinder.find(UriSchemeScanner.class)) {
    add(s);
  }
}
Program: 51177
Project: 51177
Buggy source:
public Object getInjectableInstance(Object o){
  return o;
}

Fixed version (ground truth):
public Object getInjectableInstance(Object o){
  getInjector().injectMembers(o);
  return o;
}
Program: 51178
Project: 51178
Buggy source:
public IoCComponentProvider getComponentProvider(ComponentContext cc,Class clazz){
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + clazz.getName() + "String_Node_Str");
  }
  Key<?> key=Key.get(clazz);
  Injector i=findInjector(key);
  if (i == null) {
    if (!isImplicitGuiceComponent(clazz)) {
      return null;
    }
    try {
      if (injector.getBinding(key) != null) {
        LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
        return new GuiceInstantiatedComponentProvider(injector,clazz);
      }
    }
 catch (    ConfigurationException e) {
      LOGGER.log(Level.INFO,"String_Node_Str" + clazz.getName(),e);
      throw e;
    }
  }
  final Scope[] scope=new Scope[1];
  i.getBinding(key).acceptScopingVisitor(new BindingScopingVisitor<Void>(){
    public Void visitEagerSingleton(){
      scope[0]=Scopes.SINGLETON;
      return null;
    }
    public Void visitScope(    Scope theScope){
      scope[0]=theScope;
      return null;
    }
    public Void visitScopeAnnotation(    Class scopeAnnotation){
      throw new UnsupportedOperationException();
    }
    public Void visitNoScoping(){
      scope[0]=Scopes.NO_SCOPE;
      return null;
    }
  }
);
  assert(scope[0] != null);
  ComponentScope componentScope=getComponentScope(scope[0]);
  LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str"+ componentScope+ "String_Node_Str");
  return new GuiceManagedComponentProvider(i,componentScope,clazz);
}

Fixed version (ground truth):
public IoCComponentProvider getComponentProvider(ComponentContext cc,Class clazz){
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + clazz.getName() + "String_Node_Str");
  }
  Key<?> key=Key.get(clazz);
  Injector i=findInjector(key);
  if (i == null) {
    if (!isImplicitGuiceComponent(clazz)) {
      if (isGuiceFieldOrMethodInjected(clazz)) {
        ComponentScope componentScope=getComponentScope(key,injector);
        return new GuiceManagedComponentProvider(injector,componentScope,clazz);
      }
 else {
        return null;
      }
    }
    try {
      if (injector.getBinding(key) != null) {
        LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
        return new GuiceInstantiatedComponentProvider(injector,clazz);
      }
    }
 catch (    ConfigurationException e) {
      LOGGER.log(Level.INFO,"String_Node_Str" + clazz.getName(),e);
      throw e;
    }
  }
  ComponentScope componentScope=getComponentScope(key,i);
  LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str"+ componentScope+ "String_Node_Str");
  return new GuiceManagedComponentProvider(i,componentScope,clazz);
}
Program: 51179
Project: 51179
Buggy source:
@Override protected ServletModule configure(){
  return new JerseyServletModule().path("String_Node_Str").initParam(ServletContainer.APPLICATION_CONFIG_CLASS,ClassNamesResourceConfig.class.getName()).initParam(ClassNamesResourceConfig.PROPERTY_CLASSNAMES,UnBoundPerRequestResource.class.getName()).bindClass(GuiceManagedClass.class);
}

Fixed version (ground truth):
@Override protected ServletModule configure(){
  return new JerseyServletModule().path("String_Node_Str").initParam(ServletContainer.APPLICATION_CONFIG_CLASS,ClassNamesResourceConfig.class.getName()).initParam(ClassNamesResourceConfig.PROPERTY_CLASSNAMES,UnBoundPerRequestResource.class.getName() + "String_Node_Str" + FieldInjectResource.class.getName()).bindClass(GuiceManagedClass.class);
}
Program: 51180
Project: 51180
Buggy source:
public IoCComponentProvider getComponentProvider(ComponentContext cc,Class clazz){
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + clazz.getName() + "String_Node_Str");
  }
  Key<?> key=Key.get(clazz);
  Injector i=findInjector(key);
  if (i == null) {
    if (isGuiceConstructorInjected(clazz)) {
      try {
        if (injector.getBinding(key) != null) {
          LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
          return new GuiceInstantiatedComponentProvider(injector,clazz);
        }
      }
 catch (      ConfigurationException e) {
        LOGGER.log(Level.INFO,"String_Node_Str" + clazz.getName(),e);
        throw e;
      }
    }
 else     if (isGuiceFieldOrMethodInjected(clazz)) {
      if (hasConstructorWithArguments(clazz)) {
        LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
        return new GuiceInjectedComponentProvider(injector);
      }
 else {
        ComponentScope componentScope=getComponentScope(key,injector);
        LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str"+ componentScope+ "String_Node_Str");
        return new GuiceManagedComponentProvider(injector,componentScope,clazz);
      }
    }
 else {
      return null;
    }
  }
  ComponentScope componentScope=getComponentScope(key,i);
  LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str"+ componentScope+ "String_Node_Str");
  return new GuiceManagedComponentProvider(i,componentScope,clazz);
}

Fixed version (ground truth):
public IoCComponentProvider getComponentProvider(ComponentContext cc,Class clazz){
  if (LOGGER.isLoggable(Level.FINE)) {
    LOGGER.fine("String_Node_Str" + clazz.getName() + "String_Node_Str");
  }
  Key<?> key=Key.get(clazz);
  Injector i=findInjector(key);
  if (i == null) {
    if (isGuiceConstructorInjected(clazz)) {
      try {
        if (injector.getBinding(key) != null) {
          LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
          return new GuiceInstantiatedComponentProvider(injector,clazz);
        }
      }
 catch (      ConfigurationException e) {
        LOGGER.log(Level.SEVERE,"String_Node_Str" + clazz.getName(),e);
        throw e;
      }
    }
 else     if (isGuiceFieldOrMethodInjected(clazz)) {
      LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str");
      return new GuiceInjectedComponentProvider(injector);
    }
 else {
      return null;
    }
  }
  ComponentScope componentScope=getComponentScope(key,i);
  LOGGER.info("String_Node_Str" + clazz.getName() + "String_Node_Str"+ componentScope+ "String_Node_Str");
  return new GuiceManagedComponentProvider(i,componentScope,clazz);
}
Program: 51181
Project: 51181
Buggy source:
public void test1(){
  DefaultResourceConfig drc=new DefaultResourceConfig(StringResource.class);
  initParams.put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,"String_Node_Str");
  drc.setPropertiesAndFeatures(initParams);
  startServer(drc);
  Client c=Client.create();
  ViewResource r=c.viewResource(getUri().path("String_Node_Str").path("String_Node_Str").build());
  StringController sc=r.get(StringController.class);
  Form f=new Form();
  f.add("String_Node_Str","String_Node_Str");
  assert(sc.action1("String_Node_Str","String_Node_Str").equals("String_Node_Str"));
  assert(sc.action2("String_Node_Str","String_Node_Str",f).equals("String_Node_Str"));
}

Fixed version (ground truth):
public void test1(){
  DefaultResourceConfig drc=new DefaultResourceConfig(StringResource.class);
  initParams.put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES,"String_Node_Str");
  drc.setPropertiesAndFeatures(initParams);
  startServer(drc);
  Client c=Client.create();
  ViewResource r=c.viewResource(getUri().path("String_Node_Str").path("String_Node_Str").build());
  StringController sc=r.get(StringController.class);
  Form f=new Form();
  f.add("String_Node_Str","String_Node_Str");
  assert(sc.action1("String_Node_Str","String_Node_Str").equals("String_Node_Str"));
  assert(sc.action2("String_Node_Str","String_Node_Str",f).equals("String_Node_Str"));
  f=new Form();
  f.add("String_Node_Str","String_Node_Str");
  assert(sc.action11("String_Node_Str","String_Node_Str").equals("String_Node_Str"));
  assert(sc.action21("String_Node_Str","String_Node_Str",f).equals("String_Node_Str"));
}
Program: 51183
Project: 51183
Buggy source:
public String getRequestURL(){
  return context.getAbsolutePath().toString();
}

Fixed version (ground truth):
public URL getRequestURL(){
  try {
    return context.getRequestUri().toURL();
  }
 catch (  MalformedURLException ex) {
    Logger.getLogger(OAuthServerRequest.class.getName()).log(Level.SEVERE,null,ex);
    return null;
  }
}
Program: 51184
Project: 51184
Buggy source:
/** 
 * Generates the HMAC-SHA1 signature of OAuth request elements.
 * @param elements the combined OAuth elements to sign.
 * @param secrets the shared secrets used to sign the request.
 * @return the OAuth signature, in base64-encoded form.
 */
public String sign(String elements,OAuthSecrets secrets){
  Mac mac;
  try {
    mac=Mac.getInstance(SIGNATURE_ALGORITHM);
  }
 catch (  NoSuchAlgorithmException nsae) {
    throw new IllegalStateException(nsae);
  }
  StringBuffer buf=new StringBuffer();
  String secret=secrets.getConsumerSecret();
  if (secret != null) {
    buf.append(URLCodec.encode(secret));
  }
  buf.append('&');
  secret=secrets.getTokenSecret();
  if (secret != null) {
    buf.append(URLCodec.encode(secret));
  }
  byte[] key;
  try {
    key=buf.toString().getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException uee) {
    throw new IllegalStateException(uee);
  }
  SecretKeySpec spec=new SecretKeySpec(key,SIGNATURE_ALGORITHM);
  try {
    mac.init(spec);
  }
 catch (  InvalidKeyException ike) {
    throw new IllegalStateException(ike);
  }
  return Base64.encode(mac.doFinal(elements.getBytes()));
}

Fixed version (ground truth):
/** 
 * Generates the HMAC-SHA1 signature of OAuth request elements.
 * @param elements the combined OAuth elements to sign.
 * @param secrets the shared secrets used to sign the request.
 * @return the OAuth signature, in base64-encoded form.
 */
public String sign(String elements,OAuthSecrets secrets){
  Mac mac;
  try {
    mac=Mac.getInstance(SIGNATURE_ALGORITHM);
  }
 catch (  NoSuchAlgorithmException nsae) {
    throw new IllegalStateException(nsae);
  }
  StringBuffer buf=new StringBuffer();
  String secret=secrets.getConsumerSecret();
  if (secret != null) {
    buf.append(UriComponent.encode(secret,UriComponent.Type.QUERY));
  }
  buf.append('&');
  secret=secrets.getTokenSecret();
  if (secret != null) {
    buf.append(UriComponent.encode(secret,UriComponent.Type.QUERY));
  }
  byte[] key;
  try {
    key=buf.toString().getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException uee) {
    throw new IllegalStateException(uee);
  }
  SecretKeySpec spec=new SecretKeySpec(key,SIGNATURE_ALGORITHM);
  try {
    mac.init(spec);
  }
 catch (  InvalidKeyException ike) {
    throw new IllegalStateException(ike);
  }
  return Base64.encode(mac.doFinal(elements.getBytes()));
}
Program: 51185
Project: 51185
Buggy source:
/** 
 * Writes the OAuth parameters to a request, as an Authorization header.
 * @param request the request to write OAuth parameters to.
 * @return this parameters object.
 */
public OAuthParameters writeRequest(OAuthRequest request){
  StringBuffer buf=new StringBuffer(SCHEME);
  boolean comma=false;
  for (  String key : keySet()) {
    String value=get(key);
    if (value == null) {
      continue;
    }
    buf.append(comma ? "String_Node_Str" : "String_Node_Str").append(URLCodec.encode(key));
    buf.append("String_Node_Str").append(URLCodec.encode(value)).append('"');
    comma=true;
  }
  request.addHeaderValue(AUTHORIZATION_HEADER,buf.toString());
  return this;
}

Fixed version (ground truth):
/** 
 * Writes the OAuth parameters to a request, as an Authorization header.
 * @param request the request to write OAuth parameters to.
 * @return this parameters object.
 */
public OAuthParameters writeRequest(OAuthRequest request){
  StringBuffer buf=new StringBuffer(SCHEME);
  boolean comma=false;
  for (  String key : keySet()) {
    String value=get(key);
    if (value == null) {
      continue;
    }
    buf.append(comma ? "String_Node_Str" : "String_Node_Str").append(UriComponent.encode(key,UriComponent.Type.QUERY));
    buf.append("String_Node_Str").append(UriComponent.encode(value,UriComponent.Type.QUERY)).append('"');
    comma=true;
  }
  request.addHeaderValue(AUTHORIZATION_HEADER,buf.toString());
  return this;
}
Program: 51186
Project: 51186
Buggy source:
/** 
 * Reads a request for OAuth parameters, and populates this object.
 * @param request the request to read OAuth parameters from.
 * @return this parameters object.
 */
public OAuthParameters readRequest(OAuthRequest request){
  for (  String param : request.getParameterNames()) {
    if (!param.startsWith("String_Node_Str")) {
      continue;
    }
    List values=request.getParameterValues(param);
    if (values == null) {
      continue;
    }
    Iterator<String> i=values.iterator();
    if (!i.hasNext()) {
      continue;
    }
    put(param,i.next());
  }
  List<String> headers=request.getHeaderValues(AUTHORIZATION_HEADER);
  if (headers == null) {
    return this;
  }
  for (  String header : headers) {
    if (!header.regionMatches(true,0,SCHEME_SPACE,0,SCHEME_SPACE.length())) {
      continue;
    }
    for (    String param : header.substring(SCHEME_SPACE.length()).trim().split("String_Node_Str")) {
      String[] nv=param.split("String_Node_Str",2);
      if (nv.length != 2) {
        continue;
      }
      put(URLCodec.decode(nv[0].trim()),URLCodec.decode(dequote(nv[1].trim())));
    }
  }
  return this;
}

Fixed version (ground truth):
/** 
 * Reads a request for OAuth parameters, and populates this object.
 * @param request the request to read OAuth parameters from.
 * @return this parameters object.
 */
public OAuthParameters readRequest(OAuthRequest request){
  for (  String param : request.getParameterNames()) {
    if (!param.startsWith("String_Node_Str")) {
      continue;
    }
    List values=request.getParameterValues(param);
    if (values == null) {
      continue;
    }
    Iterator<String> i=values.iterator();
    if (!i.hasNext()) {
      continue;
    }
    put(param,i.next());
  }
  List<String> headers=request.getHeaderValues(AUTHORIZATION_HEADER);
  if (headers == null) {
    return this;
  }
  for (  String header : headers) {
    if (!header.regionMatches(true,0,SCHEME_SPACE,0,SCHEME_SPACE.length())) {
      continue;
    }
    for (    String param : header.substring(SCHEME_SPACE.length()).trim().split("String_Node_Str")) {
      String[] nv=param.split("String_Node_Str",2);
      if (nv.length != 2) {
        continue;
      }
      put(UriComponent.decode(nv[0].trim(),UriComponent.Type.QUERY),UriComponent.decode(dequote(nv[1].trim()),UriComponent.Type.QUERY));
    }
  }
  return this;
}
Program: 51187
Project: 51187
Buggy source:
/** 
 * Returns the URL of the request, including protocol, server name, optional port number, and server path.
 * @return the request URL.
 */
public String getRequestURL();

Fixed version (ground truth):
/** 
 * Returns the URL of the request, including protocol, server name, optional port number, and server path.
 * @return the request URL.
 */
public URL getRequestURL();
Program: 51188
Project: 51188
Buggy source:
/** 
 * Collects, sorts and concetenates the request parameters into a normalized string, per section 9.1.1. of the OAuth 1.0 specification.
 * @param request the request to retreive parameters from.
 * @param params the OAuth authorization parameters to retrieve parameters from.
 * @return the normalized parameters string.
 */
private static String normalizeParameters(OAuthRequest request,OAuthParameters params){
  ArrayList<String> list=new ArrayList<String>();
  for (  String key : params.keySet()) {
    if (key.equals(OAuthParameters.REALM) || key.equals(OAuthParameters.SIGNATURE)) {
      continue;
    }
    String value=params.get(key);
    if (value != null) {
      list.add(URLCodec.encode(key) + '=' + URLCodec.encode(value));
    }
  }
  for (  String key : request.getParameterNames()) {
    if (key.startsWith("String_Node_Str") && params.containsKey(key)) {
      continue;
    }
    List<String> values=request.getParameterValues(key);
    if (values != null) {
      for (      String value : values) {
        list.add(URLCodec.encode(key) + '=' + URLCodec.encode(value));
      }
    }
  }
  Collections.sort(list);
  StringBuffer buf=new StringBuffer();
  for (Iterator<String> i=list.iterator(); i.hasNext(); ) {
    buf.append(i.next());
    if (i.hasNext()) {
      buf.append('&');
    }
  }
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Collects, sorts and concetenates the request parameters into a normalized string, per section 9.1.1. of the OAuth 1.0 specification.
 * @param request the request to retreive parameters from.
 * @param params the OAuth authorization parameters to retrieve parameters from.
 * @return the normalized parameters string.
 */
private static String normalizeParameters(OAuthRequest request,OAuthParameters params){
  ArrayList<String> list=new ArrayList<String>();
  for (  String key : params.keySet()) {
    if (key.equals(OAuthParameters.REALM) || key.equals(OAuthParameters.SIGNATURE)) {
      continue;
    }
    String value=params.get(key);
    if (value != null) {
      list.add(UriComponent.encode(key,UriComponent.Type.QUERY) + '=' + UriComponent.encode(value,UriComponent.Type.QUERY));
    }
  }
  for (  String key : request.getParameterNames()) {
    if (key.startsWith("String_Node_Str") && params.containsKey(key)) {
      continue;
    }
    List<String> values=request.getParameterValues(key);
    if (values != null) {
      for (      String value : values) {
        list.add(UriComponent.encode(key,UriComponent.Type.QUERY) + '=' + UriComponent.encode(value,UriComponent.Type.QUERY));
      }
    }
  }
  Collections.sort(list);
  StringBuffer buf=new StringBuffer();
  for (Iterator<String> i=list.iterator(); i.hasNext(); ) {
    buf.append(i.next());
    if (i.hasNext()) {
      buf.append('&');
    }
  }
  return buf.toString();
}
Program: 51189
Project: 51189
Buggy source:
/** 
 * Constructs the request URL, per section 9.1.2 of the OAuth 1.0 specification.
 * @param request the incoming request construct URL from.
 * @return the constructed URL.
 */
private static String constructRequestURL(OAuthRequest request) throws OAuthSignatureException {
  URL url;
  try {
    url=new URL(request.getRequestURL());
  }
 catch (  MalformedURLException mue) {
    throw new OAuthSignatureException(mue);
  }
  StringBuffer buf=new StringBuffer(url.getProtocol()).append("String_Node_Str").append(url.getHost().toLowerCase());
  int port=url.getPort();
  if (port > 0 && port != url.getDefaultPort()) {
    buf.append(':').append(port);
  }
  buf.append(url.getPath());
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Constructs the request URI, per section 9.1.2 of the OAuth 1.0 specification.
 * @param request the incoming request to construct the URI from.
 * @return the constructed URI.
 */
private static URI constructRequestURL(OAuthRequest request) throws OAuthSignatureException {
  try {
    URL url=request.getRequestURL();
    if (url == null)     throw new OAuthSignatureException();
    StringBuffer buf=new StringBuffer(url.getProtocol()).append("String_Node_Str").append(url.getHost().toLowerCase());
    int port=url.getPort();
    if (port > 0 && port != url.getDefaultPort()) {
      buf.append(':').append(port);
    }
    buf.append(url.getPath());
    return new URI(buf.toString());
  }
 catch (  URISyntaxException mue) {
    throw new OAuthSignatureException(mue);
  }
}
Program: 51190
Project: 51190
Buggy source:
/** 
 * Assembles request elements for which a digital signature is to be generated/verified, per section 9.1.3 of the OAuth 1.0 specification.
 * @param request the request from which to assemble elements.
 * @param params the OAuth authorization parameters from which to assemble elements.
 * @return the concetenated elements, ready to sign/verify
 */
private static String elements(OAuthRequest request,OAuthParameters params) throws OAuthSignatureException {
  StringBuffer buf=new StringBuffer(URLCodec.encode(request.getRequestMethod().toUpperCase()));
  buf.append('&').append(URLCodec.encode(constructRequestURL(request)));
  buf.append('&').append(URLCodec.encode(normalizeParameters(request,params)));
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Assembles request elements for which a digital signature is to be generated/verified, per section 9.1.3 of the OAuth 1.0 specification.
 * @param request the request from which to assemble elements.
 * @param params the OAuth authorization parameters from which to assemble elements.
 * @return the concetenated elements, ready to sign/verify
 */
private static String elements(OAuthRequest request,OAuthParameters params) throws OAuthSignatureException {
  StringBuffer buf=new StringBuffer(request.getRequestMethod().toUpperCase());
  URI uri=constructRequestURL(request);
  String tp=uri.getScheme();
  buf.append('&').append(UriComponent.encode(tp,UriComponent.Type.SCHEME));
  tp=uri.getAuthority();
  buf.append("String_Node_Str").append(UriComponent.encode(tp,UriComponent.Type.AUTHORITY));
  tp=uri.getPath();
  buf.append(UriComponent.encode(tp,UriComponent.Type.PATH_SEGMENT));
  buf.append('&').append(UriComponent.encode(normalizeParameters(request,params),UriComponent.Type.QUERY_PARAM));
  System.err.println("String_Node_Str" + buf);
  return buf.toString();
}
Program: 51191
Project: 51191
Buggy source:
public String getRequestURL(){
  return requestURL;
}

Fixed version (ground truth):
public URL getRequestURL(){
  try {
    return new URL(requestURL);
  }
 catch (  MalformedURLException ex) {
    Logger.getLogger(DummyRequest.class.getName()).log(Level.SEVERE,null,ex);
    return null;
  }
}
Program: 51192
Project: 51192
Buggy source:
public String getRequestURL(){
  final URI uri=clientRequest.getURI();
  return uri.getScheme() + "String_Node_Str" + uri.getAuthority()+ uri.getPath();
}

Fixed version (ground truth):
public URL getRequestURL(){
  try {
    final URI uri=clientRequest.getURI();
    return uri.toURL();
  }
 catch (  MalformedURLException ex) {
    Logger.getLogger(RequestWrapper.class.getName()).log(Level.SEVERE,null,ex);
    return null;
  }
}
Program: 51193
Project: 51193
Buggy source:
public ContainerRequest filter(ContainerRequest request){
  if (resourceConfig.getFeature(ResourceConfig.FEATURE_NORMALIZE_URI)) {
    final URI uri=request.getRequestUri();
    final URI normalizedUri=UriHelper.normalize(uri,!resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));
    if (uri != normalizedUri && resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT)) {
      throw new WebApplicationException(Response.temporaryRedirect(normalizedUri).build());
    }
  }
  return request;
}

Fixed version (ground truth):
public ContainerRequest filter(ContainerRequest request){
  if (resourceConfig.getFeature(ResourceConfig.FEATURE_NORMALIZE_URI)) {
    final URI uri=request.getRequestUri();
    final URI normalizedUri=UriHelper.normalize(uri,!resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));
    if (uri != normalizedUri) {
      if (resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT)) {
        throw new WebApplicationException(Response.temporaryRedirect(normalizedUri).build());
      }
 else {
        final URI baseUri=UriHelper.normalize(request.getBaseUri(),!resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));
        request.setUris(baseUri,normalizedUri);
      }
    }
  }
  return request;
}
Program: 51194
Project: 51194
Buggy source:
/** 
 * Creates an instance of   {@link WebAppDescriptor} from the passed {@link Builder}instance.
 * @param {@link Builder} instance
 */
private WebAppDescriptor(Builder b){
  super(b);
  this.initParams=(b.initParams == null) ? new HashMap<String,String>() : b.initParams;
  this.contextParams=(b.contextParams == null) ? new HashMap<String,String>() : b.contextParams;
  this.servletClass=b.servletClass;
  this.filterClass=b.filterClass;
  this.contextPath=b.contextPath;
  this.servletPath=b.servletPath;
  this.contextListenerClass=b.contextListenerClass;
}

Fixed version (ground truth):
/** 
 * Creates an instance of   {@link WebAppDescriptor} from the passed {@link Builder}instance.
 * @param {@link Builder} instance
 */
private WebAppDescriptor(Builder b){
  super(b);
  this.initParams=(b.initParams == null) ? new HashMap<String,String>() : b.initParams;
  this.contextParams=(b.contextParams == null) ? new HashMap<String,String>() : b.contextParams;
  this.servletClass=b.servletClass;
  this.filterClass=b.filterClass;
  this.contextPath=b.contextPath;
  this.servletPath=b.servletPath;
  this.contextListenerClass=b.contextListenerClass;
  this.contextAttributeListenerClass=b.contextAttributeListenerClass;
  this.requestListenerClass=b.requestListenerClass;
  this.requestAttributeListenerClass=b.requestAttributeListenerClass;
}
Program: 51195
Project: 51195
Buggy source:
@Override protected void reset(){
  super.reset();
  this.initParams=null;
  this.contextParams=null;
  this.servletClass=ServletContainer.class;
  this.filterClass=null;
  this.contextListenerClass=null;
  this.contextPath="String_Node_Str";
  this.servletPath="String_Node_Str";
}

Fixed version (ground truth):
@Override protected void reset(){
  super.reset();
  this.initParams=null;
  this.contextParams=null;
  this.servletClass=ServletContainer.class;
  this.filterClass=null;
  this.contextListenerClass=null;
  this.contextAttributeListenerClass=null;
  this.requestListenerClass=null;
  this.requestAttributeListenerClass=null;
  this.contextPath="String_Node_Str";
  this.servletPath="String_Node_Str";
}
Program: 51198
Project: 51198
Buggy source:
/** 
 * Creates an instance of   {@link GrizzlyWebTestContainer}
 * @param Base URI of the application
 * @param An instance of {@link WebAppDescriptor}
 */
private GrizzlyWebTestContainer(URI baseUri,WebAppDescriptor ad){
  this.baseUri=UriBuilder.fromUri(baseUri).path(ad.getContextPath()).path(ad.getServletPath()).build();
  LOGGER.info("String_Node_Str" + this.baseUri);
  this.contextPath=ad.getContextPath();
  this.servletPath=ad.getServletPath();
  this.servletClass=ad.getServletClass();
  this.filterClass=ad.getFilterClass();
  this.initParams=ad.getInitParams();
  this.contextParams=ad.getContextParams();
  this.contextListenerClassName=(ad.getContextListenerClass() != null) ? ad.getContextListenerClass().getName() : "String_Node_Str";
  instantiateGrizzlyWebServer();
}

Fixed version (ground truth):
/** 
 * Creates an instance of   {@link GrizzlyWebTestContainer}
 * @param Base URI of the application
 * @param An instance of {@link WebAppDescriptor}
 */
private GrizzlyWebTestContainer(URI baseUri,WebAppDescriptor ad){
  this.baseUri=UriBuilder.fromUri(baseUri).path(ad.getContextPath()).path(ad.getServletPath()).build();
  LOGGER.info("String_Node_Str" + this.baseUri);
  this.contextPath=ad.getContextPath();
  this.servletPath=ad.getServletPath();
  this.servletClass=ad.getServletClass();
  this.filterClass=ad.getFilterClass();
  this.initParams=ad.getInitParams();
  this.contextParams=ad.getContextParams();
  this.contextListenerClassName=(ad.getContextListenerClass() != null) ? ad.getContextListenerClass().getName() : "String_Node_Str";
  this.contextAttributeListenerClassName=(ad.getContextAttributeListenerClass() != null) ? ad.getContextAttributeListenerClass().getName() : "String_Node_Str";
  this.requestListenerClassName=(ad.getRequestListenerClass() != null) ? ad.getRequestListenerClass().getName() : "String_Node_Str";
  this.requestAttributeListenerClassName=(ad.getRequestAttributeListenerClass() != null) ? ad.getRequestAttributeListenerClass().getName() : "String_Node_Str";
  instantiateGrizzlyWebServer();
}
Program: 51199
Project: 51199
Buggy source:
public Stax2JacksonWriter(JsonGenerator generator,JSONConfiguration config){
  this.attrsWithPrefix=config.isUsingPrefixesAtNaturalAttributes();
  this.generator=generator;
}

Fixed version (ground truth):
public Stax2JacksonWriter(JsonGenerator generator,JSONConfiguration config){
  this.attrsWithPrefix=config.isUsingPrefixesAtNaturalAttributes();
  this.generator=JacksonStringMergingGenerator.createGenerator(generator);
}
Program: 51200
Project: 51200
Buggy source:
/** 
 * Generates the HMAC-SHA1 signature of OAuth request elements.
 * @param elements the combined OAuth elements to sign.
 * @param secrets the shared secrets used to sign the request.
 * @return the OAuth signature, in base64-encoded form.
 */
public String sign(String elements,OAuthSecrets secrets){
  Mac mac;
  try {
    mac=Mac.getInstance(SIGNATURE_ALGORITHM);
  }
 catch (  NoSuchAlgorithmException nsae) {
    throw new IllegalStateException(nsae);
  }
  StringBuffer buf=new StringBuffer();
  String secret=secrets.getConsumerSecret();
  if (secret != null) {
    buf.append(secret);
  }
  buf.append('&');
  secret=secrets.getTokenSecret();
  if (secret != null) {
    buf.append(secret);
  }
  byte[] key;
  try {
    key=buf.toString().getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException uee) {
    throw new IllegalStateException(uee);
  }
  SecretKeySpec spec=new SecretKeySpec(key,SIGNATURE_ALGORITHM);
  try {
    mac.init(spec);
  }
 catch (  InvalidKeyException ike) {
    throw new IllegalStateException(ike);
  }
  return Base64.encode(mac.doFinal(elements.getBytes()));
}

Fixed version (ground truth):
/** 
 * Generates the HMAC-SHA1 signature of OAuth request elements.
 * @param elements the combined OAuth elements to sign.
 * @param secrets the shared secrets used to sign the request.
 * @return the OAuth signature, in base64-encoded form.
 */
public String sign(String elements,OAuthSecrets secrets){
  Mac mac;
  try {
    mac=Mac.getInstance(SIGNATURE_ALGORITHM);
  }
 catch (  NoSuchAlgorithmException nsae) {
    throw new IllegalStateException(nsae);
  }
  StringBuffer buf=new StringBuffer();
  String secret=secrets.getConsumerSecret();
  if (secret != null) {
    buf.append(URLCodec.encode(secret));
  }
  buf.append('&');
  secret=secrets.getTokenSecret();
  if (secret != null) {
    buf.append(URLCodec.encode(secret));
  }
  byte[] key;
  try {
    key=buf.toString().getBytes("String_Node_Str");
  }
 catch (  UnsupportedEncodingException uee) {
    throw new IllegalStateException(uee);
  }
  SecretKeySpec spec=new SecretKeySpec(key,SIGNATURE_ALGORITHM);
  try {
    mac.init(spec);
  }
 catch (  InvalidKeyException ike) {
    throw new IllegalStateException(ike);
  }
  return Base64.encode(mac.doFinal(elements.getBytes()));
}
Program: 51201
Project: 51201
Buggy source:
@ProbeListener("String_Node_Str") public void requestEnd(){
  for (  AbstractRuleEvent ruleEvent : ruleEvents.get()) {
    ruleEvent.process(currentApplicationStatProvider.get());
  }
}

Fixed version (ground truth):
@ProbeListener("String_Node_Str") public void requestEnd(){
  for (  AbstractRuleEvent ruleEvent : ruleEvents.get()) {
    ruleEvent.process(currentApplicationStatProvider.get());
  }
  ruleEvents.get().clear();
}
Program: 51204
Project: 51204
Buggy source:
public Cat(String name){
  super(name);
}

Fixed version (ground truth):
public Cat(String name,String nickName){
  super(name);
  this.nickName=nickName;
}
Program: 51205
Project: 51205
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",super.toString());
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format("String_Node_Str",super.toString(),this.nickName);
}
Program: 51206
Project: 51206
Buggy source:
private JSONConfiguration(Builder b){
  notation=b.notation;
  arrays=b.arrays;
  attrsAsElems=b.attrsAsElems;
  nonStrings=b.nonStrings;
  rootUnwrapping=b.rootUnwrapping;
  humanReadableFormating=b.humanReadableFormatting;
  jsonXml2JsonNs=b.jsonXml2JsonNs;
}

Fixed version (ground truth):
private JSONConfiguration(Builder b){
  notation=b.notation;
  arrays=b.arrays;
  attrsAsElems=b.attrsAsElems;
  nonStrings=b.nonStrings;
  rootUnwrapping=b.rootUnwrapping;
  humanReadableFormating=b.humanReadableFormatting;
  jsonXml2JsonNs=b.jsonXml2JsonNs;
  usePrefixAtNaturalAttributes=b.usePrefixAtNaturalAttributes;
}
Program: 51207
Project: 51207
Buggy source:
public static XMLStreamWriter createWriter(Writer writer,JSONConfiguration config,boolean writingList) throws IOException {
switch (config.getNotation()) {
case NATURAL:
    final JsonGenerator rawGenerator=new JsonFactory().createJsonGenerator(writer);
  if (config.isHumanReadableFormatting()) {
    rawGenerator.useDefaultPrettyPrinter();
  }
final JsonGenerator bodyGenerator=writingList ? JacksonArrayWrapperGenerator.createArrayWrapperGenerator(rawGenerator) : rawGenerator;
if (config.isRootUnwrapping()) {
return new Stax2JacksonWriter(JacksonRootStrippingGenerator.createRootStrippingGenerator(bodyGenerator));
}
 else {
return new Stax2JacksonWriter(bodyGenerator);
}
case MAPPED:
return JsonXmlStreamWriter.createWriter(writer,config);
case BADGERFISH:
return new BadgerFishXMLStreamWriter(writer);
case MAPPED_JETTISON:
Configuration jmConfig;
if (null == config.getXml2JsonNs()) {
jmConfig=new Configuration();
}
 else {
jmConfig=new Configuration(config.getXml2JsonNs());
}
return new MappedXMLStreamWriter(new MappedNamespaceConvention(jmConfig),writer);
default :
return null;
}
}

Fixed version (ground truth):
public static XMLStreamWriter createWriter(Writer writer,JSONConfiguration config,boolean writingList) throws IOException {
switch (config.getNotation()) {
case NATURAL:
    final JsonGenerator rawGenerator=new JsonFactory().createJsonGenerator(writer);
  if (config.isHumanReadableFormatting()) {
    rawGenerator.useDefaultPrettyPrinter();
  }
final JsonGenerator bodyGenerator=writingList ? JacksonArrayWrapperGenerator.createArrayWrapperGenerator(rawGenerator) : rawGenerator;
if (config.isRootUnwrapping()) {
return new Stax2JacksonWriter(JacksonRootStrippingGenerator.createRootStrippingGenerator(bodyGenerator),config);
}
 else {
return new Stax2JacksonWriter(bodyGenerator,config);
}
case MAPPED:
return JsonXmlStreamWriter.createWriter(writer,config);
case BADGERFISH:
return new BadgerFishXMLStreamWriter(writer);
case MAPPED_JETTISON:
Configuration jmConfig;
if (null == config.getXml2JsonNs()) {
jmConfig=new Configuration();
}
 else {
jmConfig=new Configuration(config.getXml2JsonNs());
}
return new MappedXMLStreamWriter(new MappedNamespaceConvention(jmConfig),writer);
default :
return null;
}
}
Program: 51209
Project: 51209
Buggy source:
public Jackson2StaxReader(JsonParser parser) throws XMLStreamException {
  this.parser=parser;
  try {
    readNext();
  }
 catch (  IOException ex) {
    Logger.getLogger(Jackson2StaxReader.class.getName()).log(Level.SEVERE,null,ex);
    throw new XMLStreamException(ex);
  }
}

Fixed version (ground truth):
public Jackson2StaxReader(JsonParser parser,JSONConfiguration config) throws XMLStreamException {
  this.attrsWithPrefix=config.isUsingPrefixesAtNaturalAttributes();
  this.parser=parser;
  try {
    readNext();
  }
 catch (  IOException ex) {
    Logger.getLogger(Jackson2StaxReader.class.getName()).log(Level.SEVERE,null,ex);
    throw new XMLStreamException(ex);
  }
}
Program: 51211
Project: 51211
Buggy source:
public Stax2JacksonWriter(JsonGenerator generator){
  this.generator=generator;
}

Fixed version (ground truth):
public Stax2JacksonWriter(JsonGenerator generator,JSONConfiguration config){
  this.attrsWithPrefix=config.isUsingPrefixesAtNaturalAttributes();
  this.generator=generator;
}
Program: 51212
Project: 51212
Buggy source:
public void testSimpleXmlTypeBean() throws Exception {
  final JSONJAXBContext ctx=new JSONJAXBContext(JSONConfiguration.mapped().arrays("String_Node_Str").build(),FakeArrayBean.class);
  final JSONMarshaller jm=ctx.createJSONMarshaller();
  final JSONUnmarshaller ju=ctx.createJSONUnmarshaller();
  final StringWriter sw=new StringWriter();
  final FakeArrayBean one=(FakeArrayBean)FakeArrayBean.createTestInstance();
  jm.marshallToJSON(one,sw);
  String jsonResult=sw.toString();
  assertEquals("String_Node_Str",jsonResult);
}

Fixed version (ground truth):
public void testSimpleXmlTypeBean() throws Exception {
  final JSONJAXBContext ctx=new JSONJAXBContext(JSONConfiguration.mapped().arrays("String_Node_Str").build(),FakeArrayBean.class);
  final JSONMarshaller jm=ctx.createJSONMarshaller();
  final StringWriter sw=new StringWriter();
  final FakeArrayBean one=(FakeArrayBean)FakeArrayBean.createTestInstance();
  jm.marshallToJSON(one,sw);
  String jsonResult=sw.toString();
  assertEquals("String_Node_Str",jsonResult);
}
Program: 51213
Project: 51213
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void setUp() throws Exception {
  String beanClasses=ResourceHelper.getResourceAsString(PKG_NAME,"String_Node_Str");
  Collection classCollection=new LinkedList<Class>();
  StringTokenizer tokenizer=new StringTokenizer(beanClasses);
  beans=new LinkedList<Object>();
  while (tokenizer.hasMoreTokens()) {
    String className=tokenizer.nextToken();
    if (!"String_Node_Str".equals(className)) {
      Class beanClass=Class.forName(PKG_NAME.replace('/','.') + className);
      classCollection.add(beanClass);
      Method testBeanCreator=beanClass.getDeclaredMethod("String_Node_Str");
      Object testBean=testBeanCreator.invoke(null);
      beans.add(testBean);
    }
  }
  classes=(Class[])classCollection.toArray(new Class[0]);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void setUp() throws Exception {
  String beanClasses=TestHelper.getResourceAsString(PKG_NAME,"String_Node_Str");
  Collection classCollection=new LinkedList<Class>();
  StringTokenizer tokenizer=new StringTokenizer(beanClasses);
  beans=new LinkedList<Object>();
  while (tokenizer.hasMoreTokens()) {
    String className=tokenizer.nextToken();
    if (!"String_Node_Str".equals(className)) {
      Class beanClass=Class.forName(PKG_NAME.replace('/','.') + className);
      classCollection.add(beanClass);
      Method testBeanCreator=beanClass.getDeclaredMethod("String_Node_Str");
      Object testBean=testBeanCreator.invoke(null);
      beans.add(testBean);
    }
  }
  classes=(Class[])classCollection.toArray(new Class[0]);
}
Program: 51214
Project: 51214
Buggy source:
public void tryWritingBean(Object jaxbBean,String expectedJsonExprFilename,JSONConfiguration config) throws JAXBException, IOException {
  String expectedJsonExpr=ResourceHelper.getResourceAsString(PKG_NAME,expectedJsonExprFilename);
  Marshaller marshaller=jaxbContext.createMarshaller();
  StringWriter resultWriter=new StringWriter();
  marshaller.marshal(jaxbBean,JsonXmlStreamWriter.createWriter(resultWriter,config));
  assertEquals("String_Node_Str" + expectedJsonExpr + "String_Node_Str"+ resultWriter.toString()+ "String_Node_Str",expectedJsonExpr,resultWriter.toString());
}

Fixed version (ground truth):
public void tryWritingBean(Object jaxbBean,String expectedJsonExprFilename,JSONConfiguration config) throws JAXBException, IOException {
  String expectedJsonExpr=TestHelper.getResourceAsString(PKG_NAME,expectedJsonExprFilename);
  Marshaller marshaller=jaxbContext.createMarshaller();
  StringWriter resultWriter=new StringWriter();
  marshaller.marshal(jaxbBean,JsonXmlStreamWriter.createWriter(resultWriter,config));
  assertEquals("String_Node_Str" + expectedJsonExpr + "String_Node_Str"+ resultWriter.toString()+ "String_Node_Str",expectedJsonExpr,resultWriter.toString());
}
Program: 51215
Project: 51215
Buggy source:
public void tryReadingBean(String jsonExprFilename,Object expectedJaxbBean,JSONConfiguration config) throws JAXBException, IOException {
  Unmarshaller unmarshaller=jaxbContext.createUnmarshaller();
  JAXBElement jaxbElement=unmarshaller.unmarshal(new JsonXmlStreamReader(new StringReader(ResourceHelper.getResourceAsString(PKG_NAME,jsonExprFilename)),config),expectedJaxbBean.getClass());
  System.out.println("String_Node_Str" + jaxbElement.getValue().toString());
  assertEquals("String_Node_Str" + expectedJaxbBean + "String_Node_Str"+ jaxbElement.getValue()+ "String_Node_Str",expectedJaxbBean,jaxbElement.getValue());
}

Fixed version (ground truth):
public void tryReadingBean(String jsonExprFilename,Object expectedJaxbBean,JSONConfiguration config) throws JAXBException, IOException {
  Unmarshaller unmarshaller=jaxbContext.createUnmarshaller();
  JAXBElement jaxbElement=unmarshaller.unmarshal(new JsonXmlStreamReader(new StringReader(TestHelper.getResourceAsString(PKG_NAME,jsonExprFilename)),config),expectedJaxbBean.getClass());
  System.out.println("String_Node_Str" + jaxbElement.getValue().toString());
  assertEquals("String_Node_Str" + expectedJaxbBean + "String_Node_Str"+ jaxbElement.getValue()+ "String_Node_Str",expectedJaxbBean,jaxbElement.getValue());
}
Program: 51216
Project: 51216
Buggy source:
public void testExtensibility() throws Exception {
  String baseXml=ResourceHelper.getResourceAsString("String_Node_Str","String_Node_Str");
  JSONJAXBContext jsonContext=new JSONJAXBContext(JSONConfiguration.natural().build(),"String_Node_Str");
  Unmarshaller jaxbUnmarshaller=jsonContext.createUnmarshaller();
  Object fromXml=jaxbUnmarshaller.unmarshal(new StringReader(baseXml));
  StringWriter sw=new StringWriter();
  jsonContext.createJSONMarshaller().marshallToJSON(fromXml,sw);
  String jsonRepresentation=sw.toString();
  System.out.println(jsonRepresentation);
}

Fixed version (ground truth):
public void testExtensibility() throws Exception {
  String baseXml=TestHelper.getResourceAsString("String_Node_Str","String_Node_Str");
  JSONJAXBContext jsonContext=new JSONJAXBContext(JSONConfiguration.natural().build(),"String_Node_Str");
  Unmarshaller jaxbUnmarshaller=jsonContext.createUnmarshaller();
  Object fromXml=jaxbUnmarshaller.unmarshal(new StringReader(baseXml));
  StringWriter sw=new StringWriter();
  jsonContext.createJSONMarshaller().marshallToJSON(fromXml,sw);
  String jsonRepresentation=sw.toString();
  System.out.println(jsonRepresentation);
}
Program: 51217
Project: 51217
Buggy source:
private JSONConfiguration(Builder b){
  notation=b.notation;
  arrays=b.arrays;
  attrsAsElems=b.attrsAsElems;
  nonStrings=b.nonStrings;
  rootUnwrapping=b.rootUnwrapping;
  jsonXml2JsonNs=b.jsonXml2JsonNs;
}

Fixed version (ground truth):
private JSONConfiguration(Builder b){
  notation=b.notation;
  arrays=b.arrays;
  attrsAsElems=b.attrsAsElems;
  nonStrings=b.nonStrings;
  rootUnwrapping=b.rootUnwrapping;
  humanReadableFormating=b.humanReadableFormatting;
  jsonXml2JsonNs=b.jsonXml2JsonNs;
}