auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected String getMemoryArgs() { <START> return "-Xms1303m -Xmx1303m -XX:MaxPermSize=256m "; END> }</code><technical_language>1303m! talk small memory footprint :-)</technical_language>

Target:
protected String getMemoryArgs() { return "-Xms64m -Xmx512m -XX:MaxPermSize=256m "; }
Source:
<code>public List<TopicRef> mergeTags(Collection<TopicRef>... topicCollections) { ImmutableSet.Builder<Equivalence.Wrapper<TopicRef>> setBuilder = new ImmutableSet.Builder<>(); setBuilder.addAll( Arrays.asList(topicCollections).stream() <START> .flatMap(topicCollection -> topicCollection.stream()) <END> .map(equivalator::wrap) .collect(Collectors.toList())); return setBuilder.build().stream() .map(Equivalence.Wrapper::get) .collect(Collectors.toList()); }</code><technical_language>a method reference</technical_language>

Target:
public List<TopicRef> mergeTags(Collection<TopicRef>... topicCollections) { Set<Equivalence.Wrapper<TopicRef>> dedupedTopics = Arrays.asList(topicCollections).stream() .flatMap(topicCollection -> topicCollection.stream()) .map(equivalator::wrap) .collect(ImmutableCollectors.toSet()); return dedupedTopics.stream() .map(Equivalence.Wrapper::get) .collect(Collectors.toList()); }
Source:
<code>private void fillGraphFromAGroup(final List<? extends PhysicalLocation> wholeList, final List<Integer> groupList, final boolean logProgress, final ProgressLogger progressLoggerForKeeper, final int distance, final GraphUtils.Graph<Integer> opticalDistanceRelationGraph) { for (int i = 0; i < groupList.size(); i++) { final int iIndex = groupList.get(i); final PhysicalLocation currentLoc = wholeList.get(iIndex); if (logProgress) { progressLoggerForKeeper.record(String.format("%d", currentLoc.getReadGroup()), currentLoc.getX()); } for (int j = i + 1; j < groupList.size(); j++) { final int jIndex = groupList.get(j); PhysicalLocation other = wholeList.get(jIndex); <START> if (closeEnougnShort(currentLoc, other, distance)) { <END> opticalDistanceRelationGraph.addEdge(iIndex, jIndex); } } } }</code><technical_language>misspelled enough Also, this method, longer method closeEnough else this method..</technical_language>

Target:
private void fillGraphFromAGroup(final List<? extends PhysicalLocation> wholeList, final List<Integer> groupList, final boolean logProgress, final ProgressLogger progressLoggerForKeeper, final int distance, final GraphUtils.Graph<Integer> opticalDistanceRelationGraph) { for (int i = 0; i < groupList.size(); i++) { final int iIndex = groupList.get(i); final PhysicalLocation currentLoc = wholeList.get(iIndex); if (logProgress) { progressLoggerForKeeper.record(String.format("%d", currentLoc.getReadGroup()), currentLoc.getX()); } for (int j = i + 1; j < groupList.size(); j++) { final int jIndex = groupList.get(j); final PhysicalLocation other = wholeList.get(jIndex); if (closeEnoughShort(currentLoc, other, distance)) { opticalDistanceRelationGraph.addEdge(iIndex, jIndex); } } } }
Source:
<code>private synchronized void runHooks() { if (m_iAmAServer && !m_crashing && ShutdownHooks.m_crashMessage) { VoltLogger voltLogger = new VoltLogger("HOST"); <START> voltLogger.warn("******************************************************************************************"); <END> voltLogger.warn("********* The VoltDB server will shut down due to a control-C or other JVM exit. *********"); voltLogger.warn("******************************************************************************************\n"); } for (Entry<Integer, List<ShutdownTask>> tasks : m_shutdownTasks.entrySet()) { for (ShutdownTask task : tasks.getValue()) { if (!m_crashing || (m_crashing && task.m_runOnCrash)) { try { task.m_action.run(); } catch (Exception e) { new VoltLogger("CONSOLE").warn("Exception while running shutdown hooks.", e); } } } } VoltLogger.shutdownAsynchronousLogging(); if (m_finalAction != null) { try { m_finalAction.run(); } catch (Exception e) } }</code><technical_language>original "CONSOLE" log add ASCII art original message</technical_language>

Target:
private synchronized void runHooks() { if (m_iAmAServer && !m_crashing && ShutdownHooks.m_crashMessage) { VoltLogger voltLogger = new VoltLogger("CONSOLE"); String msg = "The VoltDB server will shut down due to a control-C or other JVM exit."; CoreUtils.PrintGoodLookingLog(voltLogger, msg, Level.WARN); } for (Entry<Integer, List<ShutdownTask>> tasks : m_shutdownTasks.entrySet()) { for (ShutdownTask task : tasks.getValue()) { if (!m_crashing || (m_crashing && task.m_runOnCrash)) { try { task.m_action.run(); } catch (Exception e) { new VoltLogger("CONSOLE").warn("Exception while running shutdown hooks.", e); } } } } VoltLogger.shutdownAsynchronousLogging(); if (m_finalAction != null) { try { m_finalAction.run(); } catch (Exception e) } }
Source:
<code>public void formatValue(String fieldName, RefObject<String> relations, RefObject<String> value, boolean caseSensitive) { if (StringHelper.EqOp(fieldName, "CREATIONDATE")) { <START> java.util.Date tmp = new java.util.Date(java.util.Date.parse(StringHelper.trim(value.argvalue, '\''))); <END> value.argvalue = StringFormat.format("'%1$s'", tmp); } else { super.formatValue(fieldName, relations, value, caseSensitive); } }</code><technical_language>import java.util.Date ^^</technical_language>

