nus-yam/ex-repair huggingface dataset:
Program: 54933
Project: 54933
Buggy source:
/** 
 * Creates an   {@link Unmarshaller} from the {@link SardineUtil#JAXB_CONTEXT}. Note: the unmarshaller is not thread safe, so it must be created for every request.
 * @return A new unmarshaller
 * @throws IOException When there is a JAXB error
 */
private static Unmarshaller createUnmarshaller(){
  try {
    return JAXB_CONTEXT.createUnmarshaller();
  }
 catch (  JAXBException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Creates an   {@link Unmarshaller} from the {@link SardineUtil#JAXB_CONTEXT}. Note: the unmarshaller is not thread safe, so it must be created for every request.
 * @return A new unmarshaller
 * @throws IOException When there is a JAXB error
 */
private static Unmarshaller createUnmarshaller() throws IOException {
  try {
    return JAXB_CONTEXT.createUnmarshaller();
  }
 catch (  JAXBException e) {
    throw new IOException(e.getMessage(),e);
  }
}
Program: 54934
Project: 54934
Buggy source:
/** 
 * @param jaxbElement An object from the model
 * @return The XML string for the WebDAV request
 * @throws RuntimeException When there is a JAXB error
 */
public static String toXml(Object jaxbElement){
  StringWriter writer=new StringWriter();
  try {
    Marshaller marshaller=createMarshaller();
    marshaller.marshal(jaxbElement,writer);
  }
 catch (  JAXBException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  return writer.toString();
}

Fixed version (ground truth):
/** 
 * @param jaxbElement An object from the model
 * @return The XML string for the WebDAV request
 * @throws RuntimeException When there is a JAXB error
 */
public static String toXml(Object jaxbElement) throws IOException {
  StringWriter writer=new StringWriter();
  try {
    Marshaller marshaller=createMarshaller();
    marshaller.marshal(jaxbElement,writer);
  }
 catch (  JAXBException e) {
    throw new RuntimeException(e.getMessage(),e);
  }
  return writer.toString();
}
Program: 54935
Project: 54935
Buggy source:
/** 
 * @param msg			Custom description of failure
 * @param statusCode	 Error code returned by server
 * @param responsePhrase Response phrase following the error code
 */
public SardineException(String msg,int statusCode,String responsePhrase){
  super(statusCode,msg);
  this.responsePhrase=responsePhrase;
}

Fixed version (ground truth):
/** 
 * @param msg            Custom description of failure
 * @param statusCode     Error code returned by server
 * @param responsePhrase Response phrase following the error code
 */
public SardineException(String msg,int statusCode,String responsePhrase){
  super(statusCode,msg);
  this.responsePhrase=responsePhrase;
}
Program: 54936
Project: 54936
Buggy source:
@Test public void testLockUnlock() throws Exception {
  Sardine sardine=SardineFactory.begin();
  String url="String_Node_Str" + UUID.randomUUID().toString();
  sardine.put(url,new byte[]{});
  try {
    String token=sardine.lock(url);
    try {
      sardine.delete(url);
      fail("String_Node_Str");
    }
 catch (    SardineException e) {
      assertEquals(423,e.getStatusCode());
    }
    sardine.unlock(url,token);
  }
  finally {
    sardine.delete(url);
  }
}

Fixed version (ground truth):
@Test public void testLockUnlock() throws Exception {
  Sardine sardine=SardineFactory.begin();
  String url=String.format("String_Node_Str",UUID.randomUUID().toString());
  sardine.put(url,new byte[0]);
  try {
    String token=sardine.lock(url);
    try {
      sardine.delete(url);
      fail("String_Node_Str");
    }
 catch (    SardineException e) {
      assertEquals(423,e.getStatusCode());
    }
    sardine.unlock(url,token);
  }
  finally {
    sardine.delete(url);
  }
}
Program: 54937
Project: 54937
Buggy source:
@Test public void lockRefreshUnlock() throws Exception {
  Sardine sardine=SardineFactory.begin();
  final UUID file=UUID.randomUUID();
  final String url=String.format("String_Node_Str",file);
  sardine.put(url,new ByteArrayInputStream(new byte[0]));
  String lockToken=sardine.lock(url);
  String result=sardine.refreshLock(url,lockToken,url);
  assertTrue(lockToken.startsWith("String_Node_Str"));
  assertTrue(lockToken.equals(result));
  sardine.unlock(url,lockToken);
}

Fixed version (ground truth):
@Test public void lockRefreshUnlock() throws Exception {
  Sardine sardine=SardineFactory.begin();
  final UUID file=UUID.randomUUID();
  final String url=String.format("String_Node_Str",file);
  sardine.put(url,new ByteArrayInputStream(new byte[0]));
  try {
    String lockToken=sardine.lock(url);
    String result=sardine.refreshLock(url,lockToken,url);
    assertTrue(lockToken.startsWith("String_Node_Str"));
    assertTrue(lockToken.equals(result));
    sardine.unlock(url,lockToken);
  }
  finally {
    sardine.delete(url);
  }
}
Program: 54938
Project: 54938
Buggy source:
/** 
 * Put an exclusive write lock on this resource. A write lock must prevent a principal without the lock from successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, DELETE, or MKCOL on the locked resource. All other current methods, GET in particular, function independently of the lock. <p/> A WebDAV compliant server is not required to support locking in any form. If the server does support locking it may choose to support any combination of exclusive and shared locks for any access types.
 * @param url Path to the resource including protocol and hostname
 * @return The lock token to unlock this resource. A lock token is a type of state token, representedas a URI, which identifies a particular lock. A lock token is returned by every successful <code>LOCK</code> operation in the lockdiscovery property in the response body, and can also be found through lock discovery on a resource.
 * @throws IOException I/O error or HTTP response validation failure
 */
String lock(String url) throws IOException ;

Fixed version (ground truth):
/** 
 * <p> Put an exclusive write lock on this resource. A write lock must prevent a principal without the lock from successfully executing a PUT, POST, PROPPATCH, LOCK, UNLOCK, MOVE, DELETE, or MKCOL on the locked resource. All other current methods, GET in particular, function independently of the lock. </p> A WebDAV compliant server is not required to support locking in any form. If the server does support locking it may choose to support any combination of exclusive and shared locks for any access types.
 * @param url Path to the resource including protocol and hostname
 * @return The lock token to unlock this resource. A lock token is a type of state token, representedas a URI, which identifies a particular lock. A lock token is returned by every successful <code>LOCK</code> operation in the lockdiscovery property in the response body, and can also be found through lock discovery on a resource.
 * @throws IOException I/O error or HTTP response validation failure
 */
String lock(String url) throws IOException ;
Program: 54939
Project: 54939
Buggy source:
/** 
 * Unlock the resource. <p/> A WebDAV compliant server is not required to support locking in any form. If the server does support locking it may choose to support any combination of exclusive and shared locks for any access types.
 * @param url   Path to the resource including protocol and hostname
 * @param token The lock token to unlock this resource.
 * @throws IOException I/O error or HTTP response validation failure
 * @see #lock(String)
 */
void unlock(String url,String token) throws IOException ;

Fixed version (ground truth):
/** 
 * <p> Unlock the resource. </p> A WebDAV compliant server is not required to support locking in any form. If the server does support locking it may choose to support any combination of exclusive and shared locks for any access types.
 * @param url   Path to the resource including protocol and hostname
 * @param token The lock token to unlock this resource.
 * @throws IOException I/O error or HTTP response validation failure
 * @see #lock(String)
 */
void unlock(String url,String token) throws IOException ;
Program: 54940
Project: 54940
Buggy source:
/** 
 * Enables HTTP GZIP compression. If enabled, requests originating from Sardine will include "gzip" as an "Accept-Encoding" header. <p/> If the server also supports gzip compression, it should serve the contents in compressed gzip format and include "gzip" as the Content-Encoding. If the content encoding is present, Sardine will automatically decompress the files upon reception.
 */
void enableCompression();

Fixed version (ground truth):
/** 
 * <p> Enables HTTP GZIP compression. If enabled, requests originating from Sardine will include "gzip" as an "Accept-Encoding" header. </p> If the server also supports gzip compression, it should serve the contents in compressed gzip format and include "gzip" as the Content-Encoding. If the content encoding is present, Sardine will automatically decompress the files upon reception.
 */
void enableCompression();
Program: 54941
Project: 54941
Buggy source:
/** 
 * Setter for attribute ignoreCookies.
 * @param Whether to ignore cookies.
 */
public void setIgnoreCookies(boolean ignoreCookies){
  this.ignoreCookies=ignoreCookies;
}

Fixed version (ground truth):
/** 
 * Setter for attribute ignoreCookies.
 * @param ignoreCookies to ignore cookies.
 */
public void setIgnoreCookies(boolean ignoreCookies){
  this.ignoreCookies=ignoreCookies;
}
Program: 54942
Project: 54942
Buggy source:
/** 
 * The Depth header may be used with the <code>LOCK</code> method. Values other than <code>0</code> or <code>infinity</code> must not be used with the Depth header on a <code>LOCK</code> method. All resources that support the <code>LOCK</code> method must support the Depth header. <p/> If no Depth header is submitted on a <code>LOCK</code> request then the request must act as if a <code>Depth:infinity</code> had been submitted.
 * @param depth <code>"0"</code> or <code>"infinity"</code>.
 */
public void setDepth(String depth){
  this.setHeader(HttpHeaders.DEPTH,depth);
}

Fixed version (ground truth):
/** 
 * <p> The Depth header may be used with the <code>LOCK</code> method. Values other than <code>0</code> or <code>infinity</code> must not be used with the Depth header on a <code>LOCK</code> method. All resources that support the <code>LOCK</code> method must support the Depth header. </p> <p> If no Depth header is submitted on a <code>LOCK</code> request then the request must act as if a <code>Depth:infinity</code> had been submitted. </p>
 * @param depth <code>"0"</code> or <code>"infinity"</code>.
 */
public void setDepth(String depth){
  this.setHeader(HttpHeaders.DEPTH,depth);
}
Program: 54943
Project: 54943
Buggy source:
/** 
 * Loops over all the possible date formats and tries to find the right one.
 * @param value ISO date string
 * @return Null if there is a parsing failure
 */
public static Date parseDate(String value){
  if (value == null) {
    return null;
  }
  Date date=null;
  for (  SimpleDateFormat format : DATETIME_FORMATS) {
    try {
      date=format.parse(value);
      break;
    }
 catch (    ParseException e) {
    }
  }
  return date;
}

Fixed version (ground truth):
/** 
 * Loops over all the possible date formats and tries to find the right one.
 * @param value ISO date string
 * @return Null if there is a parsing failure
 */
public static Date parseDate(String value){
  if (value == null) {
    return null;
  }
  Date date=null;
  for (  ThreadLocal<SimpleDateFormat> format : DATETIME_FORMATS) {
    try {
      date=format.get().parse(value);
      break;
    }
 catch (    ParseException e) {
    }
  }
  return date;
}
Program: 54944
Project: 54944
Buggy source:
@Override public HttpUriRequest getRedirect(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
  URI uri=this.getLocationURI(request,response,context);
  String method=request.getRequestLine().getMethod();
  if (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) {
    return new HttpHead(uri);
  }
  if (method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) {
    return new HttpPropFind(uri);
  }
  if (method.equalsIgnoreCase(HttpLock.METHOD_NAME)) {
    return new HttpLock(uri);
  }
  return new HttpGet(uri);
}

Fixed version (ground truth):
@Override public HttpUriRequest getRedirect(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
  String method=request.getRequestLine().getMethod();
  if (method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) {
    return new HttpPropFind(this.getLocationURI(request,response,context));
  }
  if (method.equalsIgnoreCase(HttpLock.METHOD_NAME)) {
    return new HttpLock(this.getLocationURI(request,response,context));
  }
  return super.getRedirect(request,response,context);
}
Program: 54945
Project: 54945
Buggy source:
@Override public boolean isRedirected(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
  int statusCode=response.getStatusLine().getStatusCode();
  String method=request.getRequestLine().getMethod();
  Header locationHeader=response.getFirstHeader("String_Node_Str");
switch (statusCode) {
case HttpStatus.SC_MOVED_TEMPORARILY:
    return (method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) && (locationHeader != null);
case HttpStatus.SC_MOVED_PERMANENTLY:
case HttpStatus.SC_TEMPORARY_REDIRECT:
  return method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpPropFind.METHOD_NAME);
case HttpStatus.SC_SEE_OTHER:
return true;
default :
return false;
}
}

Fixed version (ground truth):
@Override public boolean isRedirected(HttpRequest request,HttpResponse response,HttpContext context) throws ProtocolException {
  int statusCode=response.getStatusLine().getStatusCode();
  String method=request.getRequestLine().getMethod();
  Header locationHeader=response.getFirstHeader("String_Node_Str");
switch (statusCode) {
case HttpStatus.SC_MOVED_TEMPORARILY:
    return (method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpLock.METHOD_NAME)|| method.equalsIgnoreCase(HttpPropFind.METHOD_NAME)) && (locationHeader != null);
case HttpStatus.SC_MOVED_PERMANENTLY:
case HttpStatus.SC_TEMPORARY_REDIRECT:
  return method.equalsIgnoreCase(HttpGet.METHOD_NAME) || method.equalsIgnoreCase(HttpHead.METHOD_NAME) || method.equalsIgnoreCase(HttpLock.METHOD_NAME)|| method.equalsIgnoreCase(HttpPropFind.METHOD_NAME);
case HttpStatus.SC_SEE_OTHER:
return true;
default :
return false;
}
}
Program: 54947
Project: 54947
Buggy source:
/** 
 * No validation of the response. Wraps all checked exceptions to   {@link IOException}. Aborts the request if there is an exception.
 * @param request Request to execute
 * @return The response to check the reply status code
 */
protected HttpResponse execute(HttpRequestBase request) throws IOException {
  try {
    return this.client.execute(request,this.context);
  }
 catch (  IOException e) {
    request.abort();
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * No validation of the response. Aborts the request if there is an exception.
 * @param request Request to execute
 * @return The response to check the reply status code
 */
protected HttpResponse execute(HttpRequestBase request) throws IOException {
  try {
    this.context.removeAttribute(DefaultRedirectStrategy.REDIRECT_LOCATIONS);
    return this.client.execute(request,this.context);
  }
 catch (  IOException e) {
    request.abort();
    throw e;
  }
}
Program: 54948
Project: 54948
Buggy source:
@Test public void testRedirectPermanently() throws Exception {
  Sardine sardine=SardineFactory.begin();
  final String url="String_Node_Str";
  try {
    final List<DavResource> resources=sardine.list(url);
    assertNotNull(resources);
  }
 catch (  SardineException e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testRedirectPermanently() throws Exception {
  Sardine sardine=SardineFactory.begin();
  final String url="String_Node_Str";
  try {
    assertNotNull(sardine.list(url));
    assertNotNull(sardine.list(url));
  }
 catch (  SardineException e) {
    fail("String_Node_Str");
  }
}
Program: 54949
Project: 54949
Buggy source:
/** 
 * Creates default params setting the user agent.
 */
protected HttpParams createDefaultHttpParams(){
  HttpParams params=new BasicHttpParams();
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  HttpProtocolParams.setUseExpectContinue(params,false);
  return params;
}

Fixed version (ground truth):
/** 
 * Creates default params setting the user agent.
 * @return
 */
protected HttpParams createDefaultHttpParams(){
  HttpParams params=new BasicHttpParams();
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  HttpProtocolParams.setUseExpectContinue(params,false);
  return params;
}
Program: 54950
Project: 54950
Buggy source:
/** 
 * No validation of the response. Wraps all checked exceptions to   {@link IOException}. Aborts the request if there is an exception.
 * @param request Request to execute
 */
private HttpResponse execute(final HttpRequestBase request) throws IOException {
  try {
    return this.client.execute(request,this.context);
  }
 catch (  IOException e) {
    request.abort();
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * No validation of the response. Wraps all checked exceptions to   {@link IOException}. Aborts the request if there is an exception.
 * @param request Request to execute
 * @return
 * @throws java.io.IOException
 */
private HttpResponse execute(final HttpRequestBase request) throws IOException {
  try {
    return this.client.execute(request,this.context);
  }
 catch (  IOException e) {
    request.abort();
    throw e;
  }
}
Program: 54951
Project: 54951
Buggy source:
/** 
 * Override to provide proxy configuration
 * @param schemeRegistry Protocol registry
 * @param selector		  Proxy configuration
 * @return ProxySelectorRoutePlanner configured with schemeRegistry and selector
 */
protected HttpRoutePlanner createDefaultRoutePlanner(SchemeRegistry schemeRegistry,ProxySelector selector){
  return new ProxySelectorRoutePlanner(schemeRegistry,selector);
}

Fixed version (ground truth):
/** 
 * Override to provide proxy configuration
 * @param schemeRegistry Protocol registry
 * @param selector	   Proxy configuration
 * @return ProxySelectorRoutePlanner configured with schemeRegistry and selector
 */
protected HttpRoutePlanner createDefaultRoutePlanner(SchemeRegistry schemeRegistry,ProxySelector selector){
  return new ProxySelectorRoutePlanner(schemeRegistry,selector);
}
Program: 54952
Project: 54952
Buggy source:
/** 
 * @param url	 Resource
 * @param entity  The entity to read from
 * @param headers Headers to add to request
 */
public void put(String url,AbstractHttpEntity entity,Map<String,String> headers) throws IOException {
  HttpPut put=new HttpPut(url);
  put.setEntity(entity);
  for (  String header : headers.keySet()) {
    put.addHeader(header,headers.get(header));
  }
  execute(put,new VoidResponseHandler());
}

Fixed version (ground truth):
/** 
 * @param url	 Resource
 * @param entity  The entity to read from
 * @param headers Headers to add to request
 * @throws java.io.IOException
 */
public void put(String url,AbstractHttpEntity entity,Map<String,String> headers) throws IOException {
  HttpPut put=new HttpPut(url);
  put.setEntity(entity);
  for (  String header : headers.keySet()) {
    put.addHeader(header,headers.get(header));
  }
  execute(put,new VoidResponseHandler());
}
Program: 54953
Project: 54953
Buggy source:
/** 
 * @param http	 Custom client configuration
 * @param username Use in authentication header credentials
 * @param password Use in authentication header credentials
 * @param selector Proxy configuration
 */
public SardineImpl(AbstractHttpClient http,String username,String password,ProxySelector selector){
  this.client=http;
  SchemeRegistry schemeRegistry=createDefaultSchemeRegistry();
  this.client.setRoutePlanner(createDefaultRoutePlanner(schemeRegistry,selector));
  setCredentials(username,password);
}

Fixed version (ground truth):
/** 
 * @param http	 Custom client configuration
 * @param username Use in authentication header credentials
 * @param password Use in authentication header credentials
 * @param selector Proxy configuration
 */
public SardineImpl(AbstractHttpClient http,String username,String password,ProxySelector selector){
  this.init(http,username,password,selector);
}
Program: 54954
Project: 54954
Buggy source:
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  return new SardineImpl(this,username,password,sslSocketFactory,routePlanner);
}

Fixed version (ground truth):
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner,Integer port) throws SardineException {
  return new SardineImpl(this,username,password,sslSocketFactory,routePlanner,port);
}
Program: 54955
Project: 54955
Buggy source:
/** 
 * Useful for when you need to define a http proxy
 */
public static Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  return Factory.instance().begin(username,password,sslSocketFactory);
}

Fixed version (ground truth):
/** 
 * Useful for when you need to define a http proxy
 */
public static Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner,Integer port) throws SardineException {
  return Factory.instance().begin(username,password,sslSocketFactory,routePlanner,port);
}
Program: 54956
Project: 54956
Buggy source:
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if (routePlanner != null)   this.client.setRoutePlanner(routePlanner);
  if ((username != null) && (password != null)) {
    this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
    this.authEnabled=true;
  }
}

Fixed version (ground truth):
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory,HttpRoutePlanner routePlanner,Integer port) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),port != null ? port : 80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,port != null ? port : 443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),port != null ? port : 443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if (routePlanner != null)   this.client.setRoutePlanner(routePlanner);
  if ((username != null) && (password != null)) {
    this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
    this.authEnabled=true;
  }
}
Program: 54957
Project: 54957
Buggy source:
/** 
 */
