nus-yam/ex-repair huggingface dataset:
Program: 171818
Project: 171818
Buggy source:
/** 
 * Specifies the base URL to be used when making requests. Assuming that the interface has a <code>@Path("/api")</code> at the interface level and a <code>url</code> is given with <code>http://my-service:8080/service</code> then all REST calls will be invoked with a <code>url</code> of <code>http://my-service:8080/service/api</code> in addition to any <code>@Path</code> annotations included on the method.
 * @param url the base Url for the service.
 * @return the current builder with the baseUrl set
 */
public abstract RestClientBuilder baseUrl(URL url);

Fixed version (ground truth):
/** 
 * Specifies the base URL to be used when making requests. Assuming that the interface has a <code>@Path("/api")</code> at the interface level and a <code>url</code> is given with <code>http://my-service:8080/service</code> then all REST calls will be invoked with a <code>url</code> of <code>http://my-service:8080/service/api</code> in addition to any <code>@Path</code> annotations included on the method.
 * @param url the base Url for the service.
 * @return the current builder with the baseUrl set
 */
RestClientBuilder baseUrl(URL url);
Program: 171819
Project: 171819
Buggy source:
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all pre-requisites are satisfied forthe builder, this exception may get thrown. For instance, if a URL has not been set.
 */
public abstract <T>T build(Class<T> clazz) throws IllegalStateException ;

Fixed version (ground truth):
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all pre-requisites are satisfied forthe builder, this exception may get thrown. For instance, if a URL has not been set.
 */
<T>T build(Class<T> clazz) throws IllegalStateException ;
Program: 171820
Project: 171820
Buggy source:
public static RestClientBuilder newBuilder(){
  return RestClientBuilderResolver.instance().newBuilder();
}

Fixed version (ground truth):
static RestClientBuilder newBuilder(){
  return RestClientBuilderResolver.instance().newBuilder();
}
Program: 171821
Project: 171821
Buggy source:
@BeforeTest public void resetHandlers(){
  TestResponseExceptionMapper.reset();
  TestResponseExceptionMapperHandles.reset();
  wireMockServer.stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withBody("String_Node_Str")));
}

Fixed version (ground truth):
@BeforeTest public void resetHandlers(){
  TestResponseExceptionMapper.reset();
  TestResponseExceptionMapperHandles.reset();
  getWireMockServer().stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withBody("String_Node_Str")));
}
Program: 171822
Project: 171822
Buggy source:
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,CallMultipleMappersTest.class.getSimpleName() + "String_Node_Str").addClasses(TestResponseExceptionMapper.class,TestResponseExceptionMapperHandles.class).addClasses(SimpleGetApi.class).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,CallMultipleMappersTest.class.getSimpleName() + "String_Node_Str").addClasses(TestResponseExceptionMapper.class,TestResponseExceptionMapperHandles.class).addClasses(SimpleGetApi.class);
}
Program: 171823
Project: 171823
Buggy source:
@Test public void testCallsTwoProvidersWithTwoRegisteredProvider() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(new URL("String_Node_Str" + port)).register(TestResponseExceptionMapper.class).register(TestResponseExceptionMapperHandles.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapperHandles.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapperHandles.class);
    assertTrue(TestResponseExceptionMapperHandles.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapperHandles.class);
  }
}

Fixed version (ground truth):
@Test public void testCallsTwoProvidersWithTwoRegisteredProvider() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(getServerURL()).register(TestResponseExceptionMapper.class).register(TestResponseExceptionMapperHandles.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapperHandles.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapperHandles.class);
    assertTrue(TestResponseExceptionMapperHandles.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapperHandles.class);
  }
}
Program: 171824
Project: 171824
Buggy source:
@Test public void testLowerPriorityMapperTakesPrecedenceFromDefault() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(new URL("String_Node_Str" + port)).register(LowerPriorityTestResponseExceptionMapper.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str");
  }
 catch (  WebApplicationException w) {
    assertTrue(LowerPriorityTestResponseExceptionMapper.isHandlesCalled(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
    assertTrue(LowerPriorityTestResponseExceptionMapper.isThrowableCalled(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
    assertEquals(w.getMessage(),LowerPriorityTestResponseExceptionMapper.class.getSimpleName(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testLowerPriorityMapperTakesPrecedenceFromDefault() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(getServerURL()).register(LowerPriorityTestResponseExceptionMapper.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str");
  }
 catch (  WebApplicationException w) {
    assertTrue(LowerPriorityTestResponseExceptionMapper.isHandlesCalled(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
    assertTrue(LowerPriorityTestResponseExceptionMapper.isThrowableCalled(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
    assertEquals(w.getMessage(),LowerPriorityTestResponseExceptionMapper.class.getSimpleName(),LowerPriorityTestResponseExceptionMapper.class + "String_Node_Str");
  }
}
Program: 171825
Project: 171825
Buggy source:
@BeforeTest public void resetHandlers(){
  LowerPriorityTestResponseExceptionMapper.reset();
  wireMockServer.stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withStatus(STATUS).withBody(BODY)));
}

Fixed version (ground truth):
@BeforeTest public void resetHandlers(){
  LowerPriorityTestResponseExceptionMapper.reset();
  getWireMockServer().stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withStatus(STATUS).withBody(BODY)));
}
Program: 171826
Project: 171826
Buggy source:
@Test public void testPropagationOfResponseDetailsFromDefaultMapper() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(new URL("String_Node_Str" + port)).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str");
  }
 catch (  WebApplicationException w) {
    Response response=w.getResponse();
    assertEquals(response.getStatus(),STATUS,"String_Node_Str");
    String body=response.readEntity(String.class);
    assertEquals(body,BODY,"String_Node_Str");
    response.close();
  }
}

Fixed version (ground truth):
@Test public void testPropagationOfResponseDetailsFromDefaultMapper() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(getServerURL()).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str");
  }
 catch (  WebApplicationException w) {
    Response response=w.getResponse();
    assertEquals(response.getStatus(),STATUS,"String_Node_Str");
    String body=response.readEntity(String.class);
    assertEquals(body,BODY,"String_Node_Str");
    response.close();
  }
}
Program: 171827
Project: 171827
Buggy source:
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,DefaultExceptionMapperTest.class.getSimpleName() + "String_Node_Str").addClasses(SimpleGetApi.class,LowerPriorityTestResponseExceptionMapper.class).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,DefaultExceptionMapperTest.class.getSimpleName() + "String_Node_Str").addClasses(SimpleGetApi.class,LowerPriorityTestResponseExceptionMapper.class);
}
Program: 171828
Project: 171828
Buggy source:
@Test public void testWithOneRegisteredProvider() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(new URL("String_Node_Str" + port)).register(TestResponseExceptionMapper.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
  }
}