Target:
public void formatValue(String fieldName, RefObject<String> relations, RefObject<String> value, boolean caseSensitive) { if (StringHelper.EqOp(fieldName, "CREATIONDATE")) { Date tmp = new Date(Date.parse(StringHelper.trim(value.argvalue, '\''))); value.argvalue = StringFormat.format("'%1$s'", tmp); } else { super.formatValue(fieldName, relations, value, caseSensitive); } }
Source:
<code>private void configureWorkerIntegrationFlow() { Assert.notNull(this.inputChannel, "An InputChannel must be provided"); Assert.notNull(this.jobExplorer, "A JobExplorer must be provided"); if (this.stepLocator == null) { BeanFactoryStepLocator beanFactoryStepLocator = new BeanFactoryStepLocator(); beanFactoryStepLocator.setBeanFactory(this.beanFactory); this.stepLocator = beanFactoryStepLocator; } if (this.outputChannel == null) { this.outputChannel = new NullChannel(); } StepExecutionRequestHandler stepExecutionRequestHandler = new StepExecutionRequestHandler(); stepExecutionRequestHandler.setJobExplorer(this.jobExplorer); stepExecutionRequestHandler.setStepLocator(this.stepLocator); StandardIntegrationFlow standardIntegrationFlow = IntegrationFlows .from(this.inputChannel) <START> .handle(stepExecutionRequestHandler, SERVICE_ACTIVATOR_METHOD_NAME) <END> .channel(this.outputChannel) .get(); IntegrationFlowContext integrationFlowContext = this.beanFactory.getBean(IntegrationFlowContext.class); integrationFlowContext.registration(standardIntegrationFlow) .autoStartup(false) .register(); }</code><technical_language>A debug log message indicating null channel configured master poll for results a good idea</technical_language>

Target:
private void configureWorkerIntegrationFlow() { Assert.notNull(this.inputChannel, "An InputChannel must be provided"); Assert.notNull(this.jobExplorer, "A JobExplorer must be provided"); if (this.stepLocator == null) { BeanFactoryStepLocator beanFactoryStepLocator = new BeanFactoryStepLocator(); beanFactoryStepLocator.setBeanFactory(this.beanFactory); this.stepLocator = beanFactoryStepLocator; } if (this.outputChannel == null) { if (logger.isDebugEnabled()) { logger.debug("The output channel is set to a NullChannel. " + "The master step must poll the job repository for workers status."); } this.outputChannel = new NullChannel(); } StepExecutionRequestHandler stepExecutionRequestHandler = new StepExecutionRequestHandler(); stepExecutionRequestHandler.setJobExplorer(this.jobExplorer); stepExecutionRequestHandler.setStepLocator(this.stepLocator); StandardIntegrationFlow standardIntegrationFlow = IntegrationFlows .from(this.inputChannel) .handle(stepExecutionRequestHandler, SERVICE_ACTIVATOR_METHOD_NAME) .channel(this.outputChannel) .get(); IntegrationFlowContext integrationFlowContext = this.beanFactory.getBean(IntegrationFlowContext.class); integrationFlowContext.registration(standardIntegrationFlow) .autoStartup(false) .register(); }
Source:
<code>protected Builder() { id("packet") .name("Packet API") <START> .identityName("We can use project Id") <END> .credentialName("Must be Token") .documentation(URI.create("<LINK_1>")) .defaultEndpoint("<LINK_0>") .defaultProperties(PacketApiMetadata.defaultProperties()) .view(typeToken(ComputeServiceContext.class)) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(PacketHttpApiModule.class) .build()); }</code><technical_language>needs put identity. Users read this put, concrete pick option</technical_language>

Target:
protected Builder() { id("packet") .name("Packet API") .identityName("Packet Project Id") .credentialName("Must be Packet Token") .documentation(URI.create("<LINK_1>")) .defaultEndpoint("<LINK_0>") .defaultProperties(PacketApiMetadata.defaultProperties()) .defaultModules(ImmutableSet.<Class<? extends Module>>builder() .add(PacketHttpApiModule.class) .add(PacketComputeParserModule.class) .build()); }
Source:
<code>void refreshChildren() { IFolder folder = getResource(); Map<String, ITmfProjectModelElement> childrenMap = new HashMap<>(); for (TmfTraceElement trace : getTraces()) { childrenMap.put(trace.getElementPath(), trace); } List<IResource> members = getTraceResources(); for (IResource resource : members) { String name = resource.getName(); String elementPath = resource.getFullPath().makeRelativeTo(folder.getFullPath()).toString(); ITmfProjectModelElement element = childrenMap.get(elementPath); if (element instanceof TmfTraceElement) { childrenMap.remove(elementPath); } else { element = new TmfTraceElement(name, resource, this); } } for (ITmfProjectModelElement danglingChild : childrenMap.values()) { removeChild(danglingChild); } super.refreshChildren(); ITmfTrace experiment = getTrace(); if (experiment == null) { return; } Map<String, TmfAnalysisElement> analysisMap = new HashMap<>(); for (TmfAnalysisElement analysis : getAvailableAnalysis()) { <START> childrenMap.put(analysis.getAnalysisId(), <END> analysis); } for (IAnalysisModuleHelper module : TmfAnalysisManager.getAnalysisModules().values()) { if (!analysisMap.containsKey(module.getId()) && module.appliesToExperiment() && (experiment.getAnalysisModule(module.getId()) != null)) { IFolder newresource = ResourcesPlugin.getWorkspace().getRoot().getFolder(fResource.getFullPath().append(module.getId())); TmfAnalysisElement analysis = new TmfAnalysisElement(module.getName(), newresource, this, module); analysis.refreshChildren(); analysisMap.put(module.getId(), analysis); } } }</code><technical_language>analysisMap</technical_language>

Target:
void refreshChildren() { IFolder folder = getResource(); Map<String, ITmfProjectModelElement> childrenMap = new HashMap<>(); for (TmfTraceElement trace : getTraces()) { childrenMap.put(trace.getElementPath(), trace); } List<IResource> members = getTraceResources(); for (IResource resource : members) { String name = resource.getName(); String elementPath = resource.getFullPath().makeRelativeTo(folder.getFullPath()).toString(); ITmfProjectModelElement element = childrenMap.get(elementPath); if (element instanceof TmfTraceElement) { childrenMap.remove(elementPath); } else { element = new TmfTraceElement(name, resource, this); } } for (ITmfProjectModelElement danglingChild : childrenMap.values()) { removeChild(danglingChild); } super.refreshChildren(); ITmfTrace experiment = getTrace(); if (experiment == null) { return; } Map<String, TmfAnalysisElement> analysisMap = new HashMap<>(); for (TmfAnalysisElement analysis : getAvailableAnalysis()) { analysisMap.put(analysis.getAnalysisId(), analysis); } for (IAnalysisModuleHelper module : TmfAnalysisManager.getAnalysisModules().values()) { if (!analysisMap.containsKey(module.getId()) && module.appliesToExperiment() && (experiment.getAnalysisModule(module.getId()) != null)) { IFolder newresource = ResourcesPlugin.getWorkspace().getRoot().getFolder(fResource.getFullPath().append(module.getId())); TmfAnalysisElement analysis = new TmfAnalysisElement(module.getName(), newresource, this, module); analysis.refreshChildren(); analysisMap.put(module.getId(), analysis); } } }
Source:
<code>public boolean validateBufferCapacity(int bufferCapacity) { int numBucketsNeeded = (int) Math.ceil((limit + 1) / maxLoadFactor); int targetTableArenaSize = numBucketsNeeded * bucketSize * 2; int heapSize = (limit + 1) * (Ints.BYTES); int requiredSize = targetTableArenaSize + heapSize; if (bufferCapacity < requiredSize) { <START> log.info( <END> "Buffer capacity [%d] is too small for limit[%d] with load factor[%f], " + "minimum bytes needed: [%d], not applying limit push down optimization.", bufferCapacity, limit, maxLoadFactor, requiredSize ); return false; } else { return true; } }</code><technical_language>I "debug" is -- this kind of diagnostic is a bit loud for logging default</technical_language>

