auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String dataSourceName; if (request.getPath().startsWith("druid/indexer/v1/task/")) { final String taskId = request.getPathSegments().get(4).getPath(); Preconditions.checkNotNull(taskId); Optional<Task> taskOptional = taskStorageQueryAdapter.getTask(taskId); if (!taskOptional.isPresent()) { throw new WebApplicationException( Response.status(Response.Status.BAD_REQUEST) .entity(String.format("Cannot find any task with id: [%s]", taskId)) .build() ); } dataSourceName = taskOptional.get().getDataSource(); } else { throw new WebApplicationException( <START> Response.status(Response.Status.BAD_REQUEST) <END> .entity(String.format( "Do not know how to extract task information " + "for authorization check for request path: [%s]", request.getPath() )) .build() ); } final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(dataSourceName, ResourceType.DATASOURCE), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException(Response.status(Response.Status.FORBIDDEN) .entity( String.format("Access-Check-Result: %s", authResult.toString()) ) .build()); } } return request; }</code><technical_language>this a SERVER_ERROR , reaching means this filter added wrong place in code a user mistake</technical_language>

Target:
public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String taskId = Preconditions.checkNotNull( request.getPathSegments() .get( Iterables.indexOf( request.getPathSegments(), new Predicate<PathSegment>() { @Override public boolean apply(PathSegment input) { return input.getPath().equals("task"); } } ) + 1 ).getPath() ); Optional<Task> taskOptional = taskStorageQueryAdapter.getTask(taskId); if (!taskOptional.isPresent()) { throw new WebApplicationException( Response.status(Response.Status.BAD_REQUEST) .entity(String.format("Cannot find any task with id: [%s]", taskId)) .build() ); } final String dataSourceName = Preconditions.checkNotNull(taskOptional.get().getDataSource()); final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(dataSourceName, ResourceType.DATASOURCE), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException(Response.status(Response.Status.FORBIDDEN) .entity( String.format("Access-Check-Result: %s", authResult.toString()) ) .build()); } } return request; }
Source:
<code>public boolean performFinish() { try { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IProject project = root.getProject(projectName); project.create(null); project.open(null); Bundle bundle = Platform.getBundle("info.limpet.sample_data"); if (bundle == null) { <START> return true; <END> } URL entry = bundle.getEntry("/"); File file = new File(FileLocator.resolve(entry).toURI()); if (file.isDirectory()) { CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation( getShell()); List<URI> uris = new ArrayList<URI>(); File f = new File(file, "data"); if (f.isDirectory()) { uris.add(f.toURI()); } f = new File(file, "americas_cup"); if (f.isDirectory()) { uris.add(f.toURI()); } if (uris.size() == 0) { return true; } operation.copyFiles(uris.toArray(new URI[0]), project); } } catch (CoreException | URISyntaxException | IOException e) { MessageDialog.openError(getShell(), "Error", "Cannot create project. Reason: " + e.getMessage()); Activator.log(e); return false; } return true; }</code><technical_language>logging error if this fails - bundle</technical_language>

Target:
public boolean performFinish() { try { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IProject project = root.getProject(projectName); project.create(null); project.open(null); Bundle bundle = Platform.getBundle("info.limpet.sample_data"); if (bundle == null) { MessageDialog.openWarning(getShell(), "Warning", "The sample_data plugin is missing. Please check your installation"); return true; } URL entry = bundle.getEntry("/"); File file = new File(FileLocator.resolve(entry).toURI()); if (file.isDirectory()) { CopyFilesAndFoldersOperation operation = new CopyFilesAndFoldersOperation( getShell()); List<URI> uris = new ArrayList<URI>(); File f = new File(file, "data"); if (f.isDirectory()) { uris.add(f.toURI()); } f = new File(file, "americas_cup"); if (f.isDirectory()) { uris.add(f.toURI()); } if (uris.size() == 0) { return true; } operation.copyFiles(uris.toArray(new URI[0]), project); } } catch (CoreException | URISyntaxException | IOException e) { MessageDialog.openError(getShell(), "Error", "Cannot create project. Reason: " + e.getMessage()); Activator.log(e); return false; } return true; }
Source:
<code>private List<Link> createLinksFrom(Object parseResult, String rel) { if (parseResult instanceof JSONArray) { return ((JSONArray) parseResult).stream() <START> .flatMap(o -> { <END> if (o instanceof JSONArray) { return ((JSONArray) o).stream(); } else { return Stream.of(o); } }) .map(element -> extractLink((Map<String, String>) element, rel)) .collect(Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList)); } else if (parseResult instanceof Map) { return Collections.singletonList(extractLink((Map<String, String>) parseResult, rel)); } return Collections.unmodifiableList(Collections.singletonList(new Link(parseResult.toString(), rel))); }</code><technical_language>Ternary</technical_language>

Target:
private List<Link> createLinksFrom(Object parseResult, String rel) { if (parseResult instanceof JSONArray) { return ((JSONArray) parseResult).stream() .flatMap(o -> { if (o instanceof JSONArray) { return ((JSONArray) o).stream(); } else { return Stream.of(o); } }) .map(element -> extractLink(element, rel)) .collect(Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList)); } else if (parseResult instanceof Map) { return Collections.singletonList(extractLink(parseResult, rel)); } return Collections.unmodifiableList(Collections.singletonList(new Link(parseResult.toString(), rel))); }
Source:
<code>protected void unbufferedWrite(ChannelHandlerContext ctx, HttpStreamsHandler<HttpRequest, HttpResponse>.Outgoing out) { if (out.message instanceof WebSocketHttpResponse) { if ((lastRequest instanceof FullHttpRequest) || !hasBody(lastRequest)) { handleWebSocketResponse(ctx, out); } else { webSocketResponse = out; } } else { String connection = out.message.headers().get(HttpHeaders.Names.CONNECTION); if (lastRequest.getProtocolVersion().isKeepAliveDefault()) { if ("close".equalsIgnoreCase(connection)) { close = true; } } else { if (!"keep-alive".equalsIgnoreCase(connection)) { close = true; } } if (inFlight == 1 && continueExpected) { HttpHeaders.setKeepAlive(out.message, false); close = true; continueExpected = false; } int status = out.message.getStatus().code(); if (!HttpHeaders.isContentLengthSet(out.message) && !HttpHeaders.isTransferEncodingChunked(out.message) <START> && !(status < 200 || status == 204 || status == 304)) { <END> HttpHeaders.setKeepAlive(out.message, false); close = true; } super.unbufferedWrite(ctx, out); } }</code><technical_language>prefer constants here, Netty provides HttpResponseStatus.* for these</technical_language>

