//////////////////////////////////////////////////////////////////
549072
@Override
	public <P extends ParaObject> String create(P so) {
		return create(Config.getRootAppIdentifier(), so);
	}
259283
function(article, options, callback) {

            if (arguments.length === 2) {
                callback = options;
                options = null;
            }

            var self = this;

            //noinspection JSValidateTypes
            flow()
                .seq(function(cb) {
                    article.fetch(null, cb);
                })
                .seq("product", function(cb) {
                    self.initializeProduct(article.$.product, options, cb);
                })
                .exec(function(err, results) {
                    callback && callback(err, results.product);
                });
        }
1315518
function(time) {
			var t = this;
			var children = this.factory.$el.find('ul');
			var offset = 0;

			time = time ? time : this.factory.time.getDayCounter(this.showSeconds);

			if(time.length > children.length) {
				$.each(time, function(i, digit) {
					t.createList(digit);
				});
			}

			if(this.showSeconds) {
				$(this.createDivider('Seconds')).insertBefore(this.lists[this.lists.length - 2].$el);
			}
			else
			{
				offset = 2;
			}

			$(this.createDivider('Minutes')).insertBefore(this.lists[this.lists.length - 4 + offset].$el);
			$(this.createDivider('Hours')).insertBefore(this.lists[this.lists.length - 6 + offset].$el);
			$(this.createDivider('Days', true)).insertBefore(this.lists[0].$el);

			this.base();
		}
811018
@Override
    public void configureSelected(PMContext ctx) throws NumberFormatException, PMException {
        if (ctx.getEntityContainer().isSelectedNew()) {
            ctx.getEntityContainer().setSelected(null);
        } else {
            super.configureSelected(ctx);
        }
    }
1290907
function () {
      var done = this.async();
      var questions = [];
      var choices = [
        {
          name: 'Standard Preset',
          value: 'standard'
        },
        {
          name: 'Minimum Preset',
          value: 'minimum'
        },
        {
          name: 'Custom Configuration (Advanced)',
          value: 'custom'
        }
      ];
      var defaultType = 'standard';

      if (!this.skipWelcomeMessage) {
        this.log(yosay('Welcome to ' + this.pkg.name + ' v' + this.pkg.version));
      }

      if (!this.configType) {
        if (this.config.existed) {
          choices.splice(2, 0, {
            name: 'User Preset',
            value: 'user'
          });
          defaultType = 'user';
        }
        questions.push({
          type: 'list',
          name: 'configType',
          message: 'Setup Type',
          choices: choices,
          default: defaultType
        });
      }

      this.prompt(questions, function (answers) {
        if (typeof answers.configType !== 'undefined') {
          this.configType = answers.configType;
        }

        // Preset for skipping prompt
        switch (this.configType) {
          case 'standard':
            this.preset = standardPreset;
            break;
          case 'minimum':
            this.preset = minimumPreset;
            break;
          case 'user':
            this.preset = this.config.getAll();
            break;
          case 'custom':
            this.preset = {};
            break;
        }

        // Initial settings
        this.settings = _.assign({}, defaultConfig, this.config.getAll());

        done();
      }.bind(this));
    }
1038962
private void setListIdForColumn(CmsListColumnDefinition col) {

        col.setListId(getListId());
        // default actions
        Iterator<CmsListDefaultAction> itDefaultActions = col.getDefaultActions().iterator();
        while (itDefaultActions.hasNext()) {
            itDefaultActions.next().setListId(getListId());
        }
        // direct actions
        Iterator<I_CmsListDirectAction> itDirectActions = col.getDirectActions().iterator();
        while (itDirectActions.hasNext()) {
            itDirectActions.next().setListId(getListId());
        }
    }
