java.util.Map

Here are the examples of the java api class java.util.Map taken from open source projects.

1. Navigator#createOperatorMap()

Project: incubator-freemarker
File: Navigator.java
private Map createOperatorMap() {
    Map map = new HashMap();
    map.put("_attributes", new AttributesOp());
    map.put("@*", map.get("_attributes"));
    map.put("_children", new ChildrenOp());
    map.put("*", map.get("_children"));
    map.put("_descendantOrSelf", new DescendantOrSelfOp());
    map.put("_descendant", new DescendantOp());
    map.put("_document", new DocumentOp());
    map.put("_doctype", new DocumentTypeOp());
    map.put("_ancestor", new AncestorOp());
    map.put("_ancestorOrSelf", new AncestorOrSelfOp());
    map.put("_content", new ContentOp());
    map.put("_name", new LocalNameOp());
    map.put("_nsprefix", new NamespacePrefixOp());
    map.put("_nsuri", new NamespaceUriOp());
    map.put("_parent", new ParentOp());
    map.put("_qname", new QualifiedNameOp());
    map.put("_text", new TextOp());
    map.put("_type", new TypeOp());
    return map;
}

2. JavaModelManager#getDefaultOptionsNoInitialization()

Project: che
File: JavaModelManager.java
// Do not modify without modifying getDefaultOptions()
private Hashtable getDefaultOptionsNoInitialization() {
    // compiler defaults
    Map defaultOptionsMap = new CompilerOptions().getMap();
    // Override some compiler defaults
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_LOCAL_VARIABLE_ATTR, org.eclipse.jdt.core.JavaCore.GENERATE);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_CODEGEN_UNUSED_LOCAL, org.eclipse.jdt.core.JavaCore.PRESERVE);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_TASK_TAGS, org.eclipse.jdt.core.JavaCore.DEFAULT_TASK_TAGS);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_TASK_PRIORITIES, org.eclipse.jdt.core.JavaCore.DEFAULT_TASK_PRIORITIES);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_TASK_CASE_SENSITIVE, org.eclipse.jdt.core.JavaCore.ENABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_DOC_COMMENT_SUPPORT, org.eclipse.jdt.core.JavaCore.ENABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE, org.eclipse.jdt.core.JavaCore.ERROR);
    // Builder settings
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_RESOURCE_COPY_FILTER, "");
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_INVALID_CLASSPATH, org.eclipse.jdt.core.JavaCore.ABORT);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_DUPLICATE_RESOURCE, org.eclipse.jdt.core.JavaCore.WARNING);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_CLEAN_OUTPUT_FOLDER, org.eclipse.jdt.core.JavaCore.CLEAN);
    // JavaCore settings
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_JAVA_BUILD_ORDER, org.eclipse.jdt.core.JavaCore.IGNORE);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_INCOMPLETE_CLASSPATH, org.eclipse.jdt.core.JavaCore.ERROR);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_CIRCULAR_CLASSPATH, org.eclipse.jdt.core.JavaCore.ERROR);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_INCOMPATIBLE_JDK_LEVEL, org.eclipse.jdt.core.JavaCore.IGNORE);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_OUTPUT_LOCATION_OVERLAPPING_ANOTHER_SOURCE, org.eclipse.jdt.core.JavaCore.ERROR);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_ENABLE_CLASSPATH_EXCLUSION_PATTERNS, org.eclipse.jdt.core.JavaCore.ENABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CORE_ENABLE_CLASSPATH_MULTIPLE_OUTPUT_LOCATIONS, org.eclipse.jdt.core.JavaCore.ENABLED);
    // Formatter settings
    defaultOptionsMap.putAll(DefaultCodeFormatterConstants.getEclipseDefaultSettings());
    // CodeAssist settings
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_VISIBILITY_CHECK, org.eclipse.jdt.core.JavaCore.DISABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_DEPRECATION_CHECK, org.eclipse.jdt.core.JavaCore.DISABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_IMPLICIT_QUALIFICATION, org.eclipse.jdt.core.JavaCore.DISABLED);
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_FIELD_PREFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_STATIC_FIELD_PREFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_STATIC_FINAL_FIELD_PREFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_LOCAL_PREFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_ARGUMENT_PREFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_FIELD_SUFFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_STATIC_FIELD_SUFFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_STATIC_FINAL_FIELD_SUFFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_LOCAL_SUFFIXES, "");
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_ARGUMENT_SUFFIXES, "");
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_FORBIDDEN_REFERENCE_CHECK, org.eclipse.jdt.core.JavaCore.ENABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_DISCOURAGED_REFERENCE_CHECK, org.eclipse.jdt.core.JavaCore.DISABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_CAMEL_CASE_MATCH, org.eclipse.jdt.core.JavaCore.ENABLED);
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.CODEASSIST_SUGGEST_STATIC_IMPORTS, org.eclipse.jdt.core.JavaCore.ENABLED);
    // Time out for parameter names
    //$NON-NLS-1$
    defaultOptionsMap.put(org.eclipse.jdt.core.JavaCore.TIMEOUT_FOR_PARAMETER_NAME_FROM_ATTACHED_JAVADOC, "50");
    return new Hashtable(defaultOptionsMap);
}

3. NodeListModel#createOperations()

Project: incubator-freemarker
File: NodeListModel.java
private static final Map createOperations() {
    Map map = new HashMap();
    map.put("_ancestor", new AncestorOp());
    map.put("_ancestorOrSelf", new AncestorOrSelfOp());
    map.put("_attributes", ALL_ATTRIBUTES_OP);
    map.put("_children", ALL_CHILDREN_OP);
    map.put("_cname", new CanonicalNameOp());
    map.put("_content", new ContentOp());
    map.put("_descendant", new DescendantOp());
    map.put("_descendantOrSelf", new DescendantOrSelfOp());
    map.put("_document", new DocumentOp());
    map.put("_doctype", new DocTypeOp());
    map.put("_name", new NameOp());
    map.put("_nsprefix", new NamespacePrefixOp());
    map.put("_nsuri", new NamespaceUriOp());
    map.put("_parent", new ParentOp());
    map.put("_qname", new QNameOp());
    map.put("_text", new TextOp());
    return map;
}

4. DefaultAtomicTypeConverterProvider#registerDefaultAtomicTypeConverters()

Project: jackrabbit-ocm
File: DefaultAtomicTypeConverterProvider.java
protected Map registerDefaultAtomicTypeConverters() {
    Map converters = new HashMap();
    converters.put(String.class, StringTypeConverterImpl.class);
    converters.put(InputStream.class, BinaryTypeConverterImpl.class);
    converters.put(long.class, LongTypeConverterImpl.class);
    converters.put(Long.class, LongTypeConverterImpl.class);
    converters.put(int.class, IntTypeConverterImpl.class);
    converters.put(Integer.class, IntTypeConverterImpl.class);
    converters.put(double.class, DoubleTypeConverterImpl.class);
    converters.put(Double.class, DoubleTypeConverterImpl.class);
    converters.put(boolean.class, BooleanTypeConverterImpl.class);
    converters.put(Boolean.class, BooleanTypeConverterImpl.class);
    converters.put(Calendar.class, CalendarTypeConverterImpl.class);
    converters.put(GregorianCalendar.class, CalendarTypeConverterImpl.class);
    converters.put(Date.class, UtilDateTypeConverterImpl.class);
    converters.put(byte[].class, ByteArrayTypeConverterImpl.class);
    converters.put(Timestamp.class, TimestampTypeConverterImpl.class);
    return converters;
}

5. GradebookFrameworkServiceImpl#getHardDefaultLetterMapping()

Project: sakai
File: GradebookFrameworkServiceImpl.java
private Map getHardDefaultLetterMapping() {
    Map gradeMap = new HashMap();
    gradeMap.put("A+", Double.valueOf(100));
    gradeMap.put("A", Double.valueOf(95));
    gradeMap.put("A-", Double.valueOf(90));
    gradeMap.put("B+", Double.valueOf(87));
    gradeMap.put("B", Double.valueOf(83));
    gradeMap.put("B-", Double.valueOf(80));
    gradeMap.put("C+", Double.valueOf(77));
    gradeMap.put("C", Double.valueOf(73));
    gradeMap.put("C-", Double.valueOf(70));
    gradeMap.put("D+", Double.valueOf(67));
    gradeMap.put("D", Double.valueOf(63));
    gradeMap.put("D-", Double.valueOf(60));
    gradeMap.put("F", Double.valueOf(0.0));
    return gradeMap;
}

6. StandardTuner#writeAllProperties()

Project: Priam
File: StandardTuner.java
public void writeAllProperties(String yamlLocation, String hostname, String seedProvider) throws IOException {
    DumperOptions options = new DumperOptions();
    options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
    Yaml yaml = new Yaml(options);
    File yamlFile = new File(yamlLocation);
    Map map = (Map) yaml.load(new FileInputStream(yamlFile));
    map.put("cluster_name", config.getAppName());
    map.put("storage_port", config.getStoragePort());
    map.put("ssl_storage_port", config.getSSLStoragePort());
    map.put("start_rpc", config.isThriftEnabled());
    map.put("rpc_port", config.getThriftPort());
    map.put("start_native_transport", config.isNativeTransportEnabled());
    map.put("native_transport_port", config.getNativeTransportPort());
    map.put("listen_address", hostname);
    map.put("rpc_address", hostname);
    //Dont bootstrap in restore mode
    if (!Restore.isRestoreEnabled(config)) {
        map.put("auto_bootstrap", config.getAutoBoostrap());
    } else {
        map.put("auto_bootstrap", false);
    }
    map.put("saved_caches_directory", config.getCacheLocation());
    map.put("commitlog_directory", config.getCommitLogLocation());
    map.put("data_file_directories", Lists.newArrayList(config.getDataFileLocation()));
    boolean enableIncremental = (config.getBackupHour() >= 0 && config.isIncrBackup()) && (CollectionUtils.isEmpty(config.getBackupRacs()) || config.getBackupRacs().contains(config.getRac()));
    map.put("incremental_backups", enableIncremental);
    map.put("endpoint_snitch", getSnitch());
    map.put("in_memory_compaction_limit_in_mb", config.getInMemoryCompactionLimit());
    map.put("compaction_throughput_mb_per_sec", config.getCompactionThroughput());
    map.put("partitioner", derivePartitioner(map.get("partitioner").toString(), config.getPartitioner()));
    map.put("memtable_total_space_in_mb", config.getMemtableTotalSpaceMB());
    map.put("stream_throughput_outbound_megabits_per_sec", config.getStreamingThroughputMB());
    map.put("multithreaded_compaction", config.getMultithreadedCompaction());
    map.put("max_hint_window_in_ms", config.getMaxHintWindowInMS());
    map.put("hinted_handoff_throttle_in_kb", config.getHintedHandoffThrottleKb());
    map.put("authenticator", config.getAuthenticator());
    map.put("authorizer", config.getAuthorizer());
    map.put("internode_compression", config.getInternodeCompression());
    map.put("dynamic_snitch", config.isDynamicSnitchEnabled());
    map.put("concurrent_reads", config.getConcurrentReadsCnt());
    map.put("concurrent_writes", config.getConcurrentWritesCnt());
    map.put("concurrent_compactors", config.getConcurrentCompactorsCnt());
    map.put("rpc_server_type", config.getRpcServerType());
    map.put("index_interval", config.getIndexInterval());
    List<?> seedp = (List) map.get("seed_provider");
    Map<String, String> m = (Map<String, String>) seedp.get(0);
    m.put("class_name", seedProvider);
    configfureSecurity(map);
    configureGlobalCaches(config, map);
    //force to 1 until vnodes are properly supported
    map.put("num_tokens", 1);
    addExtraCassParams(map);
    logger.info(yaml.dump(map));
    yaml.dump(map, new FileWriter(yamlFile));
    configureCommitLogBackups();
}

7. MockConnection#newDistro()

Project: spacewalk
File: MockConnection.java
private String newDistro() {
    String uid = random();
    Map distro = new HashMap();
    String key = random();
    distro.put("uid", uid);
    log.debug("DISTRO: Created w/ uid " + uid + "returing handle " + key);
    distros.add(distro);
    distroMap.put(key, distro);
    distro.put("virt_bridge", "xenb0");
    distro.put("virt_cpus", Integer.valueOf(1));
    distro.put("virt_type", KickstartVirtualizationType.XEN_FULLYVIRT);
    distro.put("virt_path", "/tmp/foo");
    distro.put("virt_file_size", Integer.valueOf(8));
    distro.put("virt_ram", Integer.valueOf(512));
    distro.put("kernel_options", new HashMap());
    distro.put("kernel_options_post", new HashMap());
    distro.put("ks_meta", new HashMap());
    distro.put("redhat_management_key", "");
    return key;
}