Fixed version (ground truth):
@Test public void testWithOneRegisteredProvider() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(getServerURL()).register(TestResponseExceptionMapper.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
  }
}
Program: 171829
Project: 171829
Buggy source:
@BeforeTest public void resetHandlers(){
  TestResponseExceptionMapper.reset();
  TestResponseExceptionMapperOverridePriority.reset();
  wireMockServer.stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withBody("String_Node_Str")));
}

Fixed version (ground truth):
@BeforeTest public void resetHandlers(){
  TestResponseExceptionMapper.reset();
  TestResponseExceptionMapperOverridePriority.reset();
  getWireMockServer().stubFor(get(urlEqualTo("String_Node_Str")).willReturn(aResponse().withBody("String_Node_Str")));
}
Program: 171830
Project: 171830
Buggy source:
@Test public void testWithTwoRegisteredProviders() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(new URL("String_Node_Str" + port)).register(TestResponseExceptionMapper.class).register(TestResponseExceptionMapperOverridePriority.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertTrue(TestResponseExceptionMapperOverridePriority.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapperOverridePriority.class);
    assertFalse(TestResponseExceptionMapperOverridePriority.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapperOverridePriority.class);
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
  }
}

Fixed version (ground truth):
@Test public void testWithTwoRegisteredProviders() throws Exception {
  SimpleGetApi simpleGetApi=RestClientBuilder.newBuilder().baseUrl(getServerURL()).register(TestResponseExceptionMapper.class).register(TestResponseExceptionMapperOverridePriority.class).build(SimpleGetApi.class);
  try {
    simpleGetApi.executeGet();
    fail("String_Node_Str" + WebApplicationException.class + "String_Node_Str"+ TestResponseExceptionMapper.class);
  }
 catch (  WebApplicationException w) {
    assertTrue(TestResponseExceptionMapperOverridePriority.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapperOverridePriority.class);
    assertFalse(TestResponseExceptionMapperOverridePriority.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapperOverridePriority.class);
    assertEquals(TestResponseExceptionMapper.MESSAGE,w.getMessage(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isHandlesCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
    assertTrue(TestResponseExceptionMapper.isThrowableCalled(),"String_Node_Str" + TestResponseExceptionMapper.class);
  }
}
Program: 171831
Project: 171831
Buggy source:
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,ExceptionMapperTest.class.getSimpleName() + "String_Node_Str").addClasses(TestResponseExceptionMapper.class,TestResponseExceptionMapperOverridePriority.class).addClasses(SimpleGetApi.class).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static Archive<?> createDeployment(){
  return ShrinkWrap.create(WebArchive.class,ExceptionMapperTest.class.getSimpleName() + "String_Node_Str").addClasses(TestResponseExceptionMapper.class,TestResponseExceptionMapperOverridePriority.class).addClasses(SimpleGetApi.class);
}
Program: 171832
Project: 171832
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(SimpleGetApi.class).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(SimpleGetApi.class);
}
Program: 171833
Project: 171833
Buggy source:
private InterfaceWithoutProvidersDefined createClient() throws MalformedURLException {
  return RestClientBuilder.newBuilder().register(TestClientRequestFilter.class).register(TestClientResponseFilter.class).register(TestMessageBodyReader.class).register(TestMessageBodyWriter.class).register(TestParamConverterProvider.class).register(TestReaderInterceptor.class).register(TestWriterInterceptor.class).baseUrl(new URL("String_Node_Str" + port)).build(InterfaceWithoutProvidersDefined.class);
}

