nus-yam/ex-repair huggingface dataset:
Program: 36176
Project: 36176
Buggy source:
@Override public List<RepositoryItem> findRepositoryItemsByAttValue(String attributeName,String value){
  return createItemsForIds(metadata.findRepositoryItemsByAttValue(attributeName,value));
}

Fixed version (ground truth):
@Override public List<RepositoryItem> findRepositoryItemsByAttValue(String attributeName,String value){
  return createItemsForIds(metadata.findByAttValue(attributeName,value));
}
Program: 36177
Project: 36177
Buggy source:
@Override public List<RepositoryItem> findRepositoryItemsByAttRegex(String attributeName,String regex){
  return createItemsForIds(metadata.findRepositoryItemsByAttRegex(attributeName,regex));
}

Fixed version (ground truth):
@Override public List<RepositoryItem> findRepositoryItemsByAttRegex(String attributeName,String regex){
  return createItemsForIds(metadata.findByAttRegex(attributeName,regex));
}
Program: 36178
Project: 36178
Buggy source:
private String loadFileAsString() throws IOException {
  StringBuilder sb=new StringBuilder();
  BufferedReader br=new BufferedReader(new FileReader(itemsMetadataFile));
  String line;
  while ((line=br.readLine()) != null) {
    sb.append(line).append("String_Node_Str");
  }
  br.close();
  return sb.toString();
}