Target:
protected void unbufferedWrite(ChannelHandlerContext ctx, HttpStreamsHandler<HttpRequest, HttpResponse>.Outgoing out) { if (out.message instanceof WebSocketHttpResponse) { if ((lastRequest instanceof FullHttpRequest) || !hasBody(lastRequest)) { handleWebSocketResponse(ctx, out); } else { webSocketResponse = out; } } else { String connection = out.message.headers().get(HttpHeaders.Names.CONNECTION); if (lastRequest.getProtocolVersion().isKeepAliveDefault()) { if ("close".equalsIgnoreCase(connection)) { close = true; } } else { if (!"keep-alive".equalsIgnoreCase(connection)) { close = true; } } if (inFlight == 1 && continueExpected) { HttpHeaders.setKeepAlive(out.message, false); close = true; continueExpected = false; } if (!HttpHeaders.isContentLengthSet(out.message) && !HttpHeaders.isTransferEncodingChunked(out.message) && canHaveBody(out.message)) { HttpHeaders.setKeepAlive(out.message, false); close = true; } super.unbufferedWrite(ctx, out); } }
Source:
<code>public void validate(Object object, Errors errors) { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "condition", "field.required"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "clinicalStatus", "field.required"); if(object == null){ throw new IllegalArgumentException("The object parameter should not be null"); } if(!(object instanceof Condition)){ throw new IllegalArgumentException("The object parameter should be of type " + Condition.class); } <START> <END> }</code><technical_language>in position create some tests for this class? a examples: <LINK_0></technical_language>

Target:
public void validate(Object object, Errors errors) { if(object == null){ throw new IllegalArgumentException("The object parameter should not be null"); } if(!(object instanceof Condition)){ throw new IllegalArgumentException("The object parameter should be of type " + Condition.class); } }
Source:
<code>public final <R> Flowable<R> concatMapEager(Function<? super T, ? extends Publisher<? extends R>> mapper, int maxConcurrency, int prefetch) { ObjectHelper.verifyPositive(maxConcurrency, "maxConcurrency"); <START> return RxJavaPlugins.onAssembly(new FlowableConcatMapEager<T, R>(this, mapper, maxConcurrency, prefetch, ErrorMode.IMMEDIATE)); <END> }</code><technical_language>No, validations right, call non-positive value</technical_language>

Target:
public final <R> Flowable<R> concatMapEager(Function<? super T, ? extends Publisher<? extends R>> mapper, int maxConcurrency, int prefetch) { ObjectHelper.requireNonNull(mapper, "mapper is null"); ObjectHelper.verifyPositive(maxConcurrency, "maxConcurrency"); ObjectHelper.verifyPositive(prefetch, "prefetch"); return RxJavaPlugins.onAssembly(new FlowableConcatMapEager<T, R>(this, mapper, maxConcurrency, prefetch, ErrorMode.IMMEDIATE)); }
Source:
<code>public Object execute(ExecutionEvent event) throws ExecutionException { IStructuredSelection selection = getSelection(getPage()); if (selection.size() < 1) return null; Object input = getInput(event); if (!(input instanceof IFile)) return null; IFile resource = (IFile) input; final RepositoryMapping map = RepositoryMapping.getMapping(resource); final String gitPath = map.getRepoRelativePath(resource); Iterator<?> it = selection.iterator(); boolean errorOccured = false; List<ObjectId> ids = new ArrayList<ObjectId>(); while (it.hasNext()) { RevCommit commit = (RevCommit) it.next(); IFileRevision rev = null; try { rev = CompareUtils.getFileRevision(gitPath, commit, map .getRepository(), null); } catch (IOException e) { Activator.logError(NLS.bind( UIText.GitHistoryPage_errorLookingUpPath, gitPath, commit.getId()), e); errorOccured = true; } if (rev != null) { try { EgitUiEditorUtils.openTextEditor(getPart(event).getSite() .getPage(), rev, null); } catch (CoreException e) { Activator.logError(e.getMessage(), e); errorOccured = true; } } else { ids.add(commit.getId()); } } if (errorOccured) Activator.showError(UIText.GitHistoryPage_openFailed, null); if (ids.size() > 0) { String idList = ""; <START> for (ObjectId objectId : ids) { <END> idList += objectId.getName() + " "; } MessageDialog.openError(getPart(event).getSite().getShell(), UIText.GitHistoryPage_fileNotFound, NLS.bind( UIText.GitHistoryPage_notContainedInCommits, gitPath, idList)); } return null; }</code><technical_language>style nit: avoid braces single line block</technical_language>

