nus-yam/ex-repair huggingface dataset:
Program: 53339
Project: 53339
Buggy source:
@Override public void showVideo(){
  if (incentivizedInterstitial.isAdReadyToDisplay()) {
    fullyWatched=false;
    reward=null;
    incentivizedInterstitial.show(context,null,this,this,this,this);
  }
 else {
    log(ERROR,"String_Node_Str");
    listener.onAdFailedToLoad(this,AdRequest.ERROR_CODE_INTERNAL_ERROR);
  }
}

Fixed version (ground truth):
@Override public void showVideo(){
  if (incentivizedInterstitial.isAdReadyToDisplay()) {
    fullyWatched=false;
    reward=null;
    try {
      final Class<?> contextClass=(AppLovinSdk.VERSION_CODE < 720) ? Activity.class : Context.class;
      final Method showMethod=AppLovinIncentivizedInterstitial.class.getMethod("String_Node_Str",contextClass,String.class,AppLovinAdRewardListener.class,AppLovinAdVideoPlaybackListener.class,AppLovinAdDisplayListener.class,AppLovinAdClickListener.class);
      try {
        showMethod.invoke(incentivizedInterstitial,context,null,this,this,this,this);
      }
 catch (      Throwable th) {
        log(ERROR,"String_Node_Str");
        listener.onAdFailedToLoad(this,AdRequest.ERROR_CODE_INTERNAL_ERROR);
      }
    }
 catch (    Throwable th) {
      log(ERROR,"String_Node_Str");
      listener.onAdFailedToLoad(this,AdRequest.ERROR_CODE_INTERNAL_ERROR);
    }
  }
 else {
    log(ERROR,"String_Node_Str");
    listener.onAdFailedToLoad(this,AdRequest.ERROR_CODE_INTERNAL_ERROR);
  }
}
Program: 53341
Project: 53341
Buggy source:
@Override public void showInterstitial(){
  if (loadedAd != null) {
    final AppLovinSdk sdk=AppLovinSdk.getInstance(context);
    final AppLovinInterstitialAdDialog interstitialAd=AppLovinInterstitialAd.create(sdk,context);
    interstitialAd.setAdDisplayListener(this);
    interstitialAd.setAdClickListener(this);
    interstitialAd.setAdVideoPlaybackListener(this);
    interstitialAd.showAndRender(loadedAd);
  }
 else {
    log(ERROR,"String_Node_Str");
    listener.onInterstitialFailed(MoPubErrorCode.NETWORK_INVALID_STATE);
  }
}

Fixed version (ground truth):
@Override public void showInterstitial(){
  if (loadedAd != null) {
    final AppLovinSdk sdk=AppLovinSdk.getInstance(context);
    final AppLovinInterstitialAdDialog interstitialAd=createInterstitial(context,sdk);
    interstitialAd.setAdDisplayListener(this);
    interstitialAd.setAdClickListener(this);
    interstitialAd.setAdVideoPlaybackListener(this);
    interstitialAd.showAndRender(loadedAd);
  }
 else {
    log(ERROR,"String_Node_Str");
    listener.onInterstitialFailed(MoPubErrorCode.NETWORK_INVALID_STATE);
  }
}
Program: 53342
Project: 53342
Buggy source:
@Override public void destroy(){
}

Fixed version (ground truth):
@Override public void destroy(){
  adView.destroy();
}
Program: 53344
Project: 53344
Buggy source:
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON + "String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public Response<RuleInstance> create(Request request,@PathParam("String_Node_Str") String said){
  logger.info("String_Node_Str" + said + "String_Node_Str");
  Data<RuleInstance> data, response;
  try {
    RequestValidator.validateRequest(request);
    data=request.getMessage().getData();
    RuleInstance dto=data.getEntries().iterator().next();
    dto.setGuid(new URIImpl("String_Node_Str" + UUID.randomUUID()));
    Model ruleModel=dto.toRDF();
    Rule rule=new Rule(ruleModel,dto.getGuid(),false);
    ruleManager.add(rule);
    response=new Data<RuleInstance>(0,1,dto);
  }
 catch (  InfosphereException e) {
    return Response.badRequest(e.getMessage(),e);
  }