Fixed version (ground truth):
private String loadFileAsString() throws IOException {
  if (!itemsMetadataFile.exists()) {
    return "String_Node_Str";
  }
  StringBuilder sb=new StringBuilder();
  FileReader metadataFile=new FileReader(itemsMetadataFile);
  BufferedReader br=new BufferedReader(metadataFile);
  String line;
  while ((line=br.readLine()) != null) {
    sb.append(line).append("String_Node_Str");
  }
  br.close();
  return sb.toString();
}
Program: 36179
Project: 36179
Buggy source:
public void save(){
  try {
    PrintWriter writer=new PrintWriter(itemsMetadataFile);
    String content=JSON.serialize(itemsMetadata);
    writer.print(content);
    writer.close();
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void save(){
  try {
    if (!itemsMetadataFile.exists()) {
      itemsMetadataFile.getParentFile().mkdirs();
      itemsMetadataFile.createNewFile();
    }
    PrintWriter writer=new PrintWriter(itemsMetadataFile);
    String content=JSON.serialize(itemsMetadata);
    writer.print(content);
    writer.close();
  }
 catch (  IOException e) {
    log.error("String_Node_Str",e);
  }
}
Program: 36180
Project: 36180
Buggy source:
private void loadItemsMetadata() throws IOException {
  DBObject contents=(DBObject)JSON.parse(loadFileAsString());
  itemsMetadata=new ConcurrentHashMap<String,Map<String,String>>();
  for (  String key : contents.keySet()) {
    try {
      DBObject metadata=(DBObject)contents.get(key);
      Map<String,String> map=new HashMap<String,String>();
      for (      String metadataKey : metadata.keySet()) {
        map.put(key,metadata.get(metadataKey).toString());
      }
    }
 catch (    ClassCastException e) {
      log.warn("String_Node_Str" + key + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void loadItemsMetadata() throws IOException {
  itemsMetadata=new ConcurrentHashMap<String,Map<String,String>>();
  DBObject contents=(DBObject)JSON.parse(loadFileAsString());
  if (contents != null) {
    for (    String key : contents.keySet()) {
      try {
        DBObject metadata=(DBObject)contents.get(key);
        Map<String,String> map=new HashMap<String,String>();
        for (        String metadataKey : metadata.keySet()) {
          map.put(metadataKey,metadata.get(metadataKey).toString());
        }
        itemsMetadata.put(key,map);
      }
 catch (      ClassCastException e) {
        log.warn("String_Node_Str" + key + "String_Node_Str");
      }
    }
  }
}
Program: 36181
Project: 36181
Buggy source:
private SdpEndPoint buildAndConnectSdpEndPoint(MediaElement sourceElement,MediaElement[] sinkElements){
  getLogger().info("String_Node_Str");
  if (sinkElements != null && sinkElements.length > 0) {
    for (    MediaElement e : sinkElements) {
      Assert.notNull(e,"String_Node_Str",10023);
    }
  }
  MediaElement candidate=null;
  if (sinkElements == null || sinkElements.length == 0) {
    candidate=sourceElement;
  }
 else {
    candidate=sinkElements[0];
  }
  getLogger().info("String_Node_Str" + candidate);
  MediaPipeline mediaPipeline=null;
  if (candidate != null) {
    mediaPipeline=candidate.getMediaPipeline();
  }
 else {
    mediaPipeline=mediaPipelineFactory.create();
    releaseOnTerminate(mediaPipeline);
  }
  getLogger().info("String_Node_Str");
  SdpEndPoint sdpEndPoint=buildSdpEndPoint(mediaPipeline);
  releaseOnTerminate(sdpEndPoint);
  if (sourceElement == null) {
    sourceElement=sdpEndPoint;
  }
  getLogger().info("String_Node_Str");
  if (sinkElements != null) {
    connect(sdpEndPoint,sinkElements);
  }
  if (sourceElement != null) {
    sourceElement.connect(sdpEndPoint);
  }
  return sdpEndPoint;
}

Fixed version (ground truth):
private SdpEndPoint buildAndConnectSdpEndPoint(MediaElement sourceElement,MediaElement[] sinkElements){
  getLogger().info("String_Node_Str");
  if (sinkElements != null && sinkElements.length > 0) {
    for (    MediaElement e : sinkElements) {
      Assert.notNull(e,"String_Node_Str",10023);
    }
  }
  MediaElement candidate=null;
  if (sinkElements == null || sinkElements.length == 0) {
    candidate=sourceElement;
  }
 else {
    candidate=sinkElements[0];
  }
  getLogger().info("String_Node_Str" + candidate);
  MediaPipeline mediaPipeline=null;
  if (candidate != null) {
    mediaPipeline=candidate.getMediaPipeline();
  }
 else {
    mediaPipeline=mediaPipelineFactory.create();
    releaseOnTerminate(mediaPipeline);
  }
  getLogger().info("String_Node_Str");
  SdpEndPoint sdpEndPoint=buildSdpEndPoint(mediaPipeline);
  releaseOnTerminate(sdpEndPoint);
  if (sourceElement == null) {
    sourceElement=sdpEndPoint;
  }
  getLogger().info("String_Node_Str");
  if (sinkElements != null && sinkElements.length > 0) {
    connect(sdpEndPoint,sinkElements);
  }
  if (sourceElement != null) {
    sourceElement.connect(sdpEndPoint);
  }
  return sdpEndPoint;
}
Program: 36182
Project: 36182
Buggy source:
/** 
 * Serialize Java object to JSON (as String).
 * @param obj Java Object representing a JSON message to be serialized
 * @return Serialized JSON message (as String)
 */
public static String toString(Object obj){
  return gson.toJson(obj);
}

Fixed version (ground truth):
/** 
 * Serialize Java object to JSON (as String).
 * @param obj Java Object representing a JSON message to be serialized
 * @return Serialized JSON message (as String)
 */
public static String toString(Object obj){
  return GsonUtils.getGson().toJson(obj);
}
Program: 36183
Project: 36183
Buggy source:
@Override public void processOffer(String offer,final Continuation<String> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(offer);
  params.put(PROCESS_SDP_OFFER_PARAM_OFFER_STR,param);
  invoke(PROCESS_SDP_OFFER,new StringContinuationWrapper(cont));
}

Fixed version (ground truth):
@Override public void processOffer(String offer,final Continuation<String> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(offer);
  params.put(PROCESS_SDP_OFFER_PARAM_OFFER_STR,param);
  invoke(PROCESS_SDP_OFFER,params,new StringContinuationWrapper(cont));
}
Program: 36184
Project: 36184
Buggy source:
@Override public void processAnswer(String answer,final Continuation<String> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(answer);
  params.put(PROCESS_SDP_ANSWER_PARAM_ANSWER_STR,param);
  invoke(PROCESS_SDP_ANSWER,new StringContinuationWrapper(cont));
}

Fixed version (ground truth):
@Override public void processAnswer(String answer,final Continuation<String> cont){
  Map<String,MediaParam> params=new HashMap<String,MediaParam>(4);
  StringMediaParam param=new StringMediaParam();
  param.setString(answer);
  params.put(PROCESS_SDP_ANSWER_PARAM_ANSWER_STR,param);
  invoke(PROCESS_SDP_ANSWER,params,new StringContinuationWrapper(cont));
}
Program: 36186
Project: 36186
Buggy source:
@Test public void testMixer() throws KurentoMediaFrameworkException {
  MainMixer mixer=(MainMixer)mediaPipeline.createMediaMixer(MainMixerImpl.TYPE);
  mixer.release();
}

Fixed version (ground truth):
@Ignore @Test public void testMixer() throws KurentoMediaFrameworkException {
  MainMixer mixer=(MainMixer)mediaPipeline.createMediaMixer(MainMixerImpl.TYPE);
  mixer.release();
}
Program: 36187
Project: 36187
Buggy source:
@Test public void testRtpEndPointSimulatingAndroidSdp() throws KurentoMediaFrameworkException, InterruptedException {
  log.info("String_Node_Str");
  PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  log.info("String_Node_Str");
  RtpEndPoint rtpEndPoint=mediaPipeline.createRtpEndPoint();
  String requestSdp="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  log.info("String_Node_Str" + requestSdp);
  String answerSdp=rtpEndPoint.processOffer(requestSdp);
  log.info("String_Node_Str" + answerSdp);
  log.info("String_Node_Str");
  MediaSink videoSink=rtpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next();
  player.getMediaSrcs(KmsMediaType.VIDEO).iterator().next().connect(videoSink);
  log.info("String_Node_Str");
  player.play();
  Thread.sleep(2000);
}

Fixed version (ground truth):
@Test public void testRtpEndPointSimulatingAndroidSdp() throws KurentoMediaFrameworkException, InterruptedException {
  log.info("String_Node_Str");
  PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  log.info("String_Node_Str");
  RtpEndPoint rtpEndPoint=mediaPipeline.createRtpEndPoint();
  String requestSdp="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  log.info("String_Node_Str" + requestSdp);
  String answerSdp=rtpEndPoint.processOffer(requestSdp);
  log.info("String_Node_Str" + answerSdp);
  log.info("String_Node_Str");
  player.connect(rtpEndPoint,KmsMediaType.VIDEO);
  log.info("String_Node_Str");
  Thread.sleep(2000);
}
Program: 36188
Project: 36188
Buggy source:
@Test public void testHttpEndPoint() throws KurentoMediaFrameworkException, InterruptedException {
  final PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  HttpEndPoint httpEndPoint=mediaPipeline.createHttpEndPoint(0,0);
  MediaSink videoSink=httpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next();
  MediaSource videoSrc=player.getMediaSrcs(KmsMediaType.VIDEO).iterator().next();
  videoSrc.connect(videoSink);
  final Semaphore sem=new Semaphore(0);
  player.addEndOfStreamListener(new AbstractEndOfStreamEventListener(){
    @Override public void onEvent(    EndOfStreamEvent event){
      sem.release();
    }
  }
);
  httpEndPoint.addMediaSessionStartListener(new AbstractMediaSessionStartedEventListener(){
    @Override public void onEvent(    MediaSessionStartedEvent event){
      log.info("String_Node_Str" + event);
      player.play();
    }
  }
);
  log.info("String_Node_Str" + httpEndPoint.getUrl());
  DefaultHttpClient httpclient=new DefaultHttpClient();
  try {
    httpclient.execute(new HttpGet(httpEndPoint.getUrl()));
  }
 catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  sem.acquire();
  player.release();
  httpEndPoint.release();
}

Fixed version (ground truth):
@Test public void testHttpEndPoint() throws KurentoMediaFrameworkException, InterruptedException {
  final PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  HttpEndPoint httpEndPoint=mediaPipeline.createHttpEndPoint(0,0);
  player.connect(httpEndPoint,KmsMediaType.VIDEO);
  final Semaphore sem=new Semaphore(0);
  player.addEndOfStreamListener(new AbstractEndOfStreamEventListener(){
    @Override public void onEvent(    EndOfStreamEvent event){
      sem.release();
    }
  }
);
  httpEndPoint.addMediaSessionStartListener(new AbstractMediaSessionStartedEventListener(){
    @Override public void onEvent(    MediaSessionStartedEvent event){
      log.info("String_Node_Str" + event);
      player.play();
    }
  }
);
  log.info("String_Node_Str" + httpEndPoint.getUrl());
  DefaultHttpClient httpclient=new DefaultHttpClient();
  try {
    httpclient.execute(new HttpGet(httpEndPoint.getUrl()));
  }
 catch (  ClientProtocolException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  sem.acquire();
  player.release();
  httpEndPoint.release();
}
Program: 36189
Project: 36189
Buggy source:
@Test public void testZBar() throws KurentoMediaFrameworkException, InterruptedException {
  PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  ZBarFilter zbar=mediaPipeline.createZBarFilter();
  MediaSink videoSink=zbar.getMediaSinks(KmsMediaType.VIDEO).iterator().next();
  MediaSource videoSrc=player.getMediaSrcs(KmsMediaType.VIDEO).iterator().next();
  videoSrc.connect(videoSink);
  final Semaphore sem=new Semaphore(0);
  zbar.addCodeFoundDataListener(new AbstractCodeFoundEventListener(){
    @Override public void onEvent(    CodeFoundEvent event){
      log.info("String_Node_Str" + event);
      sem.release();
    }
  }
);
  player.play();
  Assert.assertTrue(sem.tryAcquire(10,TimeUnit.SECONDS));
  player.stop();
  zbar.release();
  player.release();
}

Fixed version (ground truth):
@Test public void testZBar() throws KurentoMediaFrameworkException, InterruptedException {
  PlayerEndPoint player=mediaPipeline.createPlayerEndPoint("String_Node_Str");
  ZBarFilter zbar=mediaPipeline.createZBarFilter();
  player.connect(zbar,KmsMediaType.VIDEO);
  final Semaphore sem=new Semaphore(0);
  zbar.addCodeFoundDataListener(new AbstractCodeFoundEventListener(){
    @Override public void onEvent(    CodeFoundEvent event){
      log.info("String_Node_Str" + event);
      sem.release();
    }
  }
);
  player.play();
  Assert.assertTrue(sem.tryAcquire(10,TimeUnit.SECONDS));
  player.stop();
  zbar.release();
  player.release();
}
Program: 36190
Project: 36190
Buggy source:
public void testCampusPartySimulatedPipeline() throws InterruptedException, KurentoMediaFrameworkException {
  log.info("String_Node_Str");
  RtpEndPoint rtpEndPoint=mediaPipeline.createRtpEndPoint();
  String requestSdp="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  log.info("String_Node_Str" + requestSdp);
  String answerSdp=rtpEndPoint.processOffer(requestSdp);
  log.info("String_Node_Str");
  rtpEndPoint.getMediaSrcs(KmsMediaType.VIDEO).iterator().next().connect(rtpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next());
  Thread.sleep(1000);
  log.info("String_Node_Str");
  HttpEndPoint httpEndPoint=mediaPipeline.createHttpEndPoint(0,0);
  log.info("String_Node_Str");
  rtpEndPoint.getMediaSrcs(KmsMediaType.VIDEO).iterator().next().connect(httpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next());
  log.info("String_Node_Str" + httpEndPoint.getUrl());
}

Fixed version (ground truth):
public void testCampusPartySimulatedPipeline() throws InterruptedException, KurentoMediaFrameworkException {
  log.info("String_Node_Str");
  RtpEndPoint rtpEndPoint=mediaPipeline.createRtpEndPoint();
  String requestSdp="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  log.info("String_Node_Str" + requestSdp);
  String answerSdp=rtpEndPoint.processOffer(requestSdp);
  log.info("String_Node_Str" + answerSdp);
  log.info("String_Node_Str");
  rtpEndPoint.getMediaSrcs(KmsMediaType.VIDEO).iterator().next().connect(rtpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next());
  Thread.sleep(1000);
  log.info("String_Node_Str");
  HttpEndPoint httpEndPoint=mediaPipeline.createHttpEndPoint(0,0);
  log.info("String_Node_Str");
  rtpEndPoint.getMediaSrcs(KmsMediaType.VIDEO).iterator().next().connect(httpEndPoint.getMediaSinks(KmsMediaType.VIDEO).iterator().next());
  log.info("String_Node_Str" + httpEndPoint.getUrl());
}
Program: 36192
Project: 36192
Buggy source:
public static void registerKurentoServletContextListener(ServletContext ctx){
  if (ctx.getAttribute(KURENTO_SERVLET_CONTEXT_LISTENER_ATTRIBUTE_NAME) == null) {
    return;
  }
  ctx.setAttribute(KURENTO_SERVLET_CONTEXT_LISTENER_ATTRIBUTE_NAME,"String_Node_Str");
  ctx.addListener(KurentoServletContextListener.class);
}

Fixed version (ground truth):
public static void registerKurentoServletContextListener(ServletContext ctx){
  if (ctx.getAttribute(KURENTO_SERVLET_CONTEXT_LISTENER_ATTRIBUTE_NAME) != null) {
    log.info("String_Node_Str");
    return;
  }
  log.info("String_Node_Str");
  ctx.setAttribute(KURENTO_SERVLET_CONTEXT_LISTENER_ATTRIBUTE_NAME,"String_Node_Str");
  ctx.addListener(KurentoServletContextListener.class);
}
Program: 36193
Project: 36193
Buggy source:
public static void closeAllKurentoApplicationContexts(ServletContext ctx){
  Assert.notNull(ctx,"String_Node_Str");
  if (childContexts != null) {
    for (    AnnotationConfigApplicationContext childContext : childContexts.values()) {
      childContext.close();
    }
  }
  childContexts=null;
  if (kurentoApplicationContextInternalReference != null) {
    kurentoApplicationContextInternalReference.close();
  }
  kurentoApplicationContextInternalReference=null;
}

Fixed version (ground truth):
public static void closeAllKurentoApplicationContexts(ServletContext ctx){
  Assert.notNull(ctx,"String_Node_Str");
  if (childContexts != null) {
    for (    AnnotationConfigApplicationContext childContext : childContexts.values()) {
      log.info("String_Node_Str" + childContext);
      childContext.close();
    }
  }
  childContexts=null;
  if (kurentoApplicationContextInternalReference != null) {
    log.info("String_Node_Str" + kurentoApplicationContextInternalReference);
    kurentoApplicationContextInternalReference.close();
  }
  kurentoApplicationContextInternalReference=null;
}
Program: 36194
Project: 36194
Buggy source:
/** 
 * Terminates this object, completing initialAsyncCtx if necessary and sending an answer to the initial request if necessary.
 * @param code
 * @param description
 */
protected void terminate(int code,String description){
  STATE localState;
synchronized (this) {
    if (state == STATE.TERMINATED)     return;
    localState=state;
    state=STATE.TERMINATED;
  }
  try {
    if (localState == STATE.IDLE || state == STATE.HANDLING || state == STATE.STARTING) {
      sendOnTerminateErrorMessageInInitialContext(code,description);
    }
 else     if (localState == STATE.ACTIVE) {
      cancelMediaTransmission();
    }
  }
 catch (  Throwable t) {
    getLogger().error(t.getMessage(),t);
  }
 finally {
    destroy();
  }
}

Fixed version (ground truth):
/** 
 * Terminates this object, completing initialAsyncCtx if necessary and sending an answer to the initial request if necessary.
 * @param code
 * @param description
 */
protected void terminate(int code,String description){
  STATE localState;
synchronized (this) {
    if (state == STATE.TERMINATED)     return;
    localState=state;
    state=STATE.TERMINATED;
  }
  try {
    if (localState == STATE.IDLE || localState == STATE.HANDLING || localState == STATE.STARTING) {
      sendOnTerminateErrorMessageInInitialContext(code,description);
    }
 else     if (localState == STATE.ACTIVE) {
      cancelMediaTransmission();
    }
  }
 catch (  Throwable t) {
    getLogger().error(t.getMessage(),t);
  }
 finally {
    destroy();
  }
}
Program: 36195
Project: 36195
Buggy source:
void startMedia(MediaElement upStream,MediaElement downStream) throws ContentException ;

Fixed version (ground truth):
void startMedia(MediaElement sinkElement,MediaElement sourceElement) throws ContentException ;
Program: 36196
Project: 36196
Buggy source:
void startMedia(MediaElement upStream,MediaElement downStream) throws ContentException ;

Fixed version (ground truth):
void startMedia(MediaElement sinkElement,MediaElement sourceElement) throws ContentException ;
Program: 36197
Project: 36197
Buggy source:
public JsonRpcRequest receiveJsonRequest(AsyncContext asyncCtx) throws IOException {
  HttpServletRequest request=(HttpServletRequest)asyncCtx.getRequest();
  InputStream inputStream=request.getInputStream();
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  byte[] buffer=new byte[BUFF];
  int len;
  while ((len=inputStream.read(buffer)) > -1) {
    baos.write(buffer,0,len);
  }
  baos.flush();
  String encoding=detectJsonEncoding(new ByteArrayInputStream(baos.toByteArray()));
  log.debug("String_Node_Str" + encoding);
  if (encoding == null || !encoding.equalsIgnoreCase(UTF8)) {
    throw new IOException("String_Node_Str");
  }
  InputStreamReader isr=new InputStreamReader(new ByteArrayInputStream(baos.toByteArray()),UTF8);
  JsonRpcRequest jsonRequest=gson.fromJson(isr,JsonRpcRequest.class);
  Assert.notNull(jsonRequest.getMethod());
  return jsonRequest;
}

Fixed version (ground truth):
public JsonRpcRequest receiveJsonRequest(AsyncContext asyncCtx) throws IOException {
  HttpServletRequest request=(HttpServletRequest)asyncCtx.getRequest();
  InputStream inputStream=request.getInputStream();
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  byte[] buffer=new byte[BUFF];
  int len;
  while ((len=inputStream.read(buffer)) > -1) {
    baos.write(buffer,0,len);
  }
  baos.flush();
  String encoding=detectJsonEncoding(new ByteArrayInputStream(baos.toByteArray()));
  log.debug("String_Node_Str" + encoding);
  if (encoding == null || !encoding.equalsIgnoreCase(UTF8)) {
    throw new IOException("String_Node_Str");
  }
  InputStreamReader isr=new InputStreamReader(new ByteArrayInputStream(baos.toByteArray()),UTF8);
  JsonRpcRequest jsonRequest=gson.fromJson(isr,JsonRpcRequest.class);
  Assert.notNull(jsonRequest.getMethod());
  log.info("String_Node_Str" + jsonRequest.toString());
  return jsonRequest;
}
Program: 36198
Project: 36198
Buggy source:
private void internalSendJsonAnswer(AsyncContext asyncCtx,JsonRpcResponse message) throws IOException {
  if (asyncCtx == null) {
    throw new IOException("String_Node_Str");
  }
  if (!asyncCtx.getRequest().isAsyncStarted()) {
    return;
  }
synchronized (asyncCtx) {
    HttpServletResponse response=(HttpServletResponse)asyncCtx.getResponse();
    response.setContentType("String_Node_Str");
    OutputStreamWriter osw=new OutputStreamWriter(response.getOutputStream(),UTF8);
    osw.write(gson.toJson(message));
    osw.flush();
    asyncCtx.complete();
  }
}

Fixed version (ground truth):
private void internalSendJsonAnswer(AsyncContext asyncCtx,JsonRpcResponse message) throws IOException {
  if (asyncCtx == null) {
    throw new IOException("String_Node_Str");
  }
  if (!asyncCtx.getRequest().isAsyncStarted()) {
    return;
  }
synchronized (asyncCtx) {
    HttpServletResponse response=(HttpServletResponse)asyncCtx.getResponse();
    response.setContentType("String_Node_Str");
    OutputStreamWriter osw=new OutputStreamWriter(response.getOutputStream(),UTF8);
    osw.write(gson.toJson(message));
    osw.flush();
    log.info("String_Node_Str" + message);
    asyncCtx.complete();
  }
}
Program: 36200
Project: 36200
Buggy source:
@Override protected final void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if (useControlProtocol) {
    resp.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED,"String_Node_Str" + "String_Node_Str");
    return;
  }
  getLogger().debug("String_Node_Str" + req.getRequestURI());
  if (!req.isAsyncSupported()) {
    resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    return;
  }
  if (isHandlerNull()) {
    resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,getHandlerSimpleClassName() + "String_Node_Str" + "String_Node_Str"+ getHandlerSimpleClassName());
    return;
  }
  String contentId=req.getPathInfo();
  if (contentId != null) {
    contentId=contentId.substring(1);
  }
  AsyncContext asyncCtx=req.startAsync();
  asyncCtx.addListener(new ContentAsyncListener());
  AbstractContentRequest contentRequest=createContentRequest(asyncCtx,contentId);
  Future<?> future=executor.getExecutor().submit(createAsyncRequestProcessor(contentRequest,null,asyncCtx));
  req.setAttribute(ContentAsyncListener.FUTURE_REQUEST_PROCESSOR_ATT_NAME,future);
  req.setAttribute(ContentAsyncListener.CONTENT_REQUEST_ATT_NAME,contentRequest);
}

Fixed version (ground truth):
@Override protected final void doGet(HttpServletRequest req,HttpServletResponse resp) throws ServletException, IOException {
  if (useControlProtocol) {
    resp.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED,"String_Node_Str" + "String_Node_Str");
    return;
  }
  getLogger().debug("String_Node_Str" + req.getRequestURI());
  if (!req.isAsyncSupported()) {
    resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,"String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    return;
  }
  if (isHandlerNull()) {
    resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,getHandlerSimpleClassName() + "String_Node_Str" + "String_Node_Str"+ getHandlerSimpleClassName());
    return;
  }
  String contentId=req.getPathInfo();
  if (contentId != null) {
    contentId=contentId.substring(1);
  }
  AsyncContext asyncCtx=req.startAsync();
  asyncCtx.addListener(new ContentAsyncListener());
}
Program: 36201
Project: 36201
Buggy source:
@Override protected void sendOnTerminateErrorMessageInInitialContext(int code,String description) throws IOException {
  if (useControlProtocol) {
    protocolManager.sendJsonError(initialAsyncCtx,JsonRpcResponse.newError(code,description,initialJsonRequest.getId()));
  }
 else {
    ((HttpServletResponse)initialAsyncCtx.getResponse()).sendError(code,description);
  }
}

Fixed version (ground truth):
@Override protected void sendOnTerminateErrorMessageInInitialContext(int code,String description) throws IOException {
  if (useControlProtocol) {
    protocolManager.sendJsonError(initialAsyncCtx,JsonRpcResponse.newError(code,description,initialJsonRequest.getId()));
  }
 else {
    ((HttpServletResponse)initialAsyncCtx.getResponse()).sendError(500,description);
  }
}
Program: 36203
Project: 36203
Buggy source:
@Override public boolean equals(Object obj){
  if (obj.getClass().equals(this.getClass())) {
    return false;
  }
 else {
    MediaObject mo=(MediaObject)obj;
    return mo.mediaObjectId.getId() == this.mediaObjectId.getId();
  }
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (!obj.getClass().equals(this.getClass())) {
    return false;
  }
 else {
    MediaObject mo=(MediaObject)obj;
    return mo.mediaObjectId.getId() == this.mediaObjectId.getId();
  }
}
Program: 36204
Project: 36204
Buggy source:
void onEvent(KmsEvent event){
  if (event.getSource() instanceof MediaPipeline) {
    fireEvent(mediaPipelineMap.get(event.getSource()),event);
  }
 else   if (event.getSource() instanceof MediaElement) {
    fireEvent(mediaPipelineMap.get(event.getSource()),event);
  }
 else {
    IllegalArgumentException iae=new IllegalArgumentException("String_Node_Str" + event.getSource().getClass());
    log.error(iae.getMessage());
    throw iae;
  }
}

Fixed version (ground truth):
void onEvent(KmsEvent event){
  if (event.getSource() instanceof MediaPipeline) {
    fireEvent(mediaPipelineMap.get(event.getSource()),event);
  }
 else   if (event.getSource() instanceof MediaElement) {
    fireEvent(mediaElementMap.get(event.getSource()),event);
  }
 else {
    IllegalArgumentException iae=new IllegalArgumentException("String_Node_Str" + event.getSource().getClass());
    log.error(iae.getMessage());
    throw iae;
  }
}
Program: 36205
Project: 36205
Buggy source:
public static void processInjectionBasedOnApplicationContext(Object bean,AnnotationConfigApplicationContext appContext){
  AutowiredAnnotationBeanPostProcessor bpp=new AutowiredAnnotationBeanPostProcessor();
  bpp.setBeanFactory(appContext.getAutowireCapableBeanFactory());
  bpp.processInjection(bean);
}

Fixed version (ground truth):
public static void processInjectionBasedOnApplicationContext(Object bean,AnnotationConfigApplicationContext appContext){
  Assert.notNull(appContext,"String_Node_Str");
  Assert.notNull(bean,"String_Node_Str");
  AutowiredAnnotationBeanPostProcessor bpp=new AutowiredAnnotationBeanPostProcessor();
  bpp.setBeanFactory(appContext.getAutowireCapableBeanFactory());
  bpp.processInjection(bean);
}
Program: 36206
Project: 36206
Buggy source:
public static void processInjectionBasedOnKurentoApplicationContext(Object bean){
  AutowiredAnnotationBeanPostProcessor bpp=new AutowiredAnnotationBeanPostProcessor();
  bpp.setBeanFactory(kurentoApplicationContextInternalReference.getAutowireCapableBeanFactory());
  bpp.processInjection(bean);
}

Fixed version (ground truth):
public static void processInjectionBasedOnKurentoApplicationContext(Object bean){
  Assert.notNull(kurentoApplicationContextInternalReference,"String_Node_Str");
  Assert.notNull(bean,"String_Node_Str");
  AutowiredAnnotationBeanPostProcessor bpp=new AutowiredAnnotationBeanPostProcessor();
  bpp.setBeanFactory(kurentoApplicationContextInternalReference.getAutowireCapableBeanFactory());
  bpp.processInjection(bean);
}
Program: 36207
Project: 36207
Buggy source:
/** 
 * Returns true if d is finite--not infinite and not NaN. (Equivalent to Double.isFinite() available from Java 8.)
 * @param d a float value
 * @return whether this value is finite.
 * @deprecated use {@link Double#isFinite(double)} instead. This method was providedfor use in Java7, where  {@link Double#isFinite(double)} did not exist yet.
 */
@Deprecated public static boolean isFinite(double d){
  return Double.isFinite(d);
}

Fixed version (ground truth):
/** 
 * Returns true if d is finite--not infinite and not NaN. (Equivalent to Double.isFinite() available from Java 8.)
 * @param d a double value
 * @return whether this value is finite.
 * @deprecated use {@link Double#isFinite(double)} instead. This method was providedfor use in Java7, where  {@link Double#isFinite(double)} did not exist yet.
 */
@Deprecated public static boolean isFinite(double d){
  return Double.isFinite(d);
}
Program: 36209
Project: 36209
Buggy source:
/** 
 * Returns an array containing the parts of the double. Avoids the overhead of four separate function calls.
 * @returns array with four elements:return[0]: Equivalent to getSign(d) return[1]: Equivalent to (exponentAsBits ? getExponentBits(d) : getExponent(d)) return[2]: Equivalent to getMantissa(d) return[3]: Equivalent to isSubnormal(d) - Uses zero for false, non-zero for true.
 */
public static long[] getAllParts(double d,boolean exponentAsBits){
  long[] segments=new long[4];
  long bits=Double.doubleToRawLongBits(d);
  segments[0]=(bits & SIGN_MASK) >>> SIGN_POS;
  segments[1]=(bits & EXPONENT_MASK) >>> EXPONENT_POS;
  segments[2]=bits & MANTISSA_MASK;
  segments[3]=(segments[1] == 0L && segments[2] != 0L ? 1L : 0L);
  if (!exponentAsBits)   segments[1]-=EXPONENT_OFFSET;
  return segments;
}

Fixed version (ground truth):
/** 
 * Returns an array containing the parts of the double. Avoids the overhead of four separate function calls.
 * @return array with four elements:return[0]: Equivalent to getSign(d) return[1]: Equivalent to (exponentAsBits ? getExponentBits(d) : getExponent(d)) return[2]: Equivalent to getMantissa(d) return[3]: Equivalent to isSubnormal(d) - Uses zero for false, non-zero for true.
 */
public static long[] getAllParts(double d,boolean exponentAsBits){
  long[] segments=new long[4];
  long bits=Double.doubleToRawLongBits(d);
  segments[0]=(bits & SIGN_MASK) >>> SIGN_POS;
  segments[1]=(bits & EXPONENT_MASK) >>> EXPONENT_POS;
  segments[2]=bits & MANTISSA_MASK;
  segments[3]=(segments[1] == 0L && segments[2] != 0L ? 1L : 0L);
  if (!exponentAsBits)   segments[1]-=EXPONENT_OFFSET;
  return segments;
}
Program: 36210
Project: 36210
Buggy source:
/** 
 * Creates a new double primitive using the provided component bits.
 * @param sign
 * @param exponent
 * @param mantissa
 * @param exponentAsBits  If true, assumes that exponent parameter represents the actual exponent bits. If false,IEEE exponent offset value will be added to the offset to get the bits.
 * @return The double value represented by 
 */
public static double getDouble(int sign,int exponent,long mantissa,boolean exponentAsBits){
  if (sign < 0 || sign > 1)   throw new IllegalArgumentException("String_Node_Str" + sign);
  if (0 != (mantissa & ~MANTISSA_MASK))   throw new IllegalArgumentException("String_Node_Str" + mantissa);
  int offsetExponent=(exponentAsBits ? exponent : exponent + EXPONENT_OFFSET);
  if (offsetExponent < 0 || offsetExponent > MAX_EXPONENT)   throw new IllegalArgumentException("String_Node_Str" + exponent);
  return Double.longBitsToDouble((((long)sign) << SIGN_POS) | (((long)offsetExponent) << EXPONENT_POS) | mantissa);
}

Fixed version (ground truth):
/** 
 * Creates a new double primitive using the provided component bits.
 * @param sign
 * @param exponent
 * @param mantissa
 * @param exponentAsBits  If true, assumes that exponent parameter represents the actual exponent bits. If false,IEEE exponent offset value will be added to the offset to get the bits.
 * @return The double value represented by the provided binary parts.
 */
public static double getDouble(int sign,int exponent,long mantissa,boolean exponentAsBits){
  if (sign < 0 || sign > 1)   throw new IllegalArgumentException("String_Node_Str" + sign);
  if (0 != (mantissa & ~MANTISSA_MASK))   throw new IllegalArgumentException("String_Node_Str" + mantissa);
  int offsetExponent=(exponentAsBits ? exponent : exponent + EXPONENT_OFFSET);
  if (offsetExponent < 0 || offsetExponent > MAX_EXPONENT)   throw new IllegalArgumentException("String_Node_Str" + exponent);
  return Double.longBitsToDouble((((long)sign) << SIGN_POS) | (((long)offsetExponent) << EXPONENT_POS) | mantissa);
}
Program: 36212
Project: 36212
Buggy source:
@Override public void putText(final String fieldName,final String value){
  jsonObject.put(fieldName,new JSONString(value));
}

Fixed version (ground truth):
@Override public void putText(final String fieldName,final String value){
  jsonObject.put(fieldName,value == null ? JSONNull.getInstance() : new JSONString(value));
}
Program: 36214
Project: 36214
Buggy source:
@Override public void generateReport(List<XmlSuite> xmlSuites,List<ISuite> suites,String outputDirectory){
  try {
    createWriter(LdpTestSuite.OUTPUT_DIR,"String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
  }
  createModel();
  createAssertions(suites);
  write();
  try {
    endWriter();
  }
 catch (  IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
  }
}

Fixed version (ground truth):
@Override public void generateReport(List<XmlSuite> xmlSuites,List<ISuite> suites,String outputDirectory){
  try {
    createWriter(LdpTestSuite.OUTPUT_DIR,"String_Node_Str");
  }
 catch (  IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
  }
  createModel();
  createAssertions(suites);
  write();
  if (missingParms.size() > 0) {
    System.out.print("String_Node_Str");
    boolean first=true;
    String o="String_Node_Str";
    for (    String p : missingParms) {
      if (first) {
        first=false;
        o=p;
      }
 else {
        o=o + "String_Node_Str" + p;
      }
    }
    System.out.println(o);
  }
  try {
    endWriter();
  }
 catch (  IOException e) {
    e.printStackTrace(System.err);
    System.exit(1);
  }
}
Program: 36219
Project: 36219
Buggy source:
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED) public void testClientPostToCreate(){
  throw new SkipClientTestException();
}

Fixed version (ground truth):
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str","String_Node_Str"}) public void testClientPostToCreate(){
  throw new SkipClientTestException();
}
Program: 36220
Project: 36220
Buggy source:
/** 
 * This is a client-only test. Server tests are covered by  {@link CommonContainerTest#testPreferContainmentTriples()} and{@link DirectContainerTest#testPreferMembershipTriples()}.
 */
@Test(enabled=false,groups={MAY},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_PENDING) public void testClientMayProvideHints(){
  throw new SkipClientTestException();
}

Fixed version (ground truth):
/** 
 * This is a client-only test. Server tests are covered by  {@link CommonContainerTest#testPreferContainmentTriples()} and{@link DirectContainerTest#testPreferMembershipTriples()}.
 */
@Test(enabled=false,groups={MAY},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_PENDING,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testClientMayProvideHints(){
  throw new SkipClientTestException();
}
Program: 36221
Project: 36221
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED) public void testAllowMultipleRdfTypes(){
  throw new SkipClientTestException();
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str"}) public void testAllowMultipleRdfTypes(){
  throw new SkipClientTestException();
}
Program: 36222
Project: 36222
Buggy source:
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED) public void testServerOpen(){
  throw new SkipClientTestException();
}