8. MockConnection#newProfile()

Project: spacewalk
File: MockConnection.java
private String newProfile() {
    Map profile = new HashMap();
    String uid = random();
    String key = random();
    profile.put("uid", uid);
    log.debug("PROFILE: Created w/ uid " + uid + "returing handle " + key);
    profiles.add(profile);
    profileMap.put(key, profile);
    profile.put("virt_bridge", "xenb0");
    profile.put("virt_cpus", Integer.valueOf(1));
    profile.put("virt_type", KickstartVirtualizationType.XEN_FULLYVIRT);
    profile.put("virt_path", "/tmp/foo");
    profile.put("virt_file_size", Integer.valueOf(8));
    profile.put("virt_ram", Integer.valueOf(512));
    profile.put("kernel_options", new HashMap());
    profile.put("kernel_options_post", new HashMap());
    profile.put("ks_meta", new HashMap());
    profile.put("redhat_management_key", "");
    return key;
}

9. CSVReader#getDefaultColumnMap()

Project: sakai
File: CSVReader.java
/**
	 * Get the default column map for CSV files.
	 */
public Map getDefaultColumnMap() {
    Map columnMap = new HashMap();
    columnMap.put(GenericCalendarImporter.LOCATION_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.LOCATION_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.ITEM_TYPE_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.ITEM_TYPE_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.FREQUENCY_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.FREQUENCY_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.DURATION_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.DURATION_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.START_TIME_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.START_TIME_CSV_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.DATE_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.DATE_CSV_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.DESCRIPTION_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.DESCRIPTION_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.TITLE_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.TITLE_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.INTERVAL_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.INTERVAL_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.ENDS_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.ENDS_PROPERTY_NAME);
    columnMap.put(GenericCalendarImporter.REPEAT_DEFAULT_COLUMN_HEADER, GenericCalendarImporter.REPEAT_PROPERTY_NAME);
    return columnMap;
}

10. ArithmeticTests#testMath44b()

Project: mvel
File: ArithmeticTests.java
public void testMath44b() {
    String expression = "a+b/c*d*e*f%g*h-i*j*k";
    double res = 6d + 8d / 9d * 1d * 9d * 10d % 4d * 4d - 4d * 6d * 3d;
    Serializable s = compileExpression(expression);
    Map vars = new HashMap();
    vars.put("a", 6d);
    vars.put("b", 8d);
    vars.put("c", 9d);
    vars.put("d", 1d);
    vars.put("e", 9d);
    vars.put("f", 10d);
    vars.put("g", 4d);
    vars.put("h", 4d);
    vars.put("i", 4d);
    vars.put("j", 6d);
    vars.put("k", 3d);
    assertEquals(res, executeExpression(s, vars));
}

11. XcodeProjectWriter#createPBXNativeTarget()

Project: nar-maven-plugin
File: XcodeProjectWriter.java
/**
   * Create PBXNativeTarget.
   * 
   * @param name
   *          name.
   * @param buildConfigurationList
   *          build configuration list.
   * @param buildPhases
   *          build phases.
   * @param buildRules
   *          build rules.
   * @param dependencies
   *          dependencies.
   * @param productInstallPath
   *          product install path.
   * @param productName
   *          product name.
   * @param productReference
   *          file reference for product.
   * @param productType
   *          product type.
   * @return native target.
   */
private static PBXObjectRef createPBXNativeTarget(final String name, final PBXObjectRef buildConfigurationList, final List buildPhases, final List buildRules, final List dependencies, final String productInstallPath, final String productName, final PBXObjectRef productReference, final String productType) {
    final Map map = new HashMap();
    map.put("isa", "PBXNativeTarget");
    map.put("buildConfigurationList", buildConfigurationList);
    map.put("buildPhases", buildPhases);
    map.put("buildRules", buildRules);
    map.put("dependencies", dependencies);
    map.put("name", name);
    map.put("productInstallPath", productInstallPath);
    map.put("productName", productName);
    map.put("productReference", productReference);
    map.put("productType", productType);
    return new PBXObjectRef(map);
}

12. OnCancelConfigTest#shouldSetPrimitiveAttributesForNantTask()

Project: gocd
File: OnCancelConfigTest.java
@Test
public void shouldSetPrimitiveAttributesForNantTask() {
    Map hashMap = new HashMap();
    hashMap.put(OnCancelConfig.ON_CANCEL_OPTIONS, "nant");
    Map valueMap = new HashMap();
    valueMap.put(BuildTask.BUILD_FILE, "default.build");
    valueMap.put(BuildTask.TARGET, "compile");
    valueMap.put(BuildTask.WORKING_DIRECTORY, "pwd");
    valueMap.put(NantTask.NANT_PATH, "/usr/bin/nant");
    hashMap.put(OnCancelConfig.NANT_ON_CANCEL, valueMap);
    hashMap.put(OnCancelConfig.EXEC_ON_CANCEL, new HashMap());
    hashMap.put(OnCancelConfig.ANT_ON_CANCEL, new HashMap());
    hashMap.put(OnCancelConfig.RAKE_ON_CANCEL, new HashMap());
    when(taskFactory.taskInstanceFor(new NantTask().getTaskType())).thenReturn(new NantTask());
    OnCancelConfig cancelConfig = OnCancelConfig.create(hashMap, taskFactory);
    NantTask expectedNantTask = new NantTask();
    expectedNantTask.setBuildFile("default.build");
    expectedNantTask.setTarget("compile");
    expectedNantTask.setWorkingDirectory("pwd");
    expectedNantTask.setNantPath("/usr/bin/nant");
    assertThat((NantTask) cancelConfig.getTask(), is(expectedNantTask));
}

13. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "LacI and TetR for IWBDA AND4 demo");
    obj.put("version", "v1");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli");
    obj.put("genome", "");
    obj.put("media", "");
    obj.put("temperature", "37");
    obj.put("growth", "");
    objects.add(obj);
    return objects;
}

14. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "TetR homologs: PhlF, SrpR, BM3R1, HlyIIR, BetI, AmtR, AmeR, QacR, IcaRA");
    obj.put("version", "EcoJS4ib");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli NEB 10-beta");
    obj.put("genome", "NEB 10 ?(ara-leu) 7697 araD139 fhuA ?lacX74 galK16 galE15 e14- ?80dlacZ?M15  recA1 relA1 endA1 nupG  rpsL (StrR) rph spoT1 ?(mrr-hsdRMS-mcrBC)");
    obj.put("media", "M9 minimal media composed of M9 media salts (6.78 g/L Na2HPO4, 3 g/L KH2PO4, 1 g/L NH4Cl, 0.5 g/L NaCl, 0.34 g/L thiamine hydrochloride, 0.4% D-glucose, 0.2% Casamino acids, 2 mM MgSO4, and 0.1 mM CaCl2; kanamycin (50 ug/ml), spectinomycin (50 ug/ml)");
    obj.put("temperature", "37");
    obj.put("growth", "Inoculation: Individual colonies into M9 media, 16 hours overnight in plate shaker.  Dilution: Next day, cells dilute ~200-fold into M9 media with antibiotics, growth for 3 hours.  Induction: Cells diluted ~650-fold into M9 media with antibiotics.  Growth: shaking incubator for 5 hours.  Arrest protein production: PBS and 2mg/ml kanamycin.  Measurement: flow cytometry, data processing for RPU normalization.");
    objects.add(obj);
    return objects;
}

15. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "TetR homologs: Jonghyeon's from 2014 that Chris Barnes used.");
    obj.put("version", "EcoCB1");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli NEB 10-beta");
    obj.put("genome", "NEB 10 ?(ara-leu) 7697 araD139 fhuA ?lacX74 galK16 galE15 e14- ?80dlacZ?M15  recA1 relA1 endA1 nupG  rpsL (StrR) rph spoT1 ?(mrr-hsdRMS-mcrBC)");
    obj.put("media", "M9 minimal media composed of M9 media salts (6.78 g/L Na2HPO4, 3 g/L KH2PO4, 1 g/L NH4Cl, 0.5 g/L NaCl, 0.34 g/L thiamine hydrochloride, 0.4% D-glucose, 0.2% Casamino acids, 2 mM MgSO4, and 0.1 mM CaCl2; kanamycin (50 ug/ml), spectinomycin (50 ug/ml)");
    obj.put("temperature", "37");
    obj.put("growth", "Inoculation: Individual colonies into M9 media, 16 hours overnight in plate shaker.  Dilution: Next day, cells dilute ~200-fold into M9 media with antibiotics, growth for 3 hours.  Induction: Cells diluted ~650-fold into M9 media with antibiotics.  Growth: shaking incubator for 5 hours.  Arrest protein production: PBS and 2mg/ml kanamycin.  Measurement: flow cytometry, data processing for RPU normalization.");
    objects.add(obj);
    return objects;
}

16. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "7 TetR homologs (NOR/NOT), 2 Activator-Chaperones (AND)");
    obj.put("version", "Eco3C3G3T3");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli NEB 10-beta");
    obj.put("genome", "NEB 10 ?(ara-leu) 7697 araD139 fhuA ?lacX74 galK16 galE15 e14- ?80dlacZ?M15  recA1 relA1 endA1 nupG  rpsL (StrR) rph spoT1 ?(mrr-hsdRMS-mcrBC)");
    obj.put("media", "M9 minimal media composed of M9 media salts (6.78 g/L Na2HPO4, 3 g/L KH2PO4, 1 g/L NH4Cl, 0.5 g/L NaCl, 0.34 g/L thiamine hydrochloride, 0.4% D-glucose, 0.2% Casamino acids, 2 mM MgSO4, and 0.1 mM CaCl2; kanamycin (50 ug/ml), spectinomycin (50 ug/ml)");
    obj.put("temperature", "37");
    obj.put("growth", "Inoculation: Individual colonies into M9 media, 16 hours overnight in plate shaker.  Dilution: Next day, cells dilute ~200-fold into M9 media with antibiotics, growth for 3 hours.  Induction: Cells diluted ~650-fold into M9 media with antibiotics.  Growth: shaking incubator for 5 hours.  Arrest protein production: PBS and 2mg/ml kanamycin.  Measurement: flow cytometry, data processing for RPU normalization.");
    objects.add(obj);
    return objects;
}

17. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "CRISRPi NOR/NOT gates, maximum of 5");
    obj.put("version", "Eco2C2G2T2");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli strain K-12 substrain MG1655");
    obj.put("genome", "K-12 MG1655* [F-kilvG- rfb-50 rph-1 D(araCBAD) D(LacI)]");
    obj.put("media", "Cells were grown in LB Miller broth (Difco, MI, 90003-350) for overnight growth and cloning, and MOPS EZ Rich Defined Medium (Teknova, CA, M2105) with 0.4% glycerol carbon source for measurement experiments.  Ampicillin (100 lg/ml), kanamycin (50 lg/ml), and spectinomycin sulfate (50 lg/ml) were used to maintain plasmids. Arabinose (Sigma Aldrich, MO, A3256), 2,4-diacetylphloroglucinol (Santa Cruz Biotechnology, TX, CAS 2161-86-6), and anhydrotetracycline (aTc) (Sigma Aldrich, MO, 37919) were used as chemical inducers. The fluorescent protein reporters YFP (Cormack et al, 1996) and mRFP1 (Campbell et al, 2002) were measured with cytometry to determine gene expression.");
    obj.put("temperature", "37");
    obj.put("growth", "Escherichia coli MG1655* cells were transformed with three plasmids encoding: (i) inducible dCas9, (ii) one or more sgRNAs, and (iii) a fluorescent reporter. Cells were plated on LB agar plates with appropriate antibiotics. Transformed colonies were inoculated intoMOPS EZ Rich Defined Medium with 0.4% glycerol and appropriate antibiotics and were then grown overnight in V-bottom 96-well plates (Nunc, Roskilde, Denmark, 249952) in an ELMI Digital Thermos Microplates shaker incubator (Elmi Ltd, Riga, Latvia) at 1,000 rpm and 37°C. The next day, cultures were diluted 180-fold into EZ Rich Medium with antibiotics and grown with the same shaking incubator parameters for 3 h. At 3 h, cells were diluted 700-fold into EZ Rich Medium with antibiotics and inducers. The cells were grown using the same shaking incubator parameters for 6 h. For cytometry measurements, 40 ll of the cell culture was added to 160 ll of phosphate-buffered saline with 0.5 mg/ml kanamycin to arrest cell growth. The cells were placed in a 4°C refrigerator for 1 h to allow the fluorophores to mature prior to cytometry analysis.");
    objects.add(obj);
    return objects;
}

18. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "TetR homologs: PhlF, SrpR, BM3R1, HlyIIR, BetI, AmtR, AmeR, QacR, IcaRA, LitR, PsrA, LmrA");
    obj.put("version", "Eco1C1G1T1");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli NEB 10-beta");
    obj.put("genome", "NEB 10 ?(ara-leu) 7697 araD139 fhuA ?lacX74 galK16 galE15 e14- ?80dlacZ?M15  recA1 relA1 endA1 nupG  rpsL (StrR) rph spoT1 ?(mrr-hsdRMS-mcrBC)");
    obj.put("media", "M9 minimal media composed of M9 media salts (6.78 g/L Na2HPO4, 3 g/L KH2PO4, 1 g/L NH4Cl, 0.5 g/L NaCl, 0.34 g/L thiamine hydrochloride, 0.4% D-glucose, 0.2% Casamino acids, 2 mM MgSO4, and 0.1 mM CaCl2; kanamycin (50 ug/ml), spectinomycin (50 ug/ml)");
    obj.put("temperature", "37");
    obj.put("growth", "Inoculation: Individual colonies into M9 media, 16 hours overnight in plate shaker.  Dilution: Next day, cells dilute ~200-fold into M9 media with antibiotics, growth for 3 hours.  Induction: Cells diluted ~650-fold into M9 media with antibiotics.  Growth: shaking incubator for 5 hours.  Arrest protein production: PBS and 2mg/ml kanamycin.  Measurement: flow cytometry, data processing for RPU normalization.");
    objects.add(obj);
    return objects;
}

19. collection_writer_header#getObjects()

Project: cello
File: collection_writer_header.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Date date = new Date();
    Map obj = new LinkedHashMap();
    obj.put("collection", "header");
    obj.put("description", "TetR homologs: PhlF, SrpR, BM3R1, HlyIIR, BetI, AmtR, AmeR");
    obj.put("version", "Eco1C1G1T0");
    obj.put("date", date.toString());
    obj.put("author", new String[] { "Bryan Der" });
    obj.put("organism", "Escherichia coli NEB 10-beta");
    obj.put("genome", "NEB 10 ?(ara-leu) 7697 araD139 fhuA ?lacX74 galK16 galE15 e14- ?80dlacZ?M15  recA1 relA1 endA1 nupG  rpsL (StrR) rph spoT1 ?(mrr-hsdRMS-mcrBC)");
    obj.put("media", "M9 minimal media composed of M9 media salts (6.78 g/L Na2HPO4, 3 g/L KH2PO4, 1 g/L NH4Cl, 0.5 g/L NaCl, 0.34 g/L thiamine hydrochloride, 0.4% D-glucose, 0.2% Casamino acids, 2 mM MgSO4, and 0.1 mM CaCl2; kanamycin (50 ug/ml), spectinomycin (50 ug/ml)");
    obj.put("temperature", "37");
    obj.put("growth", "Inoculation: Individual colonies into M9 media, 16 hours overnight in plate shaker.  Dilution: Next day, cells dilute ~200-fold into M9 media with antibiotics, growth for 3 hours.  Induction: Cells diluted ~650-fold into M9 media with antibiotics.  Growth: shaking incubator for 5 hours.  Arrest protein production: PBS and 2mg/ml kanamycin.  Measurement: flow cytometry, data processing for RPU normalization.");
    objects.add(obj);
    return objects;
}

20. IvyPatternHelper#substitute()

Project: ant-ivy
File: IvyPatternHelper.java
public static String substitute(String pattern, String org, String module, String branch, String revision, String artifact, String type, String ext, String conf, ArtifactOrigin origin, Map extraAttributes) {
    Map tokens = new HashMap(extraAttributes == null ? Collections.EMPTY_MAP : extraAttributes);
    tokens.put(ORGANISATION_KEY, org == null ? "" : org);
    tokens.put(ORGANISATION_KEY2, org == null ? "" : org);
    tokens.put(MODULE_KEY, module == null ? "" : module);
    tokens.put(BRANCH_KEY, branch == null ? "" : branch);
    tokens.put(REVISION_KEY, revision == null ? "" : revision);
    tokens.put(ARTIFACT_KEY, artifact == null ? module : artifact);
    tokens.put(TYPE_KEY, type == null ? "jar" : type);
    tokens.put(EXT_KEY, ext == null ? "jar" : ext);
    tokens.put(CONF_KEY, conf == null ? "default" : conf);
    tokens.put(ORIGINAL_ARTIFACTNAME_KEY, origin == null ? new OriginalArtifactNameValue(org, module, branch, revision, artifact, type, ext) : new OriginalArtifactNameValue(origin));
    return substituteTokens(pattern, tokens);
}

21. InstantiationTest#getTypedObjectASObjectTypes()

Project: flex-blazeds
File: InstantiationTest.java
public Map getTypedObjectASObjectTypes(ASObject aso) {
    Map typeMap = new HashMap();
    typeMap.put("main", aso.getType());
    Object obj = aso.get("theCollection");
    Object[] theCollection = (Object[]) obj;
    typeMap.put("theCollection0", ((ASObject) theCollection[0]).getType());
    typeMap.put("theCollection1", ((ASObject) theCollection[1]).getType());
    typeMap.put("theCollection2.0", ((ASObject) ((ArrayList) theCollection[2]).get(0)).getType());
    typeMap.put("theCollection2.1", ((ASObject) ((ArrayList) theCollection[2]).get(1)).getType());
    typeMap.put("mapbook", ((ASObject) ((ASObject) aso.get("map")).get("book")).getType());
    typeMap.put("hashmap", ((ASObject) ((ASObject) aso.get("map")).get("hashmap")).getType());
    typeMap.put("me", ((ASObject) aso.get("me")).getType());
    typeMap.put("map", ((ASObject) aso.get("map")).getType());
    return typeMap;
}

22. DelegatedAccessEntityProviderImpl#getEntity()

Project: sakai
File: DelegatedAccessEntityProviderImpl.java
public Object getEntity(EntityReference ref) {
    String siteRef = "/site/" + ref.getId();
    String nodeId = getFirstNodeId(siteRef, DelegatedAccessConstants.HIERARCHY_ID);
    if (nodeId == null) {
        throw new IllegalArgumentException("NodeId for Site: " + ref + " doesn't exist");
    }
    NodeModel node = projectLogic.getNodeModel(nodeId, DelegatedAccessConstants.SHOPPING_PERIOD_USER);
    if (node == null) {
        throw new IllegalArgumentException("NodeId: " + nodeId + " doesn't exist");
    }
    Map valuesMap = new HashMap<String, String>();
    valuesMap.put("shoppingStartDate", node.getNodeShoppingPeriodStartDate());
    valuesMap.put("shoppingEndDate", node.getNodeShoppingPeriodEndDate());
    valuesMap.put("shoppingRealm", node.getNodeAccessRealmRole()[0]);
    valuesMap.put("shoppingRole", node.getNodeAccessRealmRole()[1]);
    valuesMap.put("directAccess", node.isDirectAccess());
    valuesMap.put("revokeInstructorEditable", node.getNodeShoppingPeriodRevokeInstructorEditable());
    valuesMap.put("revokeInstructorPublicOpt", node.getNodeShoppingPeriodRevokeInstructorPublicOpt());
    valuesMap.put("shoppingShowAuthTools", node.getNodeRestrictedAuthTools());
    valuesMap.put("shoppingShowPublicTools", node.getNodeRestrictedPublicTools());
    return valuesMap;
}

23. MockConnection#newSystem()

Project: spacewalk
File: MockConnection.java
private String newSystem() {
    Map profile = new HashMap();
    String key = random();
    profile.put("uid", random());
    Map interfaces = new HashMap();
    Map iface = new HashMap();
    iface.put("mac_address", NetworkInterfaceTest.TEST_MAC);
    iface.put("ip_address", "127.0.0.1");
    interfaces.put("eth0", iface);
    profile.put("interfaces", interfaces);
    systems.add(profile);
    systemMap.put(key, profile);
    profile.put("ks_meta", new HashMap());
    profile.put("redhat_management_key", "");
    return key;
}

24. AbstractTaskTest#shouldBeAbleToRemoveOnCancelConfig()

Project: gocd
File: AbstractTaskTest.java
@Test
public void shouldBeAbleToRemoveOnCancelConfig() {
    AbstractTask task = new ExecTask();
    task.setCancelTask(new ExecTask());
    Map cancelTaskAttributes = new HashMap();
    cancelTaskAttributes.put(ExecTask.COMMAND, "ls");
    cancelTaskAttributes.put(ExecTask.ARG_LIST_STRING, "-la");
    Map onCancelConfigAttributes = new HashMap();
    onCancelConfigAttributes.put(OnCancelConfig.EXEC_ON_CANCEL, cancelTaskAttributes);
    Map cancelConfigAttributes = new HashMap();
    cancelConfigAttributes.put(OnCancelConfig.ON_CANCEL_OPTIONS, "exec");
    Map actualTaskAttributes = new HashMap();
    actualTaskAttributes.put(AbstractTask.HAS_CANCEL_TASK, "0");
    actualTaskAttributes.put(AbstractTask.ON_CANCEL_CONFIG, cancelConfigAttributes);
    task.setConfigAttributes(actualTaskAttributes);
    assertThat(task.hasCancelTask(), is(false));
}

25. UnsafeMethods#createPrimitiveClassesMap()

Project: incubator-freemarker
File: UnsafeMethods.java
private static Map createPrimitiveClassesMap() {
    Map map = new HashMap();
    map.put("boolean", Boolean.TYPE);
    map.put("byte", Byte.TYPE);
    map.put("char", Character.TYPE);
    map.put("short", Short.TYPE);
    map.put("int", Integer.TYPE);
    map.put("long", Long.TYPE);
    map.put("float", Float.TYPE);
    map.put("double", Double.TYPE);
    return map;
}

26. ConfigurationFactory#saveNewConfigChannel()

Project: spacewalk
File: ConfigurationFactory.java
/**
     * Save a new configuration channel.
     * Note, this method uses a stored procedure, so it must be used for all newly
     * created configuration channels.
     * @param channel The channel object to persist.
     */
public static void saveNewConfigChannel(ConfigChannel channel) {
    CallableMode m = ModeFactory.getCallableMode("config_queries", "create_new_config_channel");
    Map inParams = new HashMap();
    Map outParams = new HashMap();
    inParams.put("org_id_in", channel.getOrgId());
    inParams.put("type_in", channel.getConfigChannelType().getLabel());
    inParams.put("name_in", channel.getName());
    inParams.put("label_in", channel.getLabel());
    inParams.put("description_in", channel.getDescription());
    //Outparam
    outParams.put("channelId", new Integer(Types.NUMERIC));
    Map result = m.execute(inParams, outParams);
    Long channelId = (Long) result.get("channelId");
    channel.setId(channelId);
}

27. ConfigFileData#makeValidationMap()

Project: spacewalk
File: ConfigFileData.java
/**
     * Basically returns a map equating ConfigFileForm's form fieldnames
     * to values from config file data.. This is needed by the RHnValidationHelper
     * while matching values against xsds..
     * @return a map with key = ConfigFIleForms keys, & value = ConfigFIleData values..
     */
protected Map makeValidationMap() {
    Map map = new HashMap();
    map.put(ConfigFileForm.REV_UID, getOwner());
    map.put(ConfigFileForm.REV_GID, getGroup());
    map.put(ConfigFileForm.REV_PERMS, getPermissions());
    map.put(ConfigFileForm.REV_SELINUX_CTX, getSelinuxCtx());
    map.put(ConfigFileForm.REV_SYMLINK_TARGET_PATH, getSelinuxCtx());
    map.put(ConfigFileForm.REV_MACROSTART, getMacroStart());
    map.put(ConfigFileForm.REV_MACROEND, getMacroEnd());
    map.put(ConfigFileForm.REV_BINARY, isBinary());
    return map;
}

28. Timeout#getScriptSymbols()