Fixed version (ground truth):
private InterfaceWithoutProvidersDefined createClient() throws MalformedURLException {
  return RestClientBuilder.newBuilder().register(TestClientRequestFilter.class).register(TestClientResponseFilter.class).register(TestMessageBodyReader.class).register(TestMessageBodyWriter.class).register(TestParamConverterProvider.class).register(TestReaderInterceptor.class).register(TestWriterInterceptor.class).baseUrl(getServerURL()).build(InterfaceWithoutProvidersDefined.class);
}
Program: 171834
Project: 171834
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(InterfaceWithoutProvidersDefined.class).addPackage(TestClientResponseFilter.class.getPackage()).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(InterfaceWithoutProvidersDefined.class).addPackage(TestClientResponseFilter.class.getPackage());
}
Program: 171835
Project: 171835
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(InterfaceWithProvidersDefined.class).addPackage(TestClientResponseFilter.class.getPackage()).addAsManifestResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class).addClass(InterfaceWithProvidersDefined.class).addPackage(TestClientResponseFilter.class.getPackage());
}
Program: 171836
Project: 171836
Buggy source:
/** 
 * Specifies the base URL to be used when making requests.  Assuming that the interface has a <code>@Path("/api")</code> at the interface level and a <code>url</code> is given with <code>http://my-service:8080/service</code> then all REST calls will be invoked with a <code>url</code> of <code>http://my-service:8080/service/api</code> in addition to any <code>@Path</code> annotations included on the method.
 * @param url the base Url for the service.
 * @return the current builder with the baseUrl set
 */
public abstract RestClientBuilder baseUrl(URL url);

Fixed version (ground truth):
/** 
 * Specifies the base URL to be used when making requests. Assuming that the interface has a <code>@Path("/api")</code> at the interface level and a <code>url</code> is given with <code>http://my-service:8080/service</code> then all REST calls will be invoked with a <code>url</code> of <code>http://my-service:8080/service/api</code> in addition to any <code>@Path</code> annotations included on the method.
 * @param url the base Url for the service.
 * @return the current builder with the baseUrl set
 */
public abstract RestClientBuilder baseUrl(URL url);
Program: 171837
Project: 171837
Buggy source:
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all pre-requisites are satisfied for the builder, this exception may get thrown.  For instance, if a URLhas not been set.
 */
public abstract <T>T build(Class<T> clazz) throws IllegalStateException ;

Fixed version (ground truth):
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all pre-requisites are satisfied forthe builder, this exception may get thrown. For instance, if a URL has not been set.
 */
public abstract <T>T build(Class<T> clazz) throws IllegalStateException ;
Program: 171838
Project: 171838
Buggy source:
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all code-requisites are satisfied for the builder, this exception may get thrown.  For instance, if a URLhas not been set.
 */
public abstract <T>T build(Class<T> clazz) throws IllegalStateException ;

Fixed version (ground truth):
/** 
 * Based on the configured RestClientBuilder, creates a new instance of the given REST interface to invoke API calls against.
 * @param clazz the interface that defines REST API methods for use
 * @param < T > the type of the interface
 * @return a new instance of an implementation of this REST interface that
 * @throws IllegalStateException if not all pre-requisites are satisfied for the builder, this exception may get thrown.  For instance, if a URLhas not been set.
 */
