nus-yam/ex-repair huggingface dataset:
Program: 9291
Project: 9291
Buggy source:
private String getPasswordFromHeader(ServerContext context){
  return RestUtils.getCookieFromServerContext(context);
}

Fixed version (ground truth):
private String getPasswordFromHeader(ServerContext context){
  List<String> headerList=null;
  String oldUserPasswordHeaderName="String_Node_Str";
  HttpContext header=null;
  try {
    header=context.asContext(HttpContext.class);
    if (header == null) {
      RestDispatcher.debug.error("String_Node_Str" + "String_Node_Str");
      return null;
    }
    headerList=header.getHeaders().get(oldUserPasswordHeaderName.toLowerCase());
    if (headerList != null && !headerList.isEmpty()) {
      for (      String s : headerList) {
        return (s != null && !s.isEmpty()) ? s : null;
      }
    }
  }
 catch (  Exception e) {
    RestDispatcher.debug.error("String_Node_Str" + "String_Node_Str" + e);
  }
  return null;
}
Program: 9293
Project: 9293
Buggy source:
/** 
 * Update an existing Token in the store. If the Token does not exist in the store then a Token is created. If the Token did exist in the store then it is updated. Not all fields on the Token can be updated, see the Token class for more details.
 * @see Token
 * @param token Non null Token to update.
 * @throws CoreTokenException If there was a non-recoverable error during the operation.
 */