Project: tapestry4
File: Timeout.java
public Map getScriptSymbols() {
    int nSessionTime = getSessionTime();
    int nTimeToMessage = nSessionTime - getWarningTime();
    if (nTimeToMessage < 0)
        nTimeToMessage = 0;
    int nRemainingTime = nSessionTime - nTimeToMessage;
    int nAutoProlongTime = nSessionTime - getAutoProlongTime();
    Map mapSymbols = new HashMap();
    mapSymbols.put("confirmTimeout", new Integer(nTimeToMessage * 1000));
    mapSymbols.put("expirationTimeout", new Integer(nRemainingTime * 1000));
    mapSymbols.put("prolongSessionPeriod", new Integer(nAutoProlongTime * 1000));
    mapSymbols.put("confirmMessage", getWarningMessage());
    mapSymbols.put("expirationMessage", getExpirationMessage());
    mapSymbols.put("disableWarning", new Boolean(getDisableWarning()));
    mapSymbols.put("disableAutoProlong", new Boolean(getDisableAutoProlong()));
    mapSymbols.put("expirationFunction", getExpirationFunction());
    return mapSymbols;
}

29. ArithmeticTests#testMath34()

Project: mvel
File: ArithmeticTests.java
public void testMath34() {
    String expression = "a+b-c*d*x/y-z+10";
    Map map = new HashMap();
    map.put("a", 200);
    map.put("b", 100);
    map.put("c", 150);
    map.put("d", 2);
    map.put("x", 400);
    map.put("y", 300);
    map.put("z", 75);
    Serializable s = compileExpression(expression);
    assertEquals((double) 200 + 100 - 150 * 2 * 400 / 300 - 75 + 10, executeExpression(s, map));
}

30. XmlRpcStructFactory#getXmlRpcWorkflowCondition()

Project: oodt
File: XmlRpcStructFactory.java
/**
   * <p>
   * Gets an XML-RPC {@link HashMap} representation of the
   * {@link WorkflowCondition} to send over the wire.
   * </p>
   * 
   * @param c
   *          The WorkflowCondition to turn into an XML-RPC HashMap.
   * @return an XML-RPC {@link HashMap} representation of the
   *         {@link WorkflowCondition} to send over the wire.
   */
public static Map getXmlRpcWorkflowCondition(WorkflowCondition c) {
    Map condition = new Hashtable();
    condition.put("class", c.getConditionInstanceClassName());
    condition.put("id", c.getConditionId());
    condition.put("name", c.getConditionName());
    condition.put("order", String.valueOf(c.getOrder()));
    condition.put("timeout", String.valueOf(c.getTimeoutSeconds()));
    condition.put("optional", String.valueOf(c.isOptional()));
    condition.put("configuration", getXmlRpcWorkflowConditionConfig(c.getCondConfig()));
    return condition;
}

31. XmlRpcStructFactory#getXmlRpcWorkflowTask()

Project: oodt
File: XmlRpcStructFactory.java
/**
   * <p>
   * Gets an XML-RPC version of the {@link WorkflowTask} to send over the wire.
   * </p>
   * 
   * @param t
   *          The WorkflowTask to obtain an XML-RPC HashMap from.
   * @return an XML-RPC version of the {@link WorkflowTask} to send over the
   *         wire.
   */
public static Map getXmlRpcWorkflowTask(WorkflowTask t) {
    Map task = new Hashtable();
    task.put("class", t.getTaskInstanceClassName());
    task.put("id", t.getTaskId());
    task.put("name", t.getTaskName());
    task.put("order", String.valueOf(t.getOrder()));
    task.put("conditions", getXmlRpcWorkflowConditions(t.getConditions()));
    task.put("configuration", getXmlRpcWorkflowTaskConfiguration(t.getTaskConfig()));
    task.put("requiredMetFields", getXmlRpcWorkflowTaskReqMetFields(t.getRequiredMetFields()));
    return task;
}

32. XcodeProjectWriter#createPBXProject()

Project: nar-maven-plugin
File: XcodeProjectWriter.java
/**
   * Create PBXProject.
   * 
   * @param buildConfigurationList
   *          build configuration list.
   * @param mainGroup
   *          main group.
   * @param projectDirPath
   *          project directory path.
   * @param targets
   *          targets.
   * @param projectRoot
   *          projectRoot directory relative to
   * @return project.
   */
private static PBXObjectRef createPBXProject(final PBXObjectRef buildConfigurationList, final PBXObjectRef mainGroup, final String projectDirPath, final String projectRoot, final List targets) {
    final Map map = new HashMap();
    map.put("isa", "PBXProject");
    map.put("buildConfigurationList", buildConfigurationList.getID());
    map.put("hasScannedForEncodings", "0");
    map.put("mainGroup", mainGroup.getID());
    map.put("projectDirPath", projectDirPath);
    map.put("targets", targets);
    map.put("projectRoot", projectRoot);
    return new PBXObjectRef(map);
}

33. OnCancelConfigTest#shouldSetPrimitiveAttributesForRakeTask()

Project: gocd
File: OnCancelConfigTest.java
@Test
public void shouldSetPrimitiveAttributesForRakeTask() {
    Map hashMap = new HashMap();
    hashMap.put(OnCancelConfig.ON_CANCEL_OPTIONS, "rake");
    Map valueMap = new HashMap();
    valueMap.put(BuildTask.BUILD_FILE, "rakefile");
    valueMap.put(BuildTask.TARGET, "build");
    valueMap.put(BuildTask.WORKING_DIRECTORY, "pwd");
    hashMap.put(OnCancelConfig.RAKE_ON_CANCEL, valueMap);
    hashMap.put(OnCancelConfig.EXEC_ON_CANCEL, new HashMap());
    when(taskFactory.taskInstanceFor(new RakeTask().getTaskType())).thenReturn(new RakeTask());
    OnCancelConfig cancelConfig = OnCancelConfig.create(hashMap, taskFactory);
    RakeTask expectedRakeTask = new RakeTask();
    expectedRakeTask.setBuildFile("rakefile");
    expectedRakeTask.setTarget("build");
    expectedRakeTask.setWorkingDirectory("pwd");
    assertThat((RakeTask) cancelConfig.getTask(), is(expectedRakeTask));
}

34. OnCancelConfigTest#shouldSetPrimitiveAttributesForAntTask()

Project: gocd
File: OnCancelConfigTest.java
@Test
public void shouldSetPrimitiveAttributesForAntTask() {
    Map hashMap = new HashMap();
    hashMap.put(OnCancelConfig.ON_CANCEL_OPTIONS, "ant");
    Map valueMap = new HashMap();
    valueMap.put(BuildTask.BUILD_FILE, "build.xml");
    valueMap.put(BuildTask.TARGET, "blah");
    valueMap.put(BuildTask.WORKING_DIRECTORY, "pwd");
    hashMap.put(OnCancelConfig.ANT_ON_CANCEL, valueMap);
    hashMap.put(OnCancelConfig.EXEC_ON_CANCEL, new HashMap());
    when(taskFactory.taskInstanceFor(new AntTask().getTaskType())).thenReturn(new AntTask());
    OnCancelConfig cancelConfig = OnCancelConfig.create(hashMap, taskFactory);
    AntTask expectedAntTask = new AntTask();
    expectedAntTask.setBuildFile("build.xml");
    expectedAntTask.setTarget("blah");
    expectedAntTask.setWorkingDirectory("pwd");
    assertThat((AntTask) cancelConfig.getTask(), is(expectedAntTask));
}

35. OnCancelConfigTest#shouldSetPrimitiveAttributesForExecTask()

Project: gocd
File: OnCancelConfigTest.java
@Test
public void shouldSetPrimitiveAttributesForExecTask() {
    Map hashMap = new HashMap();
    hashMap.put(OnCancelConfig.ON_CANCEL_OPTIONS, "exec");
    Map valueMap = new HashMap();
    valueMap.put(ExecTask.COMMAND, "ls");
    valueMap.put(ExecTask.ARGS, "blah");
    valueMap.put(ExecTask.WORKING_DIR, "pwd");
    hashMap.put(OnCancelConfig.EXEC_ON_CANCEL, valueMap);
    hashMap.put(OnCancelConfig.ANT_ON_CANCEL, new HashMap());
    ExecTask execTask = new ExecTask();
    when(taskFactory.taskInstanceFor(execTask.getTaskType())).thenReturn(execTask);
    OnCancelConfig cancelConfig = OnCancelConfig.create(hashMap, taskFactory);
    assertThat((ExecTask) cancelConfig.getTask(), is(new ExecTask("ls", "blah", "pwd")));
}

36. ContextTest#test_netty()

Project: jstorm
File: ContextTest.java
@Test
public void test_netty() {
    Map storm_conf = Maps.newHashMap();
    storm_conf.put(Config.STORM_MESSAGING_TRANSPORT, "com.alibaba.jstorm.message.netty.NettyContext");
    storm_conf.put(Config.STORM_MESSAGING_NETTY_BUFFER_SIZE, 1024);
    storm_conf.put(Config.STORM_MESSAGING_NETTY_MAX_RETRIES, 10);
    storm_conf.put(Config.STORM_MESSAGING_NETTY_MIN_SLEEP_MS, 1000);
    storm_conf.put(Config.STORM_MESSAGING_NETTY_MAX_SLEEP_MS, 5000);
    storm_conf.put(Config.STORM_MESSAGING_NETTY_SERVER_WORKER_THREADS, 1);
    storm_conf.put(Config.STORM_MESSAGING_NETTY_CLIENT_WORKER_THREADS, 1);
    IContext context = TransportFactory.makeContext(storm_conf);
    Assert.assertNotNull(context);
}

37. LocalUtils#getLocalBaseConf()

Project: jstorm
File: LocalUtils.java
public static Map getLocalBaseConf() {
    JStormUtils.setLocalMode(true);
    Map conf = new HashMap();
    conf.put(Config.STORM_CLUSTER_MODE, "local");
    conf.put(Config.TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS, true);
    conf.put(Config.ZMQ_LINGER_MILLIS, 0);
    conf.put(Config.TOPOLOGY_ENABLE_MESSAGE_TIMEOUTS, false);
    conf.put(Config.TOPOLOGY_TRIDENT_BATCH_EMIT_INTERVAL_MILLIS, 50);
    ConfigExtension.setSpoutDelayRunSeconds(conf, 0);
    ConfigExtension.setTaskCleanupTimeoutSec(conf, 0);
    ConfigExtension.setTopologyDebugRecvTuple(conf, true);
    conf.put(Config.TOPOLOGY_DEBUG, true);
    conf.put(ConfigExtension.TOPOLOGY_BACKPRESSURE_ENABLE, false);
    return conf;
}

38. JsonSerializerTest#testSimpleMap()

Project: jodd
File: JsonSerializerTest.java
// ---------------------------------------------------------------- tests
@Test
public void testSimpleMap() {
    Map map = new LinkedHashMap();
    map.put("one", "uno");
    map.put("two", "duo");
    JsonSerializer jsonSerializer = new JsonSerializer();
    String json = jsonSerializer.serialize(map);
    assertEquals("{\"one\":\"uno\",\"two\":\"duo\"}", json);
    map = new LinkedHashMap();
    map.put("one", Long.valueOf(173));
    map.put("two", Double.valueOf(7.89));
    map.put("three", Boolean.TRUE);
    map.put("four", null);
    map.put("five", "new\nline");
    jsonSerializer = new JsonSerializer();
    json = jsonSerializer.serialize(map);
    assertEquals("{\"one\":173,\"two\":7.89,\"three\":true,\"four\":null,\"five\":\"new\\nline\"}", json);
}

39. MapBuilder#of()

Project: react-native
File: MapBuilder.java
/**
   * Returns map containing the given entries.
   */
public static <K, V> Map<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) {
    Map map = of();
    map.put(k1, v1);
    map.put(k2, v2);
    map.put(k3, v3);
    map.put(k4, v4);
    map.put(k5, v5);
    map.put(k6, v6);
    map.put(k7, v7);
    return map;
}

40. DeleteTableCommand#execute()

Project: camel
File: DeleteTableCommand.java
@Override
public void execute() {
    TableDescription tableDescription = ddbClient.deleteTable(new DeleteTableRequest(determineTableName())).getTableDescription();
    Map tmp = new HashMap<>();
    tmp.put(DdbConstants.PROVISIONED_THROUGHPUT, tableDescription.getProvisionedThroughput());
    tmp.put(DdbConstants.CREATION_DATE, tableDescription.getCreationDateTime());
    tmp.put(DdbConstants.ITEM_COUNT, tableDescription.getItemCount());
    tmp.put(DdbConstants.KEY_SCHEMA, tableDescription.getKeySchema());
    tmp.put(DdbConstants.TABLE_NAME, tableDescription.getTableName());
    tmp.put(DdbConstants.TABLE_SIZE, tableDescription.getTableSizeBytes());
    tmp.put(DdbConstants.TABLE_STATUS, tableDescription.getTableStatus());
    addToResults(tmp);
}