public abstract <T>T build(Class<T> clazz) throws IllegalStateException ;
Program: 171839
Project: 171839
Buggy source:
public void start(){
  try {
    this.wavPath=File.createTempFile(satellite.getId(),"String_Node_Str");
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
    return;
  }
  ProcessWrapper sox=null;
  try {
    Integer ppm=config.getInteger("String_Node_Str");
    if (ppm == null) {
      ppm=0;
    }
    sox=factory.create(config.getProperty("String_Node_Str") + "String_Node_Str" + wavPath.getAbsolutePath()+ "String_Node_Str",Redirect.INHERIT,false);
    rtlfm=factory.create(config.getProperty("String_Node_Str") + "String_Node_Str" + String.valueOf(satellite.getFrequency())+ "String_Node_Str"+ String.valueOf(ppm)+ "String_Node_Str",Redirect.INHERIT,false);
    byte[] buf=new byte[BUF_SIZE];
    while (!Thread.currentThread().isInterrupted()) {
      int r=rtlfm.getInputStream().read(buf);
      if (r == -1) {
        break;
      }
      sox.getOutputStream().write(buf,0,r);
    }
    sox.getOutputStream().flush();
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
 finally {
    LOG.info("String_Node_Str");
    Util.shutdown("String_Node_Str",rtlfm,10000);
    Util.shutdown("String_Node_Str",sox,10000);
  }
}

Fixed version (ground truth):
public void start(){
  try {
    this.wavPath=File.createTempFile(satellite.getId() + "String_Node_Str","String_Node_Str");
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
    return;
  }
  ProcessWrapper sox=null;
  try {
    Integer ppm=config.getInteger("String_Node_Str");
    if (ppm == null) {
      ppm=0;
    }
    sox=factory.create(config.getProperty("String_Node_Str") + "String_Node_Str" + wavPath.getAbsolutePath()+ "String_Node_Str",Redirect.INHERIT,false);
    rtlfm=factory.create(config.getProperty("String_Node_Str") + "String_Node_Str" + String.valueOf(satellite.getFrequency())+ "String_Node_Str"+ String.valueOf(ppm)+ "String_Node_Str",Redirect.INHERIT,false);
    byte[] buf=new byte[BUF_SIZE];
    while (!Thread.currentThread().isInterrupted()) {
      int r=rtlfm.getInputStream().read(buf);
      if (r == -1) {
        break;
      }
      sox.getOutputStream().write(buf,0,r);
    }
    sox.getOutputStream().flush();
  }
 catch (  IOException e) {
    LOG.error("String_Node_Str",e);
  }
 finally {
    LOG.info("String_Node_Str");
    Util.shutdown("String_Node_Str",rtlfm,10000);
    Util.shutdown("String_Node_Str",sox,10000);
  }
}
Program: 171840
Project: 171840
Buggy source:
private static APTResult convert(File image,List<String> lines){
  APTResult result=new APTResult();
  boolean success=true;
  for (  String cur : lines) {
    int index=cur.indexOf("String_Node_Str");
    if (index == -1) {
      continue;
    }
    String name=cur.substring(0,index).trim();
    String value=cur.substring(index + 1).trim();
    if (name.equalsIgnoreCase("String_Node_Str") && (value.equalsIgnoreCase("String_Node_Str") || value.contains("String_Node_Str"))) {
      success=false;
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setGain(value);
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setChannelA(value);
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setChannelB(value);
      continue;
    }
  }
  if (success) {
    result.setImage(image);
  }
  return result;
}

Fixed version (ground truth):
private static APTResult convert(File image,List<String> lines){
  APTResult result=new APTResult();
  boolean success=true;
  for (  String cur : lines) {
    int index=cur.indexOf("String_Node_Str");
    if (index == -1) {
      continue;
    }
    String name=cur.substring(0,index).trim();
    String value=cur.substring(index + 1).trim();
    if (name.equalsIgnoreCase("String_Node_Str") && (value.equalsIgnoreCase("String_Node_Str") || value.contains("String_Node_Str") || value.startsWith("String_Node_Str"))) {
      success=false;
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setGain(value);
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setChannelA(value);
      continue;
    }
    if (name.equalsIgnoreCase("String_Node_Str")) {
      result.setChannelB(value);
      continue;
    }
  }
  if (success) {
    result.setImage(image);
  }
  return result;
}
Program: 171841
Project: 171841
Buggy source:
public void stop(){
  Util.shutdown("String_Node_Str",rtlfm,10000);
  rtlfm=null;
  if (!wavPath.exists()) {
    LOG.info("String_Node_Str");
    return;
  }
  String observationId=String.valueOf(nextPass.getStart().getTime().getTime());
  if (!dao.createObservation(satellite.getId(),observationId,wavPath)) {
    return;
  }
  ObservationResult cur=dao.find(satellite.getId(),observationId);
  if (cur == null) {
    return;
  }
  APTResult result=aptDecoder.decode(wavPath,"String_Node_Str");
  if (result.getImage() != null) {
    dao.saveChannel(satellite.getId(),observationId,result.getImage(),"String_Node_Str");
    result=aptDecoder.decode(wavPath,"String_Node_Str");
    if (result.getImage() != null) {
      dao.saveChannel(satellite.getId(),observationId,result.getImage(),"String_Node_Str");
    }
  }
  cur.setStart(nextPass.getStart().getTime());
  cur.setEnd(nextPass.getEnd().getTime());
  cur.setGain(result.getGain());
  cur.setChannelA(result.getChannelA());
  cur.setChannelB(result.getChannelB());
  dao.saveMeta(satellite.getId(),cur);
}

Fixed version (ground truth):
public void stop(){
  Util.shutdown("String_Node_Str",rtlfm,10000);
  rtlfm=null;
  if (!wavPath.exists()) {
    LOG.info("String_Node_Str");
    return;
  }
  String observationId=String.valueOf(nextPass.getStart().getTime().getTime());
  if (!dao.createObservation(satellite.getId(),observationId,wavPath)) {
    return;
  }
  ObservationResult cur=dao.find(satellite.getId(),observationId);
  if (cur == null) {
    return;
  }
  APTResult result=aptDecoder.decode(cur.getWavPath(),"String_Node_Str");
  if (result.getImage() != null) {
    dao.saveChannel(satellite.getId(),observationId,result.getImage(),"String_Node_Str");
    result=aptDecoder.decode(cur.getWavPath(),"String_Node_Str");
    if (result.getImage() != null) {
      dao.saveChannel(satellite.getId(),observationId,result.getImage(),"String_Node_Str");
    }
  }
  cur.setStart(nextPass.getStart().getTime());
  cur.setEnd(nextPass.getEnd().getTime());
  cur.setGain(result.getGain());
  cur.setChannelA(result.getChannelA());
  cur.setChannelB(result.getChannelB());
  dao.saveMeta(satellite.getId(),cur);
}
Program: 171842
Project: 171842
Buggy source:
private Pair<Intent,Integer> getPhotoCaptureIntentRequestPair(RxGallery.Request request) throws SecurityException {
  Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  if (request.getOutputUri() != null) {
    outputUri=request.getOutputUri();
  }
 else {
    outputUri=createMedia(request);
  }
  intent.putExtra(MediaStore.EXTRA_OUTPUT,outputUri);
  return new Pair<>(intent,RC_TAKE_PHOTO);
}

Fixed version (ground truth):
private Pair<Intent,Integer> getPhotoCaptureIntentRequestPair(RxGallery.Request request) throws SecurityException {
  Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
  if (request.getOutputUri() != null) {
    outputUri=request.getOutputUri();
  }
 else {
    outputUri=createImage();
  }
  intent.putExtra(MediaStore.EXTRA_OUTPUT,outputUri);
  return new Pair<>(intent,RC_TAKE_PHOTO);
}
Program: 171843
Project: 171843
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  Intent intent=new Intent(FINISHED_ACTION);
  ArrayList<Uri> uris=new ArrayList<>();
  if (resultCode == Activity.RESULT_OK) {
switch (requestCode) {
case RC_GALLERY:
      uris=handleGallery(data);
    break;
case RC_TAKE_VIDEO:
  uris.add(data.getData());
break;
case RC_TAKE_PHOTO:
uris.add(outputUri);
break;
}
}
intent.putParcelableArrayListExtra(EXTRA_URIS,uris);
sendBroadcast(intent);
finishAll();
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  Intent intent=new Intent(FINISHED_ACTION);
  ArrayList<Uri> uris=new ArrayList<>();
  if (resultCode == Activity.RESULT_OK) {
switch (requestCode) {
case RC_GALLERY:
      uris=handleGallery(data);
    break;
case RC_TAKE_VIDEO:
  uris.add(data.getData());
break;
case RC_TAKE_PHOTO:
uris.add(outputUri);
break;
}
}
 else if (requestCode == RC_TAKE_PHOTO) {
getContentResolver().delete(outputUri,null,null);
}
intent.putParcelableArrayListExtra(EXTRA_URIS,uris);
sendBroadcast(intent);
finishAll();
}
Program: 171844
Project: 171844
Buggy source:
@Override public void subscribe(@io.reactivex.annotations.NonNull final ObservableEmitter<List<Uri>> e) throws Exception {
  final BroadcastReceiver receiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (!e.isDisposed()) {
        if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_NO_ACTIVITY)) {
          e.onError(new ActivityNotFoundException("String_Node_Str"));
        }
 else         if (intent.hasExtra(RxGalleryActivity.EXTRA_URIS)) {
          List<Uri> uris=intent.getParcelableArrayListExtra(RxGalleryActivity.EXTRA_URIS);
          if (uris != null && uris.size() > 0) {
            e.onNext(uris);
          }
        }
        e.onComplete();
      }
    }
  }