@Override public void execute() throws BuildException {
  try {
    this.sardine=SardineFactory.begin(this.username,this.password);
    for (    Command command : this.commands) {
      command.executeCommand();
    }
  }
 catch (  Exception e) {
    throw new BuildException(e);
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void execute() throws BuildException {
  try {
    this.sardine=SardineFactory.begin(this.username,this.password,this.port);
    for (    Command command : this.commands) {
      command.executeCommand();
    }
  }
 catch (  Exception e) {
    throw new BuildException(e);
  }
}
Program: 54958
Project: 54958
Buggy source:
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg + responsePhrase != null ? "String_Node_Str" + responsePhrase : "String_Node_Str" + "String_Node_Str" + statusCode);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
  if (initCause != null)   this.initCause(initCause);
}

Fixed version (ground truth):
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg,initCause);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
  if (initCause != null)   this.initCause(initCause);
}
Program: 54959
Project: 54959
Buggy source:
/** 
 * Small wrapper around HttpClient.execute() in order to wrap the IOException into a SardineException.
 */
private HttpResponse executeWrapper(HttpRequestBase base) throws SardineException {
  try {
    if (this.authEnabled) {
      Credentials creds=this.client.getCredentialsProvider().getCredentials(AuthScope.ANY);
      String value="String_Node_Str" + new String(Base64.encodeBase64(new String(creds.getUserPrincipal().getName() + "String_Node_Str" + creds.getPassword()).getBytes()));
      base.setHeader("String_Node_Str",value);
    }
    return this.client.execute(base);
  }
 catch (  IOException ex) {
    throw new SardineException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Small wrapper around HttpClient.execute() in order to wrap the IOException into a SardineException.
 */
private HttpResponse executeWrapper(HttpRequestBase base) throws SardineException {
  try {
    if (this.authEnabled) {
      Credentials creds=this.client.getCredentialsProvider().getCredentials(AuthScope.ANY);
      String value="String_Node_Str" + new String(Base64.encodeBase64(new String(creds.getUserPrincipal().getName() + "String_Node_Str" + creds.getPassword()).getBytes()));
      base.setHeader("String_Node_Str",value);
    }
    return this.client.execute(base);
  }
 catch (  IOException ex) {
    base.abort();
    throw new SardineException(ex);
  }
}
Program: 54960
Project: 54960
Buggy source:
public void move(String sourceUrl,String destinationUrl) throws SardineException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void move(String sourceUrl,String destinationUrl) throws SardineException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    move.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}
Program: 54962
Project: 54962
Buggy source:
public boolean exists(String url) throws SardineException {
  HttpHead head=new HttpHead(url);
  HttpResponse response=this.executeWrapper(head);
  StatusLine statusLine=response.getStatusLine();
  return (SardineUtil.isGoodResponse(statusLine.getStatusCode()));
}

Fixed version (ground truth):
public boolean exists(String url) throws SardineException {
  HttpHead head=new HttpHead(url);
  HttpResponse response=this.executeWrapper(head);
  StatusLine statusLine=response.getStatusLine();
  return SardineUtil.isGoodResponse(statusLine.getStatusCode());
}
Program: 54963
Project: 54963
Buggy source:
public void createDirectory(String url) throws SardineException {
  HttpMkCol mkcol=new HttpMkCol(url);
  HttpResponse response=this.executeWrapper(mkcol);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void createDirectory(String url) throws SardineException {
  HttpMkCol mkcol=new HttpMkCol(url);
  HttpResponse response=this.executeWrapper(mkcol);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    mkcol.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}
Program: 54964
Project: 54964
Buggy source:
public void copy(String sourceUrl,String destinationUrl) throws SardineException {
  HttpCopy copy=new HttpCopy(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(copy);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void copy(String sourceUrl,String destinationUrl) throws SardineException {
  HttpCopy copy=new HttpCopy(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(copy);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    copy.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}
Program: 54965
Project: 54965
Buggy source:
public InputStream getInputStream(String url) throws SardineException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.executeWrapper(get);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  try {
    return response.getEntity().getContent();
  }
 catch (  IOException ex) {
    throw new SardineException(ex);
  }
}

Fixed version (ground truth):
public InputStream getInputStream(String url) throws SardineException {
  HttpGet get=new HttpGet(url);
  HttpResponse response=this.executeWrapper(get);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    get.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    return response.getEntity().getContent();
  }
 catch (  IOException ex) {
    get.abort();
    throw new SardineException(ex);
  }
}
Program: 54966
Project: 54966
Buggy source:
public void delete(String url) throws SardineException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.executeWrapper(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void delete(String url) throws SardineException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.executeWrapper(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    delete.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}
Program: 54967
Project: 54967
Buggy source:
public void put(String url,InputStream dataStream) throws SardineException {
  HttpPut put=new HttpPut(url);
  InputStreamEntity entity=new InputStreamEntity(dataStream,-1);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode()))   throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
}

Fixed version (ground truth):
public void put(String url,InputStream dataStream) throws SardineException {
  HttpPut put=new HttpPut(url);
  InputStreamEntity entity=new InputStreamEntity(dataStream,-1);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    put.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}
Program: 54968
Project: 54968
Buggy source:
/** 
 * Represents a webdav response block.
 * @param baseUrl
 * @param name the name of the resource, with all /'s removed
 * @param creation
 * @param modified
 * @param contentType
 */
public DavResource(String baseUrl,String name,Date creation,Date modified,String contentType,Long contentLength,boolean currentDirectory){
  this.baseUrl=baseUrl;
  this.name=name;
  this.creation=creation;
  this.modified=modified;
  this.contentType=contentType;
  this.contentLength=contentLength;
  this.currentDirectory=currentDirectory;
}

Fixed version (ground truth):
/** 
 * Represents a webdav response block.
 * @param name the name of the resource, with all /'s removed
 */
public DavResource(String baseUrl,String name,Date creation,Date modified,String contentType,Long contentLength,boolean currentDirectory,Map<String,String> customProps){
  this.baseUrl=baseUrl;
  this.name=name;
  this.creation=creation;
  this.modified=modified;
  this.contentType=contentType;
  this.contentLength=contentLength;
  this.currentDirectory=currentDirectory;
  this.customProps=customProps;
}
Program: 54971
Project: 54971
Buggy source:
public void move(String sourceUrl,String destinationUrl) throws SardineException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    move.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}

Fixed version (ground truth):
public void move(String sourceUrl,String destinationUrl) throws SardineException {
  HttpMove move=new HttpMove(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(move);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    move.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    response.getEntity().getContent().close();
  }
 catch (  Exception ex) {
  }
}
Program: 54972
Project: 54972
Buggy source:
public void createDirectory(String url) throws SardineException {
  HttpMkCol mkcol=new HttpMkCol(url);
  HttpResponse response=this.executeWrapper(mkcol);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    mkcol.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}

Fixed version (ground truth):
public void createDirectory(String url) throws SardineException {
  HttpMkCol mkcol=new HttpMkCol(url);
  HttpResponse response=this.executeWrapper(mkcol);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    mkcol.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    response.getEntity().getContent().close();
  }
 catch (  Exception ex) {
  }
}
Program: 54973
Project: 54973
Buggy source:
public void copy(String sourceUrl,String destinationUrl) throws SardineException {
  HttpCopy copy=new HttpCopy(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(copy);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    copy.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}

Fixed version (ground truth):
public void copy(String sourceUrl,String destinationUrl) throws SardineException {
  HttpCopy copy=new HttpCopy(sourceUrl,destinationUrl);
  HttpResponse response=this.executeWrapper(copy);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    copy.abort();
    throw new SardineException("String_Node_Str" + sourceUrl + "String_Node_Str"+ destinationUrl,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    response.getEntity().getContent().close();
  }
 catch (  Exception ex) {
  }
}
Program: 54974
Project: 54974
Buggy source:
public void delete(String url) throws SardineException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.executeWrapper(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    delete.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}

Fixed version (ground truth):
public void delete(String url) throws SardineException {
  HttpDelete delete=new HttpDelete(url);
  HttpResponse response=this.executeWrapper(delete);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    delete.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    response.getEntity().getContent().close();
  }
 catch (  Exception ex) {
  }
}
Program: 54975
Project: 54975
Buggy source:
public void put(String url,InputStream dataStream) throws SardineException {
  HttpPut put=new HttpPut(url);
  InputStreamEntity entity=new InputStreamEntity(dataStream,-1);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    put.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
}

