nus-yam/ex-repair huggingface dataset:
Program: 62288
Project: 62288
Buggy source:
/** 
 * Check that the user has enough rights for a given topology.
 * @param topology The topology for which to check roles.
 * @param applicationRoles The roles required to edit the topology for an application.
 */
public void checkAuthorizations(Topology topology,ApplicationRole... applicationRoles){
  if (topology.getDelegateType().equals(Application.class.getSimpleName().toLowerCase())) {
    String applicationId=topology.getDelegateId();
    Application application=appService.getOrFail(applicationId);
    AuthorizationUtil.checkAuthorizationForApplication(application,applicationRoles);
  }
 else {
    AuthorizationUtil.checkHasOneRoleIn(Role.ARCHITECT);
  }
}

Fixed version (ground truth):
/** 
 * Check that the user has enough rights for a given topology.
 * @param topology The topology for which to check roles.
 * @param applicationRoles The roles required to edit the topology for an application.
 */
public void checkAuthorizations(Topology topology,ApplicationRole... applicationRoles){
}
Program: 62289
Project: 62289
Buggy source:
/** 
 * Get the delegates version of a topology.
 * @param topology the topology
 * @return The application version associated with the environment.
 */
private AbstractTopologyVersion getApplicationVersion(Topology topology){
  if (topology.getDelegateType().equalsIgnoreCase(Application.class.getSimpleName())) {
    return applicationVersionService.getByTopologyId(topology.getId());
  }
 else   if (topology.getDelegateType().equalsIgnoreCase(TopologyTemplate.class.getSimpleName())) {
    return topologyTemplateVersionService.getByTopologyId(topology.getId());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Get the delegates version of a topology.
 * @param topology the topology
 * @return The application version associated with the environment.
 */
private AbstractTopologyVersion getApplicationVersion(Topology topology){
  return null;
}
Program: 62290
Project: 62290
Buggy source:
@Override public String toString(){
  return comparable.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  if (qualifier == null) {
    return getMajorVersion() + "String_Node_Str" + getMinorVersion()+ "String_Node_Str"+ getIncrementalVersion()+ "String_Node_Str"+ getBuildNumber();
  }
  return getMajorVersion() + "String_Node_Str" + getMinorVersion()+ "String_Node_Str"+ getIncrementalVersion()+ "String_Node_Str"+ getBuildNumber()+ "String_Node_Str"+ getQualifier();
}
Program: 62291
Project: 62291
Buggy source:
/** 
 * Get a cloud service archive, or fail with   {@link NotFoundException} if not found
 * @param name The name of the archive.
 * @param version The version of the archive.
 * @return The {@link Csar Cloud Service Archive} if found in the repository.
 */
public Csar getOrFail(String name,String version){
  return getOrFail(new Csar(name,version).getId());
}

Fixed version (ground truth):
/** 
 * Get a cloud service archive, or fail with   {@link NotFoundException} if not found
 * @param name The name of the archive.
 * @param version The version of the archive.
 * @return The {@link Csar Cloud Service Archive} if found in the repository.
 */
public Csar getOrFail(String name,String version){
  Csar csar=searchService.getArchive(name,version);
  if (csar == null) {
    throw new NotFoundException("String_Node_Str" + name + "String_Node_Str"+ version+ "String_Node_Str");
  }
  return csar;
}
Program: 62293
Project: 62293
Buggy source:
private void checkVersionParsing(String version,Integer major,Integer minor,Integer incremental,Integer buildnumber,String qualifier){
  Version artifactVersion=newArtifactVersion(version);
  String parsed="String_Node_Str" + version + "String_Node_Str"+ artifactVersion.getMajorVersion()+ "String_Node_Str"+ artifactVersion.getMinorVersion()+ "String_Node_Str"+ artifactVersion.getIncrementalVersion()+ "String_Node_Str"+ artifactVersion.getBuildNumber()+ "String_Node_Str"+ artifactVersion.getQualifier()+ "String_Node_Str";
  assertEquals(parsed + "String_Node_Str",major,artifactVersion.getMajorVersion());
  assertEquals(parsed + "String_Node_Str",minor,artifactVersion.getMinorVersion());
  assertEquals(parsed + "String_Node_Str",incremental,artifactVersion.getIncrementalVersion());
  assertEquals(parsed + "String_Node_Str",buildnumber,artifactVersion.getBuildNumber());
  assertEquals(parsed + "String_Node_Str",qualifier,artifactVersion.getQualifier());
  assertEquals("String_Node_Str" + version + "String_Node_Str",version,artifactVersion.toString());
}

Fixed version (ground truth):
private void checkVersionParsing(String version,Integer major,Integer minor,Integer incremental,Integer buildnumber,String qualifier){
  Version artifactVersion=newArtifactVersion(version);
  String parsed="String_Node_Str" + version + "String_Node_Str"+ artifactVersion.getMajorVersion()+ "String_Node_Str"+ artifactVersion.getMinorVersion()+ "String_Node_Str"+ artifactVersion.getIncrementalVersion()+ "String_Node_Str"+ artifactVersion.getBuildNumber()+ "String_Node_Str"+ artifactVersion.getQualifier()+ "String_Node_Str";
  assertEquals(parsed + "String_Node_Str",major,artifactVersion.getMajorVersion());
  assertEquals(parsed + "String_Node_Str",minor,artifactVersion.getMinorVersion());
  assertEquals(parsed + "String_Node_Str",incremental,artifactVersion.getIncrementalVersion());
  assertEquals(parsed + "String_Node_Str",buildnumber,artifactVersion.getBuildNumber());
  assertEquals(parsed + "String_Node_Str",qualifier,artifactVersion.getQualifier());
}
Program: 62294
Project: 62294
Buggy source:
@Override public IESSearchQueryBuilderHelper prepareSearch(){
  super.prepareSearch(indices);
  super.searchRequestBuilder.setTypes(esTypes);
  return this;
}

Fixed version (ground truth):
@Override public IESSearchQueryBuilderHelper prepareSearch(){
  super.prepareSearch(indices);
  super.searchRequestBuilder.setTypes(esTypes);
  super.searchRequestBuilder.setQuery(queryBuilder);
  return this;
}
Program: 62295
Project: 62295
Buggy source:
Path resolveArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);

Fixed version (ground truth):
/** 
 * Resolve an artifact, try to download the artifact if possible and return the path to the downloaded artifact
 * @param artifactReference reference of the artifact
 * @param repositoryURL url of the repository
 * @param repositoryType type of the repository, it corresponds to the resolver type, normally the plugin will resolve artifact only of type defined ingetResolverType
 * @param credentials the credentials to connect to the repository
 * @return the path to the downloaded artifact
 */
Path resolveArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);
Program: 62296
Project: 62296
Buggy source:
ValidationResult canHandleArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);

