////////////////////////////////////////////////////////////////////////////////////////////////
965819
private MultimapSubject.UsingCorrespondence<M, M> usingCorrespondence(
      Iterable<? extends M> expectedValues) {
    return comparingValuesUsing(
        config
            .withExpectedMessages(expectedValues)
            .<M>toCorrespondence(FieldScopeUtil.getSingleDescriptor(actual().values())));
  }
843540
public static void main(String[] args) throws TwitterException {
        if (args.length < 1) {
            System.out.println("Usage: java twitter4j.examples.PrintFilterStream [follow(comma separated numerical user ids)] [track(comma separated filter terms)]");
            System.exit(-1);
        }

        TwitterStream twitterStream = new TwitterStreamFactory().getInstance().addListener(new StatusListener() {
            @Override
            public void onStatus(Status status) {
                System.out.println("@" + status.getUser().getScreenName() + " - " + status.getText());
            }

            @Override
            public void onDeletionNotice(StatusDeletionNotice statusDeletionNotice) {
                System.out.println("Got a status deletion notice id:" + statusDeletionNotice.getStatusId());
            }

            @Override
            public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
                System.out.println("Got track limitation notice:" + numberOfLimitedStatuses);
            }

            @Override
            public void onScrubGeo(long userId, long upToStatusId) {
                System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);
            }

            @Override
            public void onStallWarning(StallWarning warning) {
                System.out.println("Got stall warning:" + warning);
            }

            @Override
            public void onException(Exception ex) {
                ex.printStackTrace();
            }
        });

        ArrayList<Long> follow = new ArrayList<Long>();
        ArrayList<String> track = new ArrayList<String>();
        for (String arg : args) {
            if (isNumericalArgument(arg)) {
                for (String id : arg.split(",")) {
                    follow.add(Long.parseLong(id));
                }
            } else {
                track.addAll(Arrays.asList(arg.split(",")));
            }
        }
        long[] followArray = new long[follow.size()];
        for (int i = 0; i < follow.size(); i++) {
            followArray[i] = follow.get(i);
        }
        String[] trackArray = track.toArray(new String[track.size()]);

        // filter() method internally creates a thread which manipulates TwitterStream and calls these adequate listener methods continuously.
        twitterStream.filter(new FilterQuery(0, followArray, trackArray));
    }
531064
private static String formatFoundRequired(
      String description,
      JSType found,
      JSType required,
      Set<String> missing,
      Set<String> mismatch) {
    String foundStr = found.toString();
    String requiredStr = required.toString();
    if (foundStr.equals(requiredStr)) {
      foundStr = found.toAnnotationString(Nullability.IMPLICIT);
      requiredStr = required.toAnnotationString(Nullability.IMPLICIT);
    }
    String missingStr = "";
    String mismatchStr = "";
    if (missing != null && !missing.isEmpty()) {
      missingStr = Joiner.on(",").join(missing);
    }
    if (mismatch != null && !mismatch.isEmpty()) {
      mismatchStr = Joiner.on(",").join(mismatch);
    }
     if (missingStr.length() > 0 || mismatchStr.length() > 0) {
      return MessageFormat.format(
          FOUND_REQUIRED_MISSING, description, foundStr, requiredStr, missingStr, mismatchStr);
    } else {
      return MessageFormat.format(FOUND_REQUIRED, description, foundStr, requiredStr);
    }
  }
302387
@Override
    public INDArray toDense() {
        // TODO support view conversion
        INDArray result = Nd4j.zeros(shape());

        switch (data().dataType()) {
            case DOUBLE:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    double value = values.getDouble(i);
                    result.putScalar(idx, value);
                }
                break;
            case FLOAT:
                for (int i = 0; i < length; i++) {
                    int[] idx = getUnderlyingIndicesOf(i).asInt();
                    float value = values.getFloat(i);
                    result.putScalar(idx, value);
                }
                break;
            default:
                throw new UnsupportedOperationException();
        }
        return result;
    }
1090918
function(errors) {	
		var i,k;
		if(YAHOO.lang.isArray(errors)) {
			for(i = 0 ; i < errors.length ; i++) {
				k = errors[i][0];
				value = errors[i][1];
				if(this.inputsNames[k]) {
					if(this.inputsNames[k].options.showMsg) {
						this.inputsNames[k].displayMessage(value);
						Dom.replaceClass(this.inputsNames[k].divEl, "inputEx-valid", "inputEx-invalid" );
					}
				}
			}
		}
		else if(YAHOO.lang.isObject(errors)) {
			for(k in errors) {
				if(errors.hasOwnProperty(k)) {
					if(this.inputsNames[k]) {
						if(this.inputsNames[k].options.showMsg) {
							this.inputsNames[k].displayMessage(errors[k]);
							Dom.replaceClass(this.inputsNames[k].divEl, "inputEx-valid", "inputEx-invalid" );
						}
					}
				}
			}
		}
	}