Target:
public boolean validateBufferCapacity(int bufferCapacity) { int numBucketsNeeded = (int) Math.ceil((limit + 1) / maxLoadFactor); int targetTableArenaSize = numBucketsNeeded * bucketSize * 2; int heapSize = (limit + 1) * (Ints.BYTES); int requiredSize = targetTableArenaSize + heapSize; if (bufferCapacity < requiredSize) { log.debug( "Buffer capacity [%,d] is too small for limit[%d] with load factor[%f], " + "minimum bytes needed: [%,d], not applying limit push down optimization.", bufferCapacity, limit, maxLoadFactor, requiredSize ); return false; } else { return true; } }
Source:
<code>protected void initDisplayer() { completeTaskCallback(this); inlineFrame.setWidth("100%"); inlineFrame.setHeight("100%"); inlineFrame.getElement().setPropertyBoolean("webkitallowfullscreen", true); inlineFrame.getElement().setPropertyBoolean("mozallowfullscreen", true); inlineFrame.getElement().setPropertyBoolean("allowfullscreen", true); inlineFrame.getElement().getStyle().setBorderWidth(0, Style.Unit.PX); inlineFrame.getElement().getStyle().setPosition(Position.ABSOLUTE); inlineFrame.getElement().getStyle().setTop(0, Unit.PX); inlineFrame.getElement().getStyle().setLeft(0, Unit.PX); inlineFrame.setUrl(renderingSettings.getUrl()); <START> FlowPanel div = new FlowPanel(); <END> div.getElement().getStyle().setPosition(Position.RELATIVE); div.getElement().getStyle().setOverflow(Overflow.HIDDEN); div.getElement().getStyle().setPaddingTop(40, Unit.PCT); div.add(inlineFrame); formContainer.add(div); }</code><technical_language>suggestion FlowPanel div = GWT.create(FlowPanel.class);</technical_language>

Target:
protected void initDisplayer() { completeTaskCallback(this); inlineFrame.setWidth("100%"); inlineFrame.setHeight("100%"); inlineFrame.getElement().setPropertyBoolean("webkitallowfullscreen", true); inlineFrame.getElement().setPropertyBoolean("mozallowfullscreen", true); inlineFrame.getElement().setPropertyBoolean("allowfullscreen", true); inlineFrame.getElement().getStyle().setBorderWidth(0, Style.Unit.PX); inlineFrame.getElement().getStyle().setPosition(Position.ABSOLUTE); inlineFrame.getElement().getStyle().setTop(0, Unit.PX); inlineFrame.getElement().getStyle().setLeft(0, Unit.PX); inlineFrame.setUrl(renderingSettings.getUrl()); FlowPanel div = GWT.create(FlowPanel.class); div.getElement().getStyle().setPosition(Position.RELATIVE); div.getElement().getStyle().setOverflow(Overflow.HIDDEN); div.getElement().getStyle().setPaddingTop(40, Unit.PCT); div.add(inlineFrame); formContainer.add(div); }
Source:
<code>private boolean isNonconformityForRemovedRequirement(SurveillanceNonconformityEntity nonconformity) { if (!ff4j.check(FeatureList.EFFECTIVE_RULE_DATE_PLUS_ONE_WEEK)) { return false; } return nonconformity != null <START> && nonconformity.getType().equalsIgnoreCase("170.523 (k)(2)"); <END> }</code><technical_language>I guilty of this this string a constant somewhere? I referenced in a number of files PR</technical_language>

Target:
private boolean isNonconformityForRemovedRequirement(SurveillanceNonconformityEntity nonconformity) { if (!ff4j.check(FeatureList.EFFECTIVE_RULE_DATE_PLUS_ONE_WEEK)) { return false; } return nonconformity != null && nonconformity.getType().equalsIgnoreCase(NonconformityType.K2.getName()); }
Source:
<code>public int hashCode() { <START> int result = 17; <END> result = 31 * result + super.hashCode(); result = 31 * result + Objects.hashCode(bs); result = 31 * result + Objects.hashCode(join); result = 31 * result + Objects.hashCode(side); result = 31 * result + Objects.hashCode(varOrder); return result; }</code><technical_language>Objects.hash()</technical_language>

Target:
public int hashCode() { return Objects.hash(super.getBatchSize(), super.getColumn(), super.getSpan(), super.getTask(), bs, join, side, varOrder); }
Source:
<code>public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_NORMAL) { if (this.getSide(Vector3.SIDE_DOWN).getId() != SOUL_SAND) { this.getLevel().useBreakOn(this); return Level.BLOCK_UPDATE_NORMAL; } } else if (type == Level.BLOCK_UPDATE_RANDOM) { <START> if (new Random().nextInt(10) == 1) { <END> if (this.meta < 0x02) { BlockNetherWart block = (BlockNetherWart) this.clone(); ++block.meta; BlockGrowEvent ev = new BlockGrowEvent(this, block); Server.getInstance().getPluginManager().callEvent(ev); if (!ev.isCancelled()) { this.getLevel().setBlock(this, ev.getNewState(), true, true); } else { return Level.BLOCK_UPDATE_RANDOM; } } } else { return Level.BLOCK_UPDATE_RANDOM; } } return 0; }</code><technical_language>is ticked randomly, purpose of this? Decreasing chance of growing more</technical_language>