catch (  Exception e) {
    return Response.serverError(e.getMessage(),e);
  }
  return Response.ok(response);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @Consumes(MediaType.APPLICATION_JSON + "String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") public Response<RuleInstance> create(Request<RuleInstance> request,@PathParam("String_Node_Str") String said){
  logger.info("String_Node_Str" + said + "String_Node_Str");
  Data<RuleInstance> data, response;
  try {
    RequestValidator.validateRequest(request);
    data=request.getMessage().getData();
    RuleInstance dto=data.getEntries().iterator().next();
    dto.setGuid(new URIImpl("String_Node_Str" + UUID.randomUUID()));
    Model ruleModel=dto.toRDF();
    Rule rule=new Rule(ruleModel,dto.getGuid(),false);
    ruleManager.add(rule);
    response=new Data<RuleInstance>(0,1,dto);
  }
 catch (  InfosphereException e) {
    return Response.badRequest(e.getMessage(),e);
  }
catch (  Exception e) {
    return Response.serverError(e.getMessage(),e);
  }
  return Response.ok(response);
}
Program: 53345
Project: 53345
Buggy source:
private void registerToUserResolverService(User user,PersonContact profile,Tenant tenant) throws DimeException {
  ServiceProvider serviceProvider=ServiceProvider.findByName(DimeServiceAdapter.NAME);
  List<ServiceAccount> accounts=ServiceAccount.findAllByTenantAndServiceProvider(user.getTenant(),serviceProvider);
  DimeUserResolverServiceAdapter userResolver=null;
  try {
    userResolver=serviceGateway.getDimeUserResolverServiceAdapter();
    userResolver.setTenant(tenant);
    if (accounts.size() > 0) {
      ServiceAccount account=accounts.get(0);
      userResolver.setIdentifer(account.getName());
      userResolver.set(AttributeMap.PROFILE_ME,profile);
    }
 else {
      throw new DimeException("String_Node_Str" + "String_Node_Str" + user.getTenant());
    }
  }
 catch (  ServiceNotAvailableException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
catch (  AttributeNotSupportedException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
catch (  InvalidDataException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void registerToUserResolverService(User user,PersonContact profile,Tenant tenant) throws DimeException {
  ServiceProvider serviceProvider=ServiceProvider.findByName(DimeServiceAdapter.NAME);
  List<ServiceAccount> accounts=ServiceAccount.findAllByTenantAndServiceProvider(user.getTenant(),serviceProvider);
  DimeUserResolverServiceAdapter userResolver=null;
  try {
    userResolver=serviceGateway.getDimeUserResolverServiceAdapter();
    userResolver.setTenant(tenant);
    if (accounts.size() > 0) {
      ServiceAccount account=accounts.get(0);
      userResolver.setIdentifer("String_Node_Str" + account.getName().replace("String_Node_Str","String_Node_Str"));
      userResolver.set(AttributeMap.PROFILE_ME,profile);
    }
 else {
      throw new DimeException("String_Node_Str" + "String_Node_Str" + user.getTenant());
    }
  }
 catch (  ServiceNotAvailableException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
catch (  AttributeNotSupportedException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
catch (  InvalidDataException e) {
    throw new DimeException("String_Node_Str" + e.getMessage(),e);
  }
}
Program: 53346
Project: 53346
Buggy source:
private void removeFromUserResolver(String userId,Tenant tenant){
  DimeUserResolverServiceAdapter userResolver;
  try {
    userResolver=serviceGateway.getDimeUserResolverServiceAdapter();
    userResolver.setTenant(tenant);
    userResolver._delete(userId);
  }
 catch (  ServiceNotAvailableException e) {
    logger.error("String_Node_Str" + userId + "String_Node_Str",e);
  }
catch (  AttributeNotSupportedException e) {
    logger.error("String_Node_Str" + userId + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void removeFromUserResolver(String userId,Tenant tenant){
  DimeUserResolverServiceAdapter userResolver;
  try {
    userResolver=serviceGateway.getDimeUserResolverServiceAdapter();
    userResolver.setTenant(tenant);
    userResolver._delete("String_Node_Str" + userId.replace("String_Node_Str","String_Node_Str"));
  }
 catch (  ServiceNotAvailableException e) {
    logger.error("String_Node_Str" + userId + "String_Node_Str",e);
  }
catch (  AttributeNotSupportedException e) {
    logger.error("String_Node_Str" + userId + "String_Node_Str",e);
  }
}
Program: 53347
Project: 53347
Buggy source:
@Override public void storeOAuthCredentials(String providerName,String accountId,String token,String secret,Tenant tenant){
  ServiceProvider serviceProvider=ServiceProvider.findByName(providerName);
  if (serviceProvider != null) {
    ServiceAccount serviceAccount=entityFactory.buildServiceAccount();
    serviceAccount.setAccountURI(accountId);
    serviceAccount.setName(token);
    serviceAccount.setAccessToken(token);
    serviceAccount.setAccessSecret(secret);
    serviceAccount.setServiceProvider(serviceProvider);
    serviceAccount.setTenant(tenant);
    serviceAccount.merge();
    serviceAccount.flush();
  }
}

Fixed version (ground truth):
@Override public void storeOAuthCredentials(String providerName,String accountId,String token,String secret,Tenant tenant){
  ServiceProvider serviceProvider=ServiceProvider.findByName(providerName);
  if (serviceProvider != null) {
    ServiceAccount serviceAccount=entityFactory.buildServiceAccount();
    serviceAccount.setAccountURI(accountId);
    serviceAccount.setAccessToken(token);
    serviceAccount.setAccessSecret(secret);
    serviceAccount.setServiceProvider(serviceProvider);
    serviceAccount.setTenant(tenant);
    serviceAccount.merge();
    serviceAccount.flush();
  }
}
Program: 53348
Project: 53348
Buggy source:
/** 
 * Return DB
 * @param dbID
 * @return
 */
@GET @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") @Path("String_Node_Str") public Response<Resource> getMyDataboxById(@PathParam("String_Node_Str") String said,@PathParam("String_Node_Str") String dbID,@PathParam("String_Node_Str") String personId){
  Data<Resource> data=null;
  logger.info("String_Node_Str" + said + "String_Node_Str"+ personId+ "String_Node_Str"+ dbID);
  try {
    DataContainer databox=databoxManager.get(dbID);
    data=new Data<Resource>(0,1,1);
    Resource resource=new Resource(databox,null,RENAMING_RULES,databoxManager.getMe().asURI());
    writeIncludes(resource,databox);
    setUserId(resource);
    data.getEntries().add(resource);
  }
 catch (  InfosphereException e) {
    return Response.badRequest(e.getMessage(),e);
  }
catch (  Exception e) {
    return Response.serverError(e.getMessage(),e);
  }
  return Response.ok(data);
}

Fixed version (ground truth):
/** 
 * Return DB
 * @param dbID
 * @return
 */
@GET @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") @Path("String_Node_Str") public Response<Resource> getMyDataboxById(@PathParam("String_Node_Str") String said,@PathParam("String_Node_Str") String personId,@PathParam("String_Node_Str") String dbId){
  Data<Resource> data=null;
  logger.info("String_Node_Str" + said + "String_Node_Str"+ personId+ "String_Node_Str"+ dbId);
  try {
    DataContainer databox=databoxManager.get(dbId);
    data=new Data<Resource>(0,1,1);
    Resource resource=new Resource(databox,null,RENAMING_RULES,databoxManager.getMe().asURI());
    writeIncludes(resource,databox);
    setUserId(resource);
    data.getEntries().add(resource);
  }
 catch (  InfosphereException e) {
    return Response.badRequest(e.getMessage(),e);
  }
catch (  Exception e) {
    return Response.serverError(e.getMessage(),e);
  }
  return Response.ok(data);
}
Program: 53350
Project: 53350
Buggy source:
public void setConnectionProvider(ConnectionProvider conectionProvider){
  this.connectionProvider=conectionProvider;
}

Fixed version (ground truth):
public void setConnectionProvider(ConnectionProvider connectionProvider){
  this.connectionProvider=connectionProvider;
}
Program: 53352
Project: 53352
Buggy source:
@POST @Consumes(MediaType.APPLICATION_JSON + "String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") @Path("String_Node_Str") public Response getAdvisory(@PathParam("String_Node_Str") String said,Request<AdvisoryRequestEntry> request){
  Collection<AdvisoryRequestEntry> entries=request.getMessage().getData().getEntries();
  List<String> agentIDs=null, sharedThingIDs=null;
  String profileId="String_Node_Str";
  if (entries.iterator().hasNext()) {
    AdvisoryRequestEntry advisoryRequestEntry=(AdvisoryRequestEntry)entries.iterator().next();
    agentIDs=advisoryRequestEntry.agentGuids;
    sharedThingIDs=advisoryRequestEntry.shareableItems;
    profileId=advisoryRequestEntry.getProfileGuid();
  }
  Data<Warning> data=new Data<Warning>();
  int i=profileId.indexOf("String_Node_Str");
  while (i > 0) {
    profileId=profileId.substring(i);
    i=profileId.indexOf("String_Node_Str");
  }
  List<String> checkedThings=new ArrayList<String>();
  for (  String id : sharedThingIDs) {
    int index=id.indexOf("String_Node_Str");
    if (index == 0) {
      checkedThings.add(id);
    }
    while (index > 0) {
      id=id.substring(index);
      index=id.indexOf("String_Node_Str");
      checkedThings.add(id);
    }
  }
  try {
    Collection<Warning> warnings=advisoryController.getAdvisory(agentIDs,checkedThings,profileId);
    for (    Warning warning : warnings) {
      data.addEntry(warning);
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
  return Response.ok(data);
}

Fixed version (ground truth):
@POST @Consumes(MediaType.APPLICATION_JSON + "String_Node_Str") @Produces(MediaType.APPLICATION_JSON + "String_Node_Str") @Path("String_Node_Str") public Response getAdvisory(@PathParam("String_Node_Str") String said,Request<AdvisoryRequestEntry> request){
  Collection<AdvisoryRequestEntry> entries=request.getMessage().getData().getEntries();
  List<String> agentIDs=null, sharedThingIDs=null;
  String profileId="String_Node_Str";
  if (entries.iterator().hasNext()) {
    AdvisoryRequestEntry advisoryRequestEntry=(AdvisoryRequestEntry)entries.iterator().next();
    agentIDs=advisoryRequestEntry.agentGuids;
    sharedThingIDs=advisoryRequestEntry.shareableItems;
    profileId=advisoryRequestEntry.getProfileGuid();
  }
  Data<Warning> data=new Data<Warning>();
  int i=profileId.indexOf("String_Node_Str");
  while (i > 0) {
    profileId=profileId.substring(i);
    i=profileId.indexOf("String_Node_Str");
  }
  List<String> checkedThings=new ArrayList<String>();
  for (  String id : sharedThingIDs) {
    int index=id.indexOf("String_Node_Str");
    if (index == 0) {
      checkedThings.add(id);
    }
    while (index > 0) {
      id=id.substring(index);
      index=id.indexOf("String_Node_Str");
      checkedThings.add(id);
    }
  }
  try {
    Collection<Warning> warnings=advisoryController.getAdvisory(agentIDs,checkedThings,profileId);
    for (    Warning warning : warnings) {
      data.addEntry(warning);
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return Response.serverError(e.getMessage(),e);
  }
  return Response.ok(data);
}
Program: 53353
Project: 53353
Buggy source:
public Collection<Warning> getAdvisory(List<String> agentIDs,List<String> sharedThingIDs,String profile) throws NotFoundException, InfosphereException {
  Collection<Warning> warnings=new ArrayList<Warning>();
  List<String> persons;
  try {
    persons=this.getPersonList(agentIDs);
    warnings.addAll(getTrustWarnings(persons,sharedThingIDs));
    warnings.addAll(getGroupWarnings(agentIDs,sharedThingIDs));
    warnings.addAll(getProfileWarnings(persons,profile));
    warnings.addAll(getResourceWarnings(sharedThingIDs));
    warnings.addAll(getReceiverWarnings(persons,sharedThingIDs));
  }
 catch (  RepositoryException e) {
    logger.error("String_Node_Str",e);
  }
catch (  ClassCastException e) {
    logger.error("String_Node_Str",e);
  }
  return warnings;
}

Fixed version (ground truth):
public Collection<Warning> getAdvisory(List<String> agentIDs,List<String> sharedThingIDs,String profile) throws NotFoundException, InfosphereException {
  Collection<Warning> warnings=new ArrayList<Warning>();
  List<String> persons;
  try {
    persons=this.getPersonList(agentIDs);
    warnings.addAll(getTrustWarnings(persons,sharedThingIDs));
    warnings.addAll(getGroupWarnings(agentIDs,sharedThingIDs));
    warnings.addAll(getProfileWarnings(persons,profile));
    warnings.addAll(getResourceWarnings(sharedThingIDs));
    warnings.addAll(getReceiverWarnings(persons,sharedThingIDs));
  }
 catch (  RepositoryException e) {
    logger.error("String_Node_Str",e);
    throw new InfosphereException(e.getMessage(),e);
  }
catch (  ClassCastException e) {
    logger.error("String_Node_Str",e);
    throw new InfosphereException(e.getMessage(),e);
  }
  return warnings;
}
Program: 53354
Project: 53354
Buggy source:
public String resolveSaid(String said) throws NamingException {
  return DnsResolver.resolve(dimeDns,said + "String_Node_Str");
}

Fixed version (ground truth):
public String resolveSaid(String said) throws NamingException {
  try {
    return DnsResolver.resolve(dimeDns,said + "String_Node_Str");
  }
 catch (  NamingException ex) {
    throw new NamingException("String_Node_Str" + said + "String_Node_Str"+ dimeDns+ "String_Node_Str"+ ex.getExplanation());
  }
}
Program: 53355
Project: 53355
Buggy source:
/** 
 * Inquires a USB serial driver and returns if any driver is detected.
 * @param deviceName null for wildcard
 * @return true if a USB serial driver is found and is ready.
 */
protected boolean inquireUsbSerialDriver(String deviceName,int baudRate){
  if (this.usbSerialDriver != null) {
    return true;
  }
  UsbSerialDriver usbSerialDriver=findUsbSerialDriver(deviceName);
  try {
    stopSerialInputOutputManager();
    if (usbSerialDriver != null) {
      this.usbDeviceConnection=this.usbManager.openDevice(usbSerialDriver.getDevice());
      final UsbSerialPort port=usbSerialDriver.getPorts().get(0);
      port.open(this.usbDeviceConnection);
      port.setParameters(baudRate,8,UsbSerialPort.STOPBITS_1,UsbSerialPort.PARITY_NONE);
    }
  }
 catch (  IOException exception) {
    usbSerialDriver=null;
  }
 finally {
    this.usbSerialDriver=usbSerialDriver.getPorts().get(0);
    startSerialInputOutputManager();
  }
  return usbSerialDriver != null;
}

Fixed version (ground truth):
/** 
 * Inquires a USB serial driver and returns if any driver is detected.
 * @param deviceName null for wildcard
 * @return true if a USB serial driver is found and is ready.
 */
protected boolean inquireUsbSerialDriver(String deviceName,int baudRate){
  if (this.usbSerialDriver != null) {
    return true;
  }
  UsbSerialDriver usbSerialDriver=findUsbSerialDriver(deviceName);
  try {
    stopSerialInputOutputManager();
    if (usbSerialDriver != null) {
      this.usbDeviceConnection=this.usbManager.openDevice(usbSerialDriver.getDevice());
      final UsbSerialPort port=usbSerialDriver.getPorts().get(0);
      port.open(this.usbDeviceConnection);
      port.setParameters(baudRate,8,UsbSerialPort.STOPBITS_1,UsbSerialPort.PARITY_NONE);
    }
  }
 catch (  IOException exception) {
    usbSerialDriver=null;
  }
 finally {
    if (usbSerialDriver != null) {
      this.usbSerialDriver=usbSerialDriver.getPorts().get(0);
    }
    startSerialInputOutputManager();
  }
  return usbSerialDriver != null;
}
Program: 53356
Project: 53356
Buggy source:
/** 
 * Continuously services the read and write buffers until   {@link #stop()} iscalled, or until a driver exception is raised. NOTE(mikey): Uses inefficient read/write-with-timeout. TODO(mikey): Read asynchronously with  {@link UsbRequest#queue(ByteBuffer,int)}
 */
public void run(){
synchronized (this) {
    if (getState() != State.STOPPED) {
      throw new IllegalStateException("String_Node_Str");
    }
    mState=State.RUNNING;
  }
  Log.i(TAG,"String_Node_Str");
  try {
    while (true) {
      if (getState() != State.RUNNING) {
        Log.i(TAG,"String_Node_Str" + getState());
        break;
      }
      step();
    }
  }
 catch (  Exception e) {
    Log.w(TAG,"String_Node_Str" + e.getMessage(),e);
    final Listener listener=getListener();
    if (listener != null) {
      listener.onRunError(e);
    }
  }
 finally {
synchronized (this) {
      mState=State.STOPPED;
      Log.i(TAG,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Continuously services the read and write buffers until   {@link #stop()} iscalled, or until a driver exception is raised. NOTE(mikey): Uses inefficient read/write-with-timeout. TODO(mikey): Read asynchronously with  {@link UsbRequest#queue(ByteBuffer,int)}
 */
public void run(){
synchronized (this) {
    if (getState() != State.STOPPED) {
      throw new IllegalStateException("String_Node_Str");
    }
    mState=State.RUNNING;
  }
  Log.i(TAG,"String_Node_Str");
  while (true) {
    try {
      if (getState() != State.RUNNING) {
        Log.i(TAG,"String_Node_Str" + getState());
        break;
      }
      step();
    }
 catch (    Exception e) {
      Log.w(TAG,"String_Node_Str" + e.getMessage(),e);
      final Listener listener=getListener();
      if (listener != null) {
        if (listener.onRunError(e) == false) {
          continue;
        }
      }
      break;
    }
  }
synchronized (this) {
    mState=State.STOPPED;
    Log.i(TAG,"String_Node_Str");
  }
}
Program: 53357
Project: 53357
Buggy source:
/** 
 * Called when   {@link SerialInputOutputManager#run()} aborts due to anerror.
 */
public void onRunError(Exception e);

Fixed version (ground truth):
/** 
 * Called when   {@link SerialInputOutputManager#run()} aborts due to anerror.
 * @return true if transition to stop state
 */
public boolean onRunError(Exception e);
Program: 53358
Project: 53358
Buggy source:
/** 
 * {@inheritDoc}
 * @see SerialInputOutputManager.Listener#onRunError(java.lang.Exception)
 */
public void onRunError(Exception e){
  LOGGER.warn("String_Node_Str",e);
  doStop();
  try {
    Thread.sleep(Config.getWaitOnException());
  }
 catch (  InterruptedException ignored) {
  }
  doStart(getPortIdentifier(),getBaudrate(),getParity(),getDataBits(),getStopBits());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see SerialInputOutputManager.Listener#onRunError(java.lang.Exception)
 */
public boolean onRunError(Exception e){
  if (e instanceof IOException) {
    final String message=e.getMessage();
    if (message != null && (message.indexOf("String_Node_Str") >= 0 || message.indexOf("String_Node_Str") >= 0)) {
      LOGGER.warn("String_Node_Str",message);
      try {
        Thread.sleep(10);
      }
 catch (      InterruptedException ignored) {
      }
      return false;
    }
  }
  LOGGER.warn("String_Node_Str",e);
  doStop();
  try {
    Thread.sleep(Config.getWaitOnException());
  }
 catch (  InterruptedException ignored) {
  }
  doStart(getPortIdentifier(),getBaudrate(),getParity(),getDataBits(),getStopBits());
  return true;
}
Program: 53359
Project: 53359
Buggy source:
/** 
 * @param deviceName
 * @return
 */
protected UsbSerialDriver findUsbSerialDriver(String deviceName){
  if (deviceName == null || deviceName.length() == 0) {
    return UsbSerialProber.acquire(usbManager);
  }
  for (  final UsbSerialProber prober : UsbSerialProber.values()) {
    for (    final UsbDevice usbDevice : usbManager.getDeviceList().values()) {
      final UsbSerialDriver driver=prober.getDevice(usbManager,usbDevice);
      if (driver != null && deviceName.equals(driver.getDevice().getDeviceName())) {
        return driver;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param deviceName
 * @return
 */
protected UsbSerialDriver findUsbSerialDriver(String deviceName){
  if (deviceName == null || deviceName.length() == 0) {
    return UsbSerialProber.acquire(usbManager);
  }
  for (  final UsbSerialProber prober : UsbSerialProber.values()) {
    for (    final UsbDevice usbDevice : usbManager.getDeviceList().values()) {
      final UsbSerialDriver driver=getDevice(prober,usbDevice);
      if (driver != null && deviceName.equals(driver.getDevice().getDeviceName())) {
        return driver;
      }
    }
  }
  return null;
}
Program: 53360
Project: 53360
Buggy source:
/** 
 * {@inheritDoc}
 * @see com.yourinventit.processing.android.serial.SerialCommunicator#list()
 */
@Override public String[] list(){
  final List<String> names=new ArrayList<String>();
  for (  final UsbSerialProber prober : UsbSerialProber.values()) {
    for (    final UsbDevice usbDevice : usbManager.getDeviceList().values()) {
      final UsbSerialDriver driver=prober.getDevice(usbManager,usbDevice);
      if (driver != null) {
        names.add(driver.getDevice().getDeviceName());
      }
    }
  }
  return names.toArray(new String[names.size()]);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 * @see com.yourinventit.processing.android.serial.SerialCommunicator#list()
 */
@Override public String[] list(){
  final List<String> names=new ArrayList<String>();
  for (  final UsbSerialProber prober : UsbSerialProber.values()) {
    for (    final UsbDevice usbDevice : usbManager.getDeviceList().values()) {
      final UsbSerialDriver driver=getDevice(prober,usbDevice);
      if (driver != null) {
        names.add(driver.getDevice().getDeviceName());
      }
    }
  }
  return names.toArray(new String[names.size()]);
}
Program: 53361
Project: 53361
Buggy source:
public void getInterestingnessList(AsyncHttpResponseHandler handler){
  String apiUrl=getApiUrl("String_Node_Str");
  Log.d("String_Node_Str","String_Node_Str" + apiUrl);
  client.get(apiUrl,null,handler);
}

Fixed version (ground truth):
public void getInterestingnessList(AsyncHttpResponseHandler handler){
}
Program: 53363
Project: 53363
Buggy source:
/** 
 * Generates the token to cluster map from Brown cluster input file. NOTE: we only add those tokens with frequency larger than 5.
 * @param in the inputstream
 * @throws IOException the io exception
 */
public BrownCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=tabPattern.split(line);
    if (lineArray.length == 3) {
      int freq=Integer.parseInt(lineArray[2]);
      if (freq > 5) {
        tokenToClusterMap.put(lineArray[1],lineArray[0]);
      }
    }
 else     if (lineArray.length == 2) {
      tokenToClusterMap.put(lineArray[0],lineArray[1]);
    }
  }
}

Fixed version (ground truth):
/** 
 * Generates the token to cluster map from Brown cluster input file. NOTE: we only add those tokens with frequency larger than 5.
 * @param in the inputstream
 * @throws IOException the io exception
 */
public BrownCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=tabPattern.split(line);
    if (lineArray.length == 3) {
      int freq=Integer.parseInt(lineArray[2]);
      if (freq > 5) {
        String normalizedToken=ClarkCluster.dotInsideI.matcher(lineArray[1]).replaceAll("String_Node_Str");
        tokenToClusterMap.put(normalizedToken,lineArray[0]);
      }
    }
 else     if (lineArray.length == 2) {
      String normalizedToken=ClarkCluster.dotInsideI.matcher(lineArray[0]).replaceAll("String_Node_Str");
      tokenToClusterMap.put(normalizedToken,lineArray[1]);
    }
  }
}
Program: 53364
Project: 53364
Buggy source:
public ClarkCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=spacePattern.split(line);
    if (lineArray.length == 3) {
      tokenToClusterMap.put(lineArray[0].toLowerCase(),lineArray[1]);
    }
 else     if (lineArray.length == 2) {
      tokenToClusterMap.put(lineArray[0].toLowerCase(),lineArray[1]);
    }
  }
}

Fixed version (ground truth):
public ClarkCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=spacePattern.split(line);
    if (lineArray.length == 3) {
      String normalizedToken=dotInsideI.matcher(lineArray[0]).replaceAll("String_Node_Str");
      tokenToClusterMap.put(normalizedToken.toLowerCase(),lineArray[1]);
    }
 else     if (lineArray.length == 2) {
      String normalizedToken=dotInsideI.matcher(lineArray[0]).replaceAll("String_Node_Str");
      tokenToClusterMap.put(normalizedToken.toLowerCase(),lineArray[1]);
    }
  }
}
Program: 53365
Project: 53365
Buggy source:
public Word2VecCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=spacePattern.split(line);
    if (lineArray.length == 2) {
      tokenToClusterMap.put(lineArray[0].toLowerCase(),lineArray[1]);
    }
  }
}

Fixed version (ground truth):
public Word2VecCluster(InputStream in) throws IOException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(in,Charset.forName("String_Node_Str")));
  String line;
  while ((line=breader.readLine()) != null) {
    String[] lineArray=spacePattern.split(line);
    if (lineArray.length == 2) {
      String normalizedToken=ClarkCluster.dotInsideI.matcher(lineArray[0]).replaceAll("String_Node_Str");
      tokenToClusterMap.put(normalizedToken.toLowerCase(),lineArray[1]);
    }
  }
}
Program: 53366
Project: 53366
Buggy source:
/** 
 * Check if mfs features are active.
 * @param params the parameters
 * @return whether the mfs features are activated or not
 */
public static boolean isMFSFeatures(TrainingParameters params){
  String mfsFeatures=getSuperSenseFeatures(params);
  return !mfsFeatures.equalsIgnoreCase(Flags.DEFAULT_FEATURE_FLAG);
}

Fixed version (ground truth):
/** 
 * Check if mfs features are active.
 * @param params the parameters
 * @return whether the mfs features are activated or not
 */
public static boolean isMFSFeatures(TrainingParameters params){
  String mfsFeatures=getMFSFeatures(params);
  return !mfsFeatures.equalsIgnoreCase(Flags.DEFAULT_FEATURE_FLAG);
}
Program: 53367
Project: 53367
Buggy source:
@Override public void init(Map<String,String> properties,FeatureGeneratorResourceProvider resourceProvider) throws InvalidFormatException {
  Object posResource=resourceProvider.getResource(properties.get("String_Node_Str"));
  if (!(posResource instanceof POSModelResource)) {
    throw new InvalidFormatException("String_Node_Str" + properties.get("String_Node_Str"));
  }
  this.posModelResource=(POSModelResource)posResource;
  Object lemmaResource=resourceProvider.getResource(properties.get("String_Node_Str"));
  if (!(lemmaResource instanceof LemmaResource)) {
    throw new InvalidFormatException("String_Node_Str" + properties.get("String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void init(Map<String,String> properties,FeatureGeneratorResourceProvider resourceProvider) throws InvalidFormatException {
  Object posResource=resourceProvider.getResource(properties.get("String_Node_Str"));
  if (!(posResource instanceof POSModelResource)) {
    throw new InvalidFormatException("String_Node_Str" + properties.get("String_Node_Str"));
  }
  this.posModelResource=(POSModelResource)posResource;
  Object lemmaResource=resourceProvider.getResource(properties.get("String_Node_Str"));
  if (!(lemmaResource instanceof LemmaResource)) {
    throw new InvalidFormatException("String_Node_Str" + properties.get("String_Node_Str"));
  }
  this.lemmaDictResource=(LemmaResource)lemmaResource;
}
Program: 53368
Project: 53368
Buggy source:
public void createFeatures(List<String> features,String[] tokens,int index,String[] previousOutcomes){
  if (currentSentence != tokens) {
    currentSentence=tokens;
    currentTags=posModelResource.posTag(tokens);
  }
  String posTag=currentTags[index];
  String lemma=lemmaResource.lookUpLemma(tokens[index],posTag);
  features.add("String_Node_Str" + lemma);
}

Fixed version (ground truth):
public void createFeatures(List<String> features,String[] tokens,int index,String[] previousOutcomes){
  if (currentSentence != tokens) {
    currentSentence=tokens;
    currentTags=posModelResource.posTag(tokens);
  }
  String posTag=currentTags[index];
  String lemma=lemmaDictResource.lookUpLemma(tokens[index],posTag);
  features.add("String_Node_Str" + lemma);
}
Program: 53370
Project: 53370
Buggy source:
public void serialize(OutputStream out) throws IOException {
  Writer writer=new BufferedWriter(new OutputStreamWriter(out));
  for (  Map.Entry<List<String>,String> entry : dictMap.entrySet()) {
    writer.write(entry.getKey().get(0) + "String_Node_Str" + entry.getKey().get(1)+ "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
  }
  writer.flush();
}

Fixed version (ground truth):
public void serialize(OutputStream out) throws IOException {
  Writer writer=new BufferedWriter(new OutputStreamWriter(out));
  for (  Map.Entry<List<String>,String> entry : dictMap.entrySet()) {
    writer.write(entry.getKey().get(0) + "String_Node_Str" + entry.getValue()+ "String_Node_Str"+ entry.getKey().get(1)+ "String_Node_Str");
  }
  writer.flush();
}
Program: 53371
Project: 53371
Buggy source:
public void createFeatures(List<String> features,String[] tokens,int index,String[] preds){
  String normalizedToken=normalize(tokens[index]);
  features.add("String_Node_Str" + normalizedToken);
  if (Character.isLowerCase(tokens[index].codePointAt(0))) {
    features.add("String_Node_Str" + "String_Node_Str");
  }
 else   if (Character.isUpperCase(tokens[index].codePointAt(0))) {
    if (index > 0 && (tokens[index - 1].equalsIgnoreCase("String_Node_Str") || tokens[index - 1].equalsIgnoreCase("String_Node_Str") || tokens[index - 1].equalsIgnoreCase("String_Node_Str"))) {
      features.add("String_Node_Str" + "String_Node_Str");
    }
 else     if (index == 0) {
      features.add("String_Node_Str" + "String_Node_Str");
    }
 else {
      features.add("String_Node_Str" + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void createFeatures(List<String> features,String[] tokens,int index,String[] preds){
  String normalizedToken=normalize(tokens[index]);
  features.add("String_Node_Str" + normalizedToken);
  if (Character.isLowerCase(tokens[index].charAt(0))) {
    features.add("String_Node_Str" + "String_Node_Str");
  }
 else   if (Character.isUpperCase(tokens[index].charAt(0))) {
    if (index > 0 && (tokens[index - 1].equalsIgnoreCase("String_Node_Str") || tokens[index - 1].equalsIgnoreCase("String_Node_Str") || tokens[index - 1].equalsIgnoreCase("String_Node_Str"))) {
      features.add("String_Node_Str" + "String_Node_Str");
    }
 else     if (index == 0) {
      features.add("String_Node_Str" + "String_Node_Str");
    }
 else {
      features.add("String_Node_Str" + "String_Node_Str");
    }
  }
}
Program: 53372
Project: 53372
Buggy source:
/** 
 * Normalize upper case, lower case, digits and duplicate characters.
 * @param token the token to be normalized
 * @return the normalized token
 */
public static String normalize(String token){
  String normalizedToken=token.replaceAll("String_Node_Str","String_Node_Str");
  normalizedToken=token.replaceAll("String_Node_Str","String_Node_Str");
  normalizedToken=token.replaceAll("String_Node_Str","String_Node_Str");
  normalizedToken=replaceDuplicateCharacters(normalizedToken);
  return normalizedToken;
}

Fixed version (ground truth):
/** 
 * Normalize upper case, lower case, digits and duplicate characters.
 * @param token the token to be normalized
 * @return the normalized token
 */
public static String normalize(String token){
  Matcher duplicateMatcher=duplicateCharacters.matcher(token);
  String normalizedToken=duplicateMatcher.replaceAll("String_Node_Str");
  normalizedToken=normalizedToken.replaceAll("String_Node_Str","String_Node_Str");
  normalizedToken=normalizedToken.replaceAll("String_Node_Str","String_Node_Str");
  normalizedToken=normalizedToken.replaceAll("String_Node_Str","String_Node_Str");
  return normalizedToken;
}
Program: 53374
Project: 53374
Buggy source:
/** 
 * Create the available parameters for NER tagging.
 */
private void loadAnnotateParameters(){
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(true).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_OUTPUT_FORMAT).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str").choices("String_Node_Str").setDefault(Flags.DEFAULT_LEXER).required(false).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str").setDefault(Flags.DEFAULT_DICT_OPTION).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_DICT_OPTION).help("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  annotateParser.addArgument("String_Node_Str").required(false).setDefault(Flags.DEFAULT_DICT_PATH).help("String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create the available parameters for NER tagging.
 */
private void loadAnnotateParameters(){
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(true).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_OUTPUT_FORMAT).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str").choices("String_Node_Str").setDefault(Flags.DEFAULT_LEXER).required(false).help("String_Node_Str");
  annotateParser.addArgument("String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_DICT_OPTION).help("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  annotateParser.addArgument("String_Node_Str").required(false).setDefault(Flags.DEFAULT_DICT_PATH).help("String_Node_Str" + "String_Node_Str");
}
Program: 53375
Project: 53375
Buggy source:
/** 
 * Create the parameters available for evaluation.
 */
private void loadEvalParameters(){
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(true).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(false).setDefault(Flags.DEFAULT_EVALUATE_MODEL).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(true).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_EVAL_FORMAT).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str").required(false).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  evalParser.addArgument("String_Node_Str").required(false).setDefault(Flags.DEFAULT_NE_TYPES).help("String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create the parameters available for evaluation.
 */
private void loadEvalParameters(){
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(true).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(false).setDefault(Flags.DEFAULT_EVALUATE_MODEL).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(true).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str","String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str").setDefault(Flags.DEFAULT_EVAL_FORMAT).help("String_Node_Str");
  evalParser.addArgument("String_Node_Str").required(false).choices("String_Node_Str","String_Node_Str","String_Node_Str").help("String_Node_Str");
  evalParser.addArgument("String_Node_Str").required(false).setDefault(Flags.DEFAULT_NE_TYPES).help("String_Node_Str" + "String_Node_Str");
}
Program: 53377
Project: 53377
Buggy source:
/** 
 * Main evaluation entry point.
 * @throws IOException throws exception if test set not available
 */
public final void eval() throws IOException {
  String lang=parsedArguments.getString("String_Node_Str");
  String model=parsedArguments.getString("String_Node_Str");
  String testset=parsedArguments.getString("String_Node_Str");
  String corpusFormat=parsedArguments.getString("String_Node_Str");
  String netypes=parsedArguments.getString("String_Node_Str");
  Properties props=setEvalProperties(lang,model,testset,corpusFormat,netypes);
  if (parsedArguments.getString("String_Node_Str") == null) {
    Evaluate evaluator=new Evaluate(props);
    if (parsedArguments.getString("String_Node_Str") != null) {
      if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
        evaluator.evaluate();
      }
 else       if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
        evaluator.evalError();
      }
 else       if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
        evaluator.detailEvaluate();
      }
    }
 else {
      evaluator.detailEvaluate();
    }
  }
 else   if (parsedArguments.getString("String_Node_Str") != null) {
    String predFile=parsedArguments.getString("String_Node_Str");
    CorpusEvaluate corpusEvaluator=new CorpusEvaluate(predFile,props);
    corpusEvaluator.evaluate();
  }
 else {
    System.err.println("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Main evaluation entry point.
 * @throws IOException throws exception if test set not available
 */
public final void eval() throws IOException {
  String lang=parsedArguments.getString("String_Node_Str");
  String model=parsedArguments.getString("String_Node_Str");
  String testset=parsedArguments.getString("String_Node_Str");
  String corpusFormat=parsedArguments.getString("String_Node_Str");
  String netypes=parsedArguments.getString("String_Node_Str");
  Properties props=setEvalProperties(lang,model,testset,corpusFormat,netypes);
  Evaluate evaluator=new Evaluate(props);
  if (parsedArguments.getString("String_Node_Str") != null) {
    if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
      evaluator.evaluate();
    }
 else     if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
      evaluator.evalError();
    }
 else     if (parsedArguments.getString("String_Node_Str").equalsIgnoreCase("String_Node_Str")) {
      evaluator.detailEvaluate();
    }
  }
 else {
    evaluator.detailEvaluate();
  }
}
Program: 53378
Project: 53378
Buggy source:
/** 
 * Set a Properties object with the CLI parameters for annotation.
 * @param model the model parameter
 * @param language language parameter
 * @param lexer rule based parameter
 * @param dictTag directly tag from a dictionary
 * @param dictPath directory to the dictionaries
 * @return the properties object
 */
private Properties setAnnotateProperties(String model,String language,String lexer,String oepc,String dictTag,String dictPath){
  Properties annotateProperties=new Properties();
  annotateProperties.setProperty("String_Node_Str",model);
  annotateProperties.setProperty("String_Node_Str",language);
  annotateProperties.setProperty("String_Node_Str",lexer);
  annotateProperties.setProperty("String_Node_Str",oepc);
  annotateProperties.setProperty("String_Node_Str",dictTag);
  annotateProperties.setProperty("String_Node_Str",dictPath);
  return annotateProperties;
}

Fixed version (ground truth):
/** 
 * Set a Properties object with the CLI parameters for annotation.
 * @param model the model parameter
 * @param language language parameter
 * @param lexer rule based parameter
 * @param dictTag directly tag from a dictionary
 * @param dictPath directory to the dictionaries
 * @return the properties object
 */
private Properties setAnnotateProperties(String model,String language,String lexer,String dictTag,String dictPath){
  Properties annotateProperties=new Properties();
  annotateProperties.setProperty("String_Node_Str",model);
  annotateProperties.setProperty("String_Node_Str",language);
  annotateProperties.setProperty("String_Node_Str",lexer);
  annotateProperties.setProperty("String_Node_Str",dictTag);
  annotateProperties.setProperty("String_Node_Str",dictPath);
  return annotateProperties;
}
Program: 53380
Project: 53380
Buggy source:
/** 
 * Convert Entity class annotation to CoNLL formats.
 * @param neType named entity class
 * @return the converted string
 */
public String convertToConLLTypes(String neType){
  String conllType=null;
  if (neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")) {
    conllType=neType.substring(0,3);
  }
 else   if (neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")) {
    conllType=neType;
  }
  return conllType;
}

Fixed version (ground truth):
/** 
 * Convert Entity class annotation to CoNLL formats.
 * @param neType named entity class
 * @return the converted string
 */
public String convertToConLLTypes(String neType){
  String conllType=null;
  if (neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str")|| neType.length() == 3) {
    conllType=neType.substring(0,3);
  }
 else   if (neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str") || neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")|| neType.equalsIgnoreCase("String_Node_Str")) {
    conllType=neType;
  }
  return conllType;
}