4310
private void createDayPanel() {

        CmsCheckBox box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_MONDAY_0));
        box.setInternalValue(WeekDay.MONDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_TUESDAY_0));
        box.setInternalValue(WeekDay.TUESDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_WEDNESDAY_0));
        box.setInternalValue(WeekDay.WEDNESDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_THURSDAY_0));
        box.setInternalValue(WeekDay.THURSDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_FRIDAY_0));
        box.setInternalValue(WeekDay.FRIDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_SATURDAY_0));
        box.setInternalValue(WeekDay.SATURDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
        box = new CmsCheckBox(Messages.get().key(Messages.GUI_SERIALDATE_DAY_SUNDAY_0));
        box.setInternalValue(WeekDay.SUNDAY.toString());
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        box.addValueChangeHandler(m_checkBoxValueChangeHandler);
        m_checkboxes.add(box);
        m_dayPanel.add(box);
    }
901454
@Override
    public void init(String webAppRfsPath, String servletMapping, String defaultWebApplication) {

        try {
            super.init(webAppRfsPath, servletMapping, defaultWebApplication);
            CmsUpdateInfo.INSTANCE.setAdeModuleVersion(getInstalledModules().get("org.opencms.ade.containerpage"));

            if (m_workplaceUpdateThread != null) {
                if (m_workplaceUpdateThread.isAlive()) {
                    m_workplaceUpdateThread.kill();
                }
                m_workplaceUpdateThread = null;
            }
            if (m_dbUpdateThread != null) {
                if (m_dbUpdateThread.isAlive()) {
                    m_dbUpdateThread.kill();
                }
                m_dbUpdateThread = null;
                m_newLoggingOffset = 0;
                m_oldLoggingOffset = 0;
            }
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
421120
public void actionUpdateElements() throws JspException {

        try {
            List<CmsDialogElement> elementList = computeElements();
            CmsFile file = getCms().readFile(getParamTempfile(), CmsResourceFilter.IGNORE_EXPIRATION);
            CmsXmlPage page = CmsXmlPageFactory.unmarshal(getCms(), file);
            boolean foundMandatory = false;
            m_changeElement = "";
            Iterator<CmsDialogElement> i = elementList.iterator();
            while (i.hasNext()) {
                // get the current list element
                CmsDialogElement element = i.next();
                if (element.isMandantory()
                    || element.getName().equals(getParamElementname())
                    || Boolean.valueOf(
                        getJsp().getRequest().getParameter(PREFIX_PARAM_BODY + element.getName())).booleanValue()) {
                    if (!element.isExisting()) {
                        // create element in order to enable it properly
                        page.addValue(element.getName(), getElementLocale());
                    }
                    page.setEnabled(element.getName(), getElementLocale(), true);
                    if (element.isMandantory() && !foundMandatory) {
                        m_changeElement = element.getName();
                        foundMandatory = true;
                    }
                } else {
                    if (element.isExisting()) {
                        // remove element if it is already existing
                        page.removeValue(element.getName(), getElementLocale());
                    }
                }
            }
            // write the temporary file
            file.setContents(page.marshal());
            getCms().writeFile(file);
            // set the javascript functions which should be executed
            if (page.isEnabled(getParamElementname(), getElementLocale())) {
                m_changeElement = getParamElementname();
            } else if (!foundMandatory) {
                if (elementList.size() > 0) {
                    m_changeElement = elementList.get(0).getName();
                }
            }
        } catch (Throwable e) {
            // show error dialog
            setParamMessage(Messages.get().getBundle(getLocale()).key(Messages.ERR_UPDATE_ELEMENTS_0));
            includeErrorpage(this, e);
        }
    }
1290284
public void logException(Level level) {
        if (!LOG.isLoggable(level)) {
            return;
        }
        final StringBuilder builder = new StringBuilder();
        builder.append("\n----------------------------------------------------");
        builder.append("\nMonitoringException");
        builder.append("\n----------------------------------------------------");
        builder.append("\nCode:    ").append(code);
        builder.append("\nMessage: ").append(message);
        builder.append("\n----------------------------------------------------");
        if (events != null) {
            for (Event event : events) {
                builder.append("\nEvent:");
                if (event.getMessageInfo() != null) {
                    builder.append("\nMessage id: ").append(event.getMessageInfo().getMessageId());
                    builder.append("\nFlow id:    ").append(event.getMessageInfo().getFlowId());
                    builder.append("\n----------------------------------------------------");
                } else {
                    builder.append("\nNo message id and no flow id");
                }
            }
        }
        builder.append("\n----------------------------------------------------\n");
        LOG.log(level, builder.toString(), this);
    }
225808
public static void main(String args[]) throws Exception {

		// create Options object
		Options options = new Options();
		// add options
		options.addOption("path", true,
				"path to the Linear BDB index that contains the training vectors: e.g. C:/lef/BDB_1024/");
		options.addOption("d", true, "the dimensionality of the training vectors: e.g. 128 or 1024");
		options.addOption("m", true,
				"the number of subvectors to be created (d should be divided exactly by m)");
		options.addOption("c", true, "the number of centroids of each subquantizer: e.g. 256 or 1024");
		options.addOption("transform", true,
				"the type of transformation to apply before learning the product quantizer");
		options.addOption("samples", true, "how many learning vectors to use: e.g. 20000");
		options.addOption("i", true, "the maximum number of clustering iterations (default 100).");
		options.addOption("s", true, "the number of parallel execution slots to use in k-means clustering");

		options.addOption("split", false,
				"whether to also split the training vectors before learning the sub-quantizers");
		options.addOption("ivf", false,
				"whether product quantization will be combined with an inverted file (ivf)");
		options.addOption("cqfile", true, "path to the coarse quantizer file");
		options.addOption("cqcentroids", true, "number of coarse quantizer centroids: e.g. 8192");

		CommandLineParser parser = new PosixParser();
		CommandLine cmd = null;
		try {
			cmd = parser.parse(options, args);
		} catch (ParseException e) {
			System.out.println(e.getMessage());
			System.exit(0);
		}

		HelpFormatter formatter = new HelpFormatter();
		formatter.printHelp("Product quantization learning", options, true);

		// the following two parameters get the default value of false is they are
		// not passed in the console
		boolean split = cmd.hasOption("split");
		if (split) {
			System.out.println("Vectors will be splitted");
		} else {
			System.out.println("Splitting will not be performed");
		}
		String transformationType = null;
		if (cmd.getOptionValue("transform").equals("no")) {
			System.out.println("No transformation will be applied");
			transformationType = "no";
		} else if (cmd.getOptionValue("transform").equals("rr")) {
			System.out.println("Random Rotation will be applied");
			transformationType = "rr";
		} else if (cmd.getOptionValue("transform").equals("rp")) {
			System.out.println("Random Permutation will be applied");
			transformationType = "rp";
		} else {
			throw new Exception("Unsupported transformation type!");
		}
		boolean ivf = cmd.hasOption("ivf");
		String coarseQuantizerFile = "";
		int numCoarseCentroids = 0;
		if (ivf) {
			System.out.println("IVF will be used");
			// parse the other ivf related options
			if (cmd.getOptionValue("cqfile") == null) {
				throw new Exception("IVF selected but coarse quantizer file not given.");
			}
			coarseQuantizerFile = cmd.getOptionValue("cqfile");

			if (cmd.getOptionValue("cqcentroids") == null) {
				throw new Exception("IVF selected but number of coarse quantizer centroids not given.");
			}
			numCoarseCentroids = Integer.parseInt(cmd.getOptionValue("cqcentroids"));
		}

		int numVectors;
		if (cmd.getOptionValue("samples") == null) {
			System.out.println("Using the default 50000 samples for learning.");
			numVectors = 50000;
		} else {
			numVectors = Integer.parseInt(cmd.getOptionValue("samples"));
			System.out.println("Using " + numVectors + " samples for learning.");
		}

		int maxIterations;
		if (cmd.getOptionValue("i") == null) {
			System.out.println("Using the default 100 max iterations.");
			maxIterations = 100;
		} else {
			maxIterations = Integer.parseInt(cmd.getOptionValue("i"));
			System.out.println("Using " + maxIterations + " maximum iterations.");
		}

		String BDBpath = cmd.getOptionValue("path");
		if (cmd.getOptionValue("path") == null) {
			throw new Exception("The path to the training vectors is undefined!");
		}

		int numSlots = 1;
		if (cmd.getOptionValue("s") == null) {
			System.out.println("Using 1 execution slot!");
		}
		numSlots = Integer.parseInt(cmd.getOptionValue("s"));

		int vectorLength;
		if (cmd.getOptionValue("d") == null) {
			throw new Exception("The dimensionality of the training vectors is undefined!");
		}
		vectorLength = Integer.parseInt(cmd.getOptionValue("d"));

		int numProductCentroids;
		if (cmd.getOptionValue("d") == null) {
			throw new Exception("The number of centroids for each sub-quantizer is undefined!");
		}
		numProductCentroids = Integer.parseInt(cmd.getOptionValue("c"));

		int m;
		if (cmd.getOptionValue("m") == null) {
			throw new Exception("The number of sub-vectors is undefined!");
		}
		m = Integer.parseInt(cmd.getOptionValue("m"));
		// checking that m is valid
		int subVectorLength;// the dimensionality of the subvectors
		if (vectorLength % m != 0) { // d is not a multiple of m
			throw new Exception("d is not a multiple of m");
		}
		subVectorLength = vectorLength / m;

		RandomRotation rr = null;
		RandomPermutation rp = null;
		if (transformationType.equals("rr")) {
			rr = new RandomRotation(1, vectorLength);
		} else if (transformationType.equals("rp")) {
			rp = new RandomPermutation(1, vectorLength);
		}

		System.out.println("== Creating subquantizers using " + numVectors + " vectors ==");
		System.out.println("Vector dimensionality: " + vectorLength);
		System.out.println("Sub vector dimensionality: " + subVectorLength);
		System.out.println("Num centroids: " + numProductCentroids);
		System.out.println("Max iterations: " + maxIterations);

		// create a single file to store all the sub-quantizers of the product quantizer
		// construct the filename
		String subquantizersFilename = BDBpath + "/pq_" + vectorLength + "_" + m + "x"
				+ (int) (Math.log(numProductCentroids) / Math.log(2)) + "_" + numVectors;
		if (transformationType.equals("rr")) {
			subquantizersFilename += "_rr";
		} else if (transformationType.equals("rp")) {
			subquantizersFilename += "_rp";
		}
		if (ivf) {
			subquantizersFilename += "_ivf_c" + numCoarseCentroids;
		}
		subquantizersFilename += ".csv";
		BufferedWriter out = new BufferedWriter(new FileWriter(new String(subquantizersFilename)));

		// load the vectors from the Linear index (BDB store)
		Linear vectors = new Linear(vectorLength, numVectors, true, BDBpath, false, true, 0);
		// in case of ivf, load the coarse quantizer so that residual vectors can be computed.
		ResidualVectorComputation res = null;
		if (ivf) {
			double[][] coarseQuantizer = AbstractFeatureAggregator.readQuantizer(coarseQuantizerFile,
					numCoarseCentroids, vectorLength);
			res = new ResidualVectorComputation(coarseQuantizer, vectorLength, numCoarseCentroids);
		}

		// create one Instances object for learning each sub-quantizer
		Instances[] datasets = new Instances[m];
		// creating weka attributes
		ArrayList<Attribute> attributes = new ArrayList<Attribute>();
		for (int i = 0; i < subVectorLength; i++) {
			Attribute attr = new Attribute("feature" + (i + 1));
			attributes.add(attr);
		}
		for (int i = 0; i < m; i++) {
			datasets[i] = new Instances("subvectors", attributes, numVectors);
		}

		// load the sub-vectors into the corresponding Instances objects
		for (int i = 0; i < numVectors; i++) {
			double[] vector = vectors.getVector(i);
			// compute the residual vector if needed
			if (ivf) {
				vector = res.ComputeResidualVector(vector);
			}
			// apply the appropriate transformation
			if (transformationType.equals("rr")) {
				vector = rr.rotate(vector);
			} else if (transformationType.equals("rp")) {
				vector = rp.permute(vector);
			}
			// load each sub-vector into the corresponding Instances object
			for (int j = 0; j < m; j++) {
				double[] subVector = Arrays.copyOfRange(vector, j * subVectorLength, j * subVectorLength
						+ subVectorLength);
				DenseInstance instance = new DenseInstance(1.0, subVector);
				datasets[j].add(instance);
			}
		}

		// learning the sub-quantizers with k-means clustering
		for (int i = 0; i < m; i++) {
			System.out.println("Learning sub-quantizer " + (i + 1));
			double minSSE = Double.MAX_VALUE;
			SimpleKMeans bestClusterer = null;
			// try k-mean using numKmeansRepeats different random seeds and keep the one with lowest SSE
			for (int j = 0; j < numKmeansRepeats; j++) {
				// Create a new k-means instance
				SimpleKMeans clusterer = new SimpleKMeans();
				clusterer.setInitializationMethod(new SelectedTag(SimpleKMeans.KMEANS_PLUS_PLUS,
						SimpleKMeans.TAGS_SELECTION));
				clusterer.setNumExecutionSlots(numSlots);
				clusterer.setNumClusters(numProductCentroids);
				clusterer.setMaxIterations(maxIterations);
				// clusterer.setDebug(false);
				clusterer.setSeed(j + 1);
				// build the clusterer
				clusterer.buildClusterer(datasets[i]);
				double SSE = clusterer.getSquaredError();
				if (SSE < minSSE) {
					minSSE = SSE;
					bestClusterer = (SimpleKMeans) AbstractClusterer.makeCopy(clusterer);
				}
			}

			System.out.println("Mininum SSE: " + minSSE + " Seed: " + bestClusterer.getSeed());
			System.out.println("Saving best sub-quantizer in file..");
			// write the results of the clustering to the new file (csv formated)
			Instances clusterCentroids = bestClusterer.getClusterCentroids();
			for (int j = 0; j < clusterCentroids.numInstances(); j++) {
				Instance centroid = clusterCentroids.instance(j);
				for (int k = 0; k < centroid.numAttributes() - 1; k++) {
					out.write(centroid.value(k) + ",");
				}
				out.write(centroid.value(centroid.numAttributes() - 1) + "\n");
			}

			// check whether fewer than the desired clusters where generated and add fake centroids in that
			// case
			int numCentroidsMissing = numProductCentroids - clusterCentroids.numInstances();
			// add fake, distant centroids so that no vector is quantized in them
			if (numCentroidsMissing > 0) {
				System.out
						.println("Problem! Number of generated clusters is smaller that the desired one. Use more samples!");
				System.out.println("Non empty clusters: " + clusterCentroids.numInstances() + " instead of: "
						+ numProductCentroids);
				// System.exit(1);
				// Random rand = new Random(1);
				for (int k = 0; k < numCentroidsMissing; k++) {
					// int index = rand.nextInt(dataset.numInstances());
					// String instanceString = dataset.instance(index).toStringNoWeight();
					// outputStream.println(instanceString);
					for (int f = 0; f < subVectorLength - 1; f++) {
						out.write("1000,");
					}
					out.write("1000\n");
				}
			}
			out.flush();
		}
		out.close();

	}
398336
@Override
    public void actionCommit() {

        List<Throwable> errors = new ArrayList<Throwable>();

        boolean isEmail = (getParamMsgtype() != null) && getParamMsgtype().equals(MSGTYPE_EMAIL);

        if ((m_groups == null) || m_groups.isEmpty()) {
            setCommitErrors(
                Collections.singletonList((Throwable)new CmsIllegalStateException(
                    Messages.get().container(Messages.ERR_NO_SELECTED_GROUP_0))));
            return;
        }

        boolean hasUser = false;
        Iterator<String> itGroups = getGroups().iterator();
        while (!hasUser && itGroups.hasNext()) {
            String groupName = itGroups.next();
            try {
                Iterator<CmsUser> itUsers = getCms().getUsersOfGroup(groupName, true).iterator();
                while (!hasUser && itUsers.hasNext()) {
                    CmsUser user = itUsers.next();
                    if (!isEmail) {
                        if (!OpenCms.getSessionManager().getSessionInfos(user.getId()).isEmpty()) {
                            hasUser = true;
                        }
                    } else {
                        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(user.getEmail())) {
                            hasUser = true;
                        }
                    }
                }
            } catch (CmsException e) {
                // should never happen
            }
        }

        if (!hasUser) {
            setCommitErrors(
                Collections.singletonList((Throwable)new CmsIllegalStateException(
                    Messages.get().container(Messages.ERR_NO_SELECTED_RECEIVERS_0))));
            return;
        }

        try {
            Set<String> groups = new HashSet<String>(m_groups);
            Map<String, String[]> params = new HashMap<String, String[]>();
            params.put(CmsToolDialog.PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW});
            params.put(
                CmsSendEmailGroupsDialog.PARAM_GROUPS,
                new String[] {CmsStringUtil.collectionAsString(groups, CmsHtmlList.ITEM_SEPARATOR)});
            params.put(
                CmsDialog.PARAM_CLOSELINK,
                new String[] {CmsToolManager.linkForToolPath(getJsp(), "/workplace/broadcast")});

            if (isEmail) {
                getToolManager().jspForwardPage(
                    this,
                    "/system/workplace/admin/workplace/groups_send_email.jsp",
                    params);
            } else {
                getToolManager().jspForwardPage(
                    this,
                    "/system/workplace/admin/workplace/groups_send_popup.jsp",
                    params);
            }
        } catch (Throwable t) {
            errors.add(t);
        }
        // set the list of errors to display when saving failed
        setCommitErrors(errors);
    }