Target:
public int onUpdate(int type) { if (type == Level.BLOCK_UPDATE_NORMAL) { if (this.getSide(Vector3.SIDE_DOWN).getId() != SOUL_SAND) { this.getLevel().useBreakOn(this); return Level.BLOCK_UPDATE_NORMAL; } } else if (type == Level.BLOCK_UPDATE_RANDOM) { if (new Random().nextInt(10) == 1) { if (this.meta < 0x03) { BlockNetherWart block = (BlockNetherWart) this.clone(); ++block.meta; BlockGrowEvent ev = new BlockGrowEvent(this, block); Server.getInstance().getPluginManager().callEvent(ev); if (!ev.isCancelled()) { this.getLevel().setBlock(this, ev.getNewState(), true, true); } else { return Level.BLOCK_UPDATE_RANDOM; } } } else { return Level.BLOCK_UPDATE_RANDOM; } } return 0; }
Source:
<code>protected StreamProcessor createStreamProcessor(final String pId, Map<String, String> map, final CountDownLatch waitStart, final CountDownLatch waitStop) { map.put(ApplicationConfig.PROCESSOR_ID, pId); Config config = new MapConfig(map); <START> JobCoordinator jobCoordinator = Util.getObj(new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName(), JobCoordinatorFactory.class).getJobCoordinator(config); <END> StreamProcessorLifecycleListener listener = new StreamProcessorLifecycleListener() { @Override public void onStart() { if (waitStart != null) { waitStart.countDown(); } LOG.info("onStart is called for pid=" + pId); } @Override public void onShutdown() { if (waitStop != null) { waitStop.countDown(); } LOG.info("onShutdown is called for pid=" + pId); } @Override public void onFailure(Throwable t) { LOG.info("onFailure is called for pid=" + pId); } }; StreamProcessor processor = new StreamProcessor(config, new HashMap<>(), (StreamTaskFactory) TestStreamTask::new, listener, jobCoordinator); return processor; }</code><technical_language>nit. this change IDE? Line long</technical_language>

Target:
protected StreamProcessor createStreamProcessor(final String pId, Map<String, String> map, final CountDownLatch waitStart, final CountDownLatch waitStop) { map.put(ApplicationConfig.PROCESSOR_ID, pId); Config config = new MapConfig(map); String jobCoordinatorFactoryClassName = new JobCoordinatorConfig(config).getJobCoordinatorFactoryClassName(); JobCoordinator jobCoordinator = Util.getObj(jobCoordinatorFactoryClassName, JobCoordinatorFactory.class).getJobCoordinator(config); StreamProcessorLifecycleListener listener = new StreamProcessorLifecycleListener() { @Override public void onStart() { if (waitStart != null) { waitStart.countDown(); } LOG.info("onStart is called for pid=" + pId); } @Override public void onShutdown() { if (waitStop != null) { waitStop.countDown(); } LOG.info("onShutdown is called for pid=" + pId); } @Override public void onFailure(Throwable t) { LOG.info("onFailure is called for pid=" + pId); } }; StreamProcessor processor = new StreamProcessor(config, new HashMap<>(), (StreamTaskFactory) TestStreamTask::new, listener, jobCoordinator); return processor; }
Source:
<code>public void getReportTemplateHome_shouldCreateADirectoryUnderTheOpenmrsApplicationDataDirectoryIfGPValueIsRelative() throws Exception { File openmrsApplicationDataDirectory = temporaryFolder.newFolder("openmrs_home"); OpenmrsUtil.setApplicationDataDirectory(openmrsApplicationDataDirectory.getAbsolutePath()); administrationService.setGlobalProperty(RadiologyConstants.GP_MRRT_REPORT_TEMPLATE_DIR, "mrrt_templates"); File templateHome = radiologyProperties.getReportTemplateHome(); assertNotNull(templateHome); assertThat(templateHome.exists(), is(true)); assertThat(templateHome.getParentFile() .getName(), is(openmrsApplicationDataDirectory.getName())); <START> } <END></code><technical_language>@ivange94 dont test getReportTemplateHome() is is. test is application dir. good. GP GP_MRRT_REPORT_TEMPLATE_DIR is</technical_language>

Target:
public void getReportTemplateHome_shouldCreateADirectoryUnderTheOpenmrsApplicationDataDirectoryIfGPValueIsRelative() throws Exception { File openmrsApplicationDataDirectory = temporaryFolder.newFolder("openmrs_home"); OpenmrsUtil.setApplicationDataDirectory(openmrsApplicationDataDirectory.getAbsolutePath()); administrationService.setGlobalProperty(RadiologyConstants.GP_MRRT_REPORT_TEMPLATE_DIR, "mrrt_templates"); File templateHome = radiologyProperties.getReportTemplateHome(); File templateHomeFromGP = new File(administrationService.getGlobalProperty(RadiologyConstants.GP_MRRT_REPORT_TEMPLATE_DIR)); assertNotNull(templateHome); assertThat(templateHome.exists(), is(true)); assertThat(templateHome.getName(), is(templateHomeFromGP.getName())); assertThat(templateHome.getParentFile() .getName(), is(openmrsApplicationDataDirectory.getName())); }
Source:
<code>private void processProbe(LookupSource lookupSource) { <START> if (probe == null) { <END> return; } Counter lookupPositionsConsidered = new Counter(); while (true) { if (probe.getPosition() >= 0) { if (!joinCurrentPosition(lookupSource, lookupPositionsConsidered)) { break; } if (!currentProbePositionProducedRow) { currentProbePositionProducedRow = true; if (!outerJoinCurrentPosition(lookupSource)) { break; } } } currentProbePositionProducedRow = false; if (!advanceProbePosition(lookupSource)) { break; } statisticsCounter.recordProbe(joinSourcePositions); joinSourcePositions = 0; } }</code><technical_language>replace verify(probe != null)</technical_language>