41. DynamicBrokersReaderTest#setUp()

Project: apache-storm-test
File: DynamicBrokersReaderTest.java
@Before
public void setUp() throws Exception {
    server = new TestingServer();
    String connectionString = server.getConnectString();
    Map conf = new HashMap();
    conf.put(Config.STORM_ZOOKEEPER_SESSION_TIMEOUT, 1000);
    conf.put(Config.STORM_ZOOKEEPER_CONNECTION_TIMEOUT, 1000);
    conf.put(Config.STORM_ZOOKEEPER_RETRY_TIMES, 4);
    conf.put(Config.STORM_ZOOKEEPER_RETRY_INTERVAL, 5);
    ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 3);
    zookeeper = CuratorFrameworkFactory.newClient(connectionString, retryPolicy);
    dynamicBrokersReader = new DynamicBrokersReader(conf, connectionString, masterPath, topic);
    Map conf2 = new HashMap();
    conf2.putAll(conf);
    conf2.put("kafka.topic.wildcard.match", true);
    wildCardBrokerReader = new DynamicBrokersReader(conf2, connectionString, masterPath, "^test.*$");
    zookeeper.start();
}

42. AssertTest#mapAssertEquals()

Project: testng
File: AssertTest.java
@Test
public void mapAssertEquals() {
    Map expected = Maps.newHashMap();
    Map actual = Maps.newHashMap();
    expected.put(null, "a");
    expected.put("a", "a");
    expected.put("b", "c");
    actual.put("b", "c");
    actual.put(null, "a");
    actual.put("a", "a");
    Assert.assertEquals(actual, expected);
}

43. MockCharonPortal#includeTool()

Project: sakai
File: MockCharonPortal.java
protected Map includeTool() throws IOException {
    Map toolMap = new HashMap();
    toolMap.put("toolUrl", "toolUrl");
    toolMap.put("toolPlacementIDJS", "Main_" + System.currentTimeMillis());
    toolMap.put("toolTitle", "titleString");
    toolMap.put("toolShowResetButton", Boolean.valueOf(true));
    toolMap.put("toolShowHelpButton", Boolean.valueOf(true));
    toolMap.put("toolHelpActionUrl", "helpActionUrl");
    toolMap.put("toolResetActionUrl", "toolResetActionUrl");
    return toolMap;
}

44. PopulatingWithMVELTest#testMVELPopulate()

Project: drools
File: PopulatingWithMVELTest.java
@Test
public void testMVELPopulate() throws Exception {
    Object q = MVEL.eval("new org.drools.workbench.models.testscenarios.backend.DumbFact()");
    Map m = new HashMap();
    m.put("obj", q);
    m.put("val", "mike");
    MVEL.eval("obj.name = val", m);
    m = new HashMap();
    m.put("obj", q);
    m.put("val", "42");
    MVEL.eval("obj.age = val", m);
    m = new HashMap();
    m.put("obj", q);
    m.put("val", "44");
    MVEL.eval("obj.number = val", m);
    DumbFact d = (DumbFact) q;
    assertEquals("mike", d.getName());
    assertEquals(42, d.getAge());
    assertEquals(new Long(44), d.getNumber());
}

45. FactPopulatorTest#testMVELPopulate()

Project: drools
File: FactPopulatorTest.java
@Test
public void testMVELPopulate() throws Exception {
    Object q = MVEL.eval("new " + DumbFact.class.getName() + "()");
    Map m = new HashMap();
    m.put("obj", q);
    m.put("val", "mike");
    MVEL.eval("obj.name = val", m);
    m = new HashMap();
    m.put("obj", q);
    m.put("val", "42");
    MVEL.eval("obj.age = val", m);
    m = new HashMap();
    m.put("obj", q);
    m.put("val", "44");
    MVEL.eval("obj.number = val", m);
    DumbFact d = (DumbFact) q;
    assertEquals("mike", d.getName());
    assertEquals(42, d.getAge());
    assertEquals(new Long(44), d.getNumber());
}

46. EclipseJavaCompilerSettings#toNativeSettings()

Project: drools
File: EclipseJavaCompilerSettings.java
Map toNativeSettings() {
    final Map map = new HashMap(defaultEclipseSettings);
    map.put(CompilerOptions_OPTION_SuppressWarnings, isWarnings() ? CompilerOptions_GENERATE : CompilerOptions_DO_NOT_GENERATE);
    map.put(CompilerOptions_OPTION_ReportDeprecation, isDeprecations() ? CompilerOptions_GENERATE : CompilerOptions_DO_NOT_GENERATE);
    map.put(CompilerOptions_OPTION_TargetPlatform, toNativeVersion(getTargetVersion()));
    map.put(CompilerOptions_OPTION_Source, toNativeVersion(getSourceVersion()));
    map.put(CompilerOptions_OPTION_Compliance, toNativeVersion(getSourceVersion()));
    map.put(CompilerOptions_OPTION_Encoding, getSourceEncoding());
    return map;
}

47. SiteProfileManager#buildKey()

Project: cocoon
File: SiteProfileManager.java
protected Map buildKey(String category, String profileType, UserInfo info, boolean load) {
    final StringBuffer config = new StringBuffer(profileType);
    config.append('-');
    config.append(category);
    config.append('-');
    if (load) {
        config.append("load");
    } else {
        config.append("save");
    }
    final String uri = (String) info.getConfigurations().get(config.toString());
    final Map key = new LinkedMap(6);
    key.put("baseuri", uri);
    key.put("separator", "?");
    key.put("portal", info.getPortalName());
    key.put("layout", info.getLayoutKey());
    key.put("type", category);
    key.put("site", this.getSiteName());
    return key;
}

48. JdkTypeToJsonTest#testMapWithFilterExclude()

Project: elasticsearch-hadoop
File: JdkTypeToJsonTest.java
@Test
public void testMapWithFilterExclude() {
    TestSettings cfg = new TestSettings();
    cfg.setProperty("es.mapping.exclude", "key, nested.xxx");
    Map nested = new LinkedHashMap();
    nested.put("aaa", "bbb");
    nested.put("ccc", "ddd");
    nested.put("xxx", "zzz");
    Map map = new LinkedHashMap();
    map.put("key", "value");
    map.put("nested", nested);
    assertEquals("{\"nested\":{\"aaa\":\"bbb\",\"ccc\":\"ddd\"}}", jdkTypeToJson(map, cfg));
}

49. JdkTypeToJsonTest#testMapWithFilterInclude()

Project: elasticsearch-hadoop
File: JdkTypeToJsonTest.java
@Test
public void testMapWithFilterInclude() {
    TestSettings cfg = new TestSettings();
    cfg.setProperty("es.mapping.include", "key, nested.a*");
    Map nested = new LinkedHashMap();
    nested.put("aaa", "bbb");
    nested.put("ccc", "ddd");
    nested.put("axx", "zzz");
    Map map = new LinkedHashMap();
    map.put("key", "value");
    map.put("nested", nested);
    assertEquals("{\"key\":\"value\",\"nested\":{\"aaa\":\"bbb\",\"axx\":\"zzz\"}}", jdkTypeToJson(map, cfg));
}

50. ConfigSQLExecutorTest#updateWithMapParams()

Project: bboss
File: ConfigSQLExecutorTest.java
@Test
public void updateWithMapParams() throws SQLException {
    Map datas = new HashMap();
    datas.put("id", 139);
    datas.put("fieldName", "updateWithMapParams139");
    List<Map> params_ = new ArrayList<Map>();
    params_.add(datas);
    datas = new HashMap();
    datas.put("id", 140);
    datas.put("fieldName", "updateWithMapParams140");
    params_.add(datas);
    datas = new HashMap();
    datas.put("id", 141);
    datas.put("fieldName", "updateWithMapParams141");
    params_.add(datas);
    executor.updateBeans("updatesqltemplate", params_);
//		 result = (List<ListBean>) SQLExecutor.queryListBeanWithDBName(ListBean.class,"dbname","sql", params);
//		 System.out.println(result.size());
}

51. UserManager#verifyChannelRole()

Project: spacewalk
File: UserManager.java
private static boolean verifyChannelRole(Long userId, Channel channel, String role) {
    CallableMode m = ModeFactory.getCallableMode("Channel_queries", "verify_channel_role");
    Map inParams = new HashMap();
    inParams.put("cid", channel.getId());
    inParams.put("user_id", userId);
    inParams.put("role", role);
    Map outParams = new HashMap();
    outParams.put("result", new Integer(Types.VARCHAR));
    Map result = m.execute(inParams, outParams);
    return result.get("result") == null;
}

52. TestScript#testAntSyntax()

Project: tapestry4
File: TestScript.java
public void testAntSyntax() throws Exception {
    Map form = new HashMap();
    form.put("name", "gallahad");
    Map component = new HashMap();
    component.put("form", form);
    component.put("name", "lancelot");
    Map symbols = new HashMap();
    symbols.put("component", component);
    execute("ant-syntax.script", symbols);
    assertSymbol(symbols, "functionName", "gallahad_lancelot");
    assertSymbol(symbols, "incomplete1", "Incomplete: $");
    assertSymbol(symbols, "incomplete2", "Incomplete: ${");
    assertSymbol(symbols, "nopath", "This ${} ends up as literal.");
    assertSymbol(symbols, "OGNL", "This is a brace: }.");
}

53. TestScript#testAntSyntax()

Project: tapestry3
File: TestScript.java
public void testAntSyntax() throws Exception {
    Map form = new HashMap();
    form.put("name", "gallahad");
    Map component = new HashMap();
    component.put("form", form);
    component.put("name", "lancelot");
    Map symbols = new HashMap();
    symbols.put("component", component);
    execute("ant-syntax.script", symbols);
    assertSymbol(symbols, "functionName", "gallahad_lancelot");
    assertSymbol(symbols, "incomplete1", "Incomplete: $");
    assertSymbol(symbols, "incomplete2", "Incomplete: ${");
    assertSymbol(symbols, "nopath", "This ${} ends up as literal.");
    assertSymbol(symbols, "OGNL", "This is a brace: }.");
}

54. PackageEvrFactory#lookupPackageEvr()

Project: spacewalk
File: PackageEvrFactory.java
/**
     * Commit a PackageEvr via stored proc - lookup_evr
     * @param evrIn PackageEvr to commit to db
     * @return Returns a new/committed PackageEvr object.
     */
private static Long lookupPackageEvr(String epoch, String version, String release) {
    CallableMode m = ModeFactory.getCallableMode("Package_queries", "lookup_evr");
    Map inParams = new HashMap();
    inParams.put("epoch", epoch);
    inParams.put("version", version);
    inParams.put("release", release);
    Map outParams = new HashMap();
    outParams.put("evrId", new Integer(Types.NUMERIC));
    Map result = m.execute(inParams, outParams);
    return (Long) result.get("evrId");
}

55. JobConfig#setConfigAttributes()

Project: gocd
File: JobConfig.java
public void setConfigAttributes(Object attributes, TaskFactory taskFactory) {
    Map attributesMap = (Map) attributes;
    if (attributesMap.containsKey(NAME)) {
        String nameString = (String) attributesMap.get(NAME);
        jobName = nameString == null ? null : new CaseInsensitiveString(nameString);
    }
    if (attributesMap.containsKey(TASKS)) {
        tasks.setConfigAttributes(attributesMap.get(TASKS), taskFactory);
    }
    if (attributesMap.containsKey(ENVIRONMENT_VARIABLES)) {
        variables.setConfigAttributes(attributesMap.get(ENVIRONMENT_VARIABLES));
    }
    if (attributesMap.containsKey(TABS)) {
        tabs.setConfigAttributes(attributesMap.get(TABS));
    }
    if (attributesMap.containsKey(RESOURCES)) {
        resources.importFromCsv((String) attributesMap.get(RESOURCES));
    }
    if (attributesMap.containsKey(ARTIFACT_PLANS)) {
        artifactPlans.setConfigAttributes(attributesMap.get(ARTIFACT_PLANS));
    }
    setTimeoutAttribute(attributesMap);
    setJobRunTypeAttribute(attributesMap);
}

56. AbstractWebModuleTest#setUpStaticContentServlet()

