Buggy code:
public void load ( String dir , File configFile ) throws IOException , ParserConfigurationException , SAXException { } public void load ( String dir , InputSource cfgis ) throws IOException , ParserConfigurationException , SAXException { } private Document copyDoc ( Document document ) throws TransformerException { } private Properties readProperties ( Config cfg , Node node ) throws XPathExpressionException { } private volatile boolean isShutDown = false ; private volatile Config cfg ; public boolean isShutDown ( ) { } public void shutdown ( ) { } private void cancelCoreRecoveries ( ) { } @ Override protected void finalize ( ) throws Throwable { } public SolrCore register ( String name , SolrCore core , boolean returnPrevNotClosed ) { } private void registerInZk ( SolrCore core ) { } public SolrCore register ( SolrCore core , boolean returnPrev ) { } public SolrCore create ( CoreDescriptor dcore ) throws IOException , ParserConfigurationException , SAXException { } public Collection < SolrCore > getCores ( ) { } public Collection < String > getCoreNames ( ) { } public Collection < String > getCoreNames ( SolrCore core ) { } public void reload ( String name ) throws IOException , ParserConfigurationException , SAXException { name = checkDefault ( name ) ; SolrCore core ; synchronized ( cores ) { core = cores . get ( name ) ; } if ( core == null ) throw new org . apache . solr . common . SolrException ( ErrorCode . BAD_REQUEST , ( "No<seq2seq4repair_space>such<seq2seq4repair_space>core:<seq2seq4repair_space>" + name ) ) ; CoreDescriptor cd = core . getCoreDescriptor ( ) ; File instanceDir = new File ( cd . getInstanceDir ( ) ) ; if ( ! ( instanceDir . isAbsolute ( ) ) ) { instanceDir = new File ( getSolrHome ( ) , cd . getInstanceDir ( ) ) ; } CoreContainer . log . info ( "Reloading<seq2seq4repair_space>SolrCore<seq2seq4repair_space>'{}'<seq2seq4repair_space>using<seq2seq4repair_space>instanceDir:<seq2seq4repair_space>{}" , cd . getName ( ) , instanceDir . getAbsolutePath ( ) ) ; SolrResourceLoader solrLoader ; if ( ( zkController ) == null ) { solrLoader = new SolrResourceLoader ( instanceDir . getAbsolutePath ( ) , libLoader , CoreContainer . getCoreProps ( instanceDir . getAbsolutePath ( ) , cd . getPropertiesName ( ) , cd . getCoreProperties ( ) ) ) ; } else { try { String collection = cd . getCloudDescriptor ( ) . getCollectionName ( ) ; zkController . createCollectionZkNode ( cd . getCloudDescriptor ( ) ) ; String zkConfigName = zkController . readConfigName ( collection ) ; if ( zkConfigName == null ) { CoreContainer . log . error ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>config<seq2seq4repair_space>name<seq2seq4repair_space>for<seq2seq4repair_space>collection:" + collection ) ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>config<seq2seq4repair_space>name<seq2seq4repair_space>for<seq2seq4repair_space>collection:" + collection ) ) ; } solrLoader = new org . apache . solr . cloud . ZkSolrResourceLoader ( instanceDir . getAbsolutePath ( ) , zkConfigName , libLoader , CoreContainer . getCoreProps ( instanceDir . getAbsolutePath ( ) , cd . getPropertiesName ( ) , cd . getCoreProperties ( ) ) , zkController ) ; } catch ( KeeperException e ) { CoreContainer . log . error ( "" , e ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; CoreContainer . log . error ( "" , e ) ; throw new org . apache . solr . common . cloud . ZooKeeperException ( ErrorCode . SERVER_ERROR , "" , e ) ; } } <START_BUG> SolrCore newCore = core . reload ( solrLoader ) ; <END_BUG> String origName = coreToOrigName . remove ( core ) ; if ( origName != null ) { coreToOrigName . put ( newCore , origName ) ; } register ( name , newCore , false ) ; } private String checkDefault ( String name ) { } public void swap ( String n0 , String n1 ) { } public SolrCore remove ( String name ) { } public void rename ( String name , String toName ) { } public SolrCore getCore ( String name ) { } protected CoreAdminHandler createMultiCoreHandler ( final String adminHandlerClass ) { } public CoreAdminHandler getMultiCoreHandler ( ) { } public CollectionsHandler getCollectionsHandler ( ) { } public String getDefaultCoreName ( ) { } public boolean isPersistent ( ) { } public void setPersistent ( boolean persistent ) { } public String getAdminPath ( ) { } public void setAdminPath ( String adminPath ) { } public String getManagementPath ( ) { } public void setManagementPath ( String path ) { } public LogWatcher getLogging ( ) { } public void setLogging ( LogWatcher v ) { } public File getConfigFile ( ) { } public void persist ( ) { } public void persistFile ( File file ) { } private String intToString ( Integer integer ) { } private void addCoresAttrib ( Map < String , String > coresAttribs , String attribName , String attribValue , String defaultValue ) { } private void addCoreProperty ( Map < String , String > coreAttribs , Node node , String name , String value , String defaultValue ) { } public String getSolrHome ( ) { } public boolean isZooKeeperAware ( ) { } public ZkController getZkController ( ) { } public ShardHandlerFactory getShardHandlerFactory ( ) { } private SolrConfig getSolrConfigFromZk ( String zkConfigName , String solrConfigFileName , SolrResourceLoader resourceLoader ) throws IOException , InterruptedException , ParserConfigurationException , KeeperException , SAXException { } private IndexSchema getSchemaFromZk ( String zkConfigName , String schemaName , SolrConfig config , SolrResourceLoader resourceLoader ) throws InterruptedException , KeeperException { } private static final String DEF_SOLR_XML = ( ( ( ( ( ( ( "<?xml<seq2seq4repair_space>version=\"1.0\"<seq2seq4repair_space>encoding=\"UTF-8\"<seq2seq4repair_space>?>\n" + ( "<solr<seq2seq4repair_space>persistent=\"false\">\n" + "<seq2seq4repair_space><cores<seq2seq4repair_space>adminPath=\"//admin//cores\"<seq2seq4repair_space>defaultCoreName=\"" ) ) + ( CoreContainer . DEFAULT_DEFAULT_CORE_NAME ) ) + "\">\n" ) + "<seq2seq4repair_space><core<seq2seq4repair_space>name=\"" ) + ( CoreContainer . DEFAULT_DEFAULT_CORE_NAME ) ) + "\"<seq2seq4repair_space>shard=\"${shard:}\"<seq2seq4repair_space>instanceDir=\"collection1\"<seq2seq4repair_space>//>\n"

Fix:
SolrCore newCore = core . reload ( solrLoader , core ) ;