Fixed version (ground truth):
public void put(String url,InputStream dataStream) throws SardineException {
  HttpPut put=new HttpPut(url);
  InputStreamEntity entity=new InputStreamEntity(dataStream,-1);
  put.setEntity(entity);
  HttpResponse response=this.executeWrapper(put);
  StatusLine statusLine=response.getStatusLine();
  if (!SardineUtil.isGoodResponse(statusLine.getStatusCode())) {
    put.abort();
    throw new SardineException(url,statusLine.getStatusCode(),statusLine.getReasonPhrase());
  }
  try {
    response.getEntity().getContent().close();
  }
 catch (  Exception ex) {
  }
}
Program: 54976
Project: 54976
Buggy source:
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg,initCause);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
  if (initCause != null)   this.initCause(initCause);
}

Fixed version (ground truth):
/** 
 */
public SardineException(String msg,String url,int statusCode,String responsePhrase,Exception initCause){
  super(msg,initCause);
  this.url=url;
  this.statusCode=statusCode;
  this.responsePhrase=responsePhrase;
}
Program: 54978
Project: 54978
Buggy source:
public HttpPropFind(String url){
  super();
  this.setDepth(1);
  this.setURI(URI.create(url));
}

Fixed version (ground truth):
public HttpPropFind(String url){
  super();
  this.setDepth(1);
  this.setURI(URI.create(url));
  this.setHeader("String_Node_Str","String_Node_Str");
}
Program: 54979
Project: 54979
Buggy source:
public HttpMkCol(String url){
  super();
  this.setURI(URI.create(url));
}