Fixed version (ground truth):
/** 
 * Check if the resolver can handle the particular artifact
 * @param artifactReference reference of the artifact
 * @param repositoryURL url of the repository
 * @param repositoryType type of the repository, it corresponds to the resolver type, normally the plugin will resolve artifact only of type defined ingetResolverType
 * @param credentials the credentials to connect to the repository
 * @return the validation result
 */
ValidationResult canHandleArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);
Program: 62297
Project: 62297
Buggy source:
String getResolverType();

Fixed version (ground truth):
/** 
 * The type of the resolver, this is useful to distinguish different types of resolver for example git, http, maven, make sure to not having multiple resolver plugins with the same resolver type
 * @return the type of the resolver
 */
String getResolverType();
Program: 62298
Project: 62298
Buggy source:
T getConfiguration();

Fixed version (ground truth):
/** 
 * Get the configuration of the artifact resolver
 * @return the configuration of the resolver
 */
T getConfiguration();
Program: 62299
Project: 62299
Buggy source:
Path resolveArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);

Fixed version (ground truth):
/** 
 * Resolve an artifact, try to download the artifact if possible and return the path to the downloaded artifact
 * @param artifactReference reference of the artifact
 * @param repositoryURL url of the repository
 * @param repositoryType type of the repository, it corresponds to the resolver type, normally the plugin will resolve artifact only of type defined ingetResolverType
 * @param credentials the credentials to connect to the repository
 * @return the path to the downloaded artifact
 */
Path resolveArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);
Program: 62300
Project: 62300
Buggy source:
ValidationResult canHandleArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);

Fixed version (ground truth):
/** 
 * Check if the resolver can handle the particular artifact
 * @param artifactReference reference of the artifact
 * @param repositoryURL url of the repository
 * @param repositoryType type of the repository, it corresponds to the resolver type, normally the plugin will resolve artifact only of type defined ingetResolverType
 * @param credentials the credentials to connect to the repository
 * @return the validation result
 */
ValidationResult canHandleArtifact(String artifactReference,String repositoryURL,String repositoryType,Map<String,Object> credentials);
Program: 62301
Project: 62301
Buggy source:
void setConfiguration(T configuration);

Fixed version (ground truth):
/** 
 * Set the configuration of the artifact resolver
 * @param configuration the configuration of the resolver
 */
void setConfiguration(T configuration);
Program: 62302
Project: 62302
Buggy source:
IConfigurableArtifactResolver<T> newInstance();

Fixed version (ground truth):
/** 
 * Create new instance of   {@link IConfigurableArtifactResolver}
 * @return a newly created {@link IConfigurableArtifactResolver}
 */
IConfigurableArtifactResolver<T> newInstance();
Program: 62303
Project: 62303
Buggy source:
Class<T> getResolverConfigurationType();

Fixed version (ground truth):
/** 
 * The resolver's configuration type
 * @return the type of the configuration
 */
Class<T> getResolverConfigurationType();
Program: 62304
Project: 62304
Buggy source:
String getResolverType();

Fixed version (ground truth):
/** 
 * Get the resolver type which the   {@link IConfigurableArtifactResolver} can manage
 * @return the resolver's type
 */
String getResolverType();
Program: 62305
Project: 62305
Buggy source:
protected EsQueryBuilderHelper(QueryHelper.QueryBuilderHelper from,Class<T> clazz){
  super(from);
  this.clazz=clazz;
  this.indices=clazz == null ? getAllIndexes() : new String[]{getIndexForType(clazz)};
  this.requestedTypes=getRequestedTypes(clazz);
  this.esTypes=getTypesStrings(requestedTypes);
}

Fixed version (ground truth):
protected EsQueryBuilderHelper(QueryHelper.QueryBuilderHelper from,Class<T> clazz){
  super(from);
  this.clazz=clazz;
  this.indices=clazz == null ? getAllIndexes() : new String[]{getIndexForType(clazz)};
  this.requestedTypes=getRequestedTypes(clazz);
  this.esTypes=getTypesStrings(requestedTypes);
  super.types(requestedTypes);
}
Program: 62306
Project: 62306
Buggy source:
/** 
 * Convert a SearchResponse into a list of objects (json deserialization.)
 * @param searchResponse The actual search response from elastic-search.
 * @param clazz          The type of objects to de-serialize.
 * @return A list of instances that contains de-serialized data.
 */