393731
private void checkJodaConstructor2() {
        int COUNT = COUNT_VERY_FAST;
        DateTime dt = new DateTime(12345L, GJChronology.getInstance());
        for (int i = 0; i < AVERAGE; i++) {
            start("Joda", "new(millis)");
            for (int j = 0; j < COUNT; j++) {
                dt = new DateTime(12345L, GJChronology.getInstance());
                if (dt == null) {System.out.println("Anti optimise");}
            }
            end(COUNT);
        }
    }
178284
@CheckResult @Override public boolean shareTraces(String fullTraces) {
    try {
      shareTracesInternal(fullTraces);
      return true;
    } catch (RuntimeException exception1) { // Likely cause is a TransactionTooLargeException on API levels 15+.
      try {
        /*
         * Limit trace size to between 100kB and 400kB, since Unicode characters can be 1-4 bytes each.
         */
        int fullTracesLength = fullTraces.length();
        String truncatedTraces = fullTraces.substring(Math.max(0, fullTracesLength - 100000), fullTracesLength);
        shareTracesInternal(truncatedTraces);
        return true;
      } catch (RuntimeException exception2) { // Likely cause is a TransactionTooLargeException on API levels 15+.
        return false;
      }
    }
  }
770339
function (orderBy) {

/*Line 195 - 'atom-filter.js' */            if (!AtomFilter.isString(orderBy)) {
/*Line 196 - 'atom-filter.js' */                return orderBy;
/*Line 197 - 'atom-filter.js' */            }

/*Line 199 - 'atom-filter.js' */            var fields = orderBy.split(',');
/*Line 200 - 'atom-filter.js' */            fields = fields.map(function (item) {
/*Line 201 - 'atom-filter.js' */                var tokens = item.split(' ');
/*Line 202 - 'atom-filter.js' */                var desc = tokens[1] || 'asc';
/*Line 203 - 'atom-filter.js' */                return {
/*Line 204 - 'atom-filter.js' */                    field: tokens[0],
/*Line 205 - 'atom-filter.js' */                    desc: /desc/i.test(desc),
/*Line 206 - 'atom-filter.js' */                    cs: /^cs/i.test(desc)
/*Line 207 - 'atom-filter.js' */                }
/*Line 208 - 'atom-filter.js' */            });

/*Line 210 - 'atom-filter.js' */            return function (a, b) {

/*Line 212 - 'atom-filter.js' */                if (a == null || a == undefined) {
/*Line 213 - 'atom-filter.js' */                    return b == null || b == undefined ? 0 : 1;
/*Line 214 - 'atom-filter.js' */                }
/*Line 215 - 'atom-filter.js' */                if (b == null || b == undefined) {
/*Line 216 - 'atom-filter.js' */                    return 1;
/*Line 217 - 'atom-filter.js' */                }

/*Line 219 - 'atom-filter.js' */                for (var i = 0; i < fields.length; i++) {
/*Line 220 - 'atom-filter.js' */                    var f = fields[i];
/*Line 221 - 'atom-filter.js' */                    var field = f.field;
/*Line 222 - 'atom-filter.js' */                    var af = a[field];
/*Line 223 - 'atom-filter.js' */                    var bf = b[field];
/*Line 224 - 'atom-filter.js' */                    if (f.desc) {
/*Line 225 - 'atom-filter.js' */                        var t = af;
/*Line 226 - 'atom-filter.js' */                        af = bf;
/*Line 227 - 'atom-filter.js' */                        bf = t;
/*Line 228 - 'atom-filter.js' */                    }
/*Line 229 - 'atom-filter.js' */                    if (af == bf)
/*Line 230 - 'atom-filter.js' */                        continue;
/*Line 231 - 'atom-filter.js' */                    if (!af) {
/*Line 232 - 'atom-filter.js' */                        return !bf ? 0 : -1;
/*Line 233 - 'atom-filter.js' */                    }
/*Line 234 - 'atom-filter.js' */                    if (!bf) {
/*Line 235 - 'atom-filter.js' */                        return !af ? 0 : 1;
/*Line 236 - 'atom-filter.js' */                    }
/*Line 237 - 'atom-filter.js' */                    if (AtomFilter.isString(af)) {
/*Line 238 - 'atom-filter.js' */                        if (f.cs) {
/*Line 239 - 'atom-filter.js' */                            return af.localeCompare(bf);
/*Line 240 - 'atom-filter.js' */                        } else {
/*Line 241 - 'atom-filter.js' */                            af = af.toLowerCase();
/*Line 242 - 'atom-filter.js' */                            bf = bf.toLowerCase();
/*Line 243 - 'atom-filter.js' */                            if (af == bf)
/*Line 244 - 'atom-filter.js' */                                continue;
/*Line 245 - 'atom-filter.js' */                            return af.localeCompare(bf);
/*Line 246 - 'atom-filter.js' */                        }
/*Line 247 - 'atom-filter.js' */                    }

/*Line 249 - 'atom-filter.js' */                }
/*Line 250 - 'atom-filter.js' */                return 0;
/*Line 251 - 'atom-filter.js' */            }
/*Line 252 - 'atom-filter.js' */        }
192105
private static boolean hasChangesOfChildren(long last, PageContext pc, Class clazz) {

	java.lang.reflect.Method[] methods = clazz.getMethods();
	java.lang.reflect.Method method;
	Class[] params;
	for (int i = 0; i < methods.length; i++) {
	    method = methods[i];
	    if (method.getDeclaringClass() == clazz) {
		if (_hasChangesOfChildren(pc, last, method.getReturnType())) return true;
		params = method.getParameterTypes();
		for (int y = 0; y < params.length; y++) {
		    if (_hasChangesOfChildren(pc, last, params[y])) return true;
		}
	    }
	}
	return false;
    }