Target:
private void processProbe(LookupSource lookupSource) { verify(probe != null); DriverYieldSignal yieldSignal = operatorContext.getDriverContext().getYieldSignal(); while (!yieldSignal.isSet()) { if (probe.getPosition() >= 0) { if (!joinCurrentPosition(lookupSource, yieldSignal)) { break; } if (!currentProbePositionProducedRow) { currentProbePositionProducedRow = true; if (!outerJoinCurrentPosition(lookupSource)) { break; } } } currentProbePositionProducedRow = false; if (!advanceProbePosition(lookupSource)) { break; } statisticsCounter.recordProbe(joinSourcePositions); joinSourcePositions = 0; } }
Source:
<code>public void testUnionAndFilter() throws Exception { <START> runSimpleTests(); <END> }</code><technical_language>Simple test is verify result stat. #971</technical_language>

Target:
public void testUnionAndFilter() throws Exception { Optional<TajoResultSetBase[]> existing = runSimpleTests(); verifyResultStats(existing, 5L); }
Source:
<code>private void cancel() { <START> setConfirmWindow(null); <END> }</code><technical_language>other list models setWindow(null) well. if need do too, though</technical_language>

Target:
private void cancel() { }
Source:
<code>public boolean isRedirectRequested(HttpResponse httpResponse, HttpContext httpContext) { <START> return proxiedHandler.isRedirectRequested(httpResponse, httpContext); <END> }</code><technical_language>proxiedHandler null in next method, right</technical_language>

Target:
public boolean isRedirectRequested(HttpResponse httpResponse, HttpContext httpContext) { return proxiedHandler != null ? proxiedHandler.isRedirectRequested(httpResponse, httpContext) : false; }
Source:
<code>private static String readLamiFile(String filename) { String fileContent = ""; try { <START> URL url = new URL("platform:/plugin/org.eclipse.tracecompass.analysis.lami.core.tests/testfiles/" + filename); <END> try (InputStream inputStream = url.openConnection().getInputStream()) { BufferedReader in = new BufferedReader(new InputStreamReader(inputStream)); fileContent = in.lines().collect(Collectors.joining()); } } catch (IOException e) { e.printStackTrace(); } return fileContent; }</code><technical_language>I guess works too, this string declared statically. in os.linux.core.tests: Activator#getAbsoluteFilePath, write plugin name (in case decides move plugin change name, I :p )</technical_language>

Target:
private static String readLamiFile(String filename) { String fileContent = ""; try { URL url = new URL("platform:/plugin/org.eclipse.tracecompass.analysis.lami.core.tests/testfiles/" + filename); try (InputStream inputStream = url.openConnection().getInputStream()) { BufferedReader in = new BufferedReader(new InputStreamReader(inputStream)); fileContent = in.lines().collect(Collectors.joining()); } } catch (IOException e) { fail(e.getMessage()); } return fileContent; }
Source:
<code>public PoolBehavior(Node node, boolean createChannel) { this.node = node; if (!createChannel) { this.channel = null; this.writePromise = null; } else { this.channel = mock(DriverChannel.class); EventLoop eventLoop = mock(EventLoop.class); ChannelConfig config = mock(DefaultSocketChannelConfig.class); this.writePromise = DirectThreadEventExecutor.INSTANCE.newPromise(); <START> when(channel.write(any(Message.class), anyBoolean(), anyMap(), any(ResponseCallback.class))) <END> .thenAnswer( invocation -> { ResponseCallback callback = invocation.getArgument(3); callback.onStreamIdAssigned(1); callbackFuture.complete(callback); return writePromise; }); ChannelFuture closeFuture = mock(ChannelFuture.class); when(channel.closeFuture()).thenReturn(closeFuture); when(channel.eventLoop()).thenReturn(eventLoop); when(channel.config()).thenReturn(config); } }</code><technical_language>reason GlobalEventExecutor performing here? because: stops is * task pending in task queue for 1</technical_language>

Target:
public PoolBehavior(Node node, boolean createChannel) { this.node = node; if (!createChannel) { this.channel = null; this.writePromise = null; } else { this.channel = mock(DriverChannel.class); EventLoop eventLoop = mock(EventLoop.class); ChannelConfig config = mock(DefaultSocketChannelConfig.class); this.writePromise = ImmediateEventExecutor.INSTANCE.newPromise(); when(channel.write(any(Message.class), anyBoolean(), anyMap(), any(ResponseCallback.class))) .thenAnswer( invocation -> { ResponseCallback callback = invocation.getArgument(3); callback.onStreamIdAssigned(1); callbackFuture.complete(callback); return writePromise; }); ChannelFuture closeFuture = mock(ChannelFuture.class); when(channel.closeFuture()).thenReturn(closeFuture); when(channel.eventLoop()).thenReturn(eventLoop); when(channel.config()).thenReturn(config); } }
Source:
<code>public void testUDPconnection() throws Exception { Subject<byte[], byte[]> sub = PublishSubject.create(); SimpleChan simpleadapter = new SimpleChan(sub); TestAwaitableObserver<byte[]> monitor = new TestAwaitableObserver<>(); sub.subscribe(monitor); int port; ServerFrontEnd udpSrv = null; int chances = RETRIES; boolean ready = false; do { chances --; port = <START> rand.nextInt(100) + <END> 8000; try { udpSrv = ServerFrontEnd.udp(simpleadapter, port); udpSrv.startAsync().awaitRunning(); ready = true; } catch (IllegalStateException e) { if (chances <= 0) throw e; } } while (!ready); sendMSG(MSG.getBytes(), port); monitor.awaitOnNext(1, TIMEOUT); assertThat("msg was received", monitor.getOnNextEvents().get(0), equalTo(MSG.getBytes())); udpSrv.stopAsync().awaitTerminated(); }</code><technical_language>1000 chances of conflicts</technical_language>

Target:
public void testUDPconnection() throws Exception { Subject<byte[], byte[]> sub = PublishSubject.create(); SimpleChan simpleadapter = new SimpleChan(sub); TestAwaitableObserver<byte[]> monitor = new TestAwaitableObserver<>(); sub.subscribe(monitor); Pair<ServerFrontEnd, Integer> cnxn = connect(simpleadapter, null); ServerFrontEnd udpSrv = cnxn.getLeft(); int port = cnxn.getRight(); sendMSG(MSG.getBytes(), port); monitor.awaitOnNext(1, TIMEOUT); assertThat("msg was received", monitor.getOnNextEvents().get(0), equalTo(MSG.getBytes())); udpSrv.stopAsync().awaitTerminated(); }
Source:
<code>public void testActionWithPostActionParameters() throws InterruptedException, IOException, ActionNotFoundException { taskID = createTestTask(); activateTrigger(); assertTrue(waitForTaskExecution(taskID)); List<TaskTestObject> fetchedTaskTestObjects = tasksTestService.getTaskTestObjects(); List<TaskTestObject> expectedTaskTestObject = prepareExpectedTaskTestObject(); <START> deleteTask(taskID); <END> removeChannels(channelsDataService.retrieveAll()); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(0))); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(1))); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(2))); }</code><technical_language>deleteTask removeChannels done in method invoked test</technical_language>