;
  IntentFilter intentFilter=new IntentFilter(RxGalleryActivity.FINISHED_ACTION);
  context.registerReceiver(receiver,intentFilter);
  e.setDisposable(new MainThreadDisposable(){
    @Override protected void onDispose(){
      context.unregisterReceiver(receiver);
      context.sendBroadcast(new Intent(RxGalleryActivity.DISPOSED_ACTION));
    }
  }
);
  Intent intent=new Intent(context,RxGalleryActivity.class);
  intent.putExtra(RxGalleryActivity.EXTRA_REQUEST,request);
  context.startActivity(intent);
}

Fixed version (ground truth):
@Override public void subscribe(@io.reactivex.annotations.NonNull final SingleEmitter<List<Uri>> e) throws Exception {
  final BroadcastReceiver receiver=new BroadcastReceiver(){
    @Override public void onReceive(    Context context,    Intent intent){
      if (!e.isDisposed()) {
        if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_NO_ACTIVITY)) {
          e.onError(new ActivityNotFoundException("String_Node_Str"));
        }
 else         if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_SECURITY)) {
          e.onError((Throwable)intent.getSerializableExtra(RxGalleryActivity.EXTRA_ERROR_SECURITY));
        }
 else         if (intent.hasExtra(RxGalleryActivity.EXTRA_URIS)) {
          List<Uri> uris=intent.getParcelableArrayListExtra(RxGalleryActivity.EXTRA_URIS);
          e.onSuccess(uris != null ? uris : new ArrayList<Uri>());
        }
      }
    }
  }
;
  IntentFilter intentFilter=new IntentFilter(RxGalleryActivity.FINISHED_ACTION);
  context.registerReceiver(receiver,intentFilter);
  e.setDisposable(new MainThreadDisposable(){
    @Override protected void onDispose(){
      context.unregisterReceiver(receiver);
      context.sendBroadcast(new Intent(RxGalleryActivity.DISPOSED_ACTION));
    }
  }
);
  Intent intent=new Intent(context,RxGalleryActivity.class);
  intent.putExtra(RxGalleryActivity.EXTRA_REQUEST,request);
  context.startActivity(intent);
}
Program: 171845
Project: 171845
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  if (!e.isDisposed()) {
    if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_NO_ACTIVITY)) {
      e.onError(new ActivityNotFoundException("String_Node_Str"));
    }
 else     if (intent.hasExtra(RxGalleryActivity.EXTRA_URIS)) {
      List<Uri> uris=intent.getParcelableArrayListExtra(RxGalleryActivity.EXTRA_URIS);
      if (uris != null && uris.size() > 0) {
        e.onNext(uris);
      }
    }
    e.onComplete();
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  if (!e.isDisposed()) {
    if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_NO_ACTIVITY)) {
      e.onError(new ActivityNotFoundException("String_Node_Str"));
    }
 else     if (intent.hasExtra(RxGalleryActivity.EXTRA_ERROR_SECURITY)) {
      e.onError((Throwable)intent.getSerializableExtra(RxGalleryActivity.EXTRA_ERROR_SECURITY));
    }
 else     if (intent.hasExtra(RxGalleryActivity.EXTRA_URIS)) {
      List<Uri> uris=intent.getParcelableArrayListExtra(RxGalleryActivity.EXTRA_URIS);
      e.onSuccess(uris != null ? uris : new ArrayList<Uri>());
    }
  }
}
Program: 171846
Project: 171846
Buggy source:
/** 
 * @param multiSelectEnabled
 * @return
 */
@RequiresApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public Builder setMultiSelectEnabled(boolean multiSelectEnabled){
  this.multiSelectEnabled=multiSelectEnabled;
  return this;
}

Fixed version (ground truth):
/** 
 * @param multiSelectEnabled
 * @return
 */
public Builder setMultiSelectEnabled(boolean multiSelectEnabled){
  this.multiSelectEnabled=multiSelectEnabled;
  return this;
}
Program: 171847
Project: 171847
Buggy source:
private Pair<Intent,Integer> getPhotoOrVideoCaptureIntentRequestPair(RxGallery.Request request){
  String action=request.getSource() == RxGallery.Source.PHOTO_CAPTURE ? MediaStore.ACTION_IMAGE_CAPTURE : MediaStore.ACTION_VIDEO_CAPTURE;
  Intent intent=new Intent(action);
  if (request.getOutputUri() != null) {
    outputUri=request.getOutputUri();
  }
 else {
    Uri uri=request.getSource() == RxGallery.Source.PHOTO_CAPTURE ? MediaStore.Images.Media.EXTERNAL_CONTENT_URI : MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
    outputUri=createMedia(uri);
  }
  intent.putExtra(MediaStore.EXTRA_OUTPUT,outputUri);
  return new Pair<>(intent,RC_TAKE_PHOTO_OR_VIDEO);
}

Fixed version (ground truth):
private Pair<Intent,Integer> getPhotoOrVideoCaptureIntentRequestPair(RxGallery.Request request) throws SecurityException {
  String action=request.getSource() == RxGallery.Source.PHOTO_CAPTURE ? MediaStore.ACTION_IMAGE_CAPTURE : MediaStore.ACTION_VIDEO_CAPTURE;
  Intent intent=new Intent(action);
  if (request.getOutputUri() != null) {
    outputUri=request.getOutputUri();
  }
 else {
    outputUri=createMedia(request);
  }
  intent.putExtra(MediaStore.EXTRA_OUTPUT,outputUri);
  return new Pair<>(intent,RC_TAKE_PHOTO_OR_VIDEO);
}
Program: 171848
Project: 171848
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  registerReceiver(disposedReceiver,new IntentFilter(DISPOSED_ACTION));
  Pair<Intent,Integer> intentRequestPair;
  RxGallery.Request request=getIntent().getParcelableExtra(EXTRA_REQUEST);
switch (request.getSource()) {
case GALLERY:
    intentRequestPair=getGalleryIntentRequestPair(request);
  break;
default :
intentRequestPair=getPhotoOrVideoCaptureIntentRequestPair(request);
break;
}
if (intentRequestPair.first.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intentRequestPair.first,intentRequestPair.second);
}
 else {
sendErrorNoActivity();
finish();
}
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  registerReceiver(disposedReceiver,new IntentFilter(DISPOSED_ACTION));
  RxGallery.Request request=getIntent().getParcelableExtra(EXTRA_REQUEST);
switch (request.getSource()) {
case GALLERY:
    handleIntentRequestPair(getGalleryIntentRequestPair(request));
  break;
default :
try {
  handleIntentRequestPair(getPhotoOrVideoCaptureIntentRequestPair(request));
}
 catch (SecurityException e) {
  sendErrorSecurity(e);
}
break;
}
}
Program: 171849
Project: 171849
Buggy source:
private void sendErrorNoActivity(){
  Intent intent=new Intent(FINISHED_ACTION);
  intent.putExtra(EXTRA_ERROR_NO_ACTIVITY,true);
  sendBroadcast(intent);
}

Fixed version (ground truth):
private void sendErrorNoActivity(){
  Intent intent=new Intent(FINISHED_ACTION);
  intent.putExtra(EXTRA_ERROR_NO_ACTIVITY,true);
  sendBroadcast(intent);
  finishAll();
}
Program: 171850
Project: 171850
Buggy source:
private Uri createMedia(Uri uri){
  ContentResolver contentResolver=getContentResolver();
  ContentValues cv=new ContentValues();
  String timeStamp=new SimpleDateFormat("String_Node_Str",Locale.getDefault()).format(new Date());
  cv.put(MediaStore.Images.Media.TITLE,timeStamp);
  return contentResolver.insert(uri,cv);
}