Target:
public Object execute(ExecutionEvent event) throws ExecutionException { IStructuredSelection selection = getSelection(getPage()); if (selection.size() < 1) return null; Object input = getInput(event); if (!(input instanceof IFile)) return null; IFile resource = (IFile) input; final RepositoryMapping map = RepositoryMapping.getMapping(resource); final String gitPath = map.getRepoRelativePath(resource); Iterator<?> it = selection.iterator(); boolean errorOccured = false; List<ObjectId> ids = new ArrayList<ObjectId>(); while (it.hasNext()) { RevCommit commit = (RevCommit) it.next(); IFileRevision rev = null; try { rev = CompareUtils.getFileRevision(gitPath, commit, map .getRepository(), null); } catch (IOException e) { Activator.logError(NLS.bind( UIText.GitHistoryPage_errorLookingUpPath, gitPath, commit.getId()), e); errorOccured = true; } if (rev != null) { try { EgitUiEditorUtils.openTextEditor(getPart(event).getSite() .getPage(), rev, null); } catch (CoreException e) { Activator.logError(e.getMessage(), e); errorOccured = true; } } else { ids.add(commit.getId()); } } if (errorOccured) Activator.showError(UIText.GitHistoryPage_openFailed, null); if (ids.size() > 0) { String idList = ""; for (ObjectId objectId : ids) idList += objectId.getName() + " "; MessageDialog.openError(getPart(event).getSite().getShell(), UIText.GitHistoryPage_fileNotFound, NLS.bind( UIText.GitHistoryPage_notContainedInCommits, gitPath, idList)); } return null; }
Source:
<code><START> public String pkToJsonArray() throws IOException { <END> JsonGenerator g = jsonGeneratorThreadLocal.get(); g.writeStartArray(); g.writeString(database); g.writeString(table); g.writeStartArray(); for (String pk : pkColumns) { Object pkValue = null; if ( data.containsKey(pk) ) pkValue = data.get(pk); g.writeStartObject(); g.writeObjectField(pk.toLowerCase(), pkValue); g.writeEndObject(); } g.writeEndArray(); g.writeEndArray(); g.flush(); return jsonFromStream(); }</code><technical_language>this change is longer needed</technical_language>

Target:
private String pkToJsonArray() throws IOException { JsonGenerator g = jsonGeneratorThreadLocal.get(); g.writeStartArray(); g.writeString(database); g.writeString(table); g.writeStartArray(); for (String pk : pkColumns) { Object pkValue = null; if ( data.containsKey(pk) ) pkValue = data.get(pk); g.writeStartObject(); g.writeObjectField(pk.toLowerCase(), pkValue); g.writeEndObject(); } g.writeEndArray(); g.writeEndArray(); g.flush(); return jsonFromStream(); }
Source:
<code>public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { if (sourceViewer == null) { return null; } Map<?, ?> targets = getHyperlinkDetectorTargets(sourceViewer); HyperlinkDetectorRegistry hlDetectorRegistry = EditorsUI.getHyperlinkDetectorRegistry(); HyperlinkDetectorDescriptor[] hlDetectorDescriptor = hlDetectorRegistry.getHyperlinkDetectorDescriptors(); List<IHyperlinkDetector> tempHDList = new ArrayList<IHyperlinkDetector>(); <START> for (Object key : targets.keySet()) { <END> for (HyperlinkDetectorDescriptor hdd : hlDetectorDescriptor) { try { AbstractHyperlinkDetector ahld = hdd.createHyperlinkDetector(); if (hdd.getTargetId().equals(key) && !(ahld instanceof URLHyperlinkDetector)) { ahld.setContext((IAdaptable)targets.get(key)); tempHDList.add(ahld); } } catch (CoreException e) { SpecfileLog.logError(e); } } } if (!tempHDList.isEmpty()) { IHyperlinkDetector[] rc = new IHyperlinkDetector[tempHDList.size()]; rc = tempHDList.toArray(rc); return rc; } else { return null; } }</code><technical_language>is recommended entry set for iterating aka: for (Map.Entry<?, ?> entry : targets.entrySet()) {</technical_language>

Target:
public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { if (sourceViewer == null) { return null; } Map<?, ?> targets = getHyperlinkDetectorTargets(sourceViewer); HyperlinkDetectorRegistry hlDetectorRegistry = EditorsUI.getHyperlinkDetectorRegistry(); HyperlinkDetectorDescriptor[] hlDetectorDescriptor = hlDetectorRegistry.getHyperlinkDetectorDescriptors(); List<IHyperlinkDetector> tempHDList = new ArrayList<IHyperlinkDetector>(); for (Map.Entry<?, ?> entry : targets.entrySet()) { for (HyperlinkDetectorDescriptor hdd : hlDetectorDescriptor) { try { AbstractHyperlinkDetector ahld = hdd.createHyperlinkDetector(); if (hdd.getTargetId().equals(entry.getKey()) && !(ahld instanceof URLHyperlinkDetector)) { ahld.setContext((IAdaptable)entry.getValue()); tempHDList.add(ahld); } } catch (CoreException e) { SpecfileLog.logError(e); } } } if (!tempHDList.isEmpty()) { IHyperlinkDetector[] rc = new IHyperlinkDetector[tempHDList.size()]; rc = tempHDList.toArray(rc); return rc; } else { return null; } }
Source:
<code>public void orderFromCartDraft(){ withFilledCart(client(), cart -> { final OrderFromCartDraft orderFromCartDraft = OrderFromCartDraftBuilder.of(cart.getId(),cart.getVersion() ).shipmentState(ShipmentState.SHIPPED).build(); final Order order = client().executeBlocking(OrderFromCartCreateCommand.of(cart).withDraft(orderFromCartDraft)); assertThat(order).isNotNull(); <START> assertThat(order.getShipmentState()).isEqualByComparingTo(ShipmentState.SHIPPED); <END> }); }</code><technical_language>a question: do isEqualByComparingTo here? isEqualTo work</technical_language>

Target:
public void orderFromCartDraft(){ withFilledCart(client(), cart -> { final OrderFromCartDraft orderFromCartDraft = OrderFromCartDraftBuilder.of(cart.getId(),cart.getVersion() ).shipmentState(ShipmentState.SHIPPED).build(); final Order order = client().executeBlocking(OrderFromCartCreateCommand.of(cart).withDraft(orderFromCartDraft)); assertThat(order).isNotNull(); assertThat(order.getShipmentState()).isEqualTo(ShipmentState.SHIPPED); }); }
Source:
<code>public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, String studentEmail, FeedbackSessionResultsBundle bundle, String view) { if ("student".equals(view) || responses.isEmpty()) { return ""; } Map<String, Integer> answerFrequency = new LinkedHashMap<String, Integer>(); <START> int numChoicesSelected = getQuestionResultStatistics(responses, answerFrequency); <END> if (numChoicesSelected == -1) { return ""; } else { DecimalFormat df = new DecimalFormat("#.##"); StringBuilder fragments = new StringBuilder(); for (Entry<String, Integer> entry : answerFrequency.entrySet()) { fragments.append(Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS_OPTIONFRAGMENT, Slots.MCQ_CHOICE_VALUE, entry.getKey(), Slots.COUNT, entry.getValue().toString(), Slots.PERCENTAGE, df.format(100 * divideOrReturnZero(numChoicesSelected, (double) entry.getValue())))); } return Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS, Slots.FRAGMENTS, fragments.toString()); } }</code><technical_language>a more meaningful name, totalChoicesSelected</technical_language>