1248398
static String choppedStatementNoLineChange(String statement) {
    // \r\n needs to be the first element in the pipe.
    statement = statement.replaceAll("\\r\\n|\\r|\\n", " ");
    if (statement.length() <= MAX_OUTPUT_STMT_LENGTH) {
      return statement;
    }
    return statement.substring(0, MAX_OUTPUT_STMT_LENGTH) + "...... (" + (statement.length() - MAX_OUTPUT_STMT_LENGTH)
        + " characters omitted)";
  }
765079
@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
    	
        java.awt.GridBagConstraints gridBagConstraints;

        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(700, 550));
        getContentPane().setLayout(new java.awt.GridBagLayout());

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

        jTextArea1.setColumns(20);
        jTextArea1.setEditable(false);
        jTextArea1.setRows(5);
        jTextArea1.setWrapStyleWord(true);
        jTextArea1.setBackground(Color.white);
        jTextArea1.setFont(new Font("Dialog", Font.PLAIN, 12));
        jScrollPane1.setViewportView(jTextArea1);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        jPanel1.add(jScrollPane1, gridBagConstraints);
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.ipady = 5;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        jPanel1.add(jLabel1, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.ipadx = 20;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(jPanel1, gridBagConstraints);

        jButton1.setText("close");
        jButton1.setMinimumSize(new java.awt.Dimension(60, 29));
        jButton1.setPreferredSize(new java.awt.Dimension(75, 29));
        jButton1.setRolloverEnabled(false);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        getContentPane().add(jButton1, gridBagConstraints);

        pack();
    }
27345
private static void getTreeFormat(StringBuffer sb, Event event, Boolean includeContextInfo,
			int noOfTabs, long currentNanoTime, int spacesRequiredForDuration) {
		//Defect 166820
		//Check for events that got added after we started dumping the tree.
		//We ignore these events.
		if(currentNanoTime < event.getStartTime()){
			return;
		}
		
		String executionTimeStr = getExecutionTimeStringFormat(currentNanoTime,
				event); // Convert the execution time into string with 3 decimal
						// places..
		try {
			/**
			 * If its root event add header to table and set the
			 * spacesRequiredForDuration field
			 */
			if (event.getParentEvent() == null) {
				if (spacesRequiredForDuration == 0)
					spacesRequiredForDuration = executionTimeStr.length() + 5;
				sb.append(appendHeader(event, executionTimeStr));
			}
			// Append the execution time
			if (event.getEndTime() == 0) {
				sb.append(String.format(
						"%n%" + spacesRequiredForDuration + "s",
						executionTimeStr + "ms + "));
			} else {
				sb.append(String.format(
						"%n%" + spacesRequiredForDuration + "s",
						executionTimeStr + "ms   "));
			}

			// Append tabs for Child Events
			if (event.getParentEvent() != null) {
				for (int i = 0; i < noOfTabs; i++) {
					sb.append("    ");
				}
			}

			// Append Type + Context information to string...
			if (includeContextInfo && event.getContextInfo() != null) {
				sb.append(event.getType()
						+ RequestProbeConstants.EVENT_CONTEXT_INFO_SEPARATOR
						+ event.getContextInfo());
			} else {
				sb.append(event.getType());
			}

			//Iterating using indices instead of the list iterator to avoid ConcurrentModificationException
			//It is safe to do it this way as we only add elements to the list
			List<Event> list = event.getChildEvents();
			for(int i = 0; i < list.size(); i++){
				//Defect 165134
				//for (Event eventChild : event.getChildEvents()) {
				// Call recursively for child events ..
				getTreeFormat(sb, list.get(i), includeContextInfo, noOfTabs + 1, currentNanoTime,
						spacesRequiredForDuration);
			}
		} catch (Exception e) {

			FFDCFilter.processException(e, EventStackFormatter.class.getName(),
					"94", event);
		}
	}