public void update(Token token) throws CoreTokenException {
  try {
    strategy.perfom(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  getAdapter().update(token);
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",token.getTokenId()));
  }
}

Fixed version (ground truth):
/** 
 * Update an existing Token in the store. If the Token does not exist in the store then a Token is created. If the Token did exist in the store then it is updated. Not all fields on the Token can be updated, see the Token class for more details.
 * @see Token
 * @param token Non null Token to update.
 * @throws CoreTokenException If there was a non-recoverable error during the operation.
 */
public void update(Token token) throws CoreTokenException {
  try {
    strategy.perfom(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  adapter.updateOrCreate(token);
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",token.getTokenId()));
  }
}
Program: 9294
Project: 9294
Buggy source:
/** 
 * Delete a collection of Tokens from the Token Store using a filter to narrow down the Tokens to be deleted. Note: This operation is linear in its execution time so the more Tokens being deleted, the longer it will take.
 * @param query Non null filters which will be combined logically using AND.
 * @return total number of tokens deleted by query.
 * @throws DeleteFailedException If the delete failed for any reason.
 */
public int delete(Map<CoreTokenField,Object> query) throws DeleteFailedException {
  QueryFilter.QueryFilterBuilder queryFilter=getAdapter().buildFilter().and();
  for (  Map.Entry<CoreTokenField,Object> entry : query.entrySet()) {
    CoreTokenField key=entry.getKey();
    Object value=entry.getValue();
    queryFilter=queryFilter.attribute(key,value);
  }
  QueryBuilder builder=getAdapter().query().withFilter(queryFilter.build()).returnTheseAttributes(CoreTokenField.TOKEN_ID);
  Collection<Entry> entries;
  try {
    entries=builder.executeRawResults();
    for (    Entry entry : entries) {
      Attribute attribute=entry.getAttribute(CoreTokenField.TOKEN_ID.toString());
      String tokenId=attribute.firstValueAsString();
      getAdapter().delete(tokenId);
    }
    if (DEBUG.messageEnabled()) {
      DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",entries.size()));
    }
  }
 catch (  CoreTokenException e) {
    throw new DeleteFailedException(builder,e);
  }
  return entries.size();
}

Fixed version (ground truth):
/** 
 * Delete a collection of Tokens from the Token Store using a filter to narrow down the Tokens to be deleted. Note: This operation is linear in its execution time so the more Tokens being deleted, the longer it will take.
 * @param query Non null filters which will be combined logically using AND.
 * @return total number of tokens deleted by query.
 * @throws DeleteFailedException If the delete failed for any reason.
 */
public int delete(Map<CoreTokenField,Object> query) throws DeleteFailedException {
  QueryFilter.QueryFilterBuilder queryFilter=adapter.buildFilter().and();
  for (  Map.Entry<CoreTokenField,Object> entry : query.entrySet()) {
    CoreTokenField key=entry.getKey();
    Object value=entry.getValue();
    queryFilter=queryFilter.attribute(key,value);
  }
  QueryBuilder builder=adapter.query().withFilter(queryFilter.build()).returnTheseAttributes(CoreTokenField.TOKEN_ID);
  Collection<Entry> entries;
  try {
    entries=builder.executeRawResults();
    for (    Entry entry : entries) {
      Attribute attribute=entry.getAttribute(CoreTokenField.TOKEN_ID.toString());
      String tokenId=attribute.firstValueAsString();
      adapter.delete(tokenId);
    }
    if (DEBUG.messageEnabled()) {
      DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",entries.size()));
    }
  }
 catch (  CoreTokenException e) {
    throw new DeleteFailedException(builder,e);
  }
  return entries.size();
}
Program: 9295
Project: 9295
Buggy source:
/** 
 * Private restricted to preserve Singleton Instantiation.
 */
@Inject public CTSPersistentStore(CoreTokenConfig coreTokenConfig,LDAPDataConversion dataConversion,DataLayerConnectionFactory connectionFactory,TokenBlobStrategy strategy){
  this.coreTokenConfig=coreTokenConfig;
  this.dataConversion=dataConversion;
  this.strategy=strategy;
  this.connectionFactory=connectionFactory;
  this.DEBUG=SessionService.sessionDebug;
}

Fixed version (ground truth):
/** 
 * Private restricted to preserve Singleton Instantiation.
 */
@Inject public CTSPersistentStore(CoreTokenConfig coreTokenConfig,LDAPDataConversion dataConversion,TokenBlobStrategy strategy,CoreTokenAdapter adapter){
  this.coreTokenConfig=coreTokenConfig;
  this.dataConversion=dataConversion;
  this.strategy=strategy;
  this.adapter=adapter;
  this.DEBUG=SessionService.sessionDebug;
}
Program: 9296
Project: 9296
Buggy source:
/** 
 * Create a Token in the persistent store. If the Token already exists in the store then this function will throw a CoreTokenException. Instead it is recommended to use the update function.
 * @see CTSPersistentStore#update(com.sun.identity.sm.ldap.api.tokens.Token)
 * @param token Non null Token to create.
 * @throws CoreTokenException If there was a non-recoverable error during the operation or ifthe Token already exists in the store.
 */
public void create(Token token) throws CoreTokenException {
  try {
    strategy.perfom(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  getAdapter().create(token);
}

Fixed version (ground truth):
/** 
 * Create a Token in the persistent store. If the Token already exists in the store then this function will throw a CoreTokenException. Instead it is recommended to use the update function.
 * @see CTSPersistentStore#update(com.sun.identity.sm.ldap.api.tokens.Token)
 * @param token Non null Token to create.
 * @throws CoreTokenException If there was a non-recoverable error during the operation or ifthe Token already exists in the store.
 */
public void create(Token token) throws CoreTokenException {
  try {
    strategy.perfom(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  adapter.create(token);
}
Program: 9297
Project: 9297
Buggy source:
/** 
 * Read a Token from the persistent store.
 * @param tokenId The non null Token Id that the Token was created with.
 * @return Null if there was no matching Token. Otherwise a fully populated Token will be returned.
 * @throws CoreTokenException If there was a non-recoverable error during the operation.
 */
public Token read(String tokenId) throws CoreTokenException {
  Token token=getAdapter().read(tokenId);
  try {
    strategy.reverse(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  return token;
}

Fixed version (ground truth):
/** 
 * Read a Token from the persistent store.
 * @param tokenId The non null Token Id that the Token was created with.
 * @return Null if there was no matching Token. Otherwise a fully populated Token will be returned.
 * @throws CoreTokenException If there was a non-recoverable error during the operation.
 */
public Token read(String tokenId) throws CoreTokenException {
  Token token=adapter.read(tokenId);
  try {
    strategy.reverse(token);
  }
 catch (  TokenStrategyFailedException e) {
    throw new CoreTokenException("String_Node_Str",e);
  }
  return token;
}
Program: 9298
Project: 9298
Buggy source:
/** 
 * Returns the expiration information of all sessions belonging to a user. The returned value will be a Map (sid->expiration_time).
 * @param uuid User's universal unique ID.
 * @return Map of all Session for the user
 * @throws Exception if there is any problem with accessing the sessionrepository.
 */
public Map<String,Long> getTokensByUUID(String uuid) throws CoreTokenException {
  Collection<Entry> entries;
  Filter filter=getAdapter().buildFilter().and().userId(uuid).build();
  entries=getAdapter().query().withFilter(filter).returnTheseAttributes(CoreTokenField.TOKEN_ID,CoreTokenField.EXPIRY_DATE).executeRawResults();
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str" + "String_Node_Str",entries.size(),uuid));
  }
  Map<String,Long> sessions=new HashMap<String,Long>();
  for (  Entry entry : entries) {
    String sessionId=entry.getAttribute(CoreTokenField.TOKEN_ID.toString()).firstValueAsString();
    String dateString=entry.getAttribute(CoreTokenField.EXPIRY_DATE.toString()).firstValueAsString();
    Calendar timestamp=dataConversion.fromLDAPDate(dateString);
    long epochedSeconds=dataConversion.toEpochedSeconds(timestamp);
    sessions.put(sessionId,epochedSeconds);
  }
  return sessions;
}

Fixed version (ground truth):
/** 
 * Returns the expiration information of all sessions belonging to a user. The returned value will be a Map (sid->expiration_time).
 * @param uuid User's universal unique ID.
 * @return Map of all Session for the user
 * @throws Exception if there is any problem with accessing the sessionrepository.
 */
public Map<String,Long> getTokensByUUID(String uuid) throws CoreTokenException {
  Collection<Entry> entries;
  Filter filter=adapter.buildFilter().and().userId(uuid).build();
  entries=adapter.query().withFilter(filter).returnTheseAttributes(CoreTokenField.TOKEN_ID,CoreTokenField.EXPIRY_DATE).executeRawResults();
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str" + "String_Node_Str",entries.size(),uuid));
  }
  Map<String,Long> sessions=new HashMap<String,Long>();
  for (  Entry entry : entries) {
    String sessionId=entry.getAttribute(CoreTokenField.TOKEN_ID.toString()).firstValueAsString();
    String dateString=entry.getAttribute(CoreTokenField.EXPIRY_DATE.toString()).firstValueAsString();
    Calendar timestamp=dataConversion.fromLDAPDate(dateString);
    long epochedSeconds=dataConversion.toEpochedSeconds(timestamp);
    sessions.put(sessionId,epochedSeconds);
  }
  return sessions;
}
Program: 9299
Project: 9299
Buggy source:
/** 
 * Performs a list operation against the Core Token Service with a predefined filter. This allows more complex filters to be constructed and is intended to be used with the QueryFilter fluent class.
 * @see QueryFilter
 * @param filter A non null OpenDJ LDAP Filter to use to control the results returned.
 * @return A non null, but possible empty collection of Tokens.
 * @throws CoreTokenException If there was an unrecoverable error.
 */
public Collection<Token> list(Filter filter) throws CoreTokenException {
  Collection<Token> tokens=getAdapter().query().withFilter(filter).execute();
  decryptTokens(tokens);
  return tokens;
}

Fixed version (ground truth):
/** 
 * Performs a list operation against the Core Token Service with a predefined filter. This allows more complex filters to be constructed and is intended to be used with the QueryFilter fluent class.
 * @see QueryFilter
 * @param filter A non null OpenDJ LDAP Filter to use to control the results returned.
 * @return A non null, but possible empty collection of Tokens.
 * @throws CoreTokenException If there was an unrecoverable error.
 */
public Collection<Token> list(Filter filter) throws CoreTokenException {
  Collection<Token> tokens=adapter.query().withFilter(filter).execute();
  decryptTokens(tokens);
  return tokens;
}
Program: 9300
Project: 9300
Buggy source:
/** 
 * Delete all Expired Sessions, within Default Limits.
 * @return True if there are more tokens to delete.
 * @throws CoreTokenException If there was a problem performing the delete.
 */
private boolean deleteExpired() throws CoreTokenException {
  Calendar nowTimestamp=Calendar.getInstance();
  Filter filter=getAdapter().buildFilter().and().beforeDate(nowTimestamp).build();
  Collection<Entry> entries=getAdapter().query().withFilter(filter).limitResultsTo(coreTokenConfig.getExpiredSessionsSearchLimit()).returnTheseAttributes(CoreTokenField.TOKEN_ID).executeRawResults();
  for (  Entry entry : entries) {
    Attribute attribute=entry.getAttribute(CoreTokenField.TOKEN_ID.toString());
    String tokenId=attribute.firstValueAsString();
    delete(tokenId);
  }
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",entries.size()));
  }
  return entries.size() == coreTokenConfig.getExpiredSessionsSearchLimit();
}

Fixed version (ground truth):
/** 
 * Delete all Expired Sessions, within Default Limits.
 * @return True if there are more tokens to delete.
 * @throws CoreTokenException If there was a problem performing the delete.
 */
private boolean deleteExpired() throws CoreTokenException {
  Calendar nowTimestamp=Calendar.getInstance();
  Filter filter=adapter.buildFilter().and().beforeDate(nowTimestamp).build();
  Collection<Entry> entries=adapter.query().withFilter(filter).limitResultsTo(coreTokenConfig.getExpiredSessionsSearchLimit()).returnTheseAttributes(CoreTokenField.TOKEN_ID).executeRawResults();
  for (  Entry entry : entries) {
    Attribute attribute=entry.getAttribute(CoreTokenField.TOKEN_ID.toString());
    String tokenId=attribute.firstValueAsString();
    delete(tokenId);
  }
  if (DEBUG.messageEnabled()) {
    DEBUG.message(MessageFormat.format(CoreTokenConstants.DEBUG_HEADER + "String_Node_Str",entries.size()));
  }
  return entries.size() == coreTokenConfig.getExpiredSessionsSearchLimit();
}
Program: 9301
Project: 9301
Buggy source:
/** 
 * Provide Service Instance Access to our Singleton
 * @return CTSPersistentStore Singleton Instance.
 */
public static final CTSPersistentStore getInstance(){
synchronized (CTSPersistentStore.class) {
    if (instance == null) {
      instance=new CTSPersistentStore(InjectorHolder.getInstance(CoreTokenConfig.class),InjectorHolder.getInstance(LDAPDataConversion.class),InjectorHolder.getInstance(DataLayerConnectionFactory.class),InjectorHolder.getInstance(TokenBlobStrategy.class));
      try {
        initialize();
      }
 catch (      StoreException se) {
        DEBUG.error("String_Node_Str" + se.getMessage());
        DEBUG.error("String_Node_Str");
      }
    }
  }
  return instance;
}

Fixed version (ground truth):
/** 
 * Provide Service Instance Access to our Singleton
 * @return CTSPersistentStore Singleton Instance.
 */
public static final CTSPersistentStore getInstance(){
synchronized (CTSPersistentStore.class) {
    if (instance == null) {
      instance=new CTSPersistentStore(InjectorHolder.getInstance(CoreTokenConfig.class),InjectorHolder.getInstance(LDAPDataConversion.class),InjectorHolder.getInstance(TokenBlobStrategy.class),InjectorHolder.getInstance(CoreTokenAdapter.class));
      try {
        initialize();
      }
 catch (      StoreException se) {
        DEBUG.error("String_Node_Str" + se.getMessage());
        DEBUG.error("String_Node_Str");
      }
    }
  }
  return instance;
}
Program: 9302
Project: 9302
Buggy source:
public QueryFailedException(Connection connection,DN dn,Filter filter,Throwable e){
  super(MessageFormat.format("String_Node_Str" + CoreTokenConstants.DEBUG_HEADER + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",dn,connection,filter),e);
}

Fixed version (ground truth):
/** 
 * Creates a formatted exception based on the values provided.
 * @param connection Connection used to make the query.
 * @param dn May be null. DN which was used in the query.
 * @param filter May be null. Filter used in query.
 * @param e Reason for the exception.
 */
public QueryFailedException(Connection connection,DN dn,Filter filter,Throwable e){
  super(MessageFormat.format("String_Node_Str" + CoreTokenConstants.DEBUG_HEADER + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",dn,connection,filter),e);
}
Program: 9303
Project: 9303
Buggy source:
public SetFailedException(Token token,ModifyRequest diff,Throwable e){
  super(MessageFormat.format("String_Node_Str" + CoreTokenConstants.DEBUG_HEADER + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",token,diff),e);
}

Fixed version (ground truth):
public SetFailedException(Token token,Throwable e){
  super(MessageFormat.format("String_Node_Str" + CoreTokenConstants.DEBUG_HEADER + "String_Node_Str"+ "String_Node_Str",token),e);
}
Program: 9305
Project: 9305
Buggy source:
/** 
 * Common Get Instance method to obtain access to Service Methods.
 * @return AMTokenRepository Singleton Instance.
 * @throws Exception
 */
public static AMTokenRepository getInstance() throws Exception {
  if (amTokenRepository == null) {
    if (CTS_REPOSITORY_CLASS_NAME.equals(CTSPersistentStore.class.getName())) {
      amTokenRepository=CTSPersistentStore.getInstance();
    }
 else     if (CTS_REPOSITORY_CLASS_NAME.equals(com.sun.identity.sm.mq.JMQSessionRepository.class.getName())) {
      amTokenRepository=com.sun.identity.sm.mq.JMQSessionRepository.getInstance();
    }
 else {
      throw new IllegalAccessException("String_Node_Str" + CTS_REPOSITORY_CLASS_NAME + "String_Node_Str");
    }
  }
  return amTokenRepository;
}

Fixed version (ground truth):
/** 
 * Common Get Instance method to obtain access to Service Methods.
 * @return AMTokenRepository Singleton Instance.
 * @throws Exception
 */
public static AMTokenRepository getInstance() throws Exception {
  if (amTokenRepository == null) {
    if (CTS_REPOSITORY_CLASS_NAME.equals(CTSPersistentStore.class.getName())) {
      amTokenRepository=CTSPersistentStore.getInstance();
    }
 else     if (CTS_REPOSITORY_CLASS_NAME.equals(com.sun.identity.sm.mq.JMQSessionRepository.class.getName())) {
      amTokenRepository=com.sun.identity.sm.mq.JMQSessionRepository.getInstance();
    }
 else {
      throw new IllegalAccessException("String_Node_Str" + CTS_REPOSITORY_CLASS_NAME + "String_Node_Str");
    }
  }
  if (amTokenRepository == null) {
    throw new IllegalAccessError("String_Node_Str" + CTS_REPOSITORY_CLASS_NAME + "String_Node_Str");
  }
  return amTokenRepository;
}
Program: 9306
Project: 9306
Buggy source:
private void setErrorMessage(Exception e){
  String authErrorCode=null;
  if ((e != null) && (e instanceof L10NMessage)) {
    L10NMessage l10nE=(L10NMessage)e;
    authErrorCode=l10nE.getErrorCode();
    if (authErrorCode != null) {
      errorCode=authErrorCode;
      ErrorMessage=l10nE.getL10NMessage(com.sun.identity.shared.locale.Locale.getLocale(AuthUtils.getLocale(ac)));
    }
 else {
      if (ac != null) {
        ErrorMessage=ac.getErrorMessage();
        errorCode=ac.getErrorCode();
      }
    }
  }
  if (errorCode == null || errorCode.isEmpty()) {
    errorCode=AMAuthErrorCode.AUTH_ERROR;
    ErrorMessage=AuthUtils.getErrorMessage(errorCode);
  }
  if (ac != null) {
    errorTemplate=ac.getErrorTemplate();
  }
 else {
    errorTemplate=AuthUtils.getErrorTemplate(errorCode);
  }
  if (loginURL != null && errorCode.equals("String_Node_Str") && loginURL.isEmpty()) {
    setDisplayFieldValue(LOGIN_URL,AuthUtils.constructLoginURL(request));
  }
  if (loginDebug.messageEnabled()) {
    loginDebug.message("String_Node_Str" + ErrorMessage);
    loginDebug.message("String_Node_Str" + errorTemplate);
    loginDebug.message("String_Node_Str" + errorCode);
  }
  response.setHeader("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
private void setErrorMessage(Exception e){
  String authErrorCode=null;
  if ((e != null) && (e instanceof L10NMessage)) {
    L10NMessage l10nE=(L10NMessage)e;
    authErrorCode=l10nE.getErrorCode();
    if (authErrorCode != null) {
      errorCode=authErrorCode;
      ErrorMessage=l10nE.getL10NMessage(com.sun.identity.shared.locale.Locale.getLocale(AuthUtils.getLocale(ac)));
    }
  }
  if (authErrorCode == null) {
    if (ac != null) {
      errorCode=ac.getErrorCode();
      ErrorMessage=ac.getErrorMessage();
    }
  }
  if (errorCode == null || errorCode.isEmpty()) {
    errorCode=AMAuthErrorCode.AUTH_ERROR;
  }
  if (ErrorMessage == null || ErrorMessage.isEmpty()) {
    ErrorMessage=AuthUtils.getErrorMessage(errorCode);
  }
  if (ac != null) {
    errorTemplate=ac.getErrorTemplate();
  }
 else {
    errorTemplate=AuthUtils.getErrorTemplate(errorCode);
  }
  if (loginURL != null && errorCode.equals("String_Node_Str") && loginURL.isEmpty()) {
    setDisplayFieldValue(LOGIN_URL,AuthUtils.constructLoginURL(request));
  }
  if (loginDebug.messageEnabled()) {
    loginDebug.message("String_Node_Str" + ErrorMessage);
    loginDebug.message("String_Node_Str" + errorTemplate);
    loginDebug.message("String_Node_Str" + errorCode);
  }
  response.setHeader("String_Node_Str","String_Node_Str");
}
Program: 9310
Project: 9310
Buggy source:
/** 
 * This function performs the incremental expansion of the complex.
 * @param G the neighborhood graph
 * @param k the maximum dimension
 */
protected void incrementalExpansion(UndirectedWeightedListGraph G,int k){
  int n=G.getNumVertices();
  for (int u=0; u < n; u++) {
    this.addCofaces(G,k,new Simplex(new int[]{u}),G.getLowerNeighbors(u),this.converter.getInitialFiltrationValue());
  }
}

Fixed version (ground truth):
/** 
 * This function performs the incremental expansion of the complex.
 * @param G the neighborhood graph
 * @param k the maximum dimension
 */
protected void incrementalExpansion(UndirectedWeightedListGraph G,int k){
  int n=G.getNumVertices();
  ArrayList<Integer> lower_vertices=new ArrayList<Integer>(n - 1);
  for (int u=0; u < n; u++) {
    this.addCofaces(G,k,new Simplex(new int[]{u}),lower_vertices,0);
    lower_vertices.add(u);
  }
}
Program: 9311
Project: 9311
Buggy source:
protected abstract boolean isMember(Simplex simplex);

Fixed version (ground truth):
protected abstract BooleanDoublePair isMember(Simplex simplex);
Program: 9312
Project: 9312
Buggy source:
protected boolean isMember(Simplex simplex){
  return true;
}

Fixed version (ground truth):
protected BooleanDoublePair isMember(Simplex simplex){
  return new BooleanDoublePair(true,0.0);
}
Program: 9313
Project: 9313
Buggy source:
@Override protected boolean isMember(Simplex simplex){
  return true;
}

Fixed version (ground truth):
@Override protected BooleanDoublePair isMember(Simplex simplex){
  return new BooleanDoublePair(true,0.0);
}
Program: 9314
Project: 9314
Buggy source:
@Override protected boolean isMember(Simplex simplex){
  boolean isMember=false;
  int[] vertices=simplex.getVertices();
  IntDoublePair witnessAndDistance=this.getWitnessAndDistance(vertices);
  int n_star=witnessAndDistance.getFirst();
  double e_ij=witnessAndDistance.getSecond();
  if (e_ij <= this.maxDistance + this.epsilon) {
    isMember=true;
    this.updateWitnessInformationInternalIndices(n_star,e_ij,simplex.getVertices());
  }
  return isMember;
}

Fixed version (ground truth):
@Override protected BooleanDoublePair isMember(Simplex simplex){
  boolean isMember=false;
  int[] vertices=simplex.getVertices();
  IntDoublePair witnessAndDistance=this.getWitnessAndDistance(vertices);
  int n_star=witnessAndDistance.getFirst();
  double e_ij=witnessAndDistance.getSecond();
  if (e_ij <= this.maxDistance + this.epsilon) {
    isMember=true;
    this.updateWitnessInformationInternalIndices(n_star,e_ij,simplex.getVertices());
  }
  return new BooleanDoublePair(isMember,e_ij);
}
Program: 9315
Project: 9315
Buggy source:
/** 
 * This function determines whether the given point is a member of  the interval.
 * @param point the point to test
 * @return true if the point is in the interval and false otherwise
 */
public boolean containsPoint(T point){
  if (!this.isLeftInfinite) {
    if (this.isLeftClosed && (point.compareTo(this.start) < 0)) {
      return false;
    }
    if (!this.isLeftClosed && (point.compareTo(this.start) <= 0)) {
      return false;
    }
  }
  if (!this.isRightInfinite) {
    if (this.isRightClosed && (point.compareTo(this.start) > 0)) {
      return false;
    }
    if (!this.isRightClosed && (point.compareTo(this.start) >= 0)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * This function determines whether the given point is a member of  the interval.
 * @param point the point to test
 * @return true if the point is in the interval and false otherwise
 */
public boolean containsPoint(T point){
  if (!this.isLeftInfinite) {
    if (this.isLeftClosed && (point.compareTo(this.start) < 0)) {
      return false;
    }
    if (!this.isLeftClosed && (point.compareTo(this.start) <= 0)) {
      return false;
    }
  }
  if (!this.isRightInfinite) {
    if (this.isRightClosed && (point.compareTo(this.end) > 0)) {
      return false;
    }
    if (!this.isRightClosed && (point.compareTo(this.end) >= 0)) {
      return false;
    }
  }
  return true;
}
Program: 9316
Project: 9316
Buggy source:
/** 
 * Unlocks the device window in user defined screen mode. 
 */
public static void unlockOrientation(Activity activity){
  activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);
}

Fixed version (ground truth):
/** 
 * Unlocks the device window in user defined screen mode. 
 */
public static void unlockOrientation(Activity activity){
  activity.setRequestedOrientation(getManifestOrientation(activity));
}
Program: 9317
Project: 9317
Buggy source:
public List<SchemaValidationError> debugByContent(String content) throws Exception {
  String schemaText=getSchema();
  JsonNode schemaObject=MAPPER.readTree(schemaText);
  JsonSchemaFactory factory=JsonSchemaFactory.byDefault();
  JsonSchema schema=factory.getJsonSchema(schemaObject);
  ProcessingReport report=schema.validate(JsonLoader.fromString(content));
  ListProcessingReport lp=new ListProcessingReport();
  lp.mergeWith(report);
  List<SchemaValidationError> output=new ArrayList<SchemaValidationError>();
  java.util.Iterator<ProcessingMessage> it=lp.iterator();
  while (it.hasNext()) {
    ProcessingMessage pm=it.next();
    output.add(new SchemaValidationError(pm.asJson()));
  }
  return output;
}

Fixed version (ground truth):
public List<SchemaValidationError> debugByContent(String content) throws Exception {
  String schemaText=getSchema();
  JsonNode schemaObject=MAPPER.readTree(schemaText);
  JsonSchemaFactory factory=JsonSchemaFactory.byDefault();
  JsonSchema schema=factory.getJsonSchema(schemaObject);
  ProcessingReport report=schema.validate(JsonLoader.fromString(content));
  ListProcessingReport lp=new ListProcessingReport();
  lp.mergeWith(report);
  List<SchemaValidationError> output=new ArrayList<SchemaValidationError>();
  for (  ProcessingMessage pm : lp) {
    output.add(new SchemaValidationError(pm.asJson()));
  }
  return output;
}
Program: 9318
Project: 9318
Buggy source:
/** 
 * Initialize toolbar with required components such as - title, navigation icon + listener, menu/OnMenuItemClickListener, menuHideBody -
 */
protected void initToolbar(){
  toolbar.setTitle("String_Node_Str");
  toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
  toolbar.setNavigationOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      onBackPressed();
    }
  }
);
  toolbar.inflateMenu(R.menu.menu_edit);
  toolbar.setOnMenuItemClickListener(this);
  Menu menu=toolbar.getMenu();
  if (menu != null)   menuHideBody=menu.findItem(R.id.action_hide_show_body);
}

Fixed version (ground truth):
/** 
 * Initialize toolbar with required components such as - title, navigation icon + listener, menu/OnMenuItemClickListener, menuHideBody -
 */
protected void initToolbar(){
  toolbar.setTitle("String_Node_Str");
  toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material);
  toolbar.setNavigationOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      onBackPressed();
    }
  }
);
  toolbar.inflateMenu(R.menu.menu_edit);
  toolbar.setOnMenuItemClickListener(this);
  Menu menu=toolbar.getMenu();
  if (menu != null)   menuHideBody=menu.findItem(R.id.action_hide_show_body);
}
Program: 9319
Project: 9319
Buggy source:
@NotNull @Override protected String buildMeaningfulClassesQuery(OWLClassExpression index,SortedSet<OWLClassExpression> targetClasses){
  String query="String_Node_Str";
  query+=converter.convert("String_Node_Str",index);
  query+="String_Node_Str";
  query+="String_Node_Str";
  query+="String_Node_Str" + Joiner.on("String_Node_Str").join(FluentIterable.from(targetClasses).transform(Functions.compose(TO_IRI_FUNCTION,OWLCLASS_TRANSFORM_FUNCTION))) + "String_Node_Str";
  return query;
}

Fixed version (ground truth):
@NotNull @Override protected String buildMeaningfulClassesQuery(OWLClassExpression index,SortedSet<OWLClassExpression> targetClasses){
  String query="String_Node_Str";
  query+=converter.convert("String_Node_Str",index);
  query+="String_Node_Str";
  query+="String_Node_Str";
  query+="String_Node_Str" + targetClasses.stream().map(ce -> "String_Node_Str" + ce.asOWLClass().toStringID() + "String_Node_Str").collect(Collectors.joining("String_Node_Str")) + "String_Node_Str";
  return query;
}
Program: 9320
Project: 9320
Buggy source:
@Override protected String buildApplicablePropertiesValuesQuery(OWLClassExpression domain,Collection<? extends OWLObjectProperty> objectProperties){
  String domQuery=converter.convert("String_Node_Str",domain);
  String props=objectProperties.stream().map(TO_IRI_FUNCTION).collect(Collectors.joining("String_Node_Str"));
  String query="String_Node_Str" + "String_Node_Str" + domQuery + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ props+ "String_Node_Str";
  return query;
}

Fixed version (ground truth):
@Override protected String buildApplicablePropertiesValuesQuery(OWLClassExpression domain,Collection<? extends OWLObjectProperty> objectProperties){
  String domQuery=converter.convert("String_Node_Str",domain);
  String props=objectProperties.stream().map(op -> "String_Node_Str" + op.toStringID() + "String_Node_Str").collect(Collectors.joining("String_Node_Str"));
  String query="String_Node_Str" + "String_Node_Str" + domQuery + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ props+ "String_Node_Str";
  return query;
}
Program: 9323
Project: 9323
Buggy source:
@NotNull protected String buildMeaningfulClassesQuery(OWLClassExpression index,SortedSet<OWLClassExpression> targetClasses){
  String query="String_Node_Str";
  query+=converter.convert("String_Node_Str",index);
  query+="String_Node_Str";
  query+="String_Node_Str" + targetClasses.stream().map(ce -> "String_Node_Str" + ce.asOWLClass().toStringID() + "String_Node_Str").collect(Collectors.joining("String_Node_Str")) + "String_Node_Str";
  query+="String_Node_Str";
  return query;
}

Fixed version (ground truth):
protected String buildMeaningfulClassesQuery(OWLClassExpression index,SortedSet<OWLClassExpression> targetClasses){
  String query="String_Node_Str";
  query+=converter.convert("String_Node_Str",index);
  query+="String_Node_Str";
  query+="String_Node_Str" + targetClasses.stream().map(ce -> "String_Node_Str" + ce.asOWLClass().toStringID() + "String_Node_Str").collect(Collectors.joining("String_Node_Str")) + "String_Node_Str";
  query+="String_Node_Str";
  return query;
}
Program: 9324
Project: 9324
Buggy source:
public void rebuild(){
  propertyManager=new OWLObjectPropertyManager(getRootOntology().getOWLOntologyManager(),getRootOntology());
  sub2Super=propertyManager.getPropertyHierarchy();
  super2Sub=new HashMap<>();
  for (  OWLObjectPropertyExpression sub : sub2Super.keySet()) {
    for (    OWLObjectPropertyExpression superProp : sub2Super.get(sub)) {
      super2Sub.computeIfAbsent(superProp,k -> new HashSet<>()).add(sub);
    }
  }
}

Fixed version (ground truth):
public void rebuild(){
  propertyManager=new OWLObjectPropertyManager(getRootOntology().getOWLOntologyManager(),getRootOntology());
  sub2Super=propertyManager.getPropertyHierarchy();
  super2Sub=new HashMap<>();
  for (  Map.Entry<OWLObjectPropertyExpression,Set<OWLObjectPropertyExpression>> entry : sub2Super.entrySet()) {
    for (    OWLObjectPropertyExpression superProp : entry.getValue()) {
      super2Sub.computeIfAbsent(superProp,k -> new HashSet<>()).add(entry.getKey());
    }
  }
}
Program: 9326
Project: 9326
Buggy source:
public static void main(String[] args){
  SparqlEndpoint endpoint=SparqlEndpoint.getEndpointDBpediaLiveAKSW();
  Set<String> ignoredProperties=Sets.newHashSet("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  ConciseBoundedDescriptionGenerator cbdGen=new ConciseBoundedDescriptionGeneratorImpl(endpoint);
  cbdGen.setIgnoredProperties(ignoredProperties);
  cbdGen.setAllowedPropertyNamespaces(Sets.newHashSet("String_Node_Str"));
  cbdGen.setAllowedClassNamespaces(Sets.newHashSet("String_Node_Str"));
  cbdGen.setAllowedObjectNamespaces(Sets.newHashSet("String_Node_Str"));
  cbdGen=new CachingConciseBoundedDescriptionGenerator(cbdGen);
  Model cbd=cbdGen.getConciseBoundedDescription("String_Node_Str",2);
  System.out.println(cbd.size());
}

Fixed version (ground truth):
public static void main(String[] args){
  SparqlEndpoint endpoint=SparqlEndpoint.getEndpointDBpediaLiveAKSW();
  Set<String> ignoredProperties=Sets.newHashSet("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  ConciseBoundedDescriptionGenerator cbdGen=new ConciseBoundedDescriptionGeneratorImpl(endpoint);
  cbdGen=new CachingConciseBoundedDescriptionGenerator(cbdGen);
  Model cbd=cbdGen.getConciseBoundedDescription("String_Node_Str",2);
  System.out.println(cbd.size());
}
Program: 9327
Project: 9327
Buggy source:
private String createObjectFilter(Var predicateVar,Var targetVar){
  String filter="String_Node_Str";
  if (!allowedObjectNamespaces.isEmpty() || !allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str" + targetVar + "String_Node_Str";
  }
  if (!allowedObjectNamespaces.isEmpty()) {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
    filter+=allowedObjectNamespaces.stream().map(ns -> "String_Node_Str" + targetVar + "String_Node_Str"+ ns+ "String_Node_Str").collect(Collectors.joining("String_Node_Str"));
    filter+="String_Node_Str";
  }
 else {
    filter+=predicateVar + "String_Node_Str" + FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
  }
  if (!allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
    filter+=allowedClassNamespaces.stream().map(ns -> "String_Node_Str" + targetVar + "String_Node_Str"+ ns+ "String_Node_Str").collect(Collectors.joining("String_Node_Str"));
    filter+="String_Node_Str";
  }
 else {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type);
  }
  if (!allowedObjectNamespaces.isEmpty() || !allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str";
  }
  return filter;
}

Fixed version (ground truth):
private String createObjectFilter(Var predicateVar,Var targetVar){
  String filter="String_Node_Str";
  if (!allowedObjectNamespaces.isEmpty() || !allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str" + targetVar + "String_Node_Str";
  }
  if (!allowedObjectNamespaces.isEmpty()) {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
    filter+=allowedObjectNamespaces.stream().map(ns -> "String_Node_Str" + targetVar + "String_Node_Str"+ ns+ "String_Node_Str").collect(Collectors.joining("String_Node_Str"));
    filter+="String_Node_Str";
  }
 else   if (!allowedClassNamespaces.isEmpty()) {
    filter+=predicateVar + "String_Node_Str" + FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
  }
  if (!allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type)+ "String_Node_Str";
    filter+=allowedClassNamespaces.stream().map(ns -> "String_Node_Str" + targetVar + "String_Node_Str"+ ns+ "String_Node_Str").collect(Collectors.joining("String_Node_Str"));
    filter+="String_Node_Str";
  }
 else   if (!allowedObjectNamespaces.isEmpty()) {
    filter+="String_Node_Str" + predicateVar + "String_Node_Str"+ FmtUtils.stringForResource(RDF.type);
  }
  if (!allowedObjectNamespaces.isEmpty() || !allowedClassNamespaces.isEmpty()) {
    filter+="String_Node_Str";
  }
  return filter;
}
Program: 9328
Project: 9328
Buggy source:
public OWL2SPARULConverter(OWLOntology ontology,boolean useStrongTyping){
  this(ontology.getOWLOntologyManager(),ontology,useStrongTyping,new OWLAnonymousIndividualsWithMultipleOccurrences());
}

Fixed version (ground truth):
public OWL2SPARULConverter(OWLOntology ontology,boolean useStrongTyping){
  this(ontology.getOWLOntologyManager(),ontology,useStrongTyping,new OWLAnonymousIndividualsWithMultipleOccurrences(),new AlwaysOutputId(),new AtomicInteger());
}
Program: 9331
Project: 9331
Buggy source:
@Test public void invertedOperatorTest() throws ParseException, ComponentInitException {
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.RHO1);
  reasoner.init();
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.setDropDisjuncts(true);
  op.init();
  LengthLimitedRefinementOperator operator=new OperatorInverter(op);
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  Set<OWLClassExpression> refinements=operator.refine(concept,6);
  for (  OWLClassExpression refinement : refinements) {
    System.out.println(refinement);
  }
  assertTrue(refinements.size() == 4);
}

Fixed version (ground truth):
@Test public void invertedOperatorTest() throws ParseException, ComponentInitException {
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.RHO1);
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.setDropDisjuncts(true);
  op.init();
  LengthLimitedRefinementOperator operator=new OperatorInverter(op);
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  Set<OWLClassExpression> refinements=operator.refine(concept,6);
  for (  OWLClassExpression refinement : refinements) {
    System.out.println(refinement);
  }
  assertTrue(refinements.size() == 4);
}
Program: 9332
Project: 9332
Buggy source:
@Test public void rhoDRDownTest2() throws ParseException, ComponentInitException {
  StringRenderer.setRenderer(Rendering.DL_SYNTAX);
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.EPC_OE);
  reasoner.init();
  baseURI=reasoner.getBaseURI();
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.init();
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  Set<OWLClassExpression> results=op.refine(concept,10);
  for (  OWLClassExpression result : results) {
    System.out.println(result);
  }
  int desiredResultSize=107;
  if (results.size() != desiredResultSize) {
    System.out.println(results.size() + "String_Node_Str" + desiredResultSize+ "String_Node_Str");
  }
  assertTrue(results.size() == desiredResultSize);
}

Fixed version (ground truth):
@Test public void rhoDRDownTest2() throws ParseException, ComponentInitException {
  StringRenderer.setRenderer(Rendering.DL_SYNTAX);
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.EPC_OE);
  baseURI=reasoner.getBaseURI();
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.init();
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  Set<OWLClassExpression> results=op.refine(concept,10);
  for (  OWLClassExpression result : results) {
    System.out.println(result);
  }
  int desiredResultSize=107;
  if (results.size() != desiredResultSize) {
    System.out.println(results.size() + "String_Node_Str" + desiredResultSize+ "String_Node_Str");
  }
  assertTrue(results.size() == desiredResultSize);
}
Program: 9333
Project: 9333
Buggy source:
@Test public void rhoDRDownTest5() throws ParseException, LearningProblemUnsupportedException, ComponentInitException {
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.SWORE);
  reasoner.init();
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.init();
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  System.out.println(concept);
  Set<OWLClassExpression> refinements=op.refine(concept,7);
  for (  OWLClassExpression refinement : refinements) {
    System.out.println(refinement);
  }
}

Fixed version (ground truth):
@Test public void rhoDRDownTest5() throws ParseException, LearningProblemUnsupportedException, ComponentInitException {
  AbstractReasonerComponent reasoner=TestOntologies.getTestOntology(TestOntology.SWORE);
  RhoDRDown op=new RhoDRDown();
  op.setReasoner(reasoner);
  op.setSubHierarchy(reasoner.getClassHierarchy());
  op.setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy());
  op.setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy());
  op.init();
  OWLClassExpression concept=KBParser.parseConcept("String_Node_Str");
  System.out.println(concept);
  Set<OWLClassExpression> refinements=op.refine(concept,7);
  for (  OWLClassExpression refinement : refinements) {
    System.out.println(refinement);
  }
}
Program: 9335
Project: 9335
Buggy source:
/** 
 * Sets the max. execution time of the whole algorithm. Note, this values should always be higher than the max. execution time to compute a partial solution.
 * @param maxExecutionTimeInSeconds the overall the max. execution time
 */
@Override public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds){
  super.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
}