Target:
public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, String studentEmail, FeedbackSessionResultsBundle bundle, String view) { if ("student".equals(view) || responses.isEmpty()) { return ""; } Map<String, Integer> answerFrequency = new LinkedHashMap<String, Integer>(); int totalChoicesSelected = getQuestionResultStatistics(responses, answerFrequency); if (totalChoicesSelected == -1) { return ""; } DecimalFormat df = new DecimalFormat("#.##"); StringBuilder fragments = new StringBuilder(); for (Entry<String, Integer> entry : answerFrequency.entrySet()) { fragments.append(Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS_OPTIONFRAGMENT, Slots.MCQ_CHOICE_VALUE, entry.getKey(), Slots.COUNT, entry.getValue().toString(), Slots.PERCENTAGE, df.format(100 * divideOrReturnZero((double) entry.getValue(), totalChoicesSelected)))); } return Templates.populateTemplate(FormTemplates.MCQ_RESULT_STATS, Slots.FRAGMENTS, fragments.toString()); }
Source:
<code>protected void executeQueryCommand() { clusterId = getParameters().getClusterId(); detailRequired = getParameters().isDetailRequired(); volumeId = getParameters().getVolumeId(); if (volumeId != null) { GlusterVolumeEntity volume = getGlusterVolumeDao().getById(volumeId); if (volume == null) { <START> throw new RuntimeException(String.format("Invalid volume id %s", volumeId)); <END> } brick = getBrick(getParameters().getBrickId()); getQueryReturnValue().setReturnValue(fetchAdvancedDetails(volume.getName())); } else { GlusterVolumeAdvancedDetails serviceDetails = getServiceInfo(); if (serviceDetails != null) { List<GlusterServerService> serviceList = serviceDetails.getServiceInfo(); if (serviceList != null) { for (GlusterServerService service : serviceList) { String hostName = GlusterDBUtils.getInstance().getHostNameOrIP(service.getGlusterHostUuid()); if (hostName != null) { service.setHostName(hostName); } } } } getQueryReturnValue().setReturnValue(serviceDetails); } }</code><technical_language>is error message defined I feel for this. used</technical_language>

Target:
protected void executeQueryCommand() { clusterId = getParameters().getClusterId(); detailRequired = getParameters().isDetailRequired(); volumeId = getParameters().getVolumeId(); if (volumeId != null) { GlusterVolumeEntity volume = getGlusterVolumeDao().getById(volumeId); if (volume == null) { throw new RuntimeException(VdcBllMessages.GLUSTER_VOLUME_ID_INVALID.toString()); } brick = getBrick(getParameters().getBrickId()); getQueryReturnValue().setReturnValue(fetchAdvancedDetails(volume.getName())); } else { GlusterVolumeAdvancedDetails advancedDetails = getServiceInfo(); if (advancedDetails != null) { List<GlusterServerService> serviceList = advancedDetails.getServiceInfo(); if (serviceList != null) { for (GlusterServerService service : serviceList) { String hostName = GlusterDBUtils.getInstance().getHostNameOrIP(service.getGlusterHostUuid()); if (hostName != null) { service.setHostName(hostName); } } } } getQueryReturnValue().setReturnValue(advancedDetails); } }
Source:
<code><START> public void validate() { <END> if (coreThreads < 0) throw log.illegalValueThreadPoolParameter("core threads", ">= 0"); if (maxThreads <= 0) throw log.illegalValueThreadPoolParameter("max threads", "> 0"); if (maxThreads < coreThreads) throw log.illegalValueThreadPoolParameter( "max threads and core threads", "max threads >= core threads"); if (keepAlive < 0) throw log.illegalValueThreadPoolParameter("keep alive time", ">= 0"); }</code><technical_language>queueLength >= 0 change createExecutor(ThreadFactory threadFactory) create a SynchronousQueue if queueLength <= 0</technical_language>

Target:
public void validate() { if (coreThreads < 0) throw log.illegalValueThreadPoolParameter("core threads", ">= 0"); if (maxThreads <= 0) throw log.illegalValueThreadPoolParameter("max threads", "> 0"); if (maxThreads < coreThreads) throw log.illegalValueThreadPoolParameter( "max threads and core threads", "max threads >= core threads"); if (keepAlive < 0) throw log.illegalValueThreadPoolParameter("keep alive time", ">= 0"); if (queueLength < 0) throw log.illegalValueThreadPoolParameter("work queue length", ">= 0"); }
Source:
<code>protected State setupAction(AnActionEvent e) { State state = new State(); Project project = e.getProject(); state.myIdeFrame = WindowManagerEx.getInstanceEx().findFrameFor(project); if (e.getProject() == ProjectManager.getInstance().getDefaultProject()) { <START> state.myStateComponent = e.getProject().getComponent(ApplicationStateComponent.class); <END> state.myNavigationHelper = new ApplicationNavigationUtil(state.myIdeFrame); } else { state.myStateComponent = e.getProject().getComponent(ProjectStateComponent.class); state.myNavigationHelper = new ProjectNavigationUtil(e.getProject(), state.myIdeFrame); } state.myTaskContext = e; return state; }</code><technical_language>If application component, get Application.getComponent(). confusing</technical_language>