Fixed version (ground truth):
public HttpMkCol(String url){
  super();
  this.setURI(URI.create(url));
  this.setHeader("String_Node_Str","String_Node_Str");
}
Program: 54980
Project: 54980
Buggy source:
/** 
 * @return the JAXB Unmarshaller
 */
public Unmarshaller getUnmarshaller() throws SardineException {
  try {
    return this.context.createUnmarshaller();
  }
 catch (  JAXBException e) {
    throw new SardineException(e);
  }
}

Fixed version (ground truth):
/** 
 * Note: the unmarshaller is not thread safe, so it must be created for every request.
 * @return the JAXB Unmarshaller
 */
public Unmarshaller getUnmarshaller() throws SardineException {
  try {
    return this.context.createUnmarshaller();
  }
 catch (  JAXBException e) {
    throw new SardineException(e);
  }
}
Program: 54981
Project: 54981
Buggy source:
/** 
 */
public Sardine begin(String username,String password,KeyStore trustStore) throws SardineException {
  return new SardineImpl(this,username,password);
}

Fixed version (ground truth):
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return new SardineImpl(this,username,password);
}
Program: 54982
Project: 54982
Buggy source:
/** 
 * Pass in a HTTP Auth username/password for being used with all connections and a KeyStore.
 */
public static Sardine begin(String username,String password,KeyStore trustStore) throws SardineException {
  return Factory.instance().begin(username,password,trustStore);
}