982204
function() {
    var i, arg;
    for (i = 0 ; i < arguments.length ; i++) {
      arg = arguments[i];
      if (typeof arg === 'number') arg = "" + arg;
      if (typeof arg === 'undefined' || typeof arg === 'null'
          || (typeof arg !== 'object' && typeof arg !== 'string')) {
        console.error("[Widget.append] Argument #" + i + " is invalid!", arguments);
        console.error("[Widget.append] Is type is: " + (typeof arg));
        continue;
      };
      if (typeof arg === 'string') {
        if (arg.length < 1) arg = " ";
        arg = window.document.createTextNode(arg);
        if (!arg) {
          console.error(
            "[Widget.append] Unable to create a text node with this text: ", arg
          );
          console.error("[wdg] arguments=...", arguments);
          throw Error(
            "[Widget.append] Unable to create a text node with this text: "
              + JSON.stringify(arg)
          );
        }
      }
      if (Array.isArray(arg)) {
        arg.forEach(
          function(item) {
            this.append(item);
          }, this
        );
      }
      else {
        var e = arg;
        if( !(e instanceof Node) ) {
          if( e.$ instanceof Node ) e = e.$;
          else if( typeof e.element === 'function' ) e = e.element();
          else if( e.element ) e = e.element;
        }
        this._element.appendChild(e);
      }
    }
    return this;
  }
210434
public static void main(String[] args)
	{
		if(args.length !=  4)
		{
			System.err.println("Usage java "+SumStatsByMillisecondsFormular.class.getName()+" file msSecColumn calculateCol sumByMillisec");
			System.exit(-1);
		}
		
		File file = Paths.get(args[0]).toFile();
		
		try
		{
			if(!file.exists())
			{
				throw new FileNotFoundException(file.getAbsolutePath());
			}
			
			int timeMsIndex = Integer.parseInt(args[1]);
			int calculateColumn = Integer.parseInt(args[2]);
			long milliseconds = Long.parseLong(args[3]);
			
			SumStatsByMillisecondsFormular formular = new SumStatsByMillisecondsFormular(timeMsIndex, calculateColumn, milliseconds);
			
			new CsvReader(file).calc(formular);
			
			System.out.println(formular);
		}
		catch (NumberFormatException e)
		{
			System.err.println("Checks timeMsIndex:"+args[1]+",calculateColumn:"+args[2]+" and milliseconds:"+args[3]+" are valids numbers error:"+e);
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
		}
		catch (IOException e)
		{
			e.printStackTrace();
		}
		
		
	}
529320
function() {
			var oThis = this,halfWholeWidth = parseInt(this.wholeWidth/2);
			this.widthChangeGridFunFixed(halfWholeWidth);
			/* 如果宽度不足处理自动隐藏*/
			this.widthChangeGridFunOverWidthHidden();
			// 内容区域宽度自动扩展
			this.contentMinWidth = parseInt(this.wholeWidth) - parseInt(this.leftW) - parseInt(this.fixedWidth);
			if(this.contentMinWidth < 0)
				this.contentMinWidth = 0;
			if(this.contentRealWidth < this.contentMinWidth){
				this.contentWidth = this.contentMinWidth;
				var oldWidth = this.lastVisibleColumn.options.width;
				this.lastVisibleColumnWidth = oldWidth + (this.contentMinWidth - this.contentRealWidth);
				// modfied by tianxq1 最后一列自动扩展
				this.lastVisibleColumn.options.width = this.lastVisibleColumnWidth-20;
			}else{
				this.contentWidth = this.contentRealWidth;
			}
			this.createGridFlag = false;
			this.createGridDivs();
			$('#' + this.options.id + '_form').css('display', 'none');
			$('#' + this.options.id + '_grid').css('display', 'block');
		}
196140
function invShiftRows()
    {
        $temp = "";
        for ($i = 1; $i < 4; $i++) {
            for ($j = 0; $j < $this->Nb; $j++) $temp[($i + $j) % $this->Nb] = $this->s[$i][$j];
            for ($j = 0; $j < $this->Nb; $j++) $this->s[$i][$j] = $temp[$j];
        }
    }
953692
@Override
    protected void configureFindbugsEngine() {
        addBoolOption("-formatDates", formatDates);
        addBoolOption("-noTabs", noTabs);
        addBoolOption("-summary", summary);
        addArg(inputFile.getName());
        if (outputFile != null) {
            // Don't use .getName() because it discards path
            addArg(outputFile.getAbsolutePath());
        }
    }