idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
252,481
public static void planarToBuffered_F32(Planar<GrayF32> src, BufferedImage dst) {<NEW_LINE>if (src.getNumBands() != 3)<NEW_LINE>throw new IllegalArgumentException("src must have three bands");<NEW_LINE>final int width = dst.getWidth();<NEW_LINE>final int height = dst.getHeight();<NEW_LINE>float[] band1 = src.getBand(0)...
setRGB(x, y, argb);
583,378
public int buildUWP(SamplesContext context) throws IOException, InterruptedException {<NEW_LINE>syncChangesToBuildDir(context);<NEW_LINE>// ant -f /Users/shannah/cn1_files/dev/AppleMapsTest1213/build.xml -Dnb.internal.action.name=run run<NEW_LINE>List<String> cmd = new ArrayList<>();<NEW_LINE>cmd.add(context.getAnt());...
, "build.xml").getAbsolutePath());
169,000
final DescribeReplicationGroupsResult executeDescribeReplicationGroups(DescribeReplicationGroupsRequest describeReplicationGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReplicationGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
671,191
public static DescribeDomainSrcBpsDataResponse unmarshall(DescribeDomainSrcBpsDataResponse describeDomainSrcBpsDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDomainSrcBpsDataResponse.setRequestId(_ctx.stringValue("DescribeDomainSrcBpsDataResponse.RequestId"));<NEW_LINE>describeDomainSrcBpsDataResponse.setDo...
= new ArrayList<DataModule>();
1,764,546
public static NodeFlavors createDummies(String... flavors) {<NEW_LINE>FlavorConfigBuilder flavorConfigBuilder = new FlavorConfigBuilder();<NEW_LINE>for (String flavorName : flavors) {<NEW_LINE>if (flavorName.equals("docker"))<NEW_LINE>flavorConfigBuilder.addFlavor(flavorName, 1., 30., 20., <MASK><NEW_LINE>else if (flav...
1.5, Flavor.Type.DOCKER_CONTAINER);
286,825
Action createRunScriptAction(final String name, final boolean selectedText) {<NEW_LINE>Action action = new Action(name, e -> {<NEW_LINE>String script;<NEW_LINE>if (selectedText)<NEW_LINE>script = getSelectedText();<NEW_LINE>else<NEW_LINE>script = getCurrentText();<NEW_LINE>if (script == null || script.trim().length() =...
.R, KeyCombination.SHORTCUT_DOWN));
1,716,246
private File createKeyStore(String filePath, AcmeCertificate acmeCertificate, @Sensitive String password, String type, String provider) throws CertificateException {<NEW_LINE>KeyStore keyStore;<NEW_LINE>try {<NEW_LINE>keyStore = JSSEProviderFactory.getInstance(<MASK><NEW_LINE>keyStore.load(null, password.toCharArray())...
).getKeyStoreInstance(type, provider);
1,752,254
public static void main(String[] args) {<NEW_LINE>BinaryTree bt = new BinaryTree();<NEW_LINE>Node head = null;<NEW_LINE>head = bt.addNode(10, head);<NEW_LINE>head = bt.addNode(15, head);<NEW_LINE>head = <MASK><NEW_LINE>head = bt.addNode(7, head);<NEW_LINE>head = bt.addNode(19, head);<NEW_LINE>head = bt.addNode(20, head...
bt.addNode(5, head);
1,744,473
public boolean calc(ComContext context) {<NEW_LINE>int numSamplesOnNode0 = ((List<Tuple3<Double, Double, Vector>>) context.getObj(OptimVariable.fmTrainData)).size();<NEW_LINE>int numBatches = (batchSize == -1 || batchSize > numSamplesOnNode0) ? maxIter : (numSamplesOnNode0 / batchSize + 1) * maxIter;<NEW_LINE>double[] ...
2] / context.getNumTask();
164,358
public static MobileDoc createPage(Properties ctx, HttpServletRequest request, int AD_Record_ID, int AD_Table_ID) {<NEW_LINE>// MobileDoc doc = MobileDoc.createPopup (Msg.translate(ctx, "AD_Attachment_ID"));<NEW_LINE>MobileDoc doc = null;<NEW_LINE>String TableName = null;<NEW_LINE>int AD_Window_ID = 0;<NEW_LINE>int PO_...
Level.SEVERE, sql, e);
117,543
protected void assertValidFindBy(FindBy findBy) {<NEW_LINE>if (findBy.how() != null) {<NEW_LINE>if (findBy.using() == null) {<NEW_LINE>throw new IllegalArgumentException("If you set the 'how' property, you must also set 'using'");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> finders = new HashSet<>();<NEW_LINE>if (!"".eq...
"partial link text: " + findBy.partialLinkText());
1,219,055
private boolean saveDNSRelaysToTomlList() {<NEW_LINE>ArrayList<String> dnscrypt_proxy_toml_new = new ArrayList<>();<NEW_LINE>boolean lockRoutes = false;<NEW_LINE>for (int i = 0; i < dnscrypt_proxy_toml.size(); i++) {<NEW_LINE>String line = dnscrypt_proxy_toml.get(i);<NEW_LINE>if (line.contains("routes")) {<NEW_LINE>loc...
dnscrypt_proxy_toml_new.addAll(prepareDNSRelaysToSave());
1,106,693
public T openResourceManager(final String resourceName) {<NEW_LINE>assertNotClosed();<NEW_LINE>final Path resourceFile = dbConfig.getDatabaseFile().resolve(DatabaseConfiguration.DatabasePaths.DATA.getFile()).resolve(resourceName);<NEW_LINE>if (!Files.exists(resourceFile)) {<NEW_LINE>throw new SirixUsageException("Resou...
equals(dbConfig.getDatabaseFile());
613,834
final UpdateAnalysisResult executeUpdateAnalysis(UpdateAnalysisRequest updateAnalysisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAnalysisRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field....
addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight");
526,565
public String run() {<NEW_LINE>MFMAgreement agreement = (<MASK><NEW_LINE>MFMBatch batch = (MFMBatch) getParameter(FinancialSetting.BATCH_PO);<NEW_LINE>String trxName = (String) getParameter(FinancialSetting.PARAMETER_TRX_NAME);<NEW_LINE>// Nothing<NEW_LINE>if (agreement == null || batch == null) {<NEW_LINE>return null;...
MFMAgreement) getParameter(FinancialSetting.AGREEMENT_PO);
869,644
void circuitBreakerOpenAndThenClose() {<NEW_LINE>CircuitBreakerConfig config = CircuitBreakerConfig.custom().slidingWindowType(SlidingWindowType.COUNT_BASED).slidingWindowSize(10).failureRateThreshold(25.0f).waitDurationInOpenState(Duration.ofSeconds(10)).permittedNumberOfCallsInHalfOpenState(4).build();<NEW_LINE>Circu...
-> service.searchFlights(request));
359,192
public List<List<String>> accountsMerge(List<List<String>> accounts) {<NEW_LINE>int n = accounts.size();<NEW_LINE>p = new int[n];<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>p[i] = i;<NEW_LINE>}<NEW_LINE>Map<String, Integer> emailId = new HashMap<>();<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>List<String> acc...
emailId.put(email, i);
1,279,103
public void generateClass(ClassVisitor v) {<NEW_LINE>setNamePrefix(targetClass.getName());<NEW_LINE>final Method newInstance = ReflectUtils.findNewInstance(iface);<NEW_LINE>if (!newInstance.getReturnType().isAssignableFrom(targetClass)) {<NEW_LINE>throw new IllegalArgumentException("incompatible return type");<NEW_LINE...
iface) }, Constants.SOURCE_FILE);
792,132
public static void showCloudDialog(final MainActivity mainActivity, AppTheme appTheme, final OpenMode openMode) {<NEW_LINE>int accentColor = mainActivity.getAccent();<NEW_LINE>final MaterialDialog.Builder builder = new MaterialDialog.Builder(mainActivity);<NEW_LINE>switch(openMode) {<NEW_LINE>case DROPBOX:<NEW_LINE>bui...
(mainActivity.getApplicationContext()));
973,010
Map<String, Object> bindParameters(Neo4jParameterAccessor parameterAccessor, boolean includePageableParameter, UnaryOperator<Integer> limitModifier) {<NEW_LINE>final Parameters<?, ?> formalParameters = parameterAccessor.getParameters();<NEW_LINE>Map<String, Object> resolvedParameters = new HashMap<>();<NEW_LINE>// Valu...
evaluatedParam.getKey(), value);
870,752
public static void generateEmptySuiteTemplate(FileObject projectXml, String name) throws IOException {<NEW_LINE>// XXX this method could be moved in a future (depends on how complex<NEW_LINE>// suite's project.xml will be) to the .suite package dedicated class<NEW_LINE>// NOI18N<NEW_LINE>Document prjDoc = XMLUtil.creat...
getDocumentElement().appendChild(confEl);
1,131,317
public void read(JmeImporter im) throws IOException {<NEW_LINE>super.read(im);<NEW_LINE>InputCapsule ic = im.getCapsule(this);<NEW_LINE>mesh = (Mesh) ic.readSavable("mesh", null);<NEW_LINE>material = null;<NEW_LINE>String matName = ic.readString("materialName", null);<NEW_LINE>if (matName != null) {<NEW_LINE>// Materia...
ic.readSavable("material", null);
226,925
protected void vertical(GrayF32 intensity) {<NEW_LINE>float[] hXX = horizXX.data;<NEW_LINE>float[] hXY = horizXY.data;<NEW_LINE>float[] hYY = horizYY.data;<NEW_LINE>final float[] inten = intensity.data;<NEW_LINE>final int imgHeight = horizXX.getHeight();<NEW_LINE>final int imgWidth = horizXX.getWidth();<NEW_LINE>final ...
] = totalXY += hXY[srcIndex];
1,721,506
final RestartAppServerResult executeRestartAppServer(RestartAppServerRequest restartAppServerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(restartAppServerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv...
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
637,183
private void handleEditReportal(final HttpServletRequest req, final HttpServletResponse resp, final Session session) throws ServletException, IOException {<NEW_LINE>final int id = getIntParam(req, "id");<NEW_LINE>final ProjectManager projectManager = this.server.getProjectManager();<NEW_LINE>final Page page = newPage(r...
add("accessOwner", reportal.accessOwner);
1,126,125
/*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.grpc.service.DeviceManagementGrpc.DeviceManagementImplBase#<NEW_LINE>* updateCustomer(com.sitewhere.grpc.service.GUpdateCustomerRequest,<NEW_LINE>* io.grpc.stub.StreamObserver)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void updateCustomer(GUpdateCustomerRequest request, ...
this, DeviceManagementGrpc.getUpdateCustomerMethod());
517,873
public static boolean promptToClearAllSelectedObjects(final ImageData<?> imageData) {<NEW_LINE>// Get all non-TMA core objects<NEW_LINE>PathObjectHierarchy hierarchy = imageData.getHierarchy();<NEW_LINE>Collection<PathObject> selectedRaw = hierarchy.getSelectionModel().getSelectedObjects();<NEW_LINE>List<PathObject> se...
.getSelectionModel().clearSelection();
1,257,668
private void processPolymorphic(BelongsToPolymorphic belongsToPolymorphic, Class<? extends Model> modelClass) {<NEW_LINE>Class<? extends Model>[<MASK><NEW_LINE>String[] typeLabels = belongsToPolymorphic.typeLabels();<NEW_LINE>if (typeLabels.length > 0 && typeLabels.length != parentClasses.length) {<NEW_LINE>throw new I...
] parentClasses = belongsToPolymorphic.parents();
1,020,434
public void verify() {<NEW_LINE>ScheduledExecutorService execService = Executors.newScheduledThreadPool(noOfThreadsToUse);<NEW_LINE>Collection<Future<Optional<String>>> futures = new ArrayList<>(noOfThreadsToUse);<NEW_LINE>registerSpecifiedNumberOfAgents(execService, futures);<NEW_LINE>IntStream.iterate(0, i -> i + 1)....
(execService.submit(disableAgentCmd));
151,799
public int evalRPN(String[] tokens) {<NEW_LINE>Set<String> operators = new HashSet<>(Arrays.asList("+"<MASK><NEW_LINE>Stack<Integer> stack = new Stack<>();<NEW_LINE>for (String token : tokens) {<NEW_LINE>if (operators.contains(token)) {<NEW_LINE>int secondNum = stack.pop();<NEW_LINE>int firstNum = stack.pop();<NEW_LINE...
, "-", "*", "/"));
785,815
public static List<Integer> multiply(List<Integer> num1, List<Integer> num2) {<NEW_LINE>final int sign = num1.get(0) < 0 ^ num2.get(0) < 0 ? -1 : 1;<NEW_LINE>num1.set(0, Math.abs(<MASK><NEW_LINE>num2.set(0, Math.abs(num2.get(0)));<NEW_LINE>List<Integer> result = new ArrayList<>(Collections.nCopies(num1.size() + num2.si...
num1.get(0)));
1,737,193
private BTChipOutput convertResponseToOutput(byte[] response) throws BTChipException {<NEW_LINE>BTChipOutput result = null;<NEW_LINE>byte[] value = new byte[(response[0] & 0xff)];<NEW_LINE>System.arraycopy(response, 1, value, 0, value.length);<NEW_LINE>byte userConfirmationValue = response[1 + value.length];<NEW_LINE>i...
] keycardIndexes = new byte[keycardIndexesLength];
1,593,043
public static <ARR> void serLong2ArrayHashMap(Long2ObjectOpenHashMap<ARR> obj, ByteBuf buf) {<NEW_LINE>buf.writeInt(obj.size());<NEW_LINE>ObjectIterator<Long2ObjectMap.Entry<ARR>> iter = obj.long2ObjectEntrySet().fastIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Long2ObjectMap.Entry<ARR> entry = iter.next();<N...
long[]) value, buf);
296,150
private TransactionJson buildCreateSmartContractTransaction(byte[] ownerAddress, BuildArguments args) throws JsonRpcInvalidParamsException, JsonRpcInvalidRequestException, JsonRpcInternalException {<NEW_LINE>try {<NEW_LINE>CreateSmartContract.Builder build = CreateSmartContract.newBuilder();<NEW_LINE>build.setOwnerAddr...
printCreateTransaction(tx, false)));
268,371
final DeleteApiDestinationResult executeDeleteApiDestination(DeleteApiDestinationRequest deleteApiDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteApiDestinationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe...
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,367,864
private static // TODO(user) : combine this method with TypeParameterShadowing.replacementTypeVarName<NEW_LINE>String firstLetterReplacementName(String name, List<String> superTypeVars) {<NEW_LINE>String firstLetterOfBase = Character.toString(name.charAt(0));<NEW_LINE>int typeVarNum = 2;<NEW_LINE>boolean first = true;<...
matcher = TRAILING_DIGIT_EXTRACTOR.matcher(name);
1,740,817
private void updateEnabled() {<NEW_LINE>// add and OK is disabled in waitmodel<NEW_LINE>// TODO C.P how to disable OK?<NEW_LINE>boolean okEnabled = !UIUtil.isWaitModel(dependencyList.getModel());<NEW_LINE>// if there is no selection disable edit/remove buttons<NEW_LINE>boolean enabled = dependencyList.getModel().getSiz...
get(item.getResolvedFile());
1,486,091
final void executeDeprecateWorkflowType(DeprecateWorkflowTypeRequest deprecateWorkflowTypeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deprecateWorkflowTypeRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeprecateWorkflowTypeRe...
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
603,707
private void updateFiles(Gist gist) {<NEW_LINE>final Activity activity = getActivity();<NEW_LINE>if (activity == null)<NEW_LINE>return;<NEW_LINE>for (View header : fileHeaders) adapter.removeHeader(header);<NEW_LINE>fileHeaders.clear();<NEW_LINE>Map<String, GistFile> files = gist.getFiles();<NEW_LINE>if (files == null ...
findViewById(R.id.tv_file_icon);
524,609
public RowBasedMatrix calulate(Vector other, Binary op) {<NEW_LINE>assert other != null;<NEW_LINE>RBCompLongLongMatrix res;<NEW_LINE>if (op.isInplace()) {<NEW_LINE>res = this;<NEW_LINE>} else {<NEW_LINE>res = new RBCompLongLongMatrix(matrixId, clock, rows.length, (long) cols, subDim);<NEW_LINE>}<NEW_LINE>if (op.isInpla...
rowId], other, op));
687,183
private void init() {<NEW_LINE>if (fontSet == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<FontSetFamilyInfo> families = fontSet.getFamilies();<NEW_LINE>this.normalFonts = new ArrayList<>(families.size());<NEW_LINE>this.boldFonts = new ArrayList<<MASK><NEW_LINE>this.italicFonts = new ArrayList<>(families.size());<...
>(families.size());
1,660,118
private void handleChildren() {<NEW_LINE>getGraph().removeAllChildren();<NEW_LINE>map = new HashMap();<NEW_LINE>Iterator it = getChildren().iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>TestNode tn = (TestNode) it.next();<NEW_LINE>SimpleNode sn = new SimpleNode();<NEW_LINE>getGraph().addChild(sn);<NEW_LINE>sn.se...
= getChildren().iterator();
590,379
public void roundComplete(final String gameId, final String roundId, final String judgeSessionId, final String winnerSessionId, final BlackCard blackCard, final Map<String, List<WhiteCard>> cards) {<NEW_LINE>trace("%s, %s, %s, %s, %s, %s", gameId, roundId, judgeSessionId, winnerSessionId, blackCard, cards);<NEW_LINE>fi...
"draw", blackCard.getDraw());
1,424,860
final CreateMeetingDialOutResult executeCreateMeetingDialOut(CreateMeetingDialOutRequest createMeetingDialOutRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMeetingDialOutRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe...
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,318,573
public static RADComponent createQueryBean(FormModel model, RADComponent entityManager, String entityName) throws Exception {<NEW_LINE>RADComponent query = new RADComponent();<NEW_LINE>FileObject formFile = FormEditor.getFormDataObject(model).getFormFile();<NEW_LINE>// NOI18N<NEW_LINE>Class<?> queryClass = ClassPathUti...
("entityManager").setValue(entityManager);
1,316,563
public static int trap(int[] height) {<NEW_LINE>int result = 0;<NEW_LINE>if (height == null || height.length <= 2)<NEW_LINE>return result;<NEW_LINE>int[] left = new int[height.length];<NEW_LINE>int[] right = new int[height.length];<NEW_LINE>// scan from left to right<NEW_LINE>int max = height[0];<NEW_LINE>left[0] = hei...
i]) - height[i];
1,572,577
public void addImpassableRoad(@Nullable final MapActivity mapActivity, @NonNull final LatLon loc, final boolean showDialog, final boolean skipWritingSettings, @Nullable final String appModeKey) {<NEW_LINE>final Location ll = new Location("");<NEW_LINE>ll.<MASK><NEW_LINE>ll.setLongitude(loc.getLongitude());<NEW_LINE>App...
setLatitude(loc.getLatitude());
1,203,546
public void build(Model model, Datas datas, String id, List<Expression> exps, List<EAnnotation> annotations) {<NEW_LINE>int[] as = exps.get(0).toIntArray();<NEW_LINE>IntVar[] bs = exps.get(1).toIntVarArray(model);<NEW_LINE>IntVar c = exps.get(2).intVarValue(model);<NEW_LINE>BoolVar r = exps.get<MASK><NEW_LINE>if (bs.le...
(3).boolVarValue(model);
1,765,689
public <T> Optional<T> createTransportArtifact(Class<T> artifactType, String artifactName, ServerConfiguration config) {<NEW_LINE>if (EventLoopGroup.class.isAssignableFrom(artifactType)) {<NEW_LINE>switch(artifactName) {<NEW_LINE>case "bossGroup":<NEW_LINE>return Optional.of((T) new NioEventLoopGroup(config.sockets().s...
config.workersCount())));
887,219
protected void doSendRequest(final NettyClient nettyClient, ByteBuf byteBuf) {<NEW_LINE>if (logRequest()) {<NEW_LINE>getLogger().info("[doSendRequest]{}, {}", nettyClient, ByteBufUtils.readToString(byteBuf.slice()));<NEW_LINE>}<NEW_LINE>if (hasResponse()) {<NEW_LINE>nettyClient.sendRequest(byteBuf, this);<NEW_LINE>} el...
"[{}][run][timeout]{}", AbstractNettyRequestResponseCommand.this, nettyClient);
1,065,442
protected int diffSwitchExpression(JCSwitchExpression oldT, JCSwitchExpression newT, int[] bounds) {<NEW_LINE>int localPointer = bounds[0];<NEW_LINE>// rename in switch<NEW_LINE>int[] selectorBounds = getBounds(oldT.selector);<NEW_LINE>copyTo(localPointer, selectorBounds[0]);<NEW_LINE>localPointer = diffTree(oldT.selec...
est, Measure.MEMBER, printer);
1,258,035
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {<NEW_LINE>logDebug("onPrepareActionMode");<NEW_LINE>List<MegaNode> selected = adapter.getSelectedNodes();<NEW_LINE>if (selected.size() != 0) {<NEW_LINE>MenuItem unselect = menu.findItem(R.id.cab_menu_unselect_all);<NEW_LINE>if (selected.size() == adapter.g...
.action_download_versions).setVisible(false);
385,306
private void deleteSelection() {<NEW_LINE>if (DEBUG)<NEW_LINE>// NOI18N<NEW_LINE>System.<MASK><NEW_LINE>java.awt.KeyboardFocusManager kbfm = java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager();<NEW_LINE>java.awt.Component c = kbfm.getFocusOwner();<NEW_LINE>if (c != null) {<NEW_LINE>java.awt.Container p = c.g...
out.println(" deleteSelection called. " + "\n");
432,216
private void createNewTextAnnotation(String title, String content, String stateModel, String state) {<NEW_LINE>// on reply we need to create a new textAnnotation/popup combo<NEW_LINE>// and setup the IRT references for display<NEW_LINE>TextAnnotation markupAnnotation = TextAnnotationHandler.createTextAnnotation(documen...
DefaultMutableTreeNode replyToNode = new DefaultMutableTreeNode(markupAnnotation);
13,962
public static void main(String[] args) {<NEW_LINE>EdgeWeightedDigraph edgeWeightedDigraph = new EdgeWeightedDigraph(8);<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(4, 5, 0.35));<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(5, 4, 0.35));<NEW_LINE>edgeWeightedDigraph.addEdge(new DirectedEdge(4, 7, 0.37...
DijkstraSPSourceSink(edgeWeightedDigraph, 0, 2);
400,600
public static HistoricDecisionInstanceDto fromHistoricDecisionInstance(HistoricDecisionInstance historicDecisionInstance) {<NEW_LINE>HistoricDecisionInstanceDto dto = new HistoricDecisionInstanceDto();<NEW_LINE>dto.id = historicDecisionInstance.getId();<NEW_LINE>dto.decisionDefinitionId = historicDecisionInstance.getDe...
.decisionRequirementsDefinitionId = historicDecisionInstance.getDecisionRequirementsDefinitionId();
1,484,881
public List<TransformationStep> toTransformationSteps(Nat nat, @Nullable Map<String, AddressBookEntry> addressBookEntryMap, Ip interfaceIp, Warnings warnings) {<NEW_LINE>checkArgument((nat.getType() == SOURCE || nat.getType() == DESTINATION), "Interface actions can only be used in source nat and dest nat");<NEW_LINE>Tr...
? IpField.SOURCE : IpField.DESTINATION;
302,915
public Query newPrefixQuery(String text) {<NEW_LINE>List<Query> disjuncts = new ArrayList<>();<NEW_LINE>for (Map.Entry<String, Float> entry : weights.entrySet()) {<NEW_LINE>final String fieldName = entry.getKey();<NEW_LINE>final MappedFieldType ft = context.getFieldType(fieldName);<NEW_LINE>if (ft == null) {<NEW_LINE>d...
.add(rethrowUnlessLenient(e));
1,451,582
private boolean startTraceInternal(int flags, TraceContext nextContext) {<NEW_LINE>if (nextContext.buffers == null || nextContext.buffers.length == 0 || nextContext.mainBuffer == null) {<NEW_LINE>// Something has gone wrong, fail this startTrace request.<NEW_LINE>Log.e(LOG_TAG, <MASK><NEW_LINE>return false;<NEW_LINE>}<...
"No buffer was allocated for trace " + nextContext.encodedTraceId + ", failing startTrace");
1,755,770
static int indexOf(String haystack, String needle, int fromIndex, int toIndex) {<NEW_LINE>int trimmedToIndex = toIndex > haystack.length() ? haystack.length() : toIndex;<NEW_LINE>if (fromIndex >= trimmedToIndex) {<NEW_LINE>return needle.isEmpty() ? trimmedToIndex : -1;<NEW_LINE>}<NEW_LINE>int fromIndexTrimmed = fromInd...
= trimmedToIndex - needle.length();
328,719
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {<NEW_LINE>Span span = (Span) requestContext.getProperty(SPAN_PROPERTY);<NEW_LINE>if (null == span) {<NEW_LINE>// not tracing<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (requestContext.getProperty(SPAN_FINISHED_PROPERTY) !...
requestContext.setProperty(SPAN_FINISHED_PROPERTY, true);
1,660,523
public void run() {<NEW_LINE>final ODocument jsonConfig = new ODocument().fromJSON((String) cfg.field("jsonConfig"), "noMap");<NEW_LINE>int logLevel = cfg.field("logLevel");<NEW_LINE>final String configName = cfg.field("configName");<NEW_LINE>final String outDBName = cfg.field("outDBName");<NEW_LINE>// fetching the ser...
OETLMessageHandler(this.stream, logLevel);
1,672,690
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see<NEW_LINE>* freeplane.modes.ModeController.MouseWheelEventHandler#handleMouseWheelEvent<NEW_LINE>* (java.awt.event.MouseWheelEvent)<NEW_LINE>*/<NEW_LINE>public void mouseWheelMoved(final MouseWheelEvent e) {<NEW_LINE>final MapView mapView = (MapView) e.getSource();<NEW_LINE>fi...
newZoom, e.getPoint());
1,240,335
public void accept(BoardCoordinate xy) throws Exception {<NEW_LINE>if (board.cells[xy.getX()][xy.getY()] == null) {<NEW_LINE>if (currentPlayer == MarkerType.CROSS) {<NEW_LINE>board.cells[xy.getX()][xy.getY()] = MarkerType.CROSS;<NEW_LINE>board<MASK><NEW_LINE>board.currentCol = xy.getY();<NEW_LINE>presenter.addCross(xy)...
.currentRow = xy.getX();
1,633,666
private ConsumerConfig createConsumerConfig() throws UnknownHostException {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.put("zookeeper.connect", mConfig.getZookeeperQuorum() + mConfig.getKafkaZookeeperPath());<NEW_LINE>props.put("group.id", mConfig.getKafkaGroup());<NEW_LINE>props.put("zookeeper.sessio...
(mConfig.getZookeeperSessionTimeoutMs()));
1,212,118
public static J9Line parseLine(String line) {<NEW_LINE>J9Line result = new J9Line();<NEW_LINE>int closeParentheses = line.indexOf(')');<NEW_LINE>if (closeParentheses != -1) {<NEW_LINE>int openParentheses = line.indexOf('(');<NEW_LINE>if (openParentheses != -1 && openParentheses < closeParentheses) {<NEW_LINE>String tem...
String signature = parts[pos++];
1,612,040
private Builder addReturnAnnotations(Builder builder, ExecutableElement methodToOverride) {<NEW_LINE>Elements elements = processingEnv.getElementUtils();<NEW_LINE>TypeElement visibleForTestingTypeElement = elements.getTypeElement(processorUtil.visibleForTesting().reflectionName());<NEW_LINE>String visibleForTestingType...
.getAnnotationType().toString();
1,050,325
public int doEndTag() throws javax.servlet.jsp.JspTagException {<NEW_LINE>try {<NEW_LINE>final HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();<NEW_LINE>final PwmRequest pwmRequest = PwmRequest.forRequest(req, (HttpServletResponse) pageContext.getResponse());<NEW_LINE>final String successMsg = (S...
pwmRequest.getAttribute(PwmRequestAttribute.SuccessMessage);
831,565
public void computeTotals(LogisticalForm logisticalForm) throws LogisticalFormError {<NEW_LINE>BigDecimal totalNetMass = BigDecimal.ZERO;<NEW_LINE>BigDecimal totalGrossMass = BigDecimal.ZERO;<NEW_LINE>BigDecimal totalVolume = BigDecimal.ZERO;<NEW_LINE>if (logisticalForm.getLogisticalFormLineList() != null) {<NEW_LINE>S...
totalVolume = totalVolume.add(toAdd);
694,800
final DeleteJourneyResult executeDeleteJourney(DeleteJourneyRequest deleteJourneyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteJourneyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien...
invoke(request, responseHandler, executionContext);
1,147,567
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select * from " + "SupportBeanComplexProps#length(3) s0" + " left outer join " + "SupportBeanCombinedProps#length(3) s1" + " on mapped('keyOne') = indexed[2].mapped('2ma').value";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>...
SupportBeanComplexProps complex = SupportBeanComplexProps.makeDefaultBean();
1,509,220
protected static String calculateExtraClassPath(Class<?> cls, Path... paths) throws Exception {<NEW_LINE>List<String> jars = new ArrayList<>();<NEW_LINE>jars.addAll(calculateExtraClassPathDefault());<NEW_LINE>Module module = cls.getAnnotation(Module.class);<NEW_LINE>for (String str : module.storeJars()) {<NEW_LINE>File...
add(file.getAbsolutePath());
137,483
public void onAllPatchesStart() throws IOException, TinkerPatchException {<NEW_LINE>newApkParser.parseResourceTable();<NEW_LINE>final Map<String, ResourcePackage> newApkResPkgNameMap = newApkParser.getResourceTable().getPackageNameMap();<NEW_LINE>do {<NEW_LINE>if (newApkResPkgNameMap == null) {<NEW_LINE>break;<NEW_LINE...
newApkAnimResTypes = newApkResTypesNameMap.get("anim");
118,685
// ### Private methods<NEW_LINE>private void initialize() throws Exception {<NEW_LINE>if (ejbStatsProvider == null) {<NEW_LINE>synchronized (EjbSecurityStatsProvider.class) {<NEW_LINE>if (ejbStatsProvider == null) {<NEW_LINE>ejbStatsProvider = new EjbSecurityStatsProvider();<NEW_LINE>StatsProviderManager.register("secu...
EJBMethodPermission.class, this.ejbName);
1,075,655
public CodegenExpression makeWCopy(CodegenMethodScope scope, CodegenClassScope classScope) {<NEW_LINE>CodegenExpressionField copyMethodField = classScope.addFieldUnshared(true, EventBeanCopyMethod.EPTYPE, copyMethod.makeCopyMethodClassScoped(classScope));<NEW_LINE>CodegenMethod method = scope.makeChild(EventBeanUpdateH...
addParam(ExprEvaluatorContext.EPTYPE, NAME_EXPREVALCONTEXT);
1,026,852
protected boolean tryConnect(Meterpreter met) throws IOException {<NEW_LINE>URLConnection conn = this.createConnection();<NEW_LINE>if (conn == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>DataInputStream inputStream = new DataInputStream(conn.getInputStream());<NEW_LINE>try {<NEW_LINE>TLVPacket request = this.rea...
writePacket(response, TLVPacket.PACKET_TYPE_RESPONSE);
1,600,413
public Path mkdir(final Path folder, final TransferStatus status) throws BackgroundException {<NEW_LINE>final Path encrypt = vault.encrypt(session, folder, random.random(), false);<NEW_LINE>final String directoryId = encrypt.attributes().getDirectoryId();<NEW_LINE>;<NEW_LINE>// Create metadata file for directory<NEW_LI...
(session, target, true));
1,507,054
public static ListNodesResponse unmarshall(ListNodesResponse listNodesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listNodesResponse.setRequestId(_ctx.stringValue("ListNodesResponse.RequestId"));<NEW_LINE>listNodesResponse.setTotalCount(_ctx.integerValue("ListNodesResponse.TotalCount"));<NEW_LINE>listNodesResponse.se...
("ListNodesResponse.Nodes[" + i + "].ExpiredTime"));
858,387
public void serializeInByteBufferObject(OCompositeKey object, ByteBuffer buffer, Object... hints) {<NEW_LINE>final OType[] types = getKeyTypes(hints);<NEW_LINE>final List<Object> keys = object.getKeys();<NEW_LINE>final int keysSize = keys.size();<NEW_LINE>final int oldStartOffset = buffer.position();<NEW_LINE>buffer.po...
= buffer.position() - oldStartOffset;
684,622
// most common cases (decoding from native pointer) are first<NEW_LINE>@Specialization(guards = "!isNativeWrapper(arr)", rewriteOn = UnexpectedCodepointException.class)<NEW_LINE>static String doUnicodeBMP(Object arr, int elementSize, @CachedLibrary(limit = "3") InteropLibrary lib, @CachedLibrary(limit = "1") InteropLib...
raise(TypeError, "%m", e);
312,130
private static byte[] unsalt(final byte[] text) {<NEW_LINE>if (text.length == 0) {<NEW_LINE>throw new DecodingException("empty input");<NEW_LINE>}<NEW_LINE>final int size = text[0];<NEW_LINE>if (size < 0) {<NEW_LINE>throw new DecodingException(String.format("Length of salt %+d is negative, something is wrong", size));<...
sum += text[idx + 1];
1,036,058
// entry point async trace.<NEW_LINE>@InterfaceAudience.LimitedPrivate("vert.x")<NEW_LINE>@Override<NEW_LINE>public Trace newAsyncTraceObject() {<NEW_LINE>final TraceSampler.State state = traceSampler.isNewSampled();<NEW_LINE>final <MASK><NEW_LINE>if (sampling) {<NEW_LINE>final TraceRoot traceRoot = traceRootFactory.ne...
boolean sampling = state.isSampled();
1,458,798
public static void addTabbedContent(@Nonnull ContentManager manager, @Nonnull JComponent contentComponent, @Nonnull String groupPrefix, @Nonnull String tabName, boolean select, @Nullable Disposable childDisposable) {<NEW_LINE>if (PropertiesComponent.getInstance().getBoolean(TabbedContent.SPLIT_PROPERTY_PREFIX + groupPr...
tabbedContent.removeContent(tab.second);
1,206,041
final DeleteAppResult executeDeleteApp(DeleteAppRequest deleteAppRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAppRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteAppRequest> request = null;<NE...
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,236,959
private void sortArcs(double[][] costMatrix) {<NEW_LINE>int size = 0;<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>p[i] = i;<NEW_LINE>rank[i] = 0;<NEW_LINE>ccTp[i] = i;<NEW_LINE>Tree.getNeighborsOf(i).clear();<NEW_LINE>ccTree.removeNode(i);<NEW_LINE>ccTree.addNode(i);<NEW_LINE>size += g.getNeighborsOf(i).size();<NEW...
activeArcs.set(0, size);
744,314
public Object doInvoke(Invoker invoker, InvokerChain chain) throws Throwable {<NEW_LINE>String httpMethod = invoker.getHttpRequest().getMethod();<NEW_LINE>Mapping mapping = invoker.ownerMapping();<NEW_LINE>if (mapping != null && mapping.findMethod(HttpMethod.OPTIONS) != null) {<NEW_LINE>return chain.doNext(invoker);<NE...
HttpServletResponse httpResponse = invoker.getHttpResponse();
696,570
// TODO: moveInwardsBy() not implemented<NEW_LINE>public void moveInwardsBy(float offset) {<NEW_LINE>int type = this.getType();<NEW_LINE>if (type == TYPE_SLOPED)<NEW_LINE>throw new RuntimeException("Cannot move a sloped edge inwards: " + this);<NEW_LINE>float xOffset = 0;<NEW_LINE>float yOffset = 0;<NEW_LINE>ShapePoint...
" by " + xOffset + ", " + yOffset);
709,182
private void installFunctions() {<NEW_LINE>new BrowserFunction(browser, "__install") {<NEW_LINE><NEW_LINE>public Object function(Object[] arguments) {<NEW_LINE>if (arguments.length == 1 && arguments[0] instanceof String) {<NEW_LINE>String soruce <MASK><NEW_LINE>installEPF(soruce);<NEW_LINE>}<NEW_LINE>return null;<NEW_L...
= (String) arguments[0];
326,235
private Builder<String, Object> generateMetadata(final StandardSync standardSync) {<NEW_LINE>final Builder<String, Object> metadata = ImmutableMap.builder();<NEW_LINE>final UUID connectionId = standardSync.getConnectionId();<NEW_LINE>final StandardSourceDefinition sourceDefinition = configRepository.getSourceDefinition...
"connector_destination", destinationDefinition.getName());
1,089,750
private static SafeHtml tableSectionToSafeHtml(TableSectionBuilder section, String tag) {<NEW_LINE>if (!(section instanceof HtmlTableSectionBuilder)) {<NEW_LINE>throw new IllegalArgumentException("Only HtmlTableSectionBuilder is supported at this time");<NEW_LINE>}<NEW_LINE>// Strip the table section tags off of the tb...
rawHtml.length() - 8);
1,822,995
static IkePhase1Policy toIkePhase1Policy(IsakmpProfile isakmpProfile, CiscoXrConfiguration oldConfig, Configuration config, Warnings w) {<NEW_LINE>IkePhase1Policy ikePhase1Policy = new IkePhase1Policy(isakmpProfile.getName());<NEW_LINE>ImmutableList.Builder<String<MASK><NEW_LINE>for (Entry<Integer, IsakmpPolicy> entry ...
> ikePhase1ProposalBuilder = ImmutableList.builder();
612,668
public void marshall(DatasetImportJobSummary datasetImportJobSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (datasetImportJobSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(datasetImportJo...
datasetImportJobSummary.getDataSource(), DATASOURCE_BINDING);
367,254
void acquireClaimedStream(Promise<Channel> promise) {<NEW_LINE>doInEventLoop(connection.eventLoop(), () -> {<NEW_LINE>if (state != RecordState.OPEN) {<NEW_LINE>String message;<NEW_LINE>// GOAWAY<NEW_LINE>if (state == RecordState.CLOSED_TO_NEW) {<NEW_LINE>message = String.format("Connection %s received GOAWAY with Last ...
set(channel.stream());
1,418,831
public GetResult merge(List<PartitionGetResult> partResults) {<NEW_LINE>int resultSize = 0;<NEW_LINE>for (PartitionGetResult result : partResults) {<NEW_LINE>resultSize += ((PartGeneralGetResult) <MASK><NEW_LINE>}<NEW_LINE>Long2ObjectOpenHashMap<Tuple3<long[], float[], int[]>> nodeIdToNeighbors = new Long2ObjectOpenHas...
result).getNodeIds().length;
1,656,388
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String resultText = "";<NEW_LINE>try {<NEW_LINE>this.beforeExecute();<NEW_LINE>resultText =...
setExecutedSuccessfully(this.getExecutedSuccessfully());
333,792
public void run() {<NEW_LINE>for (TwoWayListener<DM, UMD, DMD> l : ls) {<NEW_LINE>if (e instanceof TwoWayEvent.Derived) {<NEW_LINE>l.derived((TwoWayEvent.Derived<DM<MASK><NEW_LINE>} else if (e instanceof TwoWayEvent.Invalidated) {<NEW_LINE>l.invalidated((TwoWayEvent.Invalidated<DM, UMD, DMD>) e);<NEW_LINE>} else if (e ...
, UMD, DMD>) e);
945,753
public void run() {<NEW_LINE>Window[] windows = Window.getWindows();<NEW_LINE>Window targetWindow = null;<NEW_LINE>for (Window each : windows) {<NEW_LINE>if (each.isActive()) {<NEW_LINE>targetWindow = each;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (targetWindow == null) {<NEW_LINE>targetWindow = JOptionPane.ge...
LOG.info("Can not get component to show message: " + message);
1,603,064
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>String xml = (String) msg;<NEW_LINE>String id = getAttribute(xml, "id");<NEW_LINE>String data = getAttribute(xml, "data");<NEW_LINE>if (id != null && data != null) {<NEW_LINE>DeviceSession deviceSession = getDe...
setLongitude(parser.nextCoordinate());
987,720
public void writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) throws IOException {<NEW_LINE><MASK><NEW_LINE>BytesRefBuilder scratch = new BytesRefBuilder();<NEW_LINE>String fileName = IndexFileNames.fileNameFromGeneration(info.info.name, LIVEDOCS_EXTENSION, info.getNext...
int size = bits.length();
687,800
final GetAccountSendingEnabledResult executeGetAccountSendingEnabled(GetAccountSendingEnabledRequest getAccountSendingEnabledRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAccountSendingEnabledRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri...
HandlerContextKey.SIGNING_REGION, getSigningRegion());