@SneakyThrows({IOException.class}) public <T>List<T> toGetListOfData(SearchResponse searchResponse,Class<T> clazz){
  if (!somethingFound(searchResponse)) {
    return null;
  }
  List<T> result=new ArrayList<>();
  for (int i=0; i < searchResponse.getHits().getHits().length; i++) {
    result.add(getJsonMapper().readValue(searchResponse.getHits().getAt(i).getSourceAsString(),clazz));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Convert a SearchResponse into a list of objects (json deserialization.)
 * @param searchResponse The actual search response from elastic-search.
 * @param clazz The type of objects to de-serialize.
 * @return A list of instances that contains de-serialized data.
 */
@SneakyThrows({IOException.class}) public <T>List<T> toGetListOfData(SearchResponse searchResponse,Class<T> clazz){
  if (!somethingFound(searchResponse)) {
    return null;
  }
  List<T> result=new ArrayList<>();
  for (int i=0; i < searchResponse.getHits().getHits().length; i++) {
    result.add(getJsonMapper().readValue(searchResponse.getHits().getAt(i).getSourceAsString(),clazz));
  }
  return result;
}
Program: 62307
Project: 62307
Buggy source:
private Map<String,FacetedSearchFacet[]> parseAggregationCounts(SearchResponse searchResponse){
  List<Aggregation> internalAggregationsList=null;
  if (searchResponse.getAggregations() == null) {
    return null;
  }
  if (searchResponse.getAggregations().get("String_Node_Str") != null) {
    Global globalAggregation=searchResponse.getAggregations().get("String_Node_Str");
    Aggregations aggregations=globalAggregation.getAggregations();
    internalAggregationsList=aggregations.asList();
  }
  if (internalAggregationsList != null && internalAggregationsList.size() > 0) {
    Map<String,FacetedSearchFacet[]> finalResults=new HashMap();
    for (    Aggregation termsAgg : internalAggregationsList) {
      InternalTerms internalTerms=(InternalTerms)termsAgg;
      List<FacetedSearchFacet> facetedSearchFacets=new ArrayList<>();
      for (      Terms.Bucket entry : internalTerms.getBuckets()) {
        facetedSearchFacets.add(new FacetedSearchFacet(entry.getKey(),entry.getDocCount()));
      }
      finalResults.put(internalTerms.getName(),facetedSearchFacets.toArray(new FacetedSearchFacet[facetedSearchFacets.size()]));
    }
    return finalResults;
  }
  return null;
}

Fixed version (ground truth):
private Map<String,FacetedSearchFacet[]> parseAggregationCounts(SearchResponse searchResponse){
  if (searchResponse.getAggregations() == null) {
    return null;
  }
  List<Aggregation> internalAggregationsList=searchResponse.getAggregations().asList();
  if (internalAggregationsList.size() == 0) {
    return null;
  }
  Map<String,FacetedSearchFacet[]> finalResults=Maps.newHashMap();
  for (  Aggregation termsAgg : internalAggregationsList) {
    InternalTerms internalTerms=(InternalTerms)termsAgg;
    List<FacetedSearchFacet> facetedSearchFacets=Lists.newArrayList();
    for (    Terms.Bucket entry : internalTerms.getBuckets()) {
      facetedSearchFacets.add(new FacetedSearchFacet(entry.getKey(),entry.getDocCount()));
    }
    finalResults.put(internalTerms.getName(),facetedSearchFacets.toArray(new FacetedSearchFacet[facetedSearchFacets.size()]));
  }
  return finalResults;
}
Program: 62308
Project: 62308
Buggy source:
/** 
 * Convert a SearchResponse into a   {@link GetMultipleDataResult} including json deserialization.
 * @param searchResponse The actual search response from elastic-search.
 * @param from           The start index of the search request.
 * @return A {@link GetMultipleDataResult} instance that contains de-serialized data.
 */
@SuppressWarnings("String_Node_Str") @SneakyThrows({IOException.class}) public <T>GetMultipleDataResult<T> toGetMultipleDataResult(Class<T> clazz,SearchResponse searchResponse,int from){
  if (!somethingFound(searchResponse)) {
    return new GetMultipleDataResult<T>(new String[0],(T[])Array.newInstance(clazz,0));
  }
  GetMultipleDataResult<T> finalResponse=new GetMultipleDataResult<T>();
  fillMultipleDataResult(clazz,searchResponse,finalResponse,from,true);
  return finalResponse;
}

Fixed version (ground truth):
/** 
 * Convert a SearchResponse into a   {@link GetMultipleDataResult} including json deserialization.
 * @param searchResponse The actual search response from elastic-search.
 * @param from The start index of the search request.
 * @return A {@link GetMultipleDataResult} instance that contains de-serialized data.
 */
@SuppressWarnings("String_Node_Str") @SneakyThrows({IOException.class}) public <T>GetMultipleDataResult<T> toGetMultipleDataResult(Class<T> clazz,SearchResponse searchResponse,int from){
  if (!somethingFound(searchResponse)) {
    return new GetMultipleDataResult<T>(new String[0],(T[])Array.newInstance(clazz,0));
  }
  GetMultipleDataResult<T> finalResponse=new GetMultipleDataResult<T>();
  fillMultipleDataResult(clazz,searchResponse,finalResponse,from,true);
  return finalResponse;
}
Program: 62310
Project: 62310
Buggy source:
/** 
 * Dispatch an event to the registered listener.
 * @param listener The listener to which to send the event.
 * @param event The event to dispatch.
 * @param retry The current retry index (0 for first dispatch)
 */
@SneakyThrows private void dispatchEvent(IPaasEventListener listener,AbstractMonitorEvent event,int retry){
  try {
    if (listener.canHandle(event)) {
      listener.eventHappened(event);
    }
  }
 catch (  RuntimeException e) {
    log.error("String_Node_Str",event.toString(),listener.toString(),retry,MAX_LISTENER_RETRY,e);
    if (retry < MAX_LISTENER_RETRY) {
      Thread.sleep(LISTENER_FAIL_RETRY_SLEEP_MS);
      dispatchEvent(listener,event,retry + 1);
    }
  }
}

Fixed version (ground truth):
/** 
 * Dispatch an event to the registered listener.
 * @param listener The listener to which to send the event.
 * @param event The event to dispatch.
 * @param retry The current retry index (0 for first dispatch)
 */
@SneakyThrows private void dispatchEvent(IPaasEventListener listener,AbstractMonitorEvent event,int retry){
  try {
    if (listener.canHandle(event)) {
      listener.eventHappened(event);
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",event.toString(),listener.toString(),retry,MAX_LISTENER_RETRY,e);
    if (retry < MAX_LISTENER_RETRY) {
      Thread.sleep(LISTENER_FAIL_RETRY_SLEEP_MS);
      dispatchEvent(listener,event,retry + 1);
    }
  }
}
Program: 62311
Project: 62311
Buggy source:
/** 
 * Link the plugin against alien components that may need to use it.
 * @param plugin The plugin to link.
 * @param managedPlugin The managed plugin related to the plugin.
 * @param componentDescriptors The map of component descriptors.
 */
private void link(Plugin plugin,ManagedPlugin managedPlugin,Map<String,PluginComponentDescriptor> componentDescriptors){
  Map<String,IPluginLoadingCallback> beans=alienContext.getBeansOfType(IPluginLoadingCallback.class);
  for (  IPluginLoadingCallback callback : beans.values()) {
    callback.onPluginLoaded(managedPlugin);
  }
  for (  PluginLinker linker : linkers) {
    Map<String,?> instancesToLink=managedPlugin.getPluginContext().getBeansOfType(linker.linkedType);
    for (    Entry<String,?> instanceToLink : instancesToLink.entrySet()) {
      linker.linker.link(plugin.getId(),instanceToLink.getKey(),instanceToLink.getValue());
      PluginComponentDescriptor componentDescriptor=componentDescriptors.get(instanceToLink.getKey());
      if (componentDescriptor == null) {
        componentDescriptor=new PluginComponentDescriptor();
        componentDescriptor.setBeanName(instanceToLink.getKey());
        componentDescriptor.setName(instanceToLink.getKey());
      }
      componentDescriptor.setType(linker.linkedType.getSimpleName());
    }
  }
  for (  PluginComponentDescriptor componentDescriptor : componentDescriptors.values()) {
    if (componentDescriptor.getType() == null) {
      componentDescriptor.setType(UNKNOWN_PLUGIN_COMPONENT_TYPE);
    }
  }
}

Fixed version (ground truth):
/** 
 * Link the plugin against alien components that may need to use it.
 * @param plugin The plugin to link.
 * @param managedPlugin The managed plugin related to the plugin.
 * @param componentDescriptors The map of component descriptors.
 */
private void link(Plugin plugin,ManagedPlugin managedPlugin,Map<String,PluginComponentDescriptor> componentDescriptors){
  for (  IPluginLoadingCallback callback : SpringUtils.getBeansOfType(alienContext,IPluginLoadingCallback.class)) {
    callback.onPluginLoaded(managedPlugin);
  }
  for (  PluginLinker linker : linkers) {
    Map<String,?> instancesToLink=managedPlugin.getPluginContext().getBeansOfType(linker.linkedType);
    for (    Entry<String,?> instanceToLink : instancesToLink.entrySet()) {
      linker.linker.link(plugin.getId(),instanceToLink.getKey(),instanceToLink.getValue());
      PluginComponentDescriptor componentDescriptor=componentDescriptors.get(instanceToLink.getKey());
      if (componentDescriptor == null) {
        componentDescriptor=new PluginComponentDescriptor();
        componentDescriptor.setBeanName(instanceToLink.getKey());
        componentDescriptor.setName(instanceToLink.getKey());
      }
      componentDescriptor.setType(linker.linkedType.getSimpleName());
    }
  }
  for (  PluginComponentDescriptor componentDescriptor : componentDescriptors.values()) {
    if (componentDescriptor.getType() == null) {
      componentDescriptor.setType(UNKNOWN_PLUGIN_COMPONENT_TYPE);
    }
  }
}
Program: 62312
Project: 62312
Buggy source:
private void unloadPlugin(String pluginId,boolean disable,boolean remove){
  ManagedPlugin managedPlugin=pluginContexts.get(pluginId);
  Path pluginPath;
  Path pluginUiPath;
  if (managedPlugin != null) {
    Map<String,IPluginLoadingCallback> beans=alienContext.getBeansOfType(IPluginLoadingCallback.class);
    for (    IPluginLoadingCallback callback : beans.values()) {
      callback.onPluginClosed(managedPlugin);
    }
    managedPlugin.getPluginContext().stop();
    managedPlugin.getPluginContext().destroy();
    pluginPath=managedPlugin.getPluginPath();
    pluginUiPath=managedPlugin.getPluginUiPath();
  }
 else {
    Plugin plugin=alienDAO.findById(Plugin.class,pluginId);
    pluginPath=getPluginPath(plugin.getPluginPathId());
    pluginUiPath=getPluginUiPath(plugin.getPluginPathId());
  }
  for (  PluginLinker linker : linkers) {
    linker.linker.unlink(pluginId);
  }
  if (remove) {
    alienDAO.delete(Plugin.class,pluginId);
    alienDAO.delete(PluginConfiguration.class,pluginId);
    try {
      FileUtil.delete(pluginPath);
      FileUtil.delete(getPluginZipFilePath(pluginId));
      FileUtil.delete(pluginUiPath);
    }
 catch (    IOException e) {
      log.error("String_Node_Str" + pluginId + "String_Node_Str",e);
    }
  }
 else   if (disable) {
    disablePlugin(pluginId);
  }
  pluginContexts.remove(pluginId);
}

Fixed version (ground truth):
private void unloadPlugin(String pluginId,boolean disable,boolean remove){
  ManagedPlugin managedPlugin=pluginContexts.get(pluginId);
  Path pluginPath;
  Path pluginUiPath;
  if (managedPlugin != null) {
    for (    IPluginLoadingCallback callback : SpringUtils.getBeansOfType(alienContext,IPluginLoadingCallback.class)) {
      callback.onPluginClosed(managedPlugin);
    }
    managedPlugin.getPluginContext().stop();
    managedPlugin.getPluginContext().destroy();
    pluginPath=managedPlugin.getPluginPath();
    pluginUiPath=managedPlugin.getPluginUiPath();
  }
 else {
    Plugin plugin=alienDAO.findById(Plugin.class,pluginId);
    pluginPath=getPluginPath(plugin.getPluginPathId());
    pluginUiPath=getPluginUiPath(plugin.getPluginPathId());
  }
  for (  PluginLinker linker : linkers) {
    linker.linker.unlink(pluginId);
  }
  if (remove) {
    alienDAO.delete(Plugin.class,pluginId);
    alienDAO.delete(PluginConfiguration.class,pluginId);
    try {
      FileUtil.delete(pluginPath);
      FileUtil.delete(getPluginZipFilePath(pluginId));
      FileUtil.delete(pluginUiPath);
    }
 catch (    IOException e) {
      log.error("String_Node_Str" + pluginId + "String_Node_Str",e);
    }
  }
 else   if (disable) {
    disablePlugin(pluginId);
  }
  pluginContexts.remove(pluginId);
}
Program: 62313
Project: 62313
Buggy source:
/** 
 * Initialize the plugins for alien.
 * @throws IOException In case we fail to iterate over the plugin directory.
 */
public void initialize() throws IOException {
  if (linkers == null) {
    linkers=Lists.newArrayList();
    Map<String,IPluginLinker> pluginLinkers=alienContext.getBeansOfType(IPluginLinker.class);
    for (    IPluginLinker linker : pluginLinkers.values()) {
      linkers.add(new PluginLinker(linker,getLinkedType(linker)));
    }
  }
  Path path=FileSystems.getDefault().getPath(pluginsWorkDirectory);
  if (!Files.exists(path)) {
    Files.createDirectories(path);
    log.info("String_Node_Str" + path.toAbsolutePath().toString() + "String_Node_Str");
  }
  log.info("String_Node_Str");
  GetMultipleDataResult<Plugin> results=alienDAO.find(Plugin.class,MapUtil.newHashMap(new String[]{"String_Node_Str"},new String[][]{{"String_Node_Str"}}),Integer.MAX_VALUE);
  loadPlugins(results.getData());
  log.info("String_Node_Str",results.getData().length);
}

Fixed version (ground truth):
/** 
 * Initialize the plugins for alien.
 * @throws IOException In case we fail to iterate over the plugin directory.
 */
public void initialize() throws IOException {
  if (linkers == null) {
    linkers=Lists.newArrayList();
    for (    IPluginLinker linker : SpringUtils.getBeansOfType(alienContext,IPluginLinker.class)) {
      linkers.add(new PluginLinker(linker,getLinkedType(linker)));
    }
  }
  Path path=FileSystems.getDefault().getPath(pluginsWorkDirectory);
  if (!Files.exists(path)) {
    Files.createDirectories(path);
    log.info("String_Node_Str" + path.toAbsolutePath().toString() + "String_Node_Str");
  }
  log.info("String_Node_Str");
  GetMultipleDataResult<Plugin> results=alienDAO.find(Plugin.class,MapUtil.newHashMap(new String[]{"String_Node_Str"},new String[][]{{"String_Node_Str"}}),Integer.MAX_VALUE);
  loadPlugins(results.getData());
  log.info("String_Node_Str",results.getData().length);
}
Program: 62314
Project: 62314
Buggy source:
public OperationParameterDeserializer(){
  super(IValue.class);
  addToRegistry("String_Node_Str",PropertyDefinition.class);
  addToRegistry("String_Node_Str",FunctionPropertyValue.class);
  addToRegistry("String_Node_Str",ConcatPropertyValue.class);
  addToRegistry("String_Node_Str",ScalarPropertyValue.class);
}

Fixed version (ground truth):
public OperationParameterDeserializer(){
  super(IValue.class);
  addToRegistry("String_Node_Str",PropertyDefinition.class);
  addToRegistry("String_Node_Str",FunctionPropertyValue.class);
  addToRegistry("String_Node_Str",ConcatPropertyValue.class);
  addToRegistry("String_Node_Str",JsonNodeType.STRING.toString(),ScalarPropertyValue.class);
  addToRegistry("String_Node_Str",JsonNodeType.ARRAY.toString(),ListPropertyValue.class);
  addToRegistry("String_Node_Str",JsonNodeType.OBJECT.toString(),ComplexPropertyValue.class);
  setValueStringClass(ScalarPropertyValue.class);
}
Program: 62315
Project: 62315
Buggy source:
public static boolean isValidNodeName(String name){
  return Pattern.matches(TopologyService.NODE_NAME_REGEX,name);
}

Fixed version (ground truth):
public static boolean isValidNodeName(String name){
  return TopologyService.NODE_NAME_PATTERN.matcher(name).matches();
}
Program: 62316
Project: 62316
Buggy source:
/** 
 * Rename the node template with an invalid name on the topology.
 * @param topology
 * @param parsedArchive
 */
public static void normalizeAllNodeTemplateName(Topology topology,ParsingResult<ArchiveRoot> parsedArchive){
  if (topology.getNodeTemplates() != null && !topology.getNodeTemplates().isEmpty()) {
    Map<String,NodeTemplate> nodeTemplates=Maps.newHashMap(topology.getNodeTemplates());
    for (    Map.Entry<String,NodeTemplate> nodeEntry : nodeTemplates.entrySet()) {
      String nodeName=nodeEntry.getKey();
      if (!isValidNodeName(nodeName)) {
        String newName=nodeName.toString().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
        newName=StringUtils.stripAccents(newName);
        if (topology.getNodeTemplates().containsKey(newName)) {
          int i=1;
          while (topology.getNodeTemplates().containsKey(newName + i)) {
            i++;
          }
          newName=newName + i;
        }
        renameNodeTemplate(topology,nodeName,newName);
        if (parsedArchive != null) {
          parsedArchive.getContext().getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.INVALID_NODE_TEMPLATE_NAME,nodeName,null,nodeName,null,newName));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * In alien 4 Cloud we try Rename the node template with an invalid name on the topology.
 * @param topology
 * @param parsedArchive
 */
public static void normalizeAllNodeTemplateName(Topology topology,ParsingResult<ArchiveRoot> parsedArchive){
  if (topology.getNodeTemplates() != null && !topology.getNodeTemplates().isEmpty()) {
    Map<String,NodeTemplate> nodeTemplates=Maps.newHashMap(topology.getNodeTemplates());
    for (    Map.Entry<String,NodeTemplate> nodeEntry : nodeTemplates.entrySet()) {
      String nodeName=nodeEntry.getKey();
      if (!isValidNodeName(nodeName)) {
        String newName=StringUtils.stripAccents(nodeName);
        newName=TopologyService.NODE_NAME_REPLACE_PATTERN.matcher(newName).replaceAll("String_Node_Str");
        if (topology.getNodeTemplates().containsKey(newName)) {
          int i=1;
          while (topology.getNodeTemplates().containsKey(newName + i)) {
            i++;
          }
          newName=newName + i;
        }
        renameNodeTemplate(topology,nodeName,newName);
        if (parsedArchive != null) {
          parsedArchive.getContext().getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.INVALID_NODE_TEMPLATE_NAME,nodeName,null,nodeName,null,newName));
        }
      }
    }
  }
}
Program: 62317
Project: 62317
Buggy source:
public static String formatPropertyValue(boolean appendLf,int indentLevel,AbstractPropertyValue propertyValue){
  if (propertyValue instanceof PropertyValue) {
    return formatValue(appendLf,indentLevel,((PropertyValue)propertyValue).getValue());
  }
 else {
    throw new NotSupportedException("String_Node_Str");
  }
}

Fixed version (ground truth):
public static String formatPropertyValue(boolean appendLf,int indentLevel,AbstractPropertyValue propertyValue){
  if (propertyValue instanceof PropertyValue) {
    return formatValue(appendLf,indentLevel,((PropertyValue)propertyValue).getValue());
  }
 else   if (propertyValue instanceof FunctionPropertyValue) {
    return formatFunctionPropertyValue(appendLf,indentLevel,((FunctionPropertyValue)propertyValue));
  }
 else {
    throw new NotSupportedException("String_Node_Str");
  }
}
Program: 62318
Project: 62318
Buggy source:
public String getCsvToString(Collection<?> list,boolean renderScalar){
  StringBuilder sb=new StringBuilder();
  boolean isFirst=true;
  if (list != null) {
    for (    Object o : list) {
      if (isFirst) {
        isFirst=false;
      }
 else {
        sb.append("String_Node_Str");
      }
      if (renderScalar) {
        sb.append(ToscaPropertySerializerUtils.renderScalar(o.toString()));
      }
 else {
        sb.append(o.toString());
      }
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
public static String getCsvToString(Collection<?> list,boolean renderScalar){
  StringBuilder sb=new StringBuilder();
  boolean isFirst=true;
  if (list != null) {
    for (    Object o : list) {
      if (isFirst) {
        isFirst=false;
      }
 else {
        sb.append("String_Node_Str");
      }
      if (renderScalar) {
        sb.append(ToscaPropertySerializerUtils.renderScalar(o.toString()));
      }
 else {
        sb.append(o.toString());
      }
    }
  }
  return sb.toString();
}
Program: 62320
Project: 62320
Buggy source:
public PropertyValue getDefault(){
  return this.defaultValue;
}

Fixed version (ground truth):
@ObjectField(enabled=false) public PropertyValue getDefault(){
  return this.defaultValue;
}
Program: 62322
Project: 62322
Buggy source:
public PropertyValue getDefault(){
  return this.defaultValue;
}

Fixed version (ground truth):
@ObjectField(enabled=false) public PropertyValue getDefault(){
  return this.defaultValue;
}
Program: 62323
Project: 62323
Buggy source:
private void validateType(PropertyDefinition propertyDefinition,ParsingContextExecution context,Node node){
  String propertyType=propertyDefinition.getType();
  if (propertyType == null) {
    context.getParsingErrors().add(new ParsingError(ErrorCode.VALIDATION_ERROR,"String_Node_Str",node.getStartMark(),"String_Node_Str",node.getEndMark(),"String_Node_Str"));
  }
 else   if (!ToscaType.isSimple(propertyType)) {
    if (ToscaType.LIST.equals(propertyType) || ToscaType.MAP.equals(propertyType)) {
      PropertyDefinition entrySchema=propertyDefinition.getEntrySchema();
      if (entrySchema == null) {
        context.getParsingErrors().add(new ParsingError(ErrorCode.VALIDATION_ERROR,"String_Node_Str",node.getStartMark(),"String_Node_Str" + propertyType + "String_Node_Str",node.getEndMark(),"String_Node_Str"));
      }
 else {
        validateType(entrySchema,context,node);
      }
    }
 else {
      ArchiveRoot archiveRoot=(ArchiveRoot)context.getRoot().getWrappedInstance();
      if (!archiveRoot.getDataTypes().containsKey(propertyType)) {
        if (!searchService.isElementExistInDependencies(IndexedDataType.class,propertyType,archiveRoot.getArchive().getDependencies())) {
          context.getParsingErrors().add(new ParsingError(ErrorCode.VALIDATION_ERROR,"String_Node_Str",node.getStartMark(),"String_Node_Str" + propertyType + "String_Node_Str",node.getEndMark(),"String_Node_Str"));
        }
      }
    }
  }
}

Fixed version (ground truth):
private void validateType(PropertyDefinition propertyDefinition,ParsingContextExecution context,Node node){
  String propertyType=propertyDefinition.getType();
  if (propertyType == null) {
    context.getParsingErrors().add(new ParsingError(ErrorCode.VALIDATION_ERROR,"String_Node_Str",node.getStartMark(),"String_Node_Str",node.getEndMark(),"String_Node_Str"));
  }
 else   if (!ToscaType.isSimple(propertyType)) {
    if (ToscaType.LIST.equals(propertyType) || ToscaType.MAP.equals(propertyType)) {
      PropertyDefinition entrySchema=propertyDefinition.getEntrySchema();
      if (entrySchema == null) {
        context.getParsingErrors().add(new ParsingError(ErrorCode.VALIDATION_ERROR,"String_Node_Str",node.getStartMark(),"String_Node_Str" + propertyType + "String_Node_Str",node.getEndMark(),"String_Node_Str"));
      }
    }
 else {
      ArchiveRoot archiveRoot=(ArchiveRoot)context.getRoot().getWrappedInstance();
      if (!archiveRoot.getDataTypes().containsKey(propertyType)) {
        if (!searchService.isElementExistInDependencies(IndexedDataType.class,propertyType,archiveRoot.getArchive().getDependencies())) {
          context.getParsingErrors().add(new ParsingError(ErrorCode.TYPE_NOT_FOUND,"String_Node_Str",node.getStartMark(),"String_Node_Str" + propertyType + "String_Node_Str",node.getEndMark(),propertyType));
        }
      }
    }
  }
}
Program: 62324
Project: 62324
Buggy source:
public void isUniqueNodeTemplateName(String topologyId,String newNodeTemplateName,Map<String,NodeTemplate> nodeTemplates){
  if (nodeTemplates.containsKey(newNodeTemplateName.toLowerCase())) {
    log.debug("String_Node_Str",newNodeTemplateName);
    throw new AlreadyExistException("String_Node_Str" + newNodeTemplateName + "String_Node_Str"+ topologyId+ "String_Node_Str");
  }
}

Fixed version (ground truth):
public void isUniqueNodeTemplateName(String topologyId,String newNodeTemplateName,Map<String,NodeTemplate> nodeTemplates){
  if (nodeTemplates.containsKey(newNodeTemplateName)) {
    log.debug("String_Node_Str",newNodeTemplateName);
    throw new AlreadyExistException("String_Node_Str" + newNodeTemplateName + "String_Node_Str"+ topologyId+ "String_Node_Str");
  }
}
Program: 62325
Project: 62325
Buggy source:
/** 
 * Query for all locations given an orchestrator
 * @param orchestratorId Id of the orchestrators for which to get locations.
 * @return An array that contains all locations for the given orchestrators.
 */
public Location[] getOrchestratorLocations(String orchestratorId){
  GetMultipleDataResult<Location> locations=alienDAO.search(Location.class,null,MapUtil.newHashMap(array("String_Node_Str"),(String[][])arOfArray(array(orchestratorId))),Integer.MAX_VALUE);
  return locations.getData();
}

Fixed version (ground truth):
/** 
 * Query for all locations given an orchestrator
 * @param orchestratorId Id of the orchestrators for which to get locations.
 * @return An array that contains all locations for the given orchestrators.
 */
public Location[] getOrchestratorLocations(String orchestratorId){
  GetMultipleDataResult<Location> locations=alienDAO.search(Location.class,null,MapUtil.newHashMap(array("String_Node_Str"),AlienUtils.<String>arOfArray(array(orchestratorId))),Integer.MAX_VALUE);
  return locations.getData();
}
Program: 62326
Project: 62326
Buggy source:
/** 
 * Rename the node template with an invalid name on the topology.
 * @param topology
 * @param parsedArchive
 */
public static void normalizeAllNodeTemplateName(Topology topology,ParsingResult<ArchiveRoot> parsedArchive){
  if (topology.getNodeTemplates() != null && !topology.getNodeTemplates().isEmpty()) {
    Map<String,NodeTemplate> nodeTemplates=Maps.newHashMap(topology.getNodeTemplates());
    for (    Map.Entry<String,NodeTemplate> nodeEntry : nodeTemplates.entrySet()) {
      String nodeName=nodeEntry.getKey();
      if (!isValidNodeName(nodeName)) {
        String newName=nodeName.toString().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
        newName=StringUtils.stripAccents(newName);
        if (nodeTemplates.containsKey(newName)) {
          int i=1;
          while (nodeTemplates.containsKey(newName + "String_Node_Str" + i)) {
            i++;
          }
          newName=newName + "String_Node_Str" + i;
        }
        renameNodeTemplate(topology,nodeName,newName);
        parsedArchive.getContext().getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.INVALID_NODE_TEMPLATE_NAME,nodeName,null,nodeName,null,newName));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Rename the node template with an invalid name on the topology.
 * @param topology
 * @param parsedArchive
 */
public static void normalizeAllNodeTemplateName(Topology topology,ParsingResult<ArchiveRoot> parsedArchive){
  if (topology.getNodeTemplates() != null && !topology.getNodeTemplates().isEmpty()) {
    Map<String,NodeTemplate> nodeTemplates=Maps.newHashMap(topology.getNodeTemplates());
    for (    Map.Entry<String,NodeTemplate> nodeEntry : nodeTemplates.entrySet()) {
      String nodeName=nodeEntry.getKey();
      if (!isValidNodeName(nodeName)) {
        String newName=nodeName.toString().replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
        newName=StringUtils.stripAccents(newName);
        if (topology.getNodeTemplates().containsKey(newName)) {
          int i=1;
          while (topology.getNodeTemplates().containsKey(newName + i)) {
            i++;
          }
          newName=newName + i;
        }
        renameNodeTemplate(topology,nodeName,newName);
        if (parsedArchive != null) {
          parsedArchive.getContext().getParsingErrors().add(new ParsingError(ParsingErrorLevel.WARNING,ErrorCode.INVALID_NODE_TEMPLATE_NAME,nodeName,null,nodeName,null,newName));
        }
      }
    }
  }
}
Program: 62327
Project: 62327
Buggy source:
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  lock.lock();
  Object target=obj;
  try {
    ProxyRegistry proxyRegistry=overridableCandidates.get(obj);
    if (proxyRegistry != null) {
      if (log.isDebugEnabled()) {
        if (proxyRegistry.target != proxyRegistry.original) {
          log.debug("String_Node_Str",method);
        }
 else {
          log.debug("String_Node_Str",method);
        }
      }
      target=proxyRegistry.target;
    }
 else {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str",method);
      }
    }
  }
  finally {
    lock.unlock();
  }
  Object result=ReflectionUtils.invokeMethod(method,target,args);
  return result;
}

Fixed version (ground truth):
@Override public Object invoke(Object proxy,Method method,Object[] args) throws Throwable {
  lock.lock();
  Object target=obj;
  try {
    ProxyRegistry proxyRegistry=overridableCandidates.get(obj);
    if (proxyRegistry != null) {
      if (log.isDebugEnabled()) {
        if (proxyRegistry.target != proxyRegistry.original) {
          log.debug("String_Node_Str",method);
        }
 else {
          log.debug("String_Node_Str",method);
        }
      }
      target=proxyRegistry.target;
    }
 else {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str",method);
      }
    }
  }
  finally {
    lock.unlock();
  }
  Object result=null;
  try {
    result=ReflectionUtils.invokeMethod(method,target,args);
  }
 catch (  Exception e) {
    try {
      ReflectionUtils.handleReflectionException(e);
    }
 catch (    UndeclaredThrowableException ute) {
      throw ute.getUndeclaredThrowable();
    }
  }
  return result;
}
Program: 62330
Project: 62330
Buggy source:
@When("String_Node_Str") public void I_update_the_node_template_s_capability_of_type_s_property_to(String nodeTempName,String capabilityName,String capabilityType,String propertyName,String propertyValue) throws Throwable {
  String topologyId=Context.getInstance().getTopologyId();
  UpdateIndexedTypePropertyRequest req=new UpdateIndexedTypePropertyRequest(propertyName,propertyValue,capabilityType);
  String json=jsonMapper.writeValueAsString(req);
  Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("String_Node_Str" + topologyId + "String_Node_Str"+ nodeTempName+ "String_Node_Str"+ capabilityName+ "String_Node_Str",json));
}

Fixed version (ground truth):
@When("String_Node_Str") public void I_update_the_node_template_s_capability_of_type_s_property_to(String nodeTempName,String capabilityName,String capabilityType,String propertyName,Object propertyValue) throws Throwable {
  String topologyId=Context.getInstance().getTopologyId();
  UpdateIndexedTypePropertyRequest req=new UpdateIndexedTypePropertyRequest(propertyName,propertyValue,capabilityType);
  String json=jsonMapper.writeValueAsString(req);
  Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("String_Node_Str" + topologyId + "String_Node_Str"+ nodeTempName+ "String_Node_Str"+ capabilityName+ "String_Node_Str",json));
}
Program: 62331
Project: 62331
Buggy source:
@When("String_Node_Str") public void I_update_the_property_of_the_relationship_into_from_the_node_template(String propertyName,String relationshipName,String newValue,String nodeTemplateName) throws Throwable {
  String topologyId=Context.getInstance().getTopologyId();
  UpdateIndexedTypePropertyRequest updatePropertyRequest=new UpdateIndexedTypePropertyRequest();
  updatePropertyRequest.setPropertyName(propertyName);
  updatePropertyRequest.setPropertyValue(newValue);
  updatePropertyRequest.setType("String_Node_Str");
  String json=jsonMapper.writeValueAsString(updatePropertyRequest);
  Context.getInstance().registerRestResponse(Context.getRestClientInstance().postJSon("String_Node_Str" + topologyId + "String_Node_Str"+ nodeTemplateName+ "String_Node_Str"+ relationshipName+ "String_Node_Str",json));
}

Fixed version (ground truth):
@When("String_Node_Str") public void I_update_the_property_of_the_relationship_into_from_the_node_template(String propertyName,String relationshipName,String newValue,String nodeTemplateName) throws Throwable {
  UpdateIndexedTypePropertyRequest updatePropertyRequest=new UpdateIndexedTypePropertyRequest();
  updatePropertyRequest.setPropertyValue(newValue);
  updatePropertyRequest.setType("String_Node_Str");
  updateRelationshipProperty(updatePropertyRequest,propertyName,relationshipName,nodeTemplateName);
}
Program: 62332
Project: 62332
Buggy source:
public void generateId(){
  this.id=generateId(esIndex,esType,targetElementId,targetProperty);
}

Fixed version (ground truth):
public static String generateId(String esIndex,String esType,String targetElementId,String targetProperty){
  return esIndex + "String_Node_Str" + esType+ "String_Node_Str"+ targetElementId+ "String_Node_Str"+ targetProperty;
}
Program: 62333
Project: 62333
Buggy source:
private void checkProperty(String nodePrefix,String propertyName,String propertyTextValue,Class<? extends IndexedInheritableToscaElement> type,String elementId,ParsingContext context){
  SuggestionEntry suggestionEntry=getSuggestionEntry(ElasticSearchDAO.TOSCA_ELEMENT_INDEX,type.getSimpleName().toLowerCase(),elementId,propertyName);
  if (suggestionEntry != null) {
    PriorityQueue<SuggestionService.MatchedSuggestion> similarValues=getJarowinklerMatchedSuggestions(suggestionEntry.getSuggestions(),propertyTextValue,0.8);
    if (!similarValues.isEmpty()) {
      SuggestionService.MatchedSuggestion mostMatched=similarValues.poll();
      if (!mostMatched.getValue().equals(propertyTextValue)) {
        ParsingErrorLevel level;
        if (mostMatched.getPriority() == 1.0) {
          level=ParsingErrorLevel.WARNING;
        }
 else {
          level=ParsingErrorLevel.INFO;
          addSuggestionValueToSuggestionEntry(suggestionEntry.getId(),propertyTextValue);
        }
        context.getParsingErrors().add(new ParsingError(level,ErrorCode.POTENTIAL_BAD_PROPERTY_VALUE,null,null,null,null,"String_Node_Str" + nodePrefix + "String_Node_Str"+ propertyName+ "String_Node_Str"+ mostMatched.getValue()+ "String_Node_Str"+ propertyTextValue+ "String_Node_Str"));
      }
    }
 else {
      addSuggestionValueToSuggestionEntry(suggestionEntry.getId(),propertyTextValue);
    }
  }
}

Fixed version (ground truth):
private SuggestionEntry checkProperty(String nodePrefix,String propertyName,String propertyTextValue,Class<? extends IndexedInheritableToscaElement> type,String elementId,ParsingContext context){
  SuggestionEntry suggestionEntry=getSuggestionEntry(ElasticSearchDAO.TOSCA_ELEMENT_INDEX,type.getSimpleName().toLowerCase(),elementId,propertyName);
  if (suggestionEntry != null) {
    PriorityQueue<SuggestionService.MatchedSuggestion> similarValues=getJaroWinklerMatchedSuggestions(suggestionEntry.getSuggestions(),propertyTextValue,0.8);
    if (!similarValues.isEmpty()) {
      SuggestionService.MatchedSuggestion mostMatched=similarValues.poll();
      if (!mostMatched.getValue().equals(propertyTextValue)) {
        ParsingErrorLevel level;
        if (mostMatched.getPriority() == 1.0) {
          level=ParsingErrorLevel.WARNING;
        }
 else {
          level=ParsingErrorLevel.INFO;
          addSuggestionValueToSuggestionEntry(suggestionEntry.getId(),propertyTextValue);
        }
        context.getParsingErrors().add(new ParsingError(level,ErrorCode.POTENTIAL_BAD_PROPERTY_VALUE,null,null,null,null,"String_Node_Str" + nodePrefix + "String_Node_Str"+ propertyName+ "String_Node_Str"+ mostMatched.getValue()+ "String_Node_Str"+ propertyTextValue+ "String_Node_Str"));
      }
    }
 else {
      addSuggestionValueToSuggestionEntry(suggestionEntry.getId(),propertyTextValue);
    }
  }
  return suggestionEntry;
}
Program: 62334
Project: 62334
Buggy source:
/** 
 * Iterate on default suggestions to update all assosiate property definition.
 */
public void setAllSuggestionIdOnPropertyDefinition(){
  List<SuggestionEntry> suggestionEntries=getAllSuggestionEntries();
  if (suggestionEntries != null && !suggestionEntries.isEmpty()) {
    for (    SuggestionEntry suggestionEntry : suggestionEntries) {
      setSuggestionIdOnPropertyDefinition(suggestionEntry);
    }
  }
}

Fixed version (ground truth):
/** 
 * Iterate on default suggestions to update all associate property definition.
 */
public void setAllSuggestionIdOnPropertyDefinition(){
  List<SuggestionEntry> suggestionEntries=getAllSuggestionEntries();
  if (suggestionEntries != null && !suggestionEntries.isEmpty()) {
    for (    SuggestionEntry suggestionEntry : suggestionEntries) {
      setSuggestionIdOnPropertyDefinition(suggestionEntry);
    }
  }
}