/////////////////////////////////////////////// ///////////////////////////////////////////////
329149
function Migration(config, dataFile) {
    this.srcNetworkName = config.srcNetworkName;
    this.dstNetworkName = config.dstNetworkName;
    this.srcGateway = config.srcGateway;
    this.dstGateway = config.dstGateway;
    this.listingsRegistryAddress = config.listingsRegistryAddress;
    this.newListingsRegistryAddress = config.newListingsRegistryAddress;
    // this.privateKey = config.privateKey;
    this.gasMultiplier = config.gasSafetyMarginMultiplier;
    this.numConfirmations = config.numConfirmations;

    this.dataFile = dataFile;

    this.web3 = null;
    this.provider = null;
    this.contractAddress = null;
    this.account = null;

    this.submittedListings = [];
    this.minedListings = [];
    this.confirmedListings = [];
    this.errors = [];

    return this;
}
231288
@Override
    protected void doHandle(CommandContext ctx) throws CommandFormatException {

        BatchManager batchManager = ctx.getBatchManager();
        if(!batchManager.isBatchActive()) {
            throw new CommandFormatException("No active batch.");
        }

        Batch batch = batchManager.getActiveBatch();
        final int batchSize = batch.size();
        if(batchSize == 0) {
            throw new CommandFormatException("The batch is empty.");
        }

        List<String> arguments = ctx.getParsedCommandLine().getOtherProperties();
        if(arguments.isEmpty()) {
            throw new CommandFormatException("Missing line number.");
        }

        if(arguments.size() != 1) {
            throw new CommandFormatException("Expected only one argument - the line number but received: " + arguments);
        }

        String intStr = arguments.get(0);
        int lineNumber;
        try {
            lineNumber = Integer.parseInt(intStr);
        } catch(NumberFormatException e) {
            throw new CommandFormatException("Failed to parse line number '" + intStr + "': " + e.getLocalizedMessage());
        }

        if(lineNumber < 1 || lineNumber > batchSize) {
            throw new CommandFormatException(lineNumber + " isn't in range [1.." + batchSize + "].");
        }

        batch.remove(lineNumber - 1);
    }
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;
    }
397961
function () {
/*Line 89 - 'AtomDataPager.js' */                    var v = this._items;
/*Line 90 - 'AtomDataPager.js' */                    if (v.length === undefined) {
/*Line 91 - 'AtomDataPager.js' */                        var val = v[this._itemsPath];

/*Line 93 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "total", v[this._totalPath]);
/*Line 94 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "value", val);
/*Line 95 - 'AtomDataPager.js' */                    } else {
/*Line 96 - 'AtomDataPager.js' */                        if (v.total) {
/*Line 97 - 'AtomDataPager.js' */                            AtomBinder.setValue(this, "total", v.total);
/*Line 98 - 'AtomDataPager.js' */                        } else {
/*Line 99 - 'AtomDataPager.js' */                            AtomBinder.setValue(this, "pages", []);
/*Line 100 - 'AtomDataPager.js' */                        }
/*Line 101 - 'AtomDataPager.js' */                        AtomBinder.setValue(this, "value", v);
/*Line 102 - 'AtomDataPager.js' */                    }

/*Line 104 - 'AtomDataPager.js' */                    this.preparePages();
/*Line 105 - 'AtomDataPager.js' */                }
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];
        }
    }
780479
function() {
		var i,
			totalSplitterSize = ( this.contentItems.length - 1 ) * this._splitterSize,
			totalWidth = this.element.width(),
			totalHeight = this.element.height(),
			totalAssigned = 0,
			additionalPixel,
			itemSize,
			itemSizes = [];
	
		if( this._isColumn ) {
			totalHeight -= totalSplitterSize;
		} else {
			totalWidth -= totalSplitterSize;
		}
	
		for( i = 0; i < this.contentItems.length; i++ ) {
			if( this._isColumn ) {
				itemSize = Math.floor( totalHeight * ( this.contentItems[ i ].config.height / 100 ) );
			} else {
				itemSize = Math.floor( totalWidth * ( this.contentItems[ i ].config.width / 100 ) );
			}

			totalAssigned += itemSize;
			itemSizes.push( itemSize );
		}

		additionalPixel = ( this._isColumn ? totalHeight : totalWidth ) - totalAssigned;

		for( i = 0; i < this.contentItems.length; i++ ) {
			if( additionalPixel - i > 0 ) {
				itemSizes[ i ]++;
			}

			if( this._isColumn ) {
				this.contentItems[ i ].element.width( totalWidth );
				this.contentItems[ i ].element.height( itemSizes[ i ] );
			} else {
				this.contentItems[ i ].element.width( itemSizes[ i ] );
				this.contentItems[ i ].element.height( totalHeight );
			}
		}
	}