Target:
protected State setupAction(AnActionEvent e) { State state = new State(); Project project = e.getProject(); state.myIdeFrame = WindowManagerEx.getInstanceEx().findFrameFor(project); if (e.getProject() == null) { state.myStateComponent = ApplicationManager.getApplication().getComponent(ApplicationComponent.class); state.myNavigationHelper = new ApplicationNavigationUtil((JFrame)state.myIdeFrame); } else { state.myStateComponent = e.getProject().getComponent(ProjectComponent.class); state.myNavigationHelper = new ProjectNavigationUtil(e.getProject(), (JFrame)state.myIdeFrame); } state.myTaskContext = e; return state; }
Source:
<code>void onDateChanged(final Moment nativeDate) { <START> getInputBind().value = nativeDate.format("HH:mm:ss"); <END> if (!Objects.isNull(onDateChanged)) { onDateChanged.accept(nativeDate); } }</code><technical_language>Please TIME_FORMAT instead of "HH:mm:ss"</technical_language>

Target:
void onDateChanged(final Moment nativeDate) { getInputBind().value = nativeDate.format(TIME_FORMAT); if (!Objects.isNull(onDateChanged)) { onDateChanged.accept(nativeDate); } }
Source:
<code>private int executeIncrementalLoad(DriverContext driverContext) { try { if (work.needCleanTablesFromBootstrap) { cleanTablesFromBootstrap(); work.needCleanTablesFromBootstrap = false; } IncrementalLoadTasksBuilder builder = work.incrementalLoadTasksBuilder(); if (!builder.hasMoreWork() && !work.getPathsToCopyIterator().hasNext()) { if (work.hasBootstrapLoadTasks()) { LOG.debug("Current incremental dump have tables to be bootstrapped. Switching to bootstrap " + "mode after applying all events."); <START> return executeBootStrapLoad(driverContext, true); <END> } } List<Task<? extends Serializable>> childTasks = new ArrayList<>(); int maxTasks = conf.getIntVar(HiveConf.ConfVars.REPL_APPROX_MAX_LOAD_TASKS); TaskTracker tracker = new TaskTracker(maxTasks); if (work.getPathsToCopyIterator().hasNext()) { childTasks.addAll(new ExternalTableCopyTaskBuilder(work, conf).tasks(tracker)); } else { childTasks.add(builder.build(driverContext, getHive(), LOG, tracker)); } if (builder.hasMoreWork() || work.getPathsToCopyIterator().hasNext() || work.hasBootstrapLoadTasks()) { DAGTraversal.traverse(childTasks, new AddDependencyToLeaves(TaskFactory.get(work, conf))); } this.childTasks = childTasks; return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }</code><technical_language>set isBootstrapDuringIncLoad in ReplLoadWork object constructor itself? need pass extra argument need set iteration</technical_language>

Target:
private int executeIncrementalLoad(DriverContext driverContext) { try { if (work.needCleanTablesFromBootstrap) { cleanTablesFromBootstrap(); work.needCleanTablesFromBootstrap = false; } IncrementalLoadTasksBuilder builder = work.incrementalLoadTasksBuilder(); if (!builder.hasMoreWork() && !work.getPathsToCopyIterator().hasNext()) { if (work.hasBootstrapLoadTasks()) { LOG.debug("Current incremental dump have tables to be bootstrapped. Switching to bootstrap " + "mode after applying all events."); return executeBootStrapLoad(driverContext); } } List<Task<? extends Serializable>> childTasks = new ArrayList<>(); int maxTasks = conf.getIntVar(HiveConf.ConfVars.REPL_APPROX_MAX_LOAD_TASKS); TaskTracker tracker = new TaskTracker(maxTasks); if (work.getPathsToCopyIterator().hasNext()) { childTasks.addAll(new ExternalTableCopyTaskBuilder(work, conf).tasks(tracker)); } else { childTasks.add(builder.build(driverContext, getHive(), LOG, tracker)); } if (builder.hasMoreWork() || work.getPathsToCopyIterator().hasNext() || work.hasBootstrapLoadTasks()) { DAGTraversal.traverse(childTasks, new AddDependencyToLeaves(TaskFactory.get(work, conf))); } this.childTasks = childTasks; return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }
Source:
<code>public Builder withHeader(Map<String, Object> headerClaims) { <START> if (headerClaims == null) <END> return this; for (Map.Entry<String, Object> entry : headerClaims.entrySet()) { if (entry.getValue() == null) { this.headerClaims.remove(entry.getKey()); } else { this.headerClaims.put(entry.getKey(), entry.getValue()); } } return this; }</code><technical_language>Please braces for this if a liner, follow project code style</technical_language>

Target:
public Builder withHeader(Map<String, Object> headerClaims) { if (headerClaims == null) { return this; } for (Map.Entry<String, Object> entry : headerClaims.entrySet()) { if (entry.getValue() == null) { this.headerClaims.remove(entry.getKey()); } else { this.headerClaims.put(entry.getKey(), entry.getValue()); } } return this; }
Source:
<code>protected void setComparator(Comparator comparator) { this.comparator = comparator; Iterable items = getItems(); if (items == null) { return; } Iterable identicalItems = (comparator == null) ? new ArrayList() : new TreeSet(comparator); for (Object item : items) { <START> setItems(identicalItems); <END> } }</code><technical_language>mean- for (Object item : items) { identicalItems.add(item); } setItems(identicalItems); - loop is redundant reset items set comparator</technical_language>

Target:
protected void setComparator(Comparator comparator) { if (comparator == this.comparator) { return; } this.comparator = comparator; Iterable items = getItems(); if (items == null) { return; } Collection identicalItems = (comparator == null) ? new ArrayList() : new TreeSet(comparator); for (Object item : items) { identicalItems.add(item); } setItems(identicalItems); }
Source:
<code>public OpaqueBlocksNode(Context context) { renderQueues = context.get(RenderQueuesHelper.class); worldRenderer = context.get(WorldRenderer.class); wireframeStateChange = new SetWireframe(true); <START> renderingDebugConfig = context.get(Config.class).getRendering().getDebug(); <END> new WireframeTrigger(renderingDebugConfig, this); playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new BindFBO(READONLY_GBUFFER, context.get(DisplayResolutionDependentFBOs.class))); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkShader = getMaterial(CHUNK_MATERIAL); }</code><technical_language>I highlight this issue in previous nodes overly important want decide if consistently initialize rendering configs obtaining Config object context or, do here, in line. I guess hand I feel a local variable helps readability getRendering() getDebug() a bit ambiguous method names go. other I compactness of one-line in this case. prefer readability compactness though. do think</technical_language>

Target:
public OpaqueBlocksNode(Context context) { renderQueues = context.get(RenderQueuesHelper.class); wireframeStateChange = new SetWireframe(true); renderingDebugConfig = context.get(Config.class).getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); worldRenderer = context.get(WorldRenderer.class); playerCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(playerCamera)); addDesiredStateChange(new BindFBO(READONLY_GBUFFER, context.get(DisplayResolutionDependentFBOs.class))); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkMaterial = getMaterial(CHUNK_MATERIAL); }
Source:
<code>public long currentTimeMicros() { FetchedTime spec = lastFetchedTime.get(); long curNano = System.nanoTime(); if (curNano > spec.nanoTimeAtCheck + ONE_SECOND_NS) { <START> spec = fetchTimeMicros(); <END> lastFetchedTime.set(spec); } return spec.timeInMicros + ((curNano - spec.nanoTimeAtCheck) / 1000); }</code><technical_language>in theory do this multiple times a concurrent access, big of a concern. get create a new FetchedTime if check passes do a CAS, if CAS succeeds, call fetchTimeMicros fill in fields of new FetchedTime</technical_language>