Project: geronimo
File: AbstractWebModuleTest.java
protected void setUpStaticContentServlet() throws Exception {
    GBeanData staticContentServletGBeanData = new GBeanData(JettyServletHolder.GBEAN_INFO);
    staticContentServletGBeanData.setAttribute("servletName", "default");
    staticContentServletGBeanData.setAttribute("servletClass", "org.mortbay.jetty.servlet.Default");
    Map staticContentServletInitParams = new HashMap();
    staticContentServletInitParams.put("acceptRanges", "true");
    staticContentServletInitParams.put("dirAllowed", "true");
    staticContentServletInitParams.put("putAllowed", "false");
    staticContentServletInitParams.put("delAllowed", "false");
    staticContentServletInitParams.put("redirectWelcome", "false");
    staticContentServletInitParams.put("minGzipLength", "8192");
    staticContentServletGBeanData.setAttribute("initParams", staticContentServletInitParams);
    staticContentServletGBeanData.setAttribute("loadOnStartup", new Integer(0));
    staticContentServletGBeanData.setAttribute("servletMappings", Collections.singleton(new String("/")));
    ObjectName staticContentServletObjectName = NameFactory.getComponentName(null, null, null, NameFactory.WEB_MODULE, null, (String) staticContentServletGBeanData.getAttribute("servletName"), NameFactory.SERVLET, moduleContext);
    staticContentServletGBeanData.setName(staticContentServletObjectName);
    staticContentServletGBeanData.setReferencePattern("JettyServletRegistration", webModuleName);
    start(staticContentServletGBeanData);
}

57. ArithmeticTests#testMath37()

Project: mvel
File: ArithmeticTests.java
public void testMath37() {
    String expression = "x+a*a*c/x*b*z+x/y-b";
    Map map = new HashMap();
    map.put("a", 10);
    map.put("b", 20);
    map.put("c", 30);
    map.put("x", 2);
    map.put("y", 2);
    map.put("z", 60);
    Serializable s = compileExpression(expression);
    assertNumEquals(2d + 10d * 10d * 30d / 2d * 20d * 60d + 2d / 2d - 20d, executeExpression(s, map));
}

58. ArithmeticTests#testMath36()

Project: mvel
File: ArithmeticTests.java
public void testMath36() {
    String expression = "b/x*z/a+x-b+x-b/z+y";
    Map map = new HashMap();
    map.put("a", 10);
    map.put("b", 20);
    map.put("c", 30);
    map.put("x", 40);
    map.put("y", 50);
    map.put("z", 60);
    Serializable s = compileExpression(expression);
    assertNumEquals(20d / 40d * 60d / 10d + 40d - 20d + 40d - 20d / 60d + 50d, executeExpression(s, map));
}

59. ArithmeticTests#testMath35_Interpreted()

Project: mvel
File: ArithmeticTests.java
public void testMath35_Interpreted() {
    String expression = "b/x/b/b*y+a";
    Map map = new HashMap();
    map.put("a", 10);
    map.put("b", 20);
    map.put("c", 30);
    map.put("x", 40);
    map.put("y", 50);
    map.put("z", 60);
    assertNumEquals(20d / 40d / 20d / 20d * 50d + 10d, MVEL.eval(expression, map));
}

60. ArithmeticTests#testMath35()

Project: mvel
File: ArithmeticTests.java
public void testMath35() {
    String expression = "b/x/b/b*y+a";
    Map map = new HashMap();
    map.put("a", 10);
    map.put("b", 20);
    map.put("c", 30);
    map.put("x", 40);
    map.put("y", 50);
    map.put("z", 60);
    assertNumEquals(20d / 40d / 20d / 20d * 50d + 10d, executeExpression(compileExpression(expression), map));
}

61. ArithmeticTests#testMath34_Interpreted()

Project: mvel
File: ArithmeticTests.java
public void testMath34_Interpreted() {
    String expression = "a+b-c*x/y-z";
    Map map = new HashMap();
    map.put("a", 200);
    map.put("b", 100);
    map.put("c", 150);
    map.put("x", 400);
    map.put("y", 300);
    map.put("z", 75);
    assertEquals((double) 200 + 100 - 150 * 400 / 300 - 75, MVEL.eval(expression, map));
}

62. ScriptContent#executeScript()

Project: email-ext-plugin
File: ScriptContent.java
/**
     * Executes a script and returns the last value as a String
     *
     * @param build the build to act on
     * @param scriptStream the script input stream
     * @return a String containing the toString of the last item in the script
     * @throws IOException
     */
private String executeScript(AbstractBuild<?, ?> build, TaskListener listener, InputStream scriptStream) throws IOException {
    String result = "";
    Map binding = new HashMap<>();
    ExtendedEmailPublisherDescriptor descriptor = Jenkins.getActiveInstance().getDescriptorByType(ExtendedEmailPublisherDescriptor.class);
    binding.put("build", build);
    binding.put("it", new ScriptContentBuildWrapper(build));
    binding.put("project", build.getParent());
    binding.put("rooturl", descriptor.getHudsonUrl());
    binding.put("logger", listener.getLogger());
    GroovyShell shell = createEngine(descriptor, binding);
    Object res = shell.evaluate(new InputStreamReader(scriptStream, descriptor.getCharset()));
    if (res != null) {
        result = res.toString();
    }
    return result;
}

63. UISystemProperties#getDebugData()

Project: community-edition
File: UISystemProperties.java
/**
    * @see org.alfresco.web.ui.common.component.debug.BaseDebugComponent#getDebugData()
    */
@SuppressWarnings("unchecked")
public Map getDebugData() {
    // note: sort properties
    Map properties = new TreeMap();
    // add the jvm system properties
    Map systemProperties = System.getProperties();
    properties.putAll(systemProperties);
    // add heap size properties
    properties.put("heap.size", formatBytes(Runtime.getRuntime().totalMemory()));
    properties.put("heap.maxsize", formatBytes(Runtime.getRuntime().maxMemory()));
    properties.put("heap.free", formatBytes(Runtime.getRuntime().freeMemory()));
    return properties;
}

64. collection_writer_measurement_std#getObjects()

Project: cello
File: collection_writer_measurement_std.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Map obj = new LinkedHashMap();
    obj.put("collection", "measurement_std");
    obj.put("signal_carrier_units", "RPU");
    obj.put("normalization_instructions", "");
    obj.put("plasmid_description", "");
    obj.put("plasmid_sequence", "");
    objects.add(obj);
    return objects;
}

65. collection_writer_logic_constraints#getObjects()

Project: cello
File: collection_writer_logic_constraints.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Map nor = new LinkedHashMap();
    nor.put("type", "NOT");
    nor.put("max_instances", 2);
    ArrayList<Map> gate_type_constraints = new ArrayList<Map>();
    gate_type_constraints.add(nor);
    Map obj = new LinkedHashMap();
    obj.put("collection", "logic_constraints");
    obj.put("available_gates", gate_type_constraints);
    objects.add(obj);
    return objects;
}

66. collection_writer_measurement_std#getObjects()

Project: cello
File: collection_writer_measurement_std.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    ArrayList<String> plasmid_genbank = Util.fileLines("resources/plasmids/pAN1717.ape");
    String plasmid_genbank_string = "";
    for (String s : plasmid_genbank) {
        plasmid_genbank_string += s + "\n";
    }
    Map obj = new LinkedHashMap();
    obj.put("collection", "measurement_std");
    obj.put("signal_carrier_units", "RPU");
    obj.put("normalization_instructions", "The following equation converts the median YFP fluorescence to RPU.  RPU = (YFP – YFP0)/(YFPRPU – YFP0), where YFP is the median fluorescence of the cells of interest, YFP0 is the median autofluorescence, and YFPRPU is the median fluorescence of the cells containing the measurement standard plasmid");
    obj.put("plasmid_description", "p15A plasmid backbone with kanamycin resistance and a YFP expression cassette. Upstream isulation by terminator L3S3P21\n" + "and a 5’-promoter spacer.  Promoter BBa_J23101, ribozyme RiboJ, RBS BBa_B0064 drives constitutive YFP expression, with transcriptional termination by L3S3P21.");
    obj.put("plasmid_sequence", plasmid_genbank);
    objects.add(obj);
    return objects;
}

67. collection_writer_measurement_std#getObjects()

Project: cello
File: collection_writer_measurement_std.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    ArrayList<String> plasmid_genbank = Util.fileLines("resources/plasmids/pAN1717.ape");
    String plasmid_genbank_string = "";
    for (String s : plasmid_genbank) {
        plasmid_genbank_string += s + "\n";
    }
    Map obj = new LinkedHashMap();
    obj.put("collection", "measurement_std");
    obj.put("signal_carrier_units", "RPU");
    obj.put("normalization_instructions", "The following equation converts the median YFP fluorescence to RPU.  RPU = (YFP – YFP0)/(YFPRPU – YFP0), where YFP is the median fluorescence of the cells of interest, YFP0 is the median autofluorescence, and YFPRPU is the median fluorescence of the cells containing the measurement standard plasmid");
    obj.put("plasmid_description", "p15A plasmid backbone with kanamycin resistance and a YFP expression cassette. Upstream isulation by terminator L3S3P21\n" + "and a 5’-promoter spacer.  Promoter BBa_J23101, ribozyme RiboJ, RBS BBa_B0064 drives constitutive YFP expression, with transcriptional termination by L3S3P21.");
    obj.put("plasmid_sequence", plasmid_genbank);
    objects.add(obj);
    return objects;
}

68. collection_writer_measurement_std#getObjects()

Project: cello
File: collection_writer_measurement_std.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    ArrayList<String> plasmid_genbank = Util.fileLines(getRootPath() + "/resources/plasmids/pAN1717.ape");
    Map obj = new LinkedHashMap();
    obj.put("collection", "measurement_std");
    obj.put("signal_carrier_units", "RPU");
    obj.put("normalization_instructions", "The following equation converts the median YFP fluorescence to RPU.  RPU = (YFP – YFP0)/(YFPRPU – YFP0), where YFP is the median fluorescence of the cells of interest, YFP0 is the median autofluorescence, and YFPRPU is the median fluorescence of the cells containing the measurement standard plasmid");
    obj.put("plasmid_description", "p15A plasmid backbone with kanamycin resistance and a YFP expression cassette. Upstream isulation by terminator L3S3P21\n" + "and a 5’-promoter spacer.  Promoter BBa_J23101, ribozyme RiboJ, RBS BBa_B0064 drives constitutive YFP expression, with transcriptional termination by L3S3P21.");
    obj.put("plasmid_sequence", plasmid_genbank);
    objects.add(obj);
    return objects;
}

69. collection_writer_logic_constraints#getObjects()

Project: cello
File: collection_writer_logic_constraints.java
@Override
public ArrayList<Map> getObjects() {
    ArrayList<Map> objects = new ArrayList<>();
    Map nor = new LinkedHashMap();
    nor.put("type", "NOR");
    nor.put("max_instances", 5);
    ArrayList<Map> gate_type_constraints = new ArrayList<Map>();
    gate_type_constraints.add(nor);
    Map obj = new LinkedHashMap();
    obj.put("collection", "logic_constraints");
    obj.put("available_gates", gate_type_constraints);
    objects.add(obj);
    return objects;
}

70. ScanCommand#execute()

Project: camel
File: ScanCommand.java
@Override
public void execute() {
    ScanResult result = ddbClient.scan(new ScanRequest().withTableName(determineTableName()).withScanFilter(determineScanFilter()));
    Map tmp = new HashMap<>();
    tmp.put(DdbConstants.ITEMS, result.getItems());
    tmp.put(DdbConstants.LAST_EVALUATED_KEY, result.getLastEvaluatedKey());
    tmp.put(DdbConstants.CONSUMED_CAPACITY, result.getConsumedCapacity());
    tmp.put(DdbConstants.COUNT, result.getCount());
    tmp.put(DdbConstants.SCANNED_COUNT, result.getScannedCount());
    addToResults(tmp);
}

71. ActionService#getLink()

Project: tapestry4
File: ActionService.java
public ILink getLink(boolean post, Object parameter) {
    Defense.isAssignable(parameter, ActionServiceParameter.class, "parameter");
    ActionServiceParameter asp = (ActionServiceParameter) parameter;
    IComponent component = asp.getComponent();
    IPage activePage = _requestCycle.getPage();
    IPage componentPage = component.getPage();
    Map parameters = new HashMap();
    boolean stateful = _request.getSession(false) != null;
    parameters.put(ServiceConstants.COMPONENT, component.getIdPath());
    parameters.put(ServiceConstants.PAGE, activePage.getPageName());
    parameters.put(ServiceConstants.CONTAINER, activePage == componentPage ? null : componentPage.getPageName());
    parameters.put(ACTION, asp.getActionId());
    parameters.put(ServiceConstants.SESSION, stateful ? "T" : null);
    return _linkFactory.constructLink(this, post, parameters, true);
}