859730
@SuppressWarnings("unchecked")
    public static <T> List<T> getValueOfCertainColumnOfAllRecord(String sql, Object... arg) {
        Connection connection = JDBCUtils.getConnection();
        PreparedStatement ps = null;

        ResultSet result = null;
        List<T> list = new ArrayList<T>();// 存放查询到的记录的字段的值
        try {
            ps = connection.prepareStatement(sql);
            // 填充占位符
            for (int i = 0; i < arg.length; i++) {
                ps.setObject(i + 1, arg[i]);
            }
            // 获取结果集
            result = ps.executeQuery();
            // 循环遍历结果集中的记录，并将每条记录的第一个字段放入List中
            while (result.next()) {
                list.add((T) result.getObject(1));
            }

        } catch (SQLException e) {
            e.printStackTrace();
        } finally {

            JDBCUtils.release(result, ps, connection);
        }

        return list;
    }
1000034
function () {
                var negate, p = input.charAt(i + 1);

                if (input.charAt(i) === '-' && (p === '@' || p === '(')) { negate = $('-') }
                var o = $(this.sub) || $(this.entities.dimension) ||
                        $(this.entities.color) || $(this.entities.variable) ||
                        $(this.entities.call);
                return negate ? new(tree.Operation)('*', [new(tree.Dimension)(-1), o])
                              : o;
            }
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)";
  }
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);
		}
	}
10509
public static void main(String [] args){
		displayCopyright();        
        if (!checkArgs(args)) {
            displayHelp();
            return;
        }
        
      //get model dir
        String modelDir = args[1];
        CRFSegmenter segmenter = new CRFSegmenter(modelDir);
        
      //tagging
        try {
        	System.out.println(args[2]);
	        if (args[2].equalsIgnoreCase("-inputfile")){
	        	System.out.println(args[3]);
	        	File inputFile = new File(args[3]);
	        	BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
	        			new FileOutputStream(inputFile.getPath() + ".wseg"), "UTF-8"));
	        	
	        	String result = segmenter.segmenting(inputFile);
	        	
	        	writer.write(result);
	        	writer.close();
	        }
	        else{ //input dir
	        	String inputDir = args[3];
	        	 if (inputDir.endsWith(File.separator)) {
		                inputDir = inputDir.substring(0, inputDir.length() - 1);
		            }
		            
		            File dir = new File(inputDir);
		            String[] children = dir.list(new FilenameFilter() {
		                public boolean accept(File dir, String name) {
		                    return name.endsWith(".tkn");
		                }
		            });    
		            
		            for (int i = 0; i < children.length; i++) {
		            	System.out.println("Segmenting " + children[i]);
		            	String filename = inputDir + File.separator + children[i];
			                if ((new File(filename)).isDirectory()) {
			                    continue;
			            }
			                
			            BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(
				        			new FileOutputStream(filename + ".wseg"), "UTF-8"));
			             
			            writer.write(segmenter.segmenting(new File(filename)));
			             
			            writer.close();
		            }
	        }
        }
        catch (Exception e){
        	System.out.println("Error while segmenting");
        	System.out.println(e.getMessage());
        	e.printStackTrace();
        }
	}
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());
        }
    }
792928
public void showHelp() {
      System.err.println(applicationDescription);
      System.err.println("===============================================");

      Map<NamedOption, String> optionNames = new HashMap<>();
      optionSet.forEach(option -> {
         String out = Stream.concat(
            Stream.of(option.getAliasSpecifications()),
            Stream.of(option.getSpecification()))
                            .sorted((s1, s2) -> Integer.compare(s1.length(), s2.length()))
                            .collect(Collectors.joining(", "));
         if (option.isRequired()) {
            out += " *";
         }
         optionNames.put(option, out);
      });

      int maxArgName = optionNames.values().stream().mapToInt(String::length).max().orElse(10);

      optionNames.entrySet().stream()
                 .sorted(Map.Entry.comparingByValue())
                 .forEach(entry -> {
                    String arg = entry.getValue();
                    boolean insertSpace = !arg.startsWith("--");
                    if (insertSpace) {
                       System.err.print(" ");
                    }
                    System.err.printf("%1$-" + maxArgName + "s\t", arg);
                    System.err.println(entry.getKey().getDescription());
                 });

      System.err.println("===============================================");
      System.err.println("* = Required");

   }