Target:
public long currentTimeMicros() { FetchedTime spec = lastFetchedTime.get(); long curNano = System.nanoTime(); if (curNano > spec.nanoTimeAtCheck + ONE_SECOND_NS) { lastFetchedTime.compareAndSet(spec, spec = fetchTimeMicros()); } return spec.timeInMicros + ((curNano - spec.nanoTimeAtCheck) / 1000); }
Source:
<code>public void testKalmanMinStreamProcessorExtension1() throws InterruptedException { log.info("KalmanMin TestCase with test attributeExpressionExecutor's length"); SiddhiManager siddhiManager = new SiddhiManager(); String inStreamDefinition = "define stream inputStream (id int ,price double);"; String query = ("@info(name = 'query1') from inputStream#timeseries:kalmanMinMax(price, 0.000001,0.0001, " + "'min') select price, extremaType, id insert into outputStream;"); ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query); <START> executionPlanRuntime.start(); <END> executionPlanRuntime.shutdown(); }</code><technical_language>need start stop in parameter validation testcases. Please remove instances</technical_language>

Target:
public void testKalmanMinStreamProcessorExtension1() throws InterruptedException { log.info("KalmanMin TestCase with test attributeExpressionExecutor's length"); SiddhiManager siddhiManager = new SiddhiManager(); String inStreamDefinition = "define stream inputStream (id int ,price double);"; String query = ("@info(name = 'query1') from inputStream#timeseries:kalmanMinMax(price, 0.000001,0.0001, " + "'min') select price, extremaType, id insert into outputStream;"); ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query); }
Source:
<code><START> public boolean executeConnectStoragePoolCommand(Guid storagePoolId) { <END> try { return Backend .getInstance() .getResourceManager() .RunVdsCommand( VDSCommandType.ConnectStoragePool, new ConnectStoragePoolVDSCommandParameters(getVds() .getId(), storagePoolId, getVds() .getvds_spm_id(), getMasterDomainIdFromDb(), getStoragePool().getmaster_domain_version())) .getSucceeded(); } catch (RuntimeException exp) { log.errorFormat("Could not connect host {0} to pool {1}", getVds() .getvds_name(), getStoragePool().getname()); return false; } }</code><technical_language>public</technical_language>

Target:
private boolean executeConnectStoragePoolCommand(Guid storagePoolId) { try { return runVdsCommand( VDSCommandType.ConnectStoragePool, new ConnectStoragePoolVDSCommandParameters(getVds() .getId(), storagePoolId, getVds() .getvds_spm_id(), getMasterDomainIdFromDb(), getStoragePool().getmaster_domain_version())) .getSucceeded(); } catch (RuntimeException exp) { log.errorFormat("Could not connect host {0} to pool {1}", getVds() .getvds_name(), getStoragePool().getname()); return false; } }
Source:
<code>public String apply(@Nullable SegmentStoreStatisticsEntry stat) { String original = (stat == null) ? "null" : stat.getName(); Collection<ISymbolProvider> symbolProviders = fSymbolProviders; <START> <END> for (ISymbolProvider symbol : symbolProviders) { try { Long address = Long.decode(original); String res = symbol.getSymbolText(address); if (res != null) { return res; } return "0x" + Long.toHexString(address); } catch (NumberFormatException e) { } } return original; }</code><technical_language>Long address = null</technical_language>

Target:
public String apply(@Nullable SegmentStoreStatisticsEntry stat) { String original = (stat == null) ? "null" : stat.getName(); Collection<ISymbolProvider> symbolProviders = fSymbolProviders; Long address = null; for (ISymbolProvider symbol : symbolProviders) { try { address = Long.decode(original); String res = symbol.getSymbolText(address); if (res != null) { return res; } } catch (NumberFormatException e) { } } return address != null ? "0x" + Long.toHexString(address) : original; }
Source:
<code>public DocumentModel getEntryFromSource(String id, boolean fetchReferences) throws DirectoryException { String idFieldName = directory.getSchemaFieldMap().get(getIdField()).getName().getPrefixedName(); DocumentModelList result = doQuery(Collections.singletonMap(idFieldName, id), Collections.emptySet(), <START> Collections.emptyMap(), true, -1, 0, false); <END> if (result.isEmpty()) { return null; } DocumentModel docModel = result.get(0); if (isMultiTenant()) { String tenantId = getCurrentTenantId(); if (StringUtils.isNotBlank(tenantId)) { String entryTenantId = (String) docModel.getProperty(schemaName, TENANT_ID_FIELD); if (StringUtils.isNotBlank(entryTenantId) && !entryTenantId.equals(tenantId)) { return null; } } } return docModel; }</code><technical_language>give a limit == 1 doQuery interested in element</technical_language>

