public TestDataflowAnalysis(BugReporter bugReporter) { dataflowClassName = SystemProperties.getProperty("dataflow.classname"); methodName = SystemProperties.getProperty("dataflow.method"); }
installUserInstalledPlugins(); Set<Entry<Object, Object>> entrySet = SystemProperties.getAllProperties().entrySet(); for (Map.Entry<?, ?> e : entrySet) { if (e.getKey() instanceof String && e.getValue() instanceof String
public CallToUnconditionalThrower(BugReporter bugReporter) { this.bugReporter = bugReporter; testingEnabled = SystemProperties.getBoolean("report_TESTING_pattern_in_standard_detectors"); }
public static boolean getBoolean(String name, boolean defaultValue) { boolean result = defaultValue; try { String value = getProperty(name); if (value == null) { return defaultValue; } result = toBoolean(value); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } return result; }
public FindRefComparison(BugReporter bugReporter) { this.bugReporter = bugReporter; this.bugAccumulator = new BugAccumulator(bugReporter); this.suspiciousSet = new HashSet<>(DEFAULT_SUSPICIOUS_SET); // Check frc.suspicious system property for additional suspicious types // to check String extraSuspiciousTypes = SystemProperties.getProperty("frc.suspicious"); if (extraSuspiciousTypes != null) { StringTokenizer tok = new StringTokenizer(extraSuspiciousTypes, ","); while (tok.hasMoreTokens()) { suspiciousSet.add(tok.nextToken()); } } testingEnabled = SystemProperties.getBoolean("report_TESTING_pattern_in_standard_detectors"); }
String msg = SystemProperties.getOSDependentProperty("findbugs.unableToLoadViaURL"); if (msg == null) { msg = e.getMessage(); if (SystemProperties.getBoolean("findbugs.failIfUnableToLoadViaURL")) { System.exit(1);
String loadFromURL = SystemProperties.getOSDependentProperty("findbugs.loadBugsFromURL"); loadFromURL = SystemProperties.rewriteURLAccordingToProperties(loadFromURL); URL url = new URL(loadFromURL); mainFrame.getMainFrameLoadSaveHelper().loadAnalysis(url);
/** * @param arg0 * property name * @param arg1 * default value * @return the int value (or arg1 if the property does not exist) * @deprecated Use {@link #getInt(String,int)} instead */ @Deprecated public static Integer getInteger(String arg0, int arg1) { return getInt(arg0, arg1); }
private static void loadPropertiesFromConfigFile() { URL systemProperties = DetectorFactoryCollection.getCoreResource("systemProperties.properties"); loadPropertiesFromURL(systemProperties); String u = System.getProperty("findbugs.loadPropertiesFrom"); if (u != null) { try { URL configURL = new URL(u); loadPropertiesFromURL(configURL); } catch (MalformedURLException e) { AnalysisContext.logError("Unable to load properties from " + u, e); } } }
/** * Set the list of source directories. */ void setSourceBaseList(Iterable<String> sourceBaseList) { for (String repos : sourceBaseList) { if (repos.endsWith(".zip") || repos.endsWith(".jar") || repos.endsWith(".z0p.gz")) { // Zip or jar archive try { if (repos.startsWith("http:") || repos.startsWith("https:") || repos.startsWith("file:")) { String url = SystemProperties.rewriteURLAccordingToProperties(repos); repositoryList.add(makeInMemorySourceRepository(url)); } else { repositoryList.add(new ZipSourceRepository(new ZipFile(repos))); } } catch (IOException e) { // Ignored - we won't use this archive AnalysisContext.logError("Unable to load " + repos, e); } } else { File dir = new File(repos); if (dir.canRead() && dir.isDirectory()) { repositoryList.add(new DirectorySourceRepository(repos)); } else { AnalysisContext.logError("Unable to load " + repos); } } } }
public static boolean getBoolean(String name, boolean defaultValue) { boolean result = defaultValue; try { String value = getProperty(name); if (value == null) { return defaultValue; } result = toBoolean(value); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } return result; }
public FindRefComparison(BugReporter bugReporter) { this.bugReporter = bugReporter; this.bugAccumulator = new BugAccumulator(bugReporter); this.suspiciousSet = new HashSet<String>(DEFAULT_SUSPICIOUS_SET); // Check frc.suspicious system property for additional suspicious types // to check String extraSuspiciousTypes = SystemProperties.getProperty("frc.suspicious"); if (extraSuspiciousTypes != null) { StringTokenizer tok = new StringTokenizer(extraSuspiciousTypes, ","); while (tok.hasMoreTokens()) { suspiciousSet.add(tok.nextToken()); } } testingEnabled = SystemProperties.getBoolean("report_TESTING_pattern_in_standard_detectors"); }
/** * @param arg0 * property name * @param arg1 * default value * @return the int value (or arg1 if the property does not exist) * @deprecated Use {@link #getInt(String,int)} instead */ @Deprecated public static Integer getInteger(String arg0, int arg1) { return getInt(arg0, arg1); }
private static void loadPropertiesFromConfigFile() { URL systemProperties = DetectorFactoryCollection.getCoreResource("systemProperties.properties"); loadPropertiesFromURL(systemProperties); String u = System.getProperty("findbugs.loadPropertiesFrom"); if (u != null) { try { URL configURL = new URL(u); loadPropertiesFromURL(configURL); } catch (MalformedURLException e) { AnalysisContext.logError("Unable to load properties from " + u, e); } } }
/** * Set the list of source directories. */ void setSourceBaseList(Iterable<String> sourceBaseList) { for (String repos : sourceBaseList) { if (repos.endsWith(".zip") || repos.endsWith(".jar") || repos.endsWith(".z0p.gz")) { // Zip or jar archive try { if (repos.startsWith("http:") || repos.startsWith("https:") || repos.startsWith("file:")) { String url = SystemProperties.rewriteURLAccordingToProperties(repos); repositoryList.add(makeInMemorySourceRepository(url)); } else { repositoryList.add(new ZipSourceRepository(new ZipFile(repos))); } } catch (IOException e) { // Ignored - we won't use this archive AnalysisContext.logError("Unable to load " + repos, e); } } else { File dir = new File(repos); if (dir.canRead() && dir.isDirectory()) { repositoryList.add(new DirectorySourceRepository(repos)); } else { AnalysisContext.logError("Unable to load " + repos); } } } }
/** * @param name * property name * @return string value (or null if the property does not exist) */ public static String getOSDependentProperty(String name) { String osDependentName = name + OS_NAME; String value = getProperty(osDependentName); if (value != null) { return value; } return getProperty(name); }
public CbeckMustOverrideSuperAnnotation(BugReporter bugReporter) { this.bugReporter = bugReporter; testingEnabled = SystemProperties.getBoolean("report_TESTING_pattern_in_standard_detectors"); }
installUserInstalledPlugins(); Set<Entry<Object, Object>> entrySet = SystemProperties.getAllProperties().entrySet(); for (Map.Entry<?, ?> e : entrySet) { if (e.getKey() instanceof String && e.getValue() instanceof String
/** * @param name * property name * @param defaultValue * default value * @return the int value (or defaultValue if the property does not exist) */ public static int getInt(String name, int defaultValue) { try { String value = getProperty(name); if (value != null) { return Integer.decode(value); } } catch (Exception e) { assert true; } return defaultValue; }
public SerializableIdiom(BugReporter bugReporter) { this.bugReporter = bugReporter; testingEnabled = SystemProperties.getBoolean("report_TESTING_pattern_in_standard_detectors"); }