Fixed version (ground truth):
private Uri createMedia(@NonNull RxGallery.Request request) throws SecurityException {
  Uri uri=request.getSource() == RxGallery.Source.PHOTO_CAPTURE ? MediaStore.Images.Media.EXTERNAL_CONTENT_URI : MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
  ContentResolver contentResolver=getContentResolver();
  ContentValues cv=new ContentValues();
  String timeStamp=new SimpleDateFormat("String_Node_Str",Locale.getDefault()).format(new Date());
  cv.put(MediaStore.Images.Media.TITLE,timeStamp);
  return contentResolver.insert(uri,cv);
}
Program: 171851
Project: 171851
Buggy source:
private ClassDiagram getClassDiagram(Collection<Symbol> symbols,ClassDiagram cd){
  ClassDiagram classDiagram=cd != null ? cd : new ClassDiagram();
  for (  Symbol s : symbols) {
    if (s instanceof ClassImpl)     parseClass(classDiagram,(ClassImpl)s);
    if (s instanceof InterfaceImpl)     parseInterface(classDiagram,(InterfaceImpl)s);
    if (s instanceof FileImpl) {
      getClassDiagram(s.allSymbols(),classDiagram);
    }
    if (s instanceof EnumeratorImpl) {
      parseEnum(classDiagram,(EnumeratorImpl)s);
    }
  }
  checkNoExistNode(classDiagram);
  return classDiagram;
}