Target:
public void testActionWithPostActionParameters() throws InterruptedException, IOException, ActionNotFoundException { taskID = createTestTask(); activateTrigger(); assertTrue(waitForTaskExecution(taskID)); List<TaskTestObject> fetchedTaskTestObjects = tasksTestService.getTaskTestObjects(); List<TaskTestObject> expectedTaskTestObject = prepareExpectedTaskTestObject(); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(0))); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(1))); assertTrue(fetchedTaskTestObjects.contains(expectedTaskTestObject.get(2))); }
Source:
<code>private boolean isDotGit(byte[] buf, int p) { <START> if (ignoreCase || windows) <END> return toLower(buf[p]) == 'g' && toLower(buf[p + 1]) == 'i' && toLower(buf[p + 2]) == 't'; return buf[p] == 'g' && buf[p + 1] == 'i' && buf[p + 2] == 't'; }</code><technical_language>needed, windows implies ignoreCase (unless explicitly chosen setIgnoreCase(false) setSafeForWindows(true))</technical_language>

Target:
private boolean isDotGit(byte[] buf, int p) { if (windows) return toLower(buf[p]) == 'g' && toLower(buf[p + 1]) == 'i' && toLower(buf[p + 2]) == 't'; return buf[p] == 'g' && buf[p + 1] == 'i' && buf[p + 2] == 't'; }
Source:
<code>public void testDeleteTempFileAfterUpload() throws IOException { String key = getRandomString(); final TransferObserver observer = transferUtility.upload(key, inputStream); observer.setTransferListener(new TransferListener() { @Override public void onStateChanged(int id, TransferState state) { Log.d(TAG, "onStateChanged: " + id + ", " + state); switch (state) { case COMPLETED: <START> assertFalse(new File(observer.getAbsoluteFilePath()).exists()); <END> break; } } @Override public void onProgressChanged(int id, long bytesCurrent, long bytesTotal) { Log.i(TAG, String.format("onProgressChanged: %d, total: %d, current: %d", id, bytesTotal, bytesCurrent)); } @Override public void onError(int id, Exception exception) { Log.e(TAG, "Error during upload: " + id, exception); } }); }</code><technical_language>written, I this test succeed onStateChanged is called, this assert statement evaluated. fix this a CountdownLatch, blocking for a seconds end of test allow time for callback called. // Define a CountdownLatch top of test CountDownLatch deleteFileLatch = new CountDownLatch(1); In callback, call countDown if file deleted: case COMPLETED: if(!new File(observer.getAbsoluteFilePath()).exists()) { deleteFileLatch.countDown(); } Then, end of test, validate latch counts some time period: if (!deleteFileLatch.await(2, TimeUnit.SECONDS)) { fail("File deleted upload."); }</technical_language>

Target:
public void testDeleteTempFileAfterUpload() throws IOException { final String key = getRandomString(); observer = transferUtility.upload(key, inputStream); File file = new File(observer.getAbsoluteFilePath()); assertTrue(file.exists()); Context context = InstrumentationRegistry.getInstrumentation().getContext(); TransferStatusUpdater transferStatusUpdater = TransferStatusUpdater.getInstance(context); transferStatusUpdater.updateState(observer.getId(), TransferState.COMPLETED); assertFalse(file.exists()); }
Source:
<code>public static HCatSchema toHiveSchema(Schema schema, HCatSchema tableSchema) { List<HCatFieldSchema> fields = Lists.newArrayList(); for (Schema.Field field : schema.getFields()) { String name = field.getName(); try { Preconditions.checkNotNull(tableSchema.get(name), "Missing field %s in table schema", name); <START> fields.add(new HCatFieldSchema(name, getType(name, field.getSchema()), "")); <END> } catch (HCatException e) { LOG.error("Failed to create HCatFieldSchema field of type from schema", name, field.getSchema().getType()); } } return new HCatSchema(fields); }</code><technical_language>creating TypeInfo field schema, is in tableSchema is guaranteed correct. need perform validation catch mismatches passed in Schema actual HCatSchema</technical_language>

Target:
public static HCatSchema toHiveSchema(Schema schema, HCatSchema tableSchema) { List<HCatFieldSchema> fields = Lists.newArrayList(); for (Schema.Field field : schema.getFields()) { String name = field.getName(); try { HCatFieldSchema hCatFieldSchema = tableSchema.get(name); Preconditions.checkNotNull(hCatFieldSchema, "Missing field %s in table schema", name); PrimitiveTypeInfo hiveType = hCatFieldSchema.getTypeInfo(); PrimitiveTypeInfo type = getType(name, field.getSchema()); if (hiveType != type) { LOG.warn("The given schema for the field does not match the schema from the table. " + "The schema for field be used.", type, name, hiveType, hiveType, name); } fields.add(hCatFieldSchema); } catch (HCatException e) { LOG.error("Failed to create HCatFieldSchema field of type from schema", name, field.getSchema().getType()); } } return new HCatSchema(fields); }
Source:
<code>String getSortedJsonStringValueFromResource(Resource resource) { final Object obj; try { obj = OBJECT_MAPPER.treeToValue(resource.getPropertyBag() , Object.class); <START> final String sortedJson = OBJECT_MAPPER.writeValueAsString(obj); <END> return sortedJson; } catch (JsonProcessingException e) { throw new IllegalStateException("Failed to obtain serialized sorted json"); } }</code><technical_language>final string avoided</technical_language>