Fixed version (ground truth):
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str"}) public void testServerOpen(){
  throw new SkipClientTestException();
}
Program: 36223
Project: 36223
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED) public void testGetResourcePreservesTriples() throws URISyntaxException {
  throw new SkipNotTestableException();
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testGetResourcePreservesTriples() throws URISyntaxException {
  throw new SkipNotTestableException();
}
Program: 36224
Project: 36224
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testAllowResponsesFromServer(){
  throw new SkipNotTestableException();
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"}) public void testAllowResponsesFromServer(){
  throw new SkipNotTestableException();
}
Program: 36225
Project: 36225
Buggy source:
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED) public void testUseStandardVocabularies() throws URISyntaxException {
  throw new SkipNotTestableException();
}

Fixed version (ground truth):
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"}) public void testUseStandardVocabularies() throws URISyntaxException {
  throw new SkipNotTestableException();
}
Program: 36226
Project: 36226
Buggy source:
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED) public void testReUseVocabularies(){
  throw new SkipNotTestableException();
}

Fixed version (ground truth):
@Test(groups={SHOULD},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"}) public void testReUseVocabularies(){
  throw new SkipNotTestableException();
}
Program: 36227
Project: 36227
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED) public void testChangeRdfTypeValue(){
  throw new SkipClientTestException();
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.CLIENT_ONLY,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str","String_Node_Str"}) public void testChangeRdfTypeValue(){
  throw new SkipClientTestException();
}
Program: 36228
Project: 36228
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED) public void testRestrictClientInference(){
  throw new SkipNotTestableException();
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.MANUAL,approval=STATUS.WG_APPROVED,steps={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"}) public void testRestrictClientInference(){
  throw new SkipNotTestableException();
}
Program: 36230
Project: 36230
Buggy source:
/** 
 * Update a resource then later test if the updates were applied (i.e., on a subsequent GET). These methods could be overwritten by subclasses.
 * @see #updateResource(Resource)
 */
protected void verifyUpdatedResource(Resource r){
  r.hasProperty(DCTerms.title,TITLE_FOR_UPDATE);
}

Fixed version (ground truth):
/** 
 * Update a resource then later test if the updates were applied (i.e., on a subsequent GET). These methods could be overwritten by subclasses.
 * @see #updateResource(Resource)
 */
protected void verifyUpdatedResource(Resource r){
  assertTrue(r.hasProperty(DCTerms.title,TITLE_FOR_UPDATE),"String_Node_Str" + TITLE_FOR_UPDATE + "String_Node_Str");
}
Program: 36231
Project: 36231
Buggy source:
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.AUTOMATED,approval=STATUS.WG_APPROVED) public void testRelativeUriResolutionPut(){
  skipIfMethodNotAllowed(HttpMethod.PUT);
  String resourceUri=getResourceUri();
  Response response=RestAssured.given().header(ACCEPT,TEXT_TURTLE).expect().statusCode(isSuccessful()).header(ETAG,isValidEntityTag()).when().get(resourceUri);
  String eTag=response.getHeader(ETAG);
  Model model=response.as(Model.class,new RdfObjectMapper(resourceUri));
  ResourceUtils.renameResource(model.getResource(resourceUri),"String_Node_Str");
  updateResource(model.getResource("String_Node_Str"));
  RestAssured.given().contentType(TEXT_TURTLE).header(IF_MATCH,eTag).body(model,new RdfObjectMapper("String_Node_Str")).expect().statusCode(isSuccessful()).when().put(resourceUri);
  model=RestAssured.given().header(ACCEPT,TEXT_TURTLE).expect().statusCode(isSuccessful()).when().get(resourceUri).as(Model.class,new RdfObjectMapper(resourceUri));
  verifyUpdatedResource(model.getResource(resourceUri));
}