Fixed version (ground truth):
/** 
 * Sets the max. execution time of the whole algorithm. Note, this values should always be higher than the max. execution time to compute a partial solution.
 * @param maxExecutionTimeInSeconds the overall the max. execution time
 */
@Override public void setMaxExecutionTimeInSeconds(long maxExecutionTimeInSeconds){
  super.setMaxExecutionTimeInSeconds(maxExecutionTimeInSeconds);
}
Program: 9336
Project: 9336
Buggy source:
@Override public void init() throws ComponentInitException {
  try {
    if (url == null) {
      Path path;
      if (fileName.startsWith("String_Node_Str")) {
        path=Paths.get(fileName);
      }
 else {
        path=Paths.get(baseDir,fileName);
      }
      URI uri=path.normalize().toUri();
      setUrl(uri.toURL().toString());
    }
    kb=KBParser.parseKBFile(new URL(getUrl()));
    logger.trace("String_Node_Str" + getUrl() + "String_Node_Str");
  }
 catch (  ParseException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  FileNotFoundException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  OWLOntologyCreationException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  MalformedURLException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  IOException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void init() throws ComponentInitException {
  try {
    if (url == null) {
      Path path=Paths.get(fileName);
      if (!path.isAbsolute() && baseDir != null) {
        path=Paths.get(baseDir,fileName);
      }
      URI uri=path.normalize().toUri();
      setUrl(uri.toURL().toString());
    }
    kb=KBParser.parseKBFile(new URL(getUrl()));
    logger.trace("String_Node_Str" + getUrl() + "String_Node_Str");
  }
 catch (  ParseException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  FileNotFoundException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  OWLOntologyCreationException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  MalformedURLException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
catch (  IOException e) {
    throw new ComponentInitException("String_Node_Str" + getUrl() + "String_Node_Str",e);
  }
}