Target:
String getSortedJsonStringValueFromResource(Resource resource) { final Object obj; try { obj = OBJECT_MAPPER.treeToValue(resource.getPropertyBag(), Object.class); return OBJECT_MAPPER.writeValueAsString(obj); } catch (JsonProcessingException e) { throw new IllegalStateException("Failed to obtain serialized sorted json"); } }
Source:
<code>private void reload(final InputStream stream) { final BufferedInputStream bufferedStream = new BufferedInputStream( stream, BUFFER_SIZE ); final AlertGroup group; try { group = _objectMapper.readValue(bufferedStream, AlertGroup.class); } catch (final IOException e) { throw new RuntimeException("Could not load alerts", e); } final ImmutableMap.Builder<UUID, Alert> mapBuilder = ImmutableMap.builder(); for (final SerializedAlert fsAlert : group.getAlerts()) { final StringArgGenerator uuidGen = Generators.nameBasedGenerator(_organization.getId()); final UUID uuid = fsAlert.getUUID().orElseGet(() -> computeUUID(uuidGen, fsAlert)); final MetricsQuery query; if (group.getVersion() == 0) { query = new DefaultMetricsQuery.Builder() .setQuery(fsAlert.getQuery().toString()) .setFormat(MetricsQueryFormat.KAIROS_DB) .build(); } else { throw new IllegalArgumentException(String.format("Unhandled alert version %d", group.getVersion())); } final Alert alert = new DefaultAlert.Builder() .setId(uuid) .setName(fsAlert.getName()) .setDescription(fsAlert.getDescription()) .setEnabled(fsAlert.isEnabled()) .setOrganization(_organization) .setQuery(query) .setAdditionalMetadata(fsAlert.getAdditionalMetadata()) .build(); mapBuilder.put(uuid, alert); } <START> synchronized (this) { _alerts = mapBuilder.build(); } <END> }</code><technical_language>synchronized? thought this statement atomic: - mapBuilder.build() is pure (and effectively atomic); - member assignment is atomic (right???); - _alerts = mapBuilder.build() is atomic</technical_language>

Target:
private void reload(final InputStream stream) { final BufferedInputStream bufferedStream = new BufferedInputStream( stream, BUFFER_SIZE ); final AlertGroup group; try { group = _objectMapper.readValue(bufferedStream, AlertGroup.class); } catch (final IOException e) { throw new RuntimeException("Could not load alerts", e); } final ImmutableMap.Builder<UUID, Alert> mapBuilder = ImmutableMap.builder(); for (final SerializedAlert fsAlert : group.getAlerts()) { final StringArgGenerator uuidGen = Generators.nameBasedGenerator(_organization.getId()); final UUID uuid = fsAlert.getUUID().orElseGet(() -> computeUUID(uuidGen, fsAlert)); final MetricsQuery query; if (group.getVersion() == 0) { query = new DefaultMetricsQuery.Builder() .setQuery(fsAlert.getQuery().toString()) .setFormat(MetricsQueryFormat.KAIROS_DB) .build(); } else { throw new IllegalArgumentException(String.format("Unhandled alert version %d", group.getVersion())); } final Alert alert = new DefaultAlert.Builder() .setId(uuid) .setName(fsAlert.getName()) .setDescription(fsAlert.getDescription()) .setEnabled(fsAlert.isEnabled()) .setOrganization(_organization) .setQuery(query) .setAdditionalMetadata(fsAlert.getAdditionalMetadata()) .build(); mapBuilder.put(uuid, alert); } _alerts = mapBuilder.build(); }
Source:
<code>Mono<Response<IndexDocumentsResult>> indexWithResponse(IndexBatch<?> batch, Context context) { return restClient.documents() .indexWithRestResponseAsync(batch, context) .handle((res, sink) -> { <START> if (res.getStatusCode() == 207) { <END> IndexBatchException ex = new IndexBatchException(res.getValue()); sink.error(ex); } else { sink.next(res); } }); }</code><technical_language>a constant MULTI_STATUS_RESPONSE instead of 207</technical_language>

Target:
Mono<Response<IndexDocumentsResult>> indexWithResponse(IndexBatch<?> batch, Context context) { return restClient.documents() .indexWithRestResponseAsync(batch, context) .handle((res, sink) -> { if (res.getStatusCode() == HttpStatus.SC_MULTI_STATUS) { IndexBatchException ex = new IndexBatchException(res.getValue()); sink.error(ex); } else { sink.next(res); } }); }
Source:
<code>private XmlRpcStruct generateOptions() { XmlRpcStruct options = new XmlRpcStruct(); options.add(VdsProperties.connectivityCheck, Boolean.toString(getParameters().isCheckConnectivity())); if (getParameters().isCheckConnectivity()) { int connectivityTimeout = getParameters().getConectivityTimeout(); <START> if (connectivityTimeout <= 0) { <END> connectivityTimeout = Config.<Integer> GetValue(ConfigValues.NetworkConnectivityCheckTimeoutInSeconds); } options.add(VdsProperties.connectivityTimeout, connectivityTimeout); } return options; }</code><technical_language>is this needed? trust other of engine? ;)</technical_language>

Target:
private XmlRpcStruct generateOptions() { XmlRpcStruct options = new XmlRpcStruct(); options.add(VdsProperties.connectivityCheck, Boolean.toString(getParameters().isCheckConnectivity())); if (getParameters().isCheckConnectivity()) { options.add(VdsProperties.connectivityTimeout, getParameters().getConectivityTimeout()); } return options; }
Source:
<code>protected void persistYamlInfoForShutdownHook(YamlLoader loader, String agentHome) throws IOException{ ObjectOutputStream oos = null; FileOutputStream fout = null; YamlConfig config = loader.getYamlConfiguration(); List<Slave> slaveList = config.getSlaves(); List<String> hosts = new ArrayList<String>(); <START> String[] slaveAgentList = null; <END> for(Slave host: slaveList){ for (String str : host.getHosts()) { hosts.add(str); } } slaveAgentList = hosts.toArray(new String[hosts.size()]); BasicYamlConfig agentConfig = new BasicYamlConfig(config.getJumbuneJobName(), config.getMaster().getHost(), config.getMaster().getAgentPort()); agentConfig.setUser(config.getMaster().getUser()); agentConfig.setRsaFile(config.getMaster().getRsaFile()); agentConfig.setDsaFile(config.getMaster().getDsaFile()); agentConfig.setSlaves(slaveAgentList); agentConfig.setTmpDir(config.getsJumbuneHome()); try{ File file = new File(loader.getjHome()+YAML_FILE); if(file.exists()){ file.delete(); } fout = new FileOutputStream(loader.getjHome()+YAML_FILE, true); oos = new ObjectOutputStream(fout); oos.writeObject(agentConfig); }finally{ if(oos != null){ oos.close(); } } RemotingUtil.sendYamlInfoToAgent(loader, agentConfig); }</code><technical_language>Optimize</technical_language>

