Program: 82177
Project: 82177
Buggy source:
public static TableContext create(TableDescriptor tableDescriptor,boolean remote,Iface client){
  if (tableDescriptor == null) {
    throw new NullPointerException("String_Node_Str");
  }
  String name=tableDescriptor.getName();
  if (name == null) {
    throw new NullPointerException("String_Node_Str");
  }
  String tableUri=tableDescriptor.getTableUri();
  if (tableUri == null) {
    throw new NullPointerException("String_Node_Str");
  }
  TableContext tableContext=_cache.get(name);
  if (tableContext != null) {
    TableContext clone=tableContext.clone();
    TableDescriptor newTd=new TableDescriptor(clone._descriptor);
    clone._descriptor=newTd;
    clone._descriptor.setEnabled(tableDescriptor.isEnabled());
    return clone;
  }
  LOG.info("String_Node_Str",name);
  Configuration configuration=getSystemConfiguration();
  BlurConfiguration blurConfiguration=getSystemBlurConfiguration();
  Map<String,String> tableProperties=tableDescriptor.getTableProperties();
  if (tableProperties != null) {
    for (    Entry<String,String> prop : tableProperties.entrySet()) {
      configuration.set(prop.getKey(),prop.getValue());
      blurConfiguration.set(prop.getKey(),prop.getValue());
    }
  }
  tableContext=new TableContext();
  tableContext._configuration=configuration;
  tableContext._blurConfiguration=blurConfiguration;
  tableContext._tablePath=new Path(tableUri);
  tableContext._defaultFieldName=SUPER;
  tableContext._table=name;
  tableContext._descriptor=tableDescriptor;
  tableContext._timeBetweenCommits=configuration.getLong(BLUR_SHARD_TIME_BETWEEN_COMMITS,60000);
  tableContext._timeBetweenRefreshs=configuration.getLong(BLUR_SHARD_TIME_BETWEEN_REFRESHS,5000);
  tableContext._defaultPrimeDocTerm=new Term(BlurConstants.PRIME_DOC,BlurConstants.PRIME_DOC_VALUE);
  tableContext._defaultScoreType=ScoreType.SUPER;
  tableContext._discoverableFields=new HashSet<String>(Arrays.asList(BlurConstants.ROW_ID,BlurConstants.RECORD_ID,BlurConstants.FAMILY));
  tableContext._accessControlFactory=new FilterAccessControlFactory();
  boolean strict=tableDescriptor.isStrictTypes();
  String defaultMissingFieldType=tableDescriptor.getDefaultMissingFieldType();
  boolean defaultMissingFieldLessIndexing=tableDescriptor.isDefaultMissingFieldLessIndexing();
  Map<String,String> defaultMissingFieldProps=emptyIfNull(tableDescriptor.getDefaultMissingFieldProps());
  Path storagePath=new Path(tableContext._tablePath,TYPES);
  try {
    FieldManager fieldManager;
    if (remote) {
      fieldManager=new ThriftFieldManager(SUPER,new NoStopWordStandardAnalyzer(),strict,defaultMissingFieldType,defaultMissingFieldLessIndexing,defaultMissingFieldProps,configuration,client,name);
    }
 else {
      fieldManager=new HdfsFieldManager(SUPER,new NoStopWordStandardAnalyzer(),storagePath,configuration,strict,defaultMissingFieldType,defaultMissingFieldLessIndexing,defaultMissingFieldProps);
    }
    loadCustomTypes(tableContext,blurConfiguration,fieldManager);
    fieldManager.loadFromStorage();
    tableContext._fieldManager=fieldManager;
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  Class<?> c1=configuration.getClass(BLUR_SHARD_INDEX_DELETION_POLICY_MAXAGE,KeepOnlyLastCommitDeletionPolicy.class);
  tableContext._indexDeletionPolicy=(IndexDeletionPolicy)configure(ReflectionUtils.newInstance(c1,configuration),tableContext);
  Class<?> c2=configuration.getClass(BLUR_SHARD_INDEX_SIMILARITY,FairSimilarity.class);
  tableContext._similarity=(Similarity)configure(ReflectionUtils.newInstance(c2,configuration),tableContext);
  String readInterceptorClass=blurConfiguration.get(BLUR_SHARD_READ_INTERCEPTOR);
  if (readInterceptorClass == null || readInterceptorClass.trim().isEmpty()) {
    tableContext._readInterceptor=DEFAULT_INTERCEPTOR;
  }
 else {
    try {
      @SuppressWarnings("String_Node_Str") Class<? extends ReadInterceptor> clazz=(Class<? extends ReadInterceptor>)Class.forName(readInterceptorClass);
      Constructor<? extends ReadInterceptor> constructor=clazz.getConstructor(new Class[]{BlurConfiguration.class});
      tableContext._readInterceptor=constructor.newInstance(blurConfiguration);
    }
 catch (    Exception e) {
      throw new RuntimeException(e);
    }
  }
  tableContext._similarity=(Similarity)configure(ReflectionUtils.newInstance(c2,configuration),tableContext);
  _cache.put(name,tableContext);
  return tableContext.clone();
}

Fixed version (ground truth):
public static TableContext create(TableDescriptor tableDescriptor,boolean remote,Iface client){
  if (tableDescriptor == null) {
    throw new NullPointerException("String_Node_Str");
  }
  String name=tableDescriptor.getName();
  if (name == null) {
    throw new NullPointerException("String_Node_Str");
  }
  String tableUri=tableDescriptor.getTableUri();
  if (tableUri == null) {
    throw new NullPointerException("String_Node_Str");
  }
  TableContext tableContext=_cache.get(name);
  if (tableContext != null) {
    return clone(tableDescriptor,tableContext);
  }
synchronized (_cache) {
    tableContext=_cache.get(name);
    if (tableContext != null) {
      return clone(tableDescriptor,tableContext);
    }
    return createInternal(tableDescriptor,remote,client,name,tableUri);
  }
}