Fixed version (ground truth):
@Test(groups={MUST},description="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str") @SpecTest(specRefUri=LdpTestSuite.SPEC_URI + "String_Node_Str",testMethod=METHOD.AUTOMATED,approval=STATUS.WG_APPROVED) public void testRelativeUriResolutionPut(){
  skipIfMethodNotAllowed(HttpMethod.PUT);
  String resourceUri=getResourceUri();
  Response response=RestAssured.given().header(ACCEPT,TEXT_TURTLE).expect().statusCode(isSuccessful()).header(ETAG,isValidEntityTag()).when().get(resourceUri);
  String eTag=response.getHeader(ETAG);
  Model model=response.as(Model.class,new RdfObjectMapper(resourceUri));
  ResourceUtils.renameResource(model.getResource(resourceUri),"String_Node_Str");
  updateResource(model.getResource("String_Node_Str"));
  Response put=RestAssured.given().contentType(TEXT_TURTLE).header(IF_MATCH,eTag).body(model,new RdfObjectMapper("String_Node_Str")).when().put(resourceUri);
  if (!isSuccessful().matches(put.getStatusCode())) {
    throw new SkipException("String_Node_Str");
  }
  model=RestAssured.given().header(ACCEPT,TEXT_TURTLE).expect().statusCode(isSuccessful()).when().get(resourceUri).as(Model.class,new RdfObjectMapper(resourceUri));
  verifyUpdatedResource(model.getResource(resourceUri));
}