Target:
protected void persistYamlInfoForShutdownHook(YamlLoader loader, String agentHome) throws IOException{ ObjectOutputStream oos = null; FileOutputStream fout = null; YamlConfig config = loader.getYamlConfiguration(); List<String> hosts = new ArrayList<String>(); String[] slaveAgentList = null; for(Slave host: config.getSlaves()){ for (String str : host.getHosts()) { hosts.add(str); } } slaveAgentList = hosts.toArray(new String[hosts.size()]); BasicYamlConfig agentConfig = new BasicYamlConfig(config.getJumbuneJobName(), config.getMaster().getHost(), config.getMaster().getAgentPort()); agentConfig.setUser(config.getMaster().getUser()); agentConfig.setRsaFile(config.getMaster().getRsaFile()); agentConfig.setDsaFile(config.getMaster().getDsaFile()); agentConfig.setSlaves(slaveAgentList); agentConfig.setTmpDir(config.getsJumbuneHome()); try{ String yamlFile = loader.getjHome()+YAML_FILE; File file = new File(yamlFile); if(file.exists()){ file.delete(); } fout = new FileOutputStream(yamlFile, true); oos = new ObjectOutputStream(fout); oos.writeObject(agentConfig); }finally{ if(oos != null){ oos.close(); } } RemotingUtil.sendYamlInfoToAgent(loader, agentConfig); }
Source:
<code>void sendReadCommand(Replica to, ReadCallback readCallback, boolean speculative) { ReadCommand command = this.command; if (to.isTransient()) { command = command.copyAsTransientQuery(to); } if (Tracing.isTracing()) { String type; if (speculative) type = to.isFull() ? "speculative full" : "speculative transient"; else type = to.isFull() ? "full" : "transient"; Tracing.trace("Enqueuing data read to {}", type, to); } if (to.isSelf()) { <START> try (ReadExecutionController executionController = command.executionController(); <END> UnfilteredPartitionIterator iterator = command.executeLocally(executionController)) { readCallback.response(command.createResponse(iterator)); } } else { MessageOut<ReadCommand> message = command.createMessage(); if (command.isTrackingRepairedStatus() && to.isFull()) message = message.withParameter(ParameterType.TRACK_REPAIRED_DATA, MessagingService.ONE_BYTE); MessagingService.instance().sendRRWithFailure(message, to.endpoint(), readCallback); } }</code><technical_language>asking question, this occur in this thread read stage? Is a possibility of this operation succeeding if local portion times out? If is done synchronously in request stage</technical_language>

Target:
void sendReadCommand(Replica to, ReadCallback readCallback, boolean speculative) { ReadCommand command = this.command; if (to.isSelf()) { StageManager.getStage(Stage.READ).maybeExecuteImmediately(new StorageProxy.LocalReadRunnable(command, readCallback)); return; } if (to.isTransient()) { command = command.copyAsTransientQuery(to); } if (Tracing.isTracing()) { String type; if (speculative) type = to.isFull() ? "speculative full" : "speculative transient"; else type = to.isFull() ? "full" : "transient"; Tracing.trace("Enqueuing data read to {}", type, to); } MessageOut<ReadCommand> message = command.createMessage(); if (command.isTrackingRepairedStatus() && to.isFull()) message = message.withParameter(ParameterType.TRACK_REPAIRED_DATA, MessagingService.ONE_BYTE); MessagingService.instance().sendRRWithFailure(message, to.endpoint(), readCallback); }
Source:
<code>public Boolean getEmailVerified() { if (emailVerified == null) { if (status == AccountStatus.ENABLED) { return Boolean.TRUE; } else if (status == AccountStatus.UNVERIFIED) { return Boolean.FALSE; } <START> } <END> return emailVerified; }</code><technical_language>this for legacy accounts? this effectively emailVerified flag automatically updated next write? cleaner put this in HibernateAccountDao.unmarshallAccount()? This way, separate data behaviors</technical_language>

Target:
public Boolean getEmailVerified() { return emailVerified; }
Source:
<code>public CapturesToolWindow(@NotNull final Project project) { myProject = project; DefaultTreeModel model = new DefaultTreeModel(new DefaultMutableTreeNode()); myTree = new SimpleTree(model); myTree.setRootVisible(false); myComponent = <START> new JBScrollPane(myTree); <END> myComponent.setBorder(BorderFactory.createEmptyBorder()); myStructure = new CapturesTreeStructure(myProject); myBuilder = new AbstractTreeBuilder(myTree, model, myStructure, null); Disposer.register(this, myBuilder); Disposer.register(project, this); myBuilder.initRootNode(); myBuilder.getInitialized().doWhenDone(new Runnable() { @Override public void run() { myBuilder.getUi().expandAll(null); } }); myTree.addHierarchyListener(this); CaptureService.getInstance(myProject).addListener(this); CaptureService.getInstance(myProject).update(); myStructure.update(); myTree.setPopupGroup(getPopupActions(), "Context"); myTree.putClientProperty(DataManager.CLIENT_PROPERTY_DATA_PROVIDER, this); }</code><technical_language>Other IJ tool windows using: ScrollPaneFactory.createScrollPane. Check</technical_language>

Target:
public CapturesToolWindow(@NotNull final Project project) { myProject = project; DefaultTreeModel model = new DefaultTreeModel(new DefaultMutableTreeNode()); myTree = new SimpleTree(model); myTree.setRootVisible(false); myComponent = ScrollPaneFactory.createScrollPane(myTree); myStructure = new CapturesTreeStructure(myProject); myBuilder = new AbstractTreeBuilder(myTree, model, myStructure, null); Disposer.register(this, myBuilder); Disposer.register(project, this); myBuilder.initRootNode(); myBuilder.getInitialized().doWhenDone(new Runnable() { @Override public void run() { myBuilder.getUi().expandAll(null); } }); myTree.addHierarchyListener(this); CaptureService.getInstance(myProject).addListener(this); CaptureService.getInstance(myProject).update(); myStructure.update(); myTree.setPopupGroup(getPopupActions(), "Context"); myTree.putClientProperty(DataManager.CLIENT_PROPERTY_DATA_PROVIDER, this); }