Target:
public DocumentModel getEntryFromSource(String id, boolean fetchReferences) throws DirectoryException { String idFieldName = directory.getSchemaFieldMap().get(getIdField()).getName().getPrefixedName(); DocumentModelList result = doQuery(Collections.singletonMap(idFieldName, id), Collections.emptySet(), Collections.emptyMap(), true, 1, 0, false); if (result.isEmpty()) { return null; } DocumentModel docModel = result.get(0); if (isMultiTenant()) { if (!checkEntryTenantId((String) docModel.getProperty(schemaName, TENANT_ID_FIELD))) { return null; } } return docModel; }
Source:
<code>private static boolean isStringLength(ExpressionTree str, ExpressionTree tree) { Symbol symbol = symbol(str); if (symbol != null && tree.is(Kind.METHOD_INVOCATION)) { MethodInvocationTree invocation = (MethodInvocationTree) tree; if (STRING_LENGTH.matches(invocation) && invocation.methodSelect().is(Kind.MEMBER_SELECT)) { <START> return symbol.equals(symbol(((MemberSelectExpressionTree) invocation.methodSelect()).expression())); <END> } } return false; }</code><technical_language>reuse isSameSymbol simplify this method a bit</technical_language>

Target:
private static boolean isStringLength(ExpressionTree str, ExpressionTree tree) { if (tree.is(Kind.METHOD_INVOCATION)) { MethodInvocationTree invocation = (MethodInvocationTree) tree; if (STRING_LENGTH.matches(invocation) && invocation.methodSelect().is(Kind.MEMBER_SELECT)) { return isSameSymbol(str, ((MemberSelectExpressionTree) invocation.methodSelect()).expression()); } } return false; }
Source:
<code>public void flushHeadEvenWhenExceptionHappens() throws IOException { final OutputStream output = Mockito.mock(OutputStream.class); final IOException exception = new IOException("Failure"); <START> Mockito.doThrow(exception).when(output) <END> .write( Mockito.any(byte[].class), Mockito.anyInt(), Mockito.anyInt() ); try { new RsPrint(new RsText("World!")) .printHead(output); } catch (final IOException ex) { if (!ex.equals(exception)) { throw ex; } } Mockito.verify(output).flush(); }</code><technical_language>@t-izbassar "Mockito" here. Further, reuse fake class test</technical_language>

Target:
public void flushHeadEvenWhenExceptionHappens() throws IOException { final IOException exception = new IOException("Error"); final FailOutputStream output = new FailOutputStream(exception); try { new RsPrint(new RsText("World!")) .printHead(output); } catch (final IOException ex) { if (!ex.equals(exception)) { throw ex; } } MatcherAssert.assertThat( output.haveFlushed(), Matchers.is(true) ); }
Source:
<code>@Test public void testRequestSuccess() throws Throwable { enqueueFromFile("announce_2016_11_21.json"); AnnouncementClient.Callback cb = mock(AnnouncementClient.Callback.class); request(cb); server().takeRequest(); <START> verify(cb).success(eq(new ArrayList<Card>())); <END> verify(cb, never()).error(any(Throwable.class)); }</code><technical_language>I anyListOf(Card.class), eq(Collections.emptyList()), a custom empty list Matcher, clearer cards back</technical_language>

Target:
@Test public void testRequestSuccess() throws Throwable { enqueueFromFile("announce_2016_11_21.json"); Callback cb = mock(Callback.class); request(cb); server().takeRequest(); verify(cb).success(anyListOf(Card.class)); verify(cb, never()).error(any(Throwable.class)); }
Source:
<code>public RealmIdentity getRealmIdentity(final Principal principal) throws RealmUnavailableException { if (principal instanceof NamePrincipal) { return new KeyStoreRealmIdentity(principal.getName()); } else { final X500Principal x500Principal = X500PrincipalUtil.asX500Principal(principal); if (x500Principal == null) { return RealmIdentity.NON_EXISTENT; } else { final KeyStore keyStore = this.keyStore; try { final Enumeration<String> aliases = keyStore.aliases(); <START> while (aliases.hasMoreElements()) { <END> final String alias = aliases.nextElement(); if (keyStore.isCertificateEntry(alias)) { final Certificate certificate = keyStore.getCertificate(alias); if (certificate instanceof X509Certificate && X500PrincipalUtil.asX500Principal(((X509Certificate) certificate).getSubjectX500Principal()).equals(x500Principal)) { return new KeyStoreRealmIdentity(alias); } } } } catch (KeyStoreException e) { throw ElytronMessages.log.failedToReadKeyStore(e); } return RealmIdentity.NON_EXISTENT; } } }</code><technical_language>is check of presence of certificate alias left for next processing, in case (principal instanceof NamePrincipal) == true</technical_language>

Target:
public RealmIdentity getRealmIdentity(final Principal principal) throws RealmUnavailableException { if (principal instanceof NamePrincipal) { return new KeyStoreRealmIdentity(principal.getName()); } else { final X500Principal x500Principal = X500PrincipalUtil.asX500Principal(principal); if (x500Principal == null) { return RealmIdentity.NON_EXISTENT; } else { final KeyStore keyStore = this.keyStore; try { final Enumeration<String> aliases = keyStore.aliases(); while (aliases.hasMoreElements()) { final String alias = aliases.nextElement(); if (keyStore.isCertificateEntry(alias)) { final Certificate certificate = keyStore.getCertificate(alias); if (certificate instanceof X509Certificate && x500Principal.equals(X500PrincipalUtil.asX500Principal(((X509Certificate) certificate).getSubjectX500Principal()))) { return new KeyStoreRealmIdentity(alias); } } } } catch (KeyStoreException e) { throw ElytronMessages.log.failedToReadKeyStore(e); } return RealmIdentity.NON_EXISTENT; } } }
Source:
<code>private void collectReferencedTables(ASTIterator iterator, Set<String> result) { while ( iterator.hasNext() ) { AST node = iterator.nextNode(); if ( node instanceof FromReferenceNode ) { FromReferenceNode fromReferenceNode = (FromReferenceNode) node; String[] tables = fromReferenceNode.getReferencedTables(); <START> if ( tables != null ) { <END> Collections.addAll(result, tables); } } else if (node instanceof SqlFragment) { SqlFragment sqlFragment = (SqlFragment) node; FromElement fromElement = sqlFragment.getFromElement(); String role = fromElement.getRole(); if ( role != null ) { result.add( fromElement.getOrigin().getPropertyTableName(role.substring(role.lastIndexOf('.') + 1)) ); } AST withClauseAst = fromElement.getWithClauseAst(); if ( withClauseAst != null ) { collectReferencedTables( new ASTIterator( withClauseAst ), result ); } } } }</code><technical_language>Again, purpose avoid array list</technical_language>