72. XTile#getScriptSymbols()

Project: tapestry4
File: XTile.java
public Map getScriptSymbols() {
    ILink link = getService().getLink(false, this);
    Map result = new HashMap();
    result.put("sendFunctionName", getSendName());
    result.put("receiveFunctionName", getReceiveName());
    result.put("errorFunctionName", getErrorName());
    result.put("disableCaching", getDisableCaching() ? "true" : null);
    result.put("url", link.getURL());
    return result;
}

73. UriBuilderTest#testBuildFromMapTest4()

Project: Resteasy
File: UriBuilderTest.java
@Test
public void testBuildFromMapTest4() throws Exception {
    StringBuffer sb = new StringBuffer();
    boolean pass = true;
    URI uri;
    Map maps = new HashMap();
    maps.put("x", "x%yz");
    maps.put("y", "/path-absolute/test1");
    maps.put("z", "[email protected]");
    maps.put("w", "path-rootless/test2");
    maps.put("u", "extra");
    String expected_path = "path-rootless/test2/x%yz//path-absolute/test1/[email protected]/x%yz";
    try {
        uri = UriBuilder.fromPath("").path("{w}/{v}/{x}/{y}/{z}/{x}").buildFromMap(maps);
        throw new Exception("Test Failed: expected IllegalArgumentException not thrown");
    } catch (IllegalArgumentException ex) {
    }
}

74. UriBuilderTest#testBuildFromMapTest3()

Project: Resteasy
File: UriBuilderTest.java
@Test
public void testBuildFromMapTest3() throws Exception {
    StringBuffer sb = new StringBuffer();
    boolean pass = true;
    URI uri;
    Map maps = new HashMap();
    maps.put("x", null);
    maps.put("y", "/path-absolute/test1");
    maps.put("z", "[email protected]");
    maps.put("w", "path-rootless/test2");
    maps.put("u", "extra");
    String expected_path = "path-rootless/test2/x%yz//path-absolute/test1/[email protected]/x%yz";
    try {
        uri = UriBuilder.fromPath("").path("{w}/{x}/{y}/{z}/{x}").buildFromMap(maps);
        throw new Exception("Test Failed: expected IllegalArgumentException not thrown");
    } catch (IllegalArgumentException ex) {
    }
}

75. UriBuilderTest#testEncodedMapTest4()

Project: Resteasy
File: UriBuilderTest.java
@Test
public void testEncodedMapTest4() throws Exception {
    StringBuffer sb = new StringBuffer();
    boolean pass = true;
    URI uri;
    Map maps = new HashMap();
    maps.put("x", "x%yz");
    maps.put("y", "/path-absolute/test1");
    maps.put("z", "[email protected]");
    maps.put("w", "path-rootless/test2");
    maps.put("u", "extra");
    String expected_path = "path-rootless/test2/x%yz//path-absolute/test1/[email protected]/x%yz";
    try {
        uri = UriBuilder.fromPath("").path("{w}/{v}/{x}/{y}/{z}/{x}").buildFromEncodedMap(maps);
        throw new Exception("Test Failed: expected IllegalArgumentException not thrown");
    } catch (IllegalArgumentException ex) {
    }
}

76. UriBuilderTest#testEncodedMapTest3()

Project: Resteasy
File: UriBuilderTest.java
/**
    * from TCK 1.1
    */
@Test
public void testEncodedMapTest3() throws Exception {
    Map maps = new HashMap();
    maps.put("x", null);
    maps.put("y", "/path-absolute/test1");
    maps.put("z", "[email protected]");
    maps.put("w", "path-rootless/test2");
    maps.put("u", "extra");
    String expected_path = "path-rootless/test2/x%yz//path-absolute/test1/[email protected]/x%yz";
    try {
        URI uri = UriBuilder.fromPath("").path("{w}/{x}/{y}/{z}/{x}").buildFromEncodedMap(maps);
        throw new Exception("Test Failed: expected IllegalArgumentException not thrown");
    } catch (IllegalArgumentException ex) {
    }
}

77. ChecksumFactory#safeCreate()

Project: spacewalk
File: ChecksumFactory.java
/**
     * Lookup a checksum and if not exists, it is created.
     * @param hash to lookup Checksum for
     * @param hashType to lookup Checksum for
     * @return Checksum
     */
public static Checksum safeCreate(String hash, String hashType) {
    if (hash == null || hashType == null) {
        return null;
    }
    // Lookup existing or create new checksum
    CallableMode m = ModeFactory.getCallableMode("checksum_queries", "create_new_checksum");
    Map inParams = new HashMap();
    Map outParams = new HashMap();
    inParams.put("checksum_in", hash);
    inParams.put("checksum_type_in", hashType);
    //Outparam
    outParams.put("checksumId", new Integer(Types.NUMERIC));
    Map result = m.execute(inParams, outParams);
    Long checksumId = (Long) result.get("checksumId");
    if (checksumId == null) {
        throw new IllegalArgumentException("Unknown checksum type: " + hashType + ")");
    }
    return lookupById(checksumId);
}

78. TestDynaActionForm#setupComplexProperties()

Project: sonarqube
File: TestDynaActionForm.java
// ------------------------------------------------------ Protected Methods
/**
     * Set up the complex properties that cannot be configured from the
     * initial value expression.
     */
protected void setupComplexProperties() {
    List listIndexed = new ArrayList();
    listIndexed.add("String 0");
    listIndexed.add("String 1");
    listIndexed.add("String 2");
    listIndexed.add("String 3");
    listIndexed.add("String 4");
    dynaForm.set("listIndexed", listIndexed);
    Map mappedProperty = new HashMap();
    mappedProperty.put("First Key", "First Value");
    mappedProperty.put("Second Key", "Second Value");
    dynaForm.set("mappedProperty", mappedProperty);
    Map mappedIntProperty = new HashMap();
    mappedIntProperty.put("One", new Integer(1));
    mappedIntProperty.put("Two", new Integer(2));
    dynaForm.set("mappedIntProperty", mappedIntProperty);
}

79. ConfigurationManager#accessToObject()

Project: spacewalk
File: ConfigurationManager.java
private boolean accessToObject(Long uid, String name, Long oid, String mode) {
    log.debug("accessToObject :: uid: " + uid + " name: " + name + " oid: " + oid + " mode: " + mode);
    CallableMode m = ModeFactory.getCallableMode("config_queries", mode);
    Map inParams = new HashMap();
    inParams.put("user_id", uid);
    inParams.put(name, oid);
    Map outParams = new HashMap();
    outParams.put("access", new Integer(Types.NUMERIC));
    Map result = m.execute(inParams, outParams);
    int access = ((Long) result.get("access")).intValue();
    return (access == 1);
}

80. DeepEqualityTest#simpleTest()

Project: ode
File: DeepEqualityTest.java
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void simpleTest() throws Exception {
    Map m1 = new HashMap();
    QName n1 = new QName("localpart");
    URI u1 = new URI("urn://a/uri");
    m1.put(u1, n1);
    DebugInfo d1 = new DebugInfo("/a/path", 0, 1, m1);
    m1.put("cyclic", d1);
    Map m2 = new HashMap();
    QName n2 = new QName("localpart");
    URI u2 = new URI("urn://a/uri");
    m2.put(u2, n2);
    DebugInfo d2 = new DebugInfo("/a/path", 0, 1, m2);
    m2.put("cyclic", d2);
    DeepEqualityHelper de = new DeepEqualityHelper();
    de.addCustomComparator(new ExtensibeImplEqualityComp());
    assertEquals(Boolean.TRUE, de.deepEquals(m1, m2));
}

81. RetainedWithTest#createMapChildren()

Project: j2objc
File: RetainedWithTest.java
@AutoreleasePool
private void createMapChildren(MapFactory factory, List<Integer> objectCodes) {
    // Use separate maps for each of the views to ensure that each view type is strengthening its
    // reference to the map.
    Map m1 = factory.newMap();
    Map m2 = factory.newMap();
    Map m3 = factory.newMap();
    ValueType v = new ValueType();
    m1.put(factory.getKey(), v);
    m2.put(factory.getKey(), v);
    m3.put(factory.getKey(), v);
    keys = m1.keySet();
    values = m2.values();
    entrySet = m3.entrySet();
    objectCodes.add(System.identityHashCode(v));
}

82. PactMultiProviderTest#doTest()

Project: pact-jvm
File: PactMultiProviderTest.java
private void doTest(String path, String json) throws IOException {
    Assert.assertEquals(new ConsumerClient(mockTestProvider.getConfig().url()).options("/second"), 200);
    Map expectedResponse = new HashMap();
    expectedResponse.put("responsetest", true);
    expectedResponse.put("name", "harry");
    assertEquals(new ConsumerClient(mockTestProvider.getConfig().url()).getAsMap(path, ""), expectedResponse);
    Map expectedResponse2 = new HashMap();
    expectedResponse2.put("responsetest", true);
    expectedResponse2.put("name", "larry");
    assertEquals(new ConsumerClient(mockTestProvider2.getConfig().url()).putAsMap("/", json), expectedResponse2);
}

83. JobInstanceSqlMapDao#findJobHistoryPage()

Project: gocd
File: JobInstanceSqlMapDao.java
public JobInstances findJobHistoryPage(String pipelineName, String stageName, String jobConfigName, int count, int offset) {
    Map params = new HashMap();
    params.put("pipelineName", pipelineName);
    params.put("stageName", stageName);
    params.put("jobConfigName", jobConfigName);
    params.put("count", count);
    params.put("offset", offset);
    List<JobInstance> results = (List<JobInstance>) getSqlMapClientTemplate().queryForList("findJobHistoryPage", params);
    return new JobInstances(results);
}

84. ConfigContextTest#shouldGetTaskPluginAttributeMap()

Project: gocd
File: ConfigContextTest.java
@Test
public void shouldGetTaskPluginAttributeMap() throws Exception {
    Map pluginAttributeMap = new HashMap();
    Map taskMap = new HashMap();
    taskMap.put("message", "hi");
    pluginAttributeMap.put("task", taskMap);
    pluginAttributeMap.put("nontask", "other");
    ConfigContext ctx = new ConfigContext(null, pluginAttributeMap);
    Map returnedTaskMap = ctx.getTaskPluginAttributeMap();
    assertFalse(returnedTaskMap.containsKey("nontask"));
    assertEquals(taskMap.get("message"), returnedTaskMap.get("message"));
}

85. DispatchXMessageDataSourceTests#testDataSourceWithTXTPlusTwoAttachments()

Project: axis2-java
File: DispatchXMessageDataSourceTests.java
@Test
public void testDataSourceWithTXTPlusTwoAttachments() throws Exception {
    Dispatch<DataSource> dispatch = getDispatch();
    Map attachments = new HashMap();
    Map requestContext = dispatch.getRequestContext();
    requestContext.put(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS, attachments);
    attachments.put(UIDGenerator.generateContentId(), new DataHandler(attachmentDS));
    attachments.put(UIDGenerator.generateContentId(), new DataHandler(imageDS));
    DataSource request = txtDS;
    DataSource response = dispatch.invoke(request);
    assertTrue(response != null);
    assertThat(response.getContentType()).isEqualTo("text/plain");
    String req = new String(getStreamAsByteArray(request.getInputStream()));
    String res = new String(getStreamAsByteArray(response.getInputStream()));
    assertEquals(req, res);
    Map attachments2 = (Map) dispatch.getResponseContext().get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);
    assertTrue(attachments2 != null);
    assertEquals(attachments2.size(), 2);
}

86. ModuleRevisionIdTest#testEncodeDecodeToString()

Project: ant-ivy
File: ModuleRevisionIdTest.java
public void testEncodeDecodeToString() {
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", "revision"));
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org", "name", ""));
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org.jayasoft", "name-post", "1.0"));
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org/jayasoft", "pre/name", "1.0-dev8/2"));
    Map extraAttributes = new HashMap();
    extraAttributes.put("extra", "extravalue");
    extraAttributes.put("att/name", "att/value");
    extraAttributes.put("att.name", "att.value");
    extraAttributes.put("att<name", "att<value");
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org/jayasoft", "pre/name", "1.0-dev8/2", extraAttributes));
    extraAttributes.put("nullatt", null);
    testEncodeDecodeToString(ModuleRevisionId.newInstance("org/jayasoft", "pre/name", "1.0-dev8/2", extraAttributes));
}

87. GeronimoServerBehaviourDelegate#getServerConnection()