1322944
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        clusteringAlgoPanel0 = new moa.gui.clustertab.ClusteringAlgoPanel();
        clusteringEvalPanel1 = new moa.gui.clustertab.ClusteringEvalPanel();
        buttonStart = new javax.swing.JButton();
        buttonStop = new javax.swing.JButton();
        buttonExport = new javax.swing.JButton();
        buttonWeka = new javax.swing.JButton();
        buttonImportSettings = new javax.swing.JButton();
        buttonExportSettings = new javax.swing.JButton();
        logPanel = new moa.gui.TextViewerPanel();

        setLayout(new java.awt.GridBagLayout());

        clusteringAlgoPanel0.setMinimumSize(new java.awt.Dimension(335, 150));
        clusteringAlgoPanel0.setPanelTitle("Cluster Algorithm Setup");
        clusteringAlgoPanel0.setPreferredSize(new java.awt.Dimension(335, 150));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(clusteringAlgoPanel0, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 2;
        gridBagConstraints.gridheight = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(clusteringEvalPanel1, gridBagConstraints);

        buttonStart.setText("Start");
        buttonStart.setPreferredSize(new java.awt.Dimension(80, 23));
        buttonStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonStartActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(buttonStart, gridBagConstraints);

        buttonStop.setText("Stop");
        buttonStop.setEnabled(false);
        buttonStop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonStopActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(buttonStop, gridBagConstraints);

        buttonExport.setText("Export CSV");
        buttonExport.setEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 5;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(buttonExport, gridBagConstraints);

        buttonWeka.setText("Weka Explorer");
        buttonWeka.setEnabled(false);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(buttonWeka, gridBagConstraints);

        buttonImportSettings.setText("Import");
        buttonImportSettings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonImportSettingsActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(4, 75, 4, 4);
        add(buttonImportSettings, gridBagConstraints);

        buttonExportSettings.setText("Export");
        buttonExportSettings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonExportSettingsActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(buttonExportSettings, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 5;
        gridBagConstraints.gridwidth = 7;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        add(logPanel, gridBagConstraints);
    }
709085
@Override
    public void selectionChanged(IAction action, ISelection selection) {
        bugInstance = null;
        // TODO learn to deal with ALL elements
        IMarker marker = MarkerUtil.getMarkerFromSingleSelection(selection);
        if (marker == null) {
            return;
        }
        bugInstance = MarkerUtil.findBugInstanceForMarker(marker);
    }
476944
@Override
	public void onQuery() {

		final App app = StructrApp.getInstance();
		try (final Tx tx = app.tx()) {

			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
				nodes.put(node.getUuid(), node);
			}

			if (nodes.size() != repository.objectCount()) {

				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );

				repository.clear();

				for (final SharedNodeInterface node : nodes.values()) {
					addObjectToRepository(node);
				}
			}

			tx.success();

		} catch (FrameworkException fex) {

			logger.warn("", fex);
		}
	}