Target:
private void collectReferencedTables(ASTIterator iterator, Set<String> result) { while ( iterator.hasNext() ) { AST node = iterator.nextNode(); if ( node instanceof FromReferenceNode ) { FromReferenceNode fromReferenceNode = (FromReferenceNode) node; String[] tables = fromReferenceNode.getReferencedTables(); if ( tables != null ) { Collections.addAll(result, tables); } } else if (node instanceof SqlFragment) { SqlFragment sqlFragment = (SqlFragment) node; FromElement fromElement = sqlFragment.getFromElement(); if (fromElement != null) { String role = fromElement.getRole(); if ( role != null ) { result.add( fromElement.getOrigin().getPropertyTableName(role.substring(role.lastIndexOf('.') + 1)) ); } AST withClauseAst = fromElement.getWithClauseAst(); if ( withClauseAst != null ) { collectReferencedTables( new ASTIterator( withClauseAst ), result ); } } } } }
Source:
<code>private void setSalienceByRowNumbers( final AttributeCol52 modelColumn, final int iModelColumn ) { <START> int salience = (modelColumn.isReverseOrder() ? model.getData().size() : 1); <END> for (int rowNumber = 0; rowNumber < model.getData().size(); rowNumber++) { final List<DTCellValue52> modelRow = model.getData().get( rowNumber ); final DTCellValue52 modelCell = modelRow.get( iModelColumn ); modelCell.setNumericValue( salience ); uiModel.setCellValueInternal(rowNumber, iModelColumn, gridWidgetCellFactory.convertCell( modelCell, modelColumn, cellUtilities, columnUtilities ) ); if ( modelColumn.isReverseOrder() ) { salience--; } else { salience++; } } uiModel.indexColumn( iModelColumn ); }</code><technical_language>Do need this parentheses</technical_language>

Target:
private void setSalienceByRowNumbers( final AttributeCol52 modelColumn, final int iModelColumn ) { int salience = modelColumn.isReverseOrder() ? model.getData().size() : 1; for (int rowNumber = 0; rowNumber < model.getData().size(); rowNumber++) { final List<DTCellValue52> modelRow = model.getData().get( rowNumber ); final DTCellValue52 modelCell = modelRow.get( iModelColumn ); modelCell.setNumericValue( salience ); uiModel.setCellValueInternal(rowNumber, iModelColumn, gridWidgetCellFactory.convertCell( modelCell, modelColumn, cellUtilities, columnUtilities ) ); if ( modelColumn.isReverseOrder() ) { salience--; } else { salience++; } } uiModel.indexColumn( iModelColumn ); }
Source:
<code>public void saveOrUpdate(ChannelDTO channel) { Assert.notNull(channel); <START> Assert.notNull(channel.getId()); <END> Assert.notNull(channel.getName()); ChannelEntity entity = modelMapper.map(channel, ChannelEntity.class); try { channelRepository.save(entity); } catch (ConstraintViolationException | DataIntegrityViolationException ex) { log.error("Save to repository failed.", ex); String channelName = channel.getName(); throw new DuplicateRecordException(channelName, "Duplication occurred when saving channel: " + channelName, ex); } }</code><technical_language>new channels created id-s, this assertion prevent inserting new channels. Please failing integration tests</technical_language>

Target:
public void saveOrUpdate(ChannelDTO channel) { Assert.notNull(channel); Assert.notNull(channel.getName()); ChannelEntity entity = modelMapper.map(channel, ChannelEntity.class); try { channelRepository.save(entity); } catch (ConstraintViolationException | DataIntegrityViolationException ex) { log.error("Save to repository failed.", ex); String channelName = channel.getName(); throw new DuplicateRecordException(channelName, "Duplication occurred when saving channel: " + channelName, ex); } }
Source:
<code>private ScriptEngine buildEngine() throws ScriptException, IOException { ScriptEngine nashorn = new ScriptEngineManager().getEngineByName("nashorn"); Map<String, Object> data = Maps.newHashMap(); this._bindings = new SimpleBindings(data); data.put("__tapestry", buildNashornModuleLoader(nashorn)); nashorn.eval(read("META-INF/modules/eddyson/react/isomorphic/polyfill.js"), this._bindings); <START> nashorn.eval(read("META-INF/modules/eddyson/react/isomorphic/r.js"), this._bindings); <END> nashorn.eval(read("META-INF/modules/eddyson/react/isomorphic/r-config.js"), this._bindings); return nashorn; }</code><technical_language>I this loaded a webjar. a special reason include file in PR</technical_language>

Target:
private ScriptEngine buildEngine() throws ScriptException, IOException { ScriptEngine nashorn = new ScriptEngineManager().getEngineByName("nashorn"); nashorn.getBindings(ScriptContext.ENGINE_SCOPE).put("__tapestry", this.moduleLoaderFactory.buildModuleLoader(nashorn)); nashorn.eval(read(classpathResource("de/eddyson/tapestry/react/services/isomorphic/polyfill.js"))); nashorn.eval(read(classpathResource("de/eddyson/tapestry/react/services/isomorphic/r-patched.js"))); nashorn.eval(read(classpathResource("de/eddyson/tapestry/react/services/isomorphic/r-config.js"))); nashorn.eval(read(classpathResource("de/eddyson/tapestry/react/services/isomorphic/run.js"))); return nashorn; }