Project: geronimo-devtools
File: GeronimoServerBehaviourDelegate.java
public MBeanServerConnection getServerConnection() throws Exception {
    Map map = new HashMap();
    String user = getGeronimoServer().getAdminID();
    String password = getGeronimoServer().getAdminPassword();
    map.put("jmx.remote.credentials", new String[] { user, password });
    map.put("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");
    map.put("java.naming.factory.url.pkgs", "org.apache.geronimo.naming");
    map.put("java.naming.provider.url", "rmi://" + getServer().getHost() + ":1099");
    String url = getGeronimoServer().getJMXServiceURL();
    if (url != null) {
        try {
            JMXServiceURL address = new JMXServiceURL(url);
            JMXConnector jmxConnector = JMXConnectorFactory.connect(address, map);
            MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();
            Trace.trace(Trace.INFO, "Connected to kernel. " + url);
            return connection;
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }
    return null;
}

88. EnterpriseNamingContextTest#testList()

Project: geronimo
File: EnterpriseNamingContextTest.java
public void testList() throws Exception {
    Map map = new HashMap();
    map.put("one", new Integer(1));
    map.put("two", new Integer(2));
    map.put("three", new Integer(3));
    Context context = EnterpriseNamingContext.createEnterpriseNamingContext(map);
    Map result = toListResults(context.list(""));
    assertEquals(4, result.size());
    assertEquals(Integer.class.getName(), result.get("one"));
    assertEquals(Integer.class.getName(), result.get("two"));
    assertEquals(Integer.class.getName(), result.get("three"));
    assertNotNull(result.get("env"));
    result = toListBindingResults(context.listBindings(""));
    assertEquals(4, result.size());
    assertEquals(new Integer(1), result.get("one"));
    assertEquals(new Integer(2), result.get("two"));
    assertEquals(new Integer(3), result.get("three"));
    assertNotNull(result.get("env"));
}

89. DisruptorWrapBlockingQueue#getState()

Project: jstorm
File: DisruptorWrapBlockingQueue.java
@Override
public Object getState() {
    Map state = new HashMap<String, Object>();
    // get readPos then writePos so it's never an under-estimate
    long rp = readPos();
    long wp = writePos();
    state.put("capacity", capacity());
    state.put("population", wp - rp);
    state.put("write_pos", wp);
    state.put("read_pos", rp);
    return state;
}

90. DeepScanTest#scans_can_be_filtered()

Project: JsonPath
File: DeepScanTest.java
@Test
public void scans_can_be_filtered() {
    final Map brown = singletonMap("val", "brown");
    final Map white = singletonMap("val", "white");
    final Map cow = new HashMap() {

        {
            put("mammal", true);
            put("color", brown);
        }
    };
    final Map dog = new HashMap() {

        {
            put("mammal", true);
            put("color", white);
        }
    };
    final Map frog = new HashMap() {

        {
            put("mammal", false);
        }
    };
    List animals = new ArrayList() {

        {
            add(cow);
            add(dog);
            add(frog);
        }
    };
    assertThat(using(JSON_SMART_CONFIGURATION.addOptions(Option.REQUIRE_PROPERTIES)).parse(animals).read("$..[?(@.mammal == true)].color", List.class)).containsExactly(brown, white);
}

91. PackageRepository#setConfigAttributes()

Project: gocd
File: PackageRepository.java
public void setConfigAttributes(Object attributes) {
    Map attributesMap = (Map) attributes;
    if (attributesMap.containsKey(NAME)) {
        name = ((String) attributesMap.get(NAME));
    }
    if (attributesMap.containsKey(REPO_ID)) {
        id = ((String) attributesMap.get(REPO_ID));
    }
    if (attributesMap.containsKey(PLUGIN_CONFIGURATION)) {
        pluginConfiguration.setConfigAttributes(attributesMap.get(PLUGIN_CONFIGURATION));
    }
    if (attributesMap.containsKey(Configuration.CONFIGURATION)) {
        configuration.clear();
        configuration.setConfigAttributes(attributesMap.get(Configuration.CONFIGURATION), getSecureKeyInfoProvider());
    }
}

92. TfsMaterialConfig#setConfigAttributes()

Project: gocd
File: TfsMaterialConfig.java
@Override
public void setConfigAttributes(Object attributes) {
    if (attributes == null) {
        return;
    }
    super.setConfigAttributes(attributes);
    Map map = (Map) attributes;
    if (map.containsKey(URL)) {
        this.url = new UrlArgument((String) map.get(URL));
    }
    if (map.containsKey(USERNAME)) {
        this.userName = (String) map.get(USERNAME);
    }
    if (map.containsKey(DOMAIN)) {
        this.domain = (String) map.get(DOMAIN);
    }
    if (map.containsKey(PASSWORD_CHANGED) && "1".equals(map.get(PASSWORD_CHANGED))) {
        String passwordToSet = (String) map.get(PASSWORD);
        resetPassword(passwordToSet);
    }
    if (map.containsKey(PROJECT_PATH)) {
        this.projectPath = (String) map.get(PROJECT_PATH);
    }
}

93. BasicEnvironmentConfig#setConfigAttributes()

Project: gocd
File: BasicEnvironmentConfig.java
@Override
public void setConfigAttributes(Object attributes) {
    if (attributes == null) {
        return;
    }
    Map attributeMap = (Map) attributes;
    if (attributeMap.containsKey(NAME_FIELD)) {
        name = new CaseInsensitiveString((String) attributeMap.get(NAME_FIELD));
    }
    if (attributeMap.containsKey(PIPELINES_FIELD)) {
        pipelines.setConfigAttributes(attributeMap.get(PIPELINES_FIELD));
    }
    if (attributeMap.containsKey(AGENTS_FIELD)) {
        agents.setConfigAttributes(attributeMap.get(AGENTS_FIELD));
    }
    if (attributeMap.containsKey(VARIABLES_FIELD)) {
        variables.setConfigAttributes(attributeMap.get(VARIABLES_FIELD));
    }
}

94. TikaTextExtractorGraphPropertyWorkerTest#before()

Project: lumify
File: TikaTextExtractorGraphPropertyWorkerTest.java
@Before
public void before() throws Exception {
    graph = InMemoryGraph.create();
    visibility = new Visibility("");
    authorizations = new InMemoryAuthorizations();
    textExtractor = new TikaTextExtractorGraphPropertyWorker();
    visibilityTranslator = new DirectVisibilityTranslator();
    Map config = new HashMap();
    config.put("ontology.intent.concept.person", "http://lumify.io/test#person");
    config.put("ontology.intent.concept.location", "http://lumify.io/test#location");
    config.put("ontology.intent.concept.organization", "http://lumify.io/test#organization");
    config.put("ontology.intent.relationship.artifactHasEntity", "http://lumify.io/test#artifactHasEntity");
    io.lumify.core.config.Configuration configuration = new HashMapConfigurationLoader(config).createConfiguration();
    GraphPropertyWorkerPrepareData prepareData = new GraphPropertyWorkerPrepareData(config, null, null, null, null, null);
    textExtractor.setConfiguration(configuration);
    textExtractor.setGraph(graph);
    textExtractor.setWorkQueueRepository(workQueueRepository);
    textExtractor.setAuditRepository(auditRepository);
    textExtractor.setVisibilityTranslator(visibilityTranslator);
    textExtractor.setOntologyRepository(ontologyRepository);
    textExtractor.prepare(prepareData);
}

95. RewriteAppenderTest#testMapPolicy()

Project: log4j-extras
File: RewriteAppenderTest.java
public void testMapPolicy() throws Exception {
    configure("map.xml");
    Logger logger = Logger.getLogger(RewriteAppenderTest.class);
    logger.info("Message 0");
    MDC.put("p1", "Hola");
    Map msg = new TreeMap();
    msg.put("p1", "Hello");
    msg.put("p2", "World");
    msg.put("x1", "Mundo");
    logger.info(msg);
    msg.put("message", "Message 1");
    logger.info(msg);
    assertTrue(Compare.compare(RewriteAppenderTest.class, "target/temp", "map.log"));
}

96. CopyUtilsTest#copyUtilsTest()

Project: pinpoint
File: CopyUtilsTest.java
@Test
public void copyUtilsTest() {
    Map original = createSimpleMap("key", 2);
    Map copied = CopyUtils.mediumCopyMap(original);
    Assert.assertEquals(2, copied.get("key"));
    Assert.assertEquals(2, original.get("key"));
    original.put("key", 4);
    copied.put("key", 3);
    copied.put("new", "new");
    Assert.assertEquals(3, copied.get("key"));
    Assert.assertEquals("new", copied.get("new"));
    Assert.assertEquals(4, original.get("key"));
}

97. MysqlFactory#startDatabaseServer()

Project: openmrs-core
File: MysqlFactory.java
public static MysqldResource startDatabaseServer(File databaseDir, File dataDir, String port, String userName, String password) throws InterruptedException {
    Thread.sleep(1000);
    MysqldResource mysqldResource = new MysqldResource(databaseDir);
    Map database_options = new HashMap();
    database_options.put(MysqldResourceI.PORT, Integer.toString(Integer.parseInt(port)));
    database_options.put(MysqldResourceI.INITIALIZE_USER, "true");
    database_options.put(MysqldResourceI.INITIALIZE_USER_NAME, userName);
    database_options.put(MysqldResourceI.INITIALIZE_PASSWORD, password);
    stopDatabaseServer(mysqldResource);
    mysqldResource.start("openmrs-release-test", database_options);
    if (!mysqldResource.isRunning()) {
        throw new RuntimeException("MySQL did not start.");
    }
    System.out.println("MySQL is running.");
    return mysqldResource;
}

98. CmsDatabaseImportFromServer#actionCommit()

Project: opencms-core
File: CmsDatabaseImportFromServer.java
/**
     * @see org.opencms.workplace.CmsWidgetDialog#actionCommit()
     */
@Override
public void actionCommit() throws IOException, ServletException {
    List errors = new ArrayList();
    Map params = new HashMap();
    params.put(PARAM_FILE, getImportFile());
    params.put(PARAM_KEEPPERMISSIONS.toLowerCase(), getKeepPermissions());
    // set style to display report in correct layout
    params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
    // set close link to get back to overview after finishing the import
    params.put(PARAM_CLOSELINK, CmsToolManager.linkForToolPath(getJsp(), "/database"));
    // redirect to the report output JSP
    getToolManager().jspForwardPage(this, IMPORT_ACTION_REPORT, params);
    // set the list of errors to display when saving failed
    setCommitErrors(errors);
}

99. CmsDatabaseImportFromHttp#actionCommit()

Project: opencms-core
File: CmsDatabaseImportFromHttp.java
/**
     * @see org.opencms.workplace.administration.A_CmsImportFromHttp#actionCommit()
     */
@Override
public void actionCommit() throws IOException, ServletException {
    try {
        copyFileToServer(OpenCms.getSystemInfo().getPackagesRfsPath());
    } catch (CmsException e) {
        setException(e);
        return;
    }
    Map params = new HashMap();
    params.put(PARAM_FILE, getParamImportfile());
    params.put(PARAM_KEEPPERMISSIONS.toLowerCase(), getParamKeepPermissions());
    // set style to display report in correct layout
    params.put(PARAM_STYLE, CmsToolDialog.STYLE_NEW);
    // set close link to get back to overview after finishing the import
    params.put(PARAM_CLOSELINK, CmsToolManager.linkForToolPath(getJsp(), "/database"));
    // redirect to the report output JSP
    getToolManager().jspForwardPage(this, CmsDatabaseImportFromServer.IMPORT_ACTION_REPORT, params);
}

100. XmlRpcStructFactory#getXmlRpcWorkflowInstancePage()

Project: oodt
File: XmlRpcStructFactory.java
/**
   * Gets a {@link HashMap} representation of a {@link WorkflowInstancePage}
   * that is serializable over the XML-RPC wire.
   * 
   * @param page
   *          The {@link WorkflowInstancePage} to turn into a {@link Hashtable}.
   * @return A {@link Hashtable} representation of a
   *         {@link WorkflowInstancePage}.
   */
public static Map getXmlRpcWorkflowInstancePage(WorkflowInstancePage page) {
    Map pageHash = new Hashtable();
    pageHash.put("totalPages", String.valueOf(page.getTotalPages()));
    pageHash.put("pageNum", String.valueOf(page.getPageNum()));
    pageHash.put("pageSize", String.valueOf(page.getPageSize()));
    pageHash.put("pageWorkflows", getXmlRpcWorkflowInstances(page.getPageWorkflows()));
    return pageHash;
}