Fixed version (ground truth):
private ClassDiagram getClassDiagram(Collection<Symbol> symbols,ClassDiagram cd){
  ClassDiagram classDiagram=cd != null ? cd : new ClassDiagram();
  for (  Symbol s : symbols) {
    if (s instanceof ClassImpl)     parseClass(classDiagram,(ClassImpl)s);
    if (s instanceof InterfaceImpl)     parseInterface(classDiagram,(InterfaceImpl)s);
    if (s instanceof EnumeratorImpl) {
      parseEnum(classDiagram,(EnumeratorImpl)s);
    }
  }
  checkNoExistNode(classDiagram);
  return classDiagram;
}
Program: 171852
Project: 171852
Buggy source:
@Override public void run(){
  Project project=new ObjcProject(path);
  project.readProject();
  com.away1994.tsp.feature.plantuml.classes.ClassesDiagram diagram=project.getClassesDiagram();
  try {
    Output.writeToFile(output,diagram.getPUTextDescription());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  File file=new File(path);
  if (!file.exists()) {
    System.out.println("String_Node_Str");
    return;
  }
  Project project=new ObjcProject(path);
  project.readProject();
  com.away1994.tsp.feature.plantuml.classes.ClassesDiagram diagram=project.getClassesDiagram();
  try {
    String out=output != null ? output : "String_Node_Str" + file.getName() + "String_Node_Str";
    Output.writeToFile(out,diagram.getPUTextDescription());
  }
 catch (  IOException e) {
    System.out.println("String_Node_Str");
  }
}
Program: 171853
Project: 171853
Buggy source:
@Test public void commandLineTest() throws Exception {
  File file=new File("String_Node_Str");
}

Fixed version (ground truth):
@Test public void commandLineTest() throws Exception {
  IDLE.main(new String[]{"String_Node_Str","String_Node_Str",TestConstants.AFNetworking_PROJECT_PATH,"String_Node_Str",TestConstants.TEST_RESOURCES_PATH + "String_Node_Str"});
}
Program: 171855
Project: 171855
Buggy source:
public final CodeContext code() throws RecognitionException {
  CodeContext _localctx=new CodeContext(_ctx,getState());
  enterRule(_localctx,4,RULE_code);
  try {
    int _alt;
    enterOuterAlt(_localctx,1);
{
      setState(28);
      _errHandler.sync(this);
      _alt=1;
      do {
switch (_alt) {
case 1:
{
{
              setState(27);
              match(CODE);
            }
          }
        break;
default :
      throw new NoViableAltException(this);
  }
  setState(30);
  _errHandler.sync(this);
  _alt=getInterpreter().adaptivePredict(_input,2,_ctx);
}
 while (_alt != 2 && _alt != org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER);
}
}
 catch (RecognitionException re) {
_localctx.exception=re;
_errHandler.reportError(this,re);
_errHandler.recover(this,re);
}
 finally {
exitRule();
}
return _localctx;
}

Fixed version (ground truth):
public final CodeContext code() throws RecognitionException {
  CodeContext _localctx=new CodeContext(_ctx,getState());
  enterRule(_localctx,4,RULE_code);
  try {
    int _alt;
    enterOuterAlt(_localctx,1);
{
      setState(28);
      _errHandler.sync(this);
      _alt=1;
      do {
switch (_alt) {
case 1:
{
{
              setState(27);
              match(CODE);
            }
          }
        break;
default :
      throw new NoViableAltException(this);
  }
  setState(30);
  _errHandler.sync(this);
  _alt=getInterpreter().adaptivePredict(_input,2,_ctx);
}
 while (_alt != 2 && _alt != ATN.INVALID_ALT_NUMBER);
}
}
 catch (RecognitionException re) {
_localctx.exception=re;
_errHandler.reportError(this,re);
_errHandler.recover(this,re);
}
 finally {
exitRule();
}
return _localctx;
}
Program: 171856
Project: 171856
Buggy source:
@Test public void testTwoStepProcessing(){
  String emptyClassString="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ANTLRInputStream inputStream=new ANTLRInputStream(emptyClassString);
  ObjectiveCPreprocessorLexer preLexer=new ObjectiveCPreprocessorLexer(inputStream);
  CommonTokenStream preToken=new CommonTokenStream(preLexer);
  ObjectiveCPreprocessorParser preParser=new ObjectiveCPreprocessorParser(preToken);
  ObjectiveCPreprocessorParser.ObjectiveCDocumentContext preParseTree=preParser.objectiveCDocument();
  System.out.println(preParseTree.toStringTree(preParser));
  ObjectiveCPreprocessor preprocessor=new ObjectiveCPreprocessor(preToken);
  Object res=preprocessor.visit(preParseTree);
  System.out.println(preParseTree.toStringTree(preParser));
  ObjectiveCLexer lexer=new ObjectiveCLexer(inputStream);
  CommonTokenStream token=new CommonTokenStream(lexer);
  ObjectiveCParser parser=new ObjectiveCParser(token);
  ParseTree parseTree=parser.translationUnit();
  System.out.println(parseTree.toStringTree(parser));
}

Fixed version (ground truth):
@Test public void testTwoStepProcessing(){
  String emptyClassString="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ANTLRInputStream preInputStream=new ANTLRInputStream(emptyClassString);
  ObjectiveCPreprocessorLexer preLexer=new ObjectiveCPreprocessorLexer(preInputStream);
  CommonTokenStream preToken=new CommonTokenStream(preLexer);
  ObjectiveCPreprocessorParser preParser=new ObjectiveCPreprocessorParser(preToken);
  ObjectiveCPreprocessorParser.ObjectiveCDocumentContext preParseTree=preParser.objectiveCDocument();
  ObjectiveCPreprocessor preprocessor=new ObjectiveCPreprocessor(preToken);
  String removedSourceString=preprocessor.visit(preParseTree);
  System.out.println(preParseTree.toStringTree(preParser));
  ANTLRInputStream inputStream=new ANTLRInputStream(removedSourceString);
  ObjectiveCLexer lexer=new ObjectiveCLexer(inputStream);
  CommonTokenStream token=new CommonTokenStream(lexer);
  ObjectiveCParser parser=new ObjectiveCParser(token);
  ParseTree parseTree=parser.translationUnit();
  System.out.println(parseTree.toStringTree(parser));
}
Program: 171857
Project: 171857
Buggy source:
@Override public String visitPreprocessorDefine(ObjectiveCPreprocessorParser.PreprocessorDefineContext context){
  if (IsCompiliedText()) {
    StringBuilder str=new StringBuilder();
    for (    ObjectiveCPreprocessorParser.Directive_textContext d : context.directive_text()) {
      str.append(d.TEXT() != null ? d.TEXT() : "String_Node_Str");
    }
    String directiveText=str.toString().trim();
    ConditionalSymbols.put(context.CONDITIONAL_SYMBOL().getText().replace("String_Node_Str","String_Node_Str"),directiveText);
  }
  return Boolean.toString(IsCompiliedText());
}

Fixed version (ground truth):
@Override public String visitPreprocessorDefine(ObjectiveCPreprocessorParser.PreprocessorDefineContext context){
  if (IsCompiliedText()) {
    StringBuilder str=new StringBuilder();
    ObjectiveCPreprocessorParser.Directive_textContext d=context.directive_text();
    str.append(d.TEXT() != null ? d.TEXT() : "String_Node_Str");
    String directiveText=str.toString().trim();
    ConditionalSymbols.put(context.CONDITIONAL_SYMBOL().getText().replace("String_Node_Str","String_Node_Str"),directiveText);
  }
  return Boolean.toString(IsCompiliedText());
}
Program: 171859
Project: 171859
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  this.mGauge=this.findViewById(R.id.gauge);
  this.mGauge.setAngleStart(-225);
  this.mGauge.setAngleSweep(270);
  this.mGauge.setRecognizePathTouch(true);
  this.mGauge.setPathTouchThreshold(100);
  ScCopier base=this.mGauge.getBase();
  base.setWidths(100);
  base.setColors(Color.parseColor("String_Node_Str"),Color.MAGENTA,Color.YELLOW);
  base.setColorsMode(ScFeature.ColorsMode.GRADIENT);
  base.getPainter().setStrokeCap(Paint.Cap.ROUND);
  ScCopier progress=this.mGauge.getProgress();
  progress.setWidths(100);
  progress.setColors(Color.RED);
  progress.getPainter().setStrokeCap(Paint.Cap.ROUND);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  this.mGauge=this.findViewById(R.id.gauge);
  this.mGauge.setAngleStart(-225);
  this.mGauge.setAngleSweep(270);
  this.mGauge.setRecognizePathTouch(true);
  this.mGauge.setPathTouchThreshold(100);
  ScCopier base=this.mGauge.getBase();
  base.setWidths(100);
  base.setColors(Color.YELLOW,Color.MAGENTA,Color.YELLOW);
  base.setColorsMode(ScFeature.ColorsMode.GRADIENT);
  base.getPainter().setStrokeCap(Paint.Cap.ROUND);
  ScCopier progress=this.mGauge.getProgress();
  progress.setWidths(100);
  progress.setColors(Color.RED);
  progress.getPainter().setStrokeCap(Paint.Cap.ROUND);
}