Buggy code:
@ Plugin ( name = "puppetdb" , service = "ResourceModelSource" ) public class PuppetDBResourceModelSourceFactory implements Describable , ResourceModelSourceFactory { private static final Logger LOG = LoggerFactory . getLogger ( PuppetDBResourceModelSource . class ) ; public static final String PUPPETDB_HOST = "PUPPETDB_HOST" ; public static final String PUPPETDB_PORT = "PUPPETDB_PORT" ; public static final String SSL_DIR = "SSL_DIR" ; public static final String CA_CERT_PEM = "CA_CERT_PEM" ; public static final String CERT_PEM = "CERT_PEM" ; public static final String USERNAME = "USERNAME" ; public static final String CACHE = "CACHE" ; public static final String FACTS_DELIMITER = ";" ; public static final String FACTS = "FACTS" ; private static final Description DESC = DescriptionBuilder . builder ( ) . name ( "puppetdb" ) . title ( "PuppetDB" ) . description ( "Provides<seq2seq4repair_space>PuppetDB<seq2seq4repair_space>nodes<seq2seq4repair_space>for<seq2seq4repair_space>your<seq2seq4repair_space>RunDeck<seq2seq4repair_space>server." ) . stringProperty ( PuppetDBResourceModelSourceFactory . PUPPETDB_HOST , null , true , "PuppetDB<seq2seq4repair_space>Host" , "The<seq2seq4repair_space>hostname<seq2seq4repair_space>of<seq2seq4repair_space>your<seq2seq4repair_space>PuppetDB<seq2seq4repair_space>server" ) . integerProperty ( PuppetDBResourceModelSourceFactory . PUPPETDB_PORT , "8081" , false , "PuppetDB<seq2seq4repair_space>Port" , "Port<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>PuppetDB<seq2seq4repair_space>or<seq2seq4repair_space>blank<seq2seq4repair_space>for<seq2seq4repair_space>default" ) . stringProperty ( PuppetDBResourceModelSourceFactory . SSL_DIR , "//var//lib//puppet//ssl" , false , "SSL<seq2seq4repair_space>Directory" , "The<seq2seq4repair_space>SSL<seq2seq4repair_space>directory<seq2seq4repair_space>of<seq2seq4repair_space>your<seq2seq4repair_space>puppet<seq2seq4repair_space>node<seq2seq4repair_space>or<seq2seq4repair_space>blank<seq2seq4repair_space>for<seq2seq4repair_space>default" ) . stringProperty ( PuppetDBResourceModelSourceFactory . CA_CERT_PEM , "ca.pem" , false , "Ca<seq2seq4repair_space>cert<seq2seq4repair_space>pem" , "The<seq2seq4repair_space>filename<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>Ca<seq2seq4repair_space>cert<seq2seq4repair_space>pem<seq2seq4repair_space>file<seq2seq4repair_space>or<seq2seq4repair_space>blank<seq2seq4repair_space>for<seq2seq4repair_space>default" ) . stringProperty ( PuppetDBResourceModelSourceFactory . CERT_PEM , null , true , "Cert<seq2seq4repair_space>pem" , "The<seq2seq4repair_space>cert<seq2seq4repair_space>pem<seq2seq4repair_space>filename<seq2seq4repair_space>of<seq2seq4repair_space>your<seq2seq4repair_space>rundeck<seq2seq4repair_space>node" ) . stringProperty ( PuppetDBResourceModelSourceFactory . USERNAME , "rundeck" , false , "Username" , "The<seq2seq4repair_space>connecting<seq2seq4repair_space>username<seq2seq4repair_space>or<seq2seq4repair_space>blank<seq2seq4repair_space>for<seq2seq4repair_space>default" ) . stringProperty ( PuppetDBResourceModelSourceFactory . FACTS , null , false , "Facts<seq2seq4repair_space>mapped<seq2seq4repair_space>to<seq2seq4repair_space>tags" , "Additional<seq2seq4repair_space>facts,<seq2seq4repair_space>that<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>mapped<seq2seq4repair_space>to<seq2seq4repair_space>your<seq2seq4repair_space>nodes<seq2seq4repair_space>as<seq2seq4repair_space>tags<seq2seq4repair_space>(semicolon<seq2seq4repair_space>separated<seq2seq4repair_space>values)" ) . integerProperty ( PuppetDBResourceModelSourceFactory . CACHE , null , false , "Caching<seq2seq4repair_space>of<seq2seq4repair_space>PuppetDB<seq2seq4repair_space>nodes" , "Set<seq2seq4repair_space>the<seq2seq4repair_space>time<seq2seq4repair_space>in<seq2seq4repair_space>seconds<seq2seq4repair_space>nodes<seq2seq4repair_space>get<seq2seq4repair_space>removed<seq2seq4repair_space>from<seq2seq4repair_space>cache<seq2seq4repair_space>or<seq2seq4repair_space>blank<seq2seq4repair_space>to<seq2seq4repair_space>disable<seq2seq4repair_space>caching" ) . build ( ) ; @ Override public ResourceModelSource createResourceModelSource ( Properties configuration ) throws ConfigurationException { } @ Override public Description getDescription ( ) { } private Cache < String , INodeSet > createCache ( Properties configuration ) { } private PuppetDBClient createPuppetDBClient ( Properties configuration ) { BasicAPIPreferences prefs = new BasicAPIPreferences ( ) ; prefs . setServiceHostname ( configuration . getProperty ( PuppetDBResourceModelSourceFactory . PUPPETDB_HOST ) ) ; <START_BUG> prefs . setServicePort ( Integer . valueOf ( configuration . getProperty ( PuppetDBResourceModelSourceFactory . PUPPETDB_PORT ) ) ) ; <END_BUG> prefs . setAllowAllHosts ( false ) ; File sslDir = new File ( configuration . getProperty ( PuppetDBResourceModelSourceFactory . SSL_DIR ) ) ; File caCertPem = new File ( sslDir , ( "certs//" + ( configuration . getProperty ( PuppetDBResourceModelSourceFactory . CA_CERT_PEM ) ) ) ) ; if ( caCertPem . canRead ( ) ) { prefs . setCaCertPEM ( caCertPem ) ; } String agentCertPem = configuration . getProperty ( PuppetDBResourceModelSourceFactory . CERT_PEM ) ; File certPem = new File ( sslDir , ( "certs//" + agentCertPem ) ) ; prefs . setCertPEM ( certPem ) ; File privateKeyPEM = new File ( sslDir , ( "private_keys//" + agentCertPem ) ) ; prefs . setPrivateKeyPEM ( privateKeyPEM ) ; return PuppetDBClientFactory . newClient ( prefs ) ; } private Set < String > parseFacts ( Properties configuration ) { } }

Fix:
prefs . setServicePort ( Integer . parseInt ( configuration . getProperty ( PuppetDBResourceModelSourceFactory . PUPPETDB_PORT ) ) ) ;