Fixed version (ground truth):
/** 
 * If you want to use custom HTTPS settings with Sardine, this allows you to pass in a SSLSocketFactory.
 * @see <a href="http://hc.apache.org/httpcomponents-client/httpclient/xref/org/apache/http/conn/ssl/SSLSocketFactory.html">SSLSocketFactory</a>
 */
public static Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return Factory.instance().begin(username,password,sslSocketFactory);
}
Program: 54983
Project: 54983
Buggy source:
/** 
 */
public SardineImpl(Factory factory,String username,String password,KeyStore trustStore) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  schemeRegistry.register(new Scheme("String_Node_Str",this.getSSLSocketFactory(trustStore),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}

Fixed version (ground truth):
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}
Program: 54985
Project: 54985
Buggy source:
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return new SardineImpl(this,username,password);
}

Fixed version (ground truth):
/** 
 */
public Sardine begin(String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  return new SardineImpl(this,username,password,sslSocketFactory);
}
Program: 54987
Project: 54987
Buggy source:
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}

Fixed version (ground truth):
/** 
 * Main constructor.
 */
public SardineImpl(Factory factory,String username,String password,SSLSocketFactory sslSocketFactory) throws SardineException {
  this.factory=factory;
  HttpParams params=new BasicHttpParams();
  ConnManagerParams.setMaxTotalConnections(params,100);
  HttpProtocolParams.setVersion(params,HttpVersion.HTTP_1_1);
  HttpProtocolParams.setUserAgent(params,"String_Node_Str" + Version.getSpecification());
  SchemeRegistry schemeRegistry=new SchemeRegistry();
  schemeRegistry.register(new Scheme("String_Node_Str",PlainSocketFactory.getSocketFactory(),80));
  if (sslSocketFactory != null)   schemeRegistry.register(new Scheme("String_Node_Str",sslSocketFactory,443));
 else   schemeRegistry.register(new Scheme("String_Node_Str",SSLSocketFactory.getSocketFactory(),443));
  ClientConnectionManager cm=new ThreadSafeClientConnManager(params,schemeRegistry);
  this.client=new DefaultHttpClient(cm,params);
  if ((username != null) && (password != null))   this.client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY_HOST,AuthScope.ANY_PORT),new UsernamePasswordCredentials(username,password));
}
Program: 54988
Project: 54988
Buggy source:
/** 
 * @return the JAXB Unmarshaller
 */
public Unmarshaller getUnmarshaller(){
  return this.unmarshaller;
}

Fixed version (ground truth):
/** 
 * @return the JAXB Unmarshaller
 */
public Unmarshaller getUnmarshaller() throws SardineException {
  try {
    return this.context.createUnmarshaller();
  }
 catch (  JAXBException e) {
    throw new SardineException(e);
  }
}