458318
@Override
    public Map<String, SegmentData> getTRSegments(String trId,
        DocumentType type, String documentId, String language)
            throws ServiceException {
        if (trId == null || trId.isEmpty()) {
            throw new IllegalArgumentException("Non-empty trId must be specified.");
        }
        if (documentId == null || documentId.isEmpty()) {
            throw new IllegalArgumentException("Non-empty documentId must be specified.");
        }
        if (language == null || language.isEmpty()) {
            throw new IllegalArgumentException("Non-empty languageId must be specified.");
        }

        GetSegmentsResponse resp = invokeApiJson(
                "GET",
                escapePathSegment(account.getInstanceId()) + "/v2/doc-trs/"
                    + escapePathSegment(trId) + "/" + type.toString().toLowerCase() + "/"
                    + escapePathSegment(documentId) + "/" + language,
                null,
                GetSegmentsResponse.class);

        if (resp.getStatus() == Status.ERROR) {
            throw new ServiceException(resp.getMessage());
        }

        Map<String, SegmentData> resultEntries = new TreeMap<String, SegmentData>();
        if (resp.segments != null && !resp.segments.isEmpty()) {
            for (Entry<String, RestSegmentData> entry : resp.segments.entrySet()) {
                resultEntries.put(entry.getKey(),
                        new SegmentDataImpl(entry.getValue()));
            }
        }
        return resultEntries;
    }
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' */        }
61619
function (e) {
/*Line 45 - 'AtomSortableColumn.js' */                if (!this._direction) {
/*Line 46 - 'AtomSortableColumn.js' */                    AtomBinder.setValue(this, "direction", this._defaultDirection);
/*Line 47 - 'AtomSortableColumn.js' */                } else {
/*Line 48 - 'AtomSortableColumn.js' */                    if (this._direction == "asc") {
/*Line 49 - 'AtomSortableColumn.js' */                        AtomBinder.setValue(this, "direction", "desc");
/*Line 50 - 'AtomSortableColumn.js' */                    } else {
/*Line 51 - 'AtomSortableColumn.js' */                        AtomBinder.setValue(this, "direction", "asc");
/*Line 52 - 'AtomSortableColumn.js' */                    }
/*Line 53 - 'AtomSortableColumn.js' */                }
/*Line 54 - 'AtomSortableColumn.js' */                AtomBinder.setValue(this, "value", this._sortField + " " + this._direction);
/*Line 55 - 'AtomSortableColumn.js' */            }
87163
private void readCalendars()
   {
      //
      // Create the calendars
      //
      for (MapRow row : getTable("NCALTAB"))
      {
         ProjectCalendar calendar = m_projectFile.addCalendar();
         calendar.setUniqueID(row.getInteger("UNIQUE_ID"));
         calendar.setName(row.getString("NAME"));
         calendar.setWorkingDay(Day.SUNDAY, row.getBoolean("SUNDAY"));
         calendar.setWorkingDay(Day.MONDAY, row.getBoolean("MONDAY"));
         calendar.setWorkingDay(Day.TUESDAY, row.getBoolean("TUESDAY"));
         calendar.setWorkingDay(Day.WEDNESDAY, row.getBoolean("WEDNESDAY"));
         calendar.setWorkingDay(Day.THURSDAY, row.getBoolean("THURSDAY"));
         calendar.setWorkingDay(Day.FRIDAY, row.getBoolean("FRIDAY"));
         calendar.setWorkingDay(Day.SATURDAY, row.getBoolean("SATURDAY"));

         for (Day day : Day.values())
         {
            if (calendar.isWorkingDay(day))
            {
               // TODO: this is an approximation
               calendar.addDefaultCalendarHours(day);
            }
         }
      }

      //
      // Set up the hierarchy and add exceptions
      //
      Table exceptionsTable = getTable("CALXTAB");
      for (MapRow row : getTable("NCALTAB"))
      {
         ProjectCalendar child = m_projectFile.getCalendarByUniqueID(row.getInteger("UNIQUE_ID"));
         ProjectCalendar parent = m_projectFile.getCalendarByUniqueID(row.getInteger("BASE_CALENDAR_ID"));
         if (child != null && parent != null)
         {
            child.setParent(parent);
         }

         addCalendarExceptions(exceptionsTable, child, row.getInteger("FIRST_CALENDAR_EXCEPTION_ID"));

         m_eventManager.fireCalendarReadEvent(child);
      }
   }