962209
@Override
    protected void configureFindbugsEngine() {
        addOption("-name", name);
        addOption("-timestamp", timestamp);
        addOption("-source", source);
        addOption("-findSource", findSource);
        addOption("-suppress", suppress);
        addBoolOption("-withMessages", withMessages);
        if (resetSource != null && "true".equals(resetSource)) {
            addArg("-resetSource");
        }
        addArg(inputFile);
        if (outputFile != null) {
            addArg(outputFile);
        }
    }
1364422
private void init(final Window window, final CmsAccountsApp app, final CmsUserSettings settings, boolean enabled) {

        m_userdata.initFields(m_user, enabled ? EditLevel.all : EditLevel.none);
        if (m_user != null) {
            if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getFirstname())
                | CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getLastname())
                | CmsStringUtil.isEmptyOrWhitespaceOnly(m_user.getEmail())) {
                m_name_was_empty = true;
            }
        }
        iniLanguage(settings);
        iniProject(settings);
        iniSite(settings);
        iniStartView(settings);

        m_site.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = 5111762655156037899L;

            public void valueChange(ValueChangeEvent event) {

                setupStartFolder(null);

            }

        });

        m_ok.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -2579639520410382246L;

            public void buttonClick(ClickEvent event) {

                setupValidators();
                if (isValid()) {
                    save();
                    window.close();
                    app.reload();
                }
            }
        });

        m_next.addClickListener(new ClickListener() {

            private static final long serialVersionUID = -8584899970290349959L;

            public void buttonClick(ClickEvent event) {

                setupValidators();
                switchTab();

            }
        });

        m_cancel.addClickListener(new ClickListener() {

            private static final long serialVersionUID = 5803825104722705175L;

            public void buttonClick(ClickEvent event) {

                window.close();
            }
        });

        if (m_user == null) {
            m_role.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 5697126133686172725L;

                public void valueChange(ValueChangeEvent event) {

                    iniSite(settings);
                    iniStartView(settings);
                }
            });
            m_group.addValueChangeListener(new ValueChangeListener() {

                private static final long serialVersionUID = 1512940002751242094L;

                public void valueChange(ValueChangeEvent event) {

                    iniStartView(settings);
                    iniSite(settings);
                }

            });
        }

        m_site.addValueChangeListener(new ValueChangeListener() {

            private static final long serialVersionUID = -169973382455098800L;

            public void valueChange(ValueChangeEvent event) {

                m_startfolder.setCmsObject(getCmsObjectWithSite((String)m_site.getValue()));

            }

        });

        m_generateButton.addClickListener(new Button.ClickListener() {

            private static final long serialVersionUID = 4128513094772586752L;

            public void buttonClick(ClickEvent event) {

                final Window windowDialog = CmsBasicDialog.prepareWindow(CmsBasicDialog.DialogWidth.content);
                windowDialog.setCaption(
                    CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_GEN_PASSWORD_CAPTION_0));
                CmsGeneratePasswordDialog dialog = new CmsGeneratePasswordDialog(
                    CmsUserEditDialog.this,
                    new Runnable() {

                        public void run() {

                            windowDialog.close();

                        }
                    });
                windowDialog.setContent(dialog);
                A_CmsUI.get().addWindow(windowDialog);
            }
        });
    }