auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected @NonNull TmfViewer createLeftChildViewer(Composite parent) { CounterTreeViewer treeViewer = new CounterTreeViewer(parent); treeViewer.addSelectionChangeListener(new SelectionChangeListener()); // Initialize the viewers with the currently selected trace ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace); treeViewer.traceSelected(signal); START setTrace(trace); END } return treeViewer; } The base class TmfChartView already sets the trace in its createPartControl(). - If TmfTimeViewer handles TmfTraceSelectedSignal signal, shouldn't it initialize its trace itself? - If TmfChartView initializes its trace, shouldn't it handle TmfTraceSelectedSignal by itself? - After TmfChartView has set its initial trace, it never gets changed even when a new trace is selected. But it doesn't seem to matter because the viewers handle the trace change themselves.

Target:
protected @NonNull TmfViewer createLeftChildViewer(Composite parent) { CounterTreeViewer treeViewer = new CounterTreeViewer(parent); treeViewer.addSelectionChangeListener(new SelectionChangeListener()); // Initialize the viewers with the currently selected trace ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace); treeViewer.traceSelected(signal); } return treeViewer; }
Source:
private void resetData() { for (CounterAnalysis analysis : fModules) { ITmfStateSystem ss = analysis.getStateSystem(); if (ss == null) { continue; } for (Integer quark : fQuarks) { START deleteSeries(createSeriesName(ss, quark)); END } } fQuarks = new TreeSet<>(); } Because of the AIOOB exception above, this doesn't work. I wonder if we should not clear more broadly, can we tell the viewer to clear all its data without having to tell it what it was?

Target:
private void resetData() { for (CounterAnalysis analysis : fModules) { ITmfStateSystem ss = analysis.getStateSystem(); if (ss == null) { continue; } for (Integer quark : fQuarks) { deleteSeries(createSeriesName(ss, quark)); } } fQuarks.clear(); }
Source:
public static @Nullable SegmentStoreDataProvider create(ITmfTrace trace, @Nullable ISegmentStoreProvider provider) { if (provider == null) { return null; } START if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } return new SegmentStoreDataProvider(trace, provider); END } return only if the provider is an AnalysisModule?

Target:
public static @Nullable SegmentStoreDataProvider create(ITmfTrace trace, @Nullable ISegmentStoreProvider provider) { if (provider == null) { return null; } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); return new SegmentStoreDataProvider(trace, provider); } return null; }
Source:
public static boolean isExcludedColumn(VerifyTreeData tree, int ind) { List<Integer> excludedColumns = tree.getExcludedColumns(); START for (Integer excludedColumn : excludedColumns) { END if (excludedColumn.equals(ind)) { return true; } } return false; } excludedColumns.contains(Integer.valueOf(ind))

Target:
public static boolean isExcludedColumn(VerifyTreeData tree, int ind) { List<Integer> excludedColumns = tree.getExcludedColumns(); return excludedColumns.contains(ind); }
Source:
protected void openDiagram(String name) { START editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), VIEWPOINT_NAME + " " + name, name, DDiagram.class); editor.setSnapToGrid(false); editor.zoom(ZoomLevel.ZOOM_100); END } you could replace with openDiagram(name, ZoomLevel.ZOOM_100);

Target:
protected void openDiagram(String name) { openDiagram(name, ZoomLevel.ZOOM_100); }
Source:
public CommonXAxisModelBuilder addYSeries(IYSeries ySeries) { START if (fXValues.length == 0) { throw new IllegalStateException("X values must be set before setting Y values"); //$NON-NLS-1$ } END if (fXValues.length != ySeries.getDatapoints().length) { throw new IllegalStateException("All series in list must be of length : " + fXValues.length); //$NON-NLS-1$ } fYSeries.put(ySeries.getLabel(), ySeries); fModel = null; return this; } what if you query on a single timestamp.

Target:
public CommonXAxisModelBuilder addYSeries(IYSeries ySeries) { if (fXValues.length != ySeries.getDatapoints().length) { throw new IllegalStateException("All series in list must be of length : " + fXValues.length); //$NON-NLS-1$ } fYSeries.put(ySeries.getLabel(), ySeries); fModel = null; return this; }
Source:
public long getEnd() { return START fXvalues[fXvalues.length]; END } length - 1 ?

Target:
public long getEnd() { return fXvalues[Integer.max(0, fXvalues.length - 1)]; }
Source:
public static @Nullable KernelMemoryUsageDataProvider create(ITmfTrace trace) { TmfStateSystemAnalysisModule module = TmfTraceUtils.getAnalysisModuleOfClass(trace, START TmfStateSystemAnalysisModule.class, END KernelMemoryAnalysisModule.ID); if (module != null) { module.schedule(); return new KernelMemoryUsageDataProvider(trace, module); } return null; } KernelMemoryAnalysisModule

Target:
public static @Nullable KernelMemoryUsageDataProvider create(ITmfTrace trace) { KernelMemoryAnalysisModule module = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelMemoryAnalysisModule.class, KernelMemoryAnalysisModule.ID); if (module != null) { module.schedule(); return new KernelMemoryUsageDataProvider(trace, module); } return null; }
Source:
public ITmfCommonXAxisResponse fetchXY(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { START if (!(filter instanceof SelectedCpuQueryFilter)) { return TmfCommonXAxisResponseFactory.createFailedResponse(CommonStatusMessage.UNEXPECTED_QUERY_FILTER); } return fetchXY((SelectedCpuQueryFilter) filter, monitor); END } invert your condition to do if(A instanceof B) { use (B) A }

Target:
public ITmfCommonXAxisResponse fetchXY(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { if (filter instanceof SelectedCpuQueryFilter) { return fetchXY((SelectedCpuQueryFilter) filter, monitor); } return TmfCommonXAxisResponseFactory.createFailedResponse(CommonStatusMessage.UNEXPECTED_QUERY_FILTER); }
Source:
public boolean isMatch(String relativeTarget, boolean isDirectory) { if (relativeTarget == null) { return false; } relativeTarget = START stripTrailing(relativeTarget, END FastIgnoreRule.PATH_SEPARATOR); if (relativeTarget.length() == 0) { return false; } boolean match = matcher.matches(relativeTarget, isDirectory); return match; } I decided to strip the trailing slashes here. The caller here don't care if it is "dir" or "dir/", so we will get the "native git" behavior. I decided not to do this in PathMatcher, because it is more generic one and this would also have implications on ignore rules, which I can't overlook right now.

Target:
public boolean isMatch(String relativeTarget, boolean isDirectory) { if (relativeTarget == null) return false; if (relativeTarget.length() == 0) return false; boolean match = matcher.matches(relativeTarget, isDirectory); return match; }
Source:
public void setClosestMatch(String text) { START System.out.println("matching text " + text); //$NON-NLS-1$ END final boolean matchFound = ComboUtil.setClosestMatch(getCCombo(), text); // if no literal matches, reset to initial state if (!matchFound) { reset(); } } Remove sysout

Target:
public void setClosestMatch(String text) { final boolean matchFound = ComboUtil.setClosestMatch(getCCombo(), text); // if no literal matches, reset to initial state if (!matchFound) { reset(); } }
Source:
private void applyExpandedStateContext(ViewContext viewContext) { if (viewContext != null) { fTimeGraphViewer.expandAll(); fTimeGraphViewer.setExpandedState(viewContext.getCollapsedEntries(), false); START fTimeGraphViewer.refresh(); END } } This refresh shouldn't be necessary?

Target:
private void applyExpandedStateContext(ViewContext viewContext) { if (viewContext != null) { fTimeGraphViewer.expandAll(); fTimeGraphViewer.setExpandedState(viewContext.getCollapsedEntries(), false); } }
Source:
public void goToLastEvent() throws CTFException { long endTime = Long.MIN_VALUE; for (CTFStreamInputReader sir : fPrio) { sir.goToLastEvent(); IEventDefinition currentEvent = sir.getCurrentEvent(); if (currentEvent != null) { endTime = Math.max(currentEvent.getTimestamp(), endTime); } } setEndTime(fTrace.timestampCyclesToNanos(endTime)); // Go right before the end time, may be several events before the end but they // would all be the "last" event occurring at the same time START seek(fTrace.timestampNanoToCycles(getEndTime())); END } To avoid unnecessary conversion (and possibly rounding error?), you could use 'endTime' directly?

Target:
public void goToLastEvent() throws CTFException { long endTime = Long.MIN_VALUE; for (CTFStreamInputReader sir : fPrio) { sir.goToLastEvent(); IEventDefinition currentEvent = sir.getCurrentEvent(); if (currentEvent != null) { endTime = Math.max(currentEvent.getTimestamp(), endTime); } } setEndTime(fTrace.timestampCyclesToNanos(endTime)); // Go right before the end time, may be several events before the end but they // would all be the "last" event occurring at the same time seek(endTime); }
Source:
public Collection<ViewPrototype> getAllPrototypes() { Collection<ViewPrototype> result = new ArrayList<ViewPrototype>(); for (MergedArchitectureViewpoint viewpoint : getViewpoints()) { for (RepresentationKind kind : viewpoint.getRepresentationKinds()) { PapyrusRepresentationKind view = (PapyrusRepresentationKind) kind; ViewPrototype proto = ViewPrototype.get(view); START if (!result.contains(proto) && null != proto) { END result.add(proto); } } } return result; } invert contains and null condition please. It's not necessary to call contains if proto == null

Target:
public Collection<ViewPrototype> getAllPrototypes() { Collection<ViewPrototype> result = new ArrayList<ViewPrototype>(); for (MergedArchitectureViewpoint viewpoint : getViewpoints()) { for (RepresentationKind kind : viewpoint.getRepresentationKinds()) { PapyrusRepresentationKind view = (PapyrusRepresentationKind) kind; ViewPrototype proto = ViewPrototype.get(view); if (null != proto && !result.contains(proto)) { result.add(proto); } } } return result; }
Source:
public IPluginBase createPluginBase(boolean isFragment) { START if (fPluginBase != null) END return fPluginBase; if (isFragment) { fPluginBase = new FragmentNode(); fPluginBase.setXMLTagName("fragment"); //$NON-NLS-1$ } else { fPluginBase = new PluginNode(); fPluginBase.setXMLTagName("plugin"); //$NON-NLS-1$ } fPluginBase.setInTheModel(true); fPluginBase.setModel(this); return fPluginBase; } Use brackets also for single statements

Target:
public IPluginBase createPluginBase(boolean isFragment) { if (fPluginBase != null) { return fPluginBase; } if (isFragment) { fPluginBase = new FragmentNode(); fPluginBase.setXMLTagName("fragment"); //$NON-NLS-1$ } else { fPluginBase = new PluginNode(); fPluginBase.setXMLTagName("plugin"); //$NON-NLS-1$ } fPluginBase.setInTheModel(true); fPluginBase.setModel(this); return fPluginBase; }
Source:
public List<PageUpdateCommand> notifyAndGetUpdateCommands(ResourceSetChangeEvent resourceSetChangeEvent) { return START null; END } Should return an empty list instead of null in such a case.

Target:
public PageUpdateCommand notifyAndGetUpdateCommands(ResourceSetChangeEvent resourceSetChangeEvent) { return null; }
Source:
public static List<RGBColor> getDefaultPalette() { return Arrays.asList( BLUE, RED, GREEN, MAGENTA, CYAN, DARK_BLUE, DARK_RED, DARK_GREEN, START DARK_BLUE, DARK_RED, DARK_GREEN, DARK_MAGENTA, END DARK_CYAN, DARK_YELLOW, BLACK, GRAY, YELLOW); } repeated colors

Target:
public static List<RGBColor> getDefaultPalette() { return Arrays.asList( BLUE, RED, GREEN, MAGENTA, CYAN, DARK_BLUE, DARK_RED, DARK_GREEN, DARK_MAGENTA, DARK_CYAN, DARK_YELLOW, BLACK, GRAY, YELLOW); }
Source:
public void registerHandler(ITraceEventHandler handler) { int pos = Collections.binarySearch(fHandlers, handler, HANDLER_COMPARATOR); if (pos < 0) { fHandlers.add(-pos - 1, handler); } else { START fHandlers.add(handler); END } } Do you really need to add this since it is already in the list?

Target:
public void registerHandler(ITraceEventHandler handler) { int pos = Collections.binarySearch(fHandlers, handler, HANDLER_COMPARATOR); if (pos < 0) { fHandlers.add(-pos - 1, handler); } // If pos >= 0, the handler is already in the list }
Source:
private void establishHistoryLimit() { int historyLimit= SearchPreferencePage.getHistoryLimit(); QueryManager searchManager= getSearchManager(); if (historyLimit >= searchManager.getSize()) { return; } int numberQueriesNotShown= 0; SearchViewManager searchViewManager= getSearchViewManager(); ISearchQuery[] queries= searchManager.getQueries(); START for (ISearchQuery querie : queries) { END ISearchQuery query= querie; if (!searchViewManager.isShown(query)) { if (++numberQueriesNotShown >= historyLimit) { removeQuery(query); } } } } No need for the intermediate querie - you should use the query from following line which is not needed.

Target:
private void establishHistoryLimit() { int historyLimit= SearchPreferencePage.getHistoryLimit(); QueryManager searchManager= getSearchManager(); if (historyLimit >= searchManager.getSize()) { return; } int numberQueriesNotShown= 0; SearchViewManager searchViewManager= getSearchViewManager(); ISearchQuery[] queries= searchManager.getQueries(); for (ISearchQuery query : queries) { if (!searchViewManager.isShown(query)) { if (++numberQueriesNotShown >= historyLimit) { removeQuery(query); } } } }
Source:
public boolean provides(String pageId) { if START (DebugPage.PAGE_ID.equals(pageId)) { END return true; } return false; } "return DebugPage.PAGE_ID.equals(pageId)" ?

Target:
public boolean provides(String pageId) { return DebugPage.PAGE_ID.equals(pageId); }
Source:
public static void incrementAttributeLong(ITmfStateSystemBuilder ssb, long t, int attributeQuark, long increment) { START @Nullable END Object stateValue = ssb.queryOngoing(attributeQuark); /* if the attribute was previously null, start counting at 0 */ long prevValue = 0; if (stateValue != null && stateValue instanceof Long) { prevValue = (long) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); } write nullable on the same line or don't write it

Target:
public static void incrementAttributeLong(ITmfStateSystemBuilder ssb, long t, int attributeQuark, long increment) { Object stateValue = ssb.queryOngoing(attributeQuark); /* if the attribute was previously null, start counting at 0 */ long prevValue = 0; if (stateValue != null && stateValue instanceof Long) { prevValue = (long) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); }
Source:
public static void incrementAttributeInt(ITmfStateSystemBuilder ssb, long t, int attributeQuark, int increment) throws StateValueTypeException, AttributeNotFoundException { Object stateValue = ssb.queryOngoing(attributeQuark); /* if the attribute was previously null, start counting at 0 */ int prevValue = 0; if START (stateValue != null && stateValue END instanceof Integer) { prevValue = (int) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); } cannot remove this?

Target:
public static void incrementAttributeInt(ITmfStateSystemBuilder ssb, long t, int attributeQuark, int increment) { Object stateValue = ssb.queryOngoing(attributeQuark); /* if the attribute was previously null, start counting at 0 */ int prevValue = 0; if (stateValue instanceof Integer) { prevValue = (int) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); }
Source:
START public void END setExecuteOnKeyRelease(boolean executeOnKeyRelease) { this.executeOnKeyRelease = executeOnKeyRelease; } protected?

Target:
protected void setExecuteOnKeyRelease(boolean executeOnKeyRelease) { this.executeOnKeyRelease = executeOnKeyRelease; }
Source:
public boolean handles(final Table table, final Object axisElement) { START final String id = AxisUtils.getPropertyId(axisElement); // Handle only the Requirement::text column in Requirement table return (null != id && id.equals(SYSML_REQUIREMENTS_REQUIREMENT_TEXT_ID)); END } return SYSML_REQUIREMENTS_REQUIREMENT_TEXT_ID.equals(AxisUtils.getPropertyId(axisElement)) should work no ?

Target:
public boolean handles(final Table table, final Object axisElement) { // Handle only the Requirement::text column in Requirement table return (SYSML_REQUIREMENTS_REQUIREMENT_TEXT_ID.equals(AxisUtils.getPropertyId(axisElement))); }
Source:
protected boolean isForceRefLog(ReceiveCommand cmd) { return cmd.isForceRefLog() != null ? START cmd.isForceRefLog().booleanValue() END : isForceRefLog(); } When ReceiveCommand.isForceRefLog() is annotated as @Nullable this causes a "potential null pointer" error in Eclipse. This is clearly a false positive since we check for null on the previous line. Factoring it out to a variable fixes it.

Target:
protected boolean isForceRefLog(ReceiveCommand cmd) { Boolean isForceRefLog = cmd.isForceRefLog(); return isForceRefLog != null ? isForceRefLog.booleanValue() : isForceRefLog(); }
Source:
public START Sampling setSampling(Sampling END sampling) { Sampling prev = fSampling; fSampling = sampling; return prev; } It this worth it to return previous? Doesn't seem to be used?

Target:
public void setSampling(Sampling sampling) { fSampling = sampling; }
Source:
public TmfResolvedSymbol getSymbolEntry(long address) { Entry<Long, TmfResolvedSymbol> floorEntry = fSymbolMapping.floorEntry(address); if (floorEntry == null) { return null; } // See if the symbol returned is the end of a block, in this case, don't // use the floor unless it hits the exact address TmfResolvedSymbol symbol = floorEntry.getValue(); long floorValue = symbol.getBaseAddress(); START if (symbol.getSymbolName().endsWith(getEndSuffix()) && floorValue != address) { return null; } return symbol; END } Ternary operator if you're feeling fancy.

Target:
public TmfResolvedSymbol getSymbolEntry(long address) { Entry<Long, TmfResolvedSymbol> floorEntry = fSymbolMapping.floorEntry(address); if (floorEntry == null) { return null; } // See if the symbol returned is the end of a block, in this case, don't // use the floor unless it hits the exact address TmfResolvedSymbol symbol = floorEntry.getValue(); long floorValue = symbol.getBaseAddress(); return (symbol.getSymbolName().endsWith(getEndSuffix()) && floorValue != address) ? null : symbol; }
Source:
public AccessContext(IASTName name) { this.name = name; START this.isPrefixLookup = false; END } Please delegate to the other constructor using this(name, false); in the constructor body.

Target:
public AccessContext(IASTName name) { this(name, false); }
Source:
public StatusAdapter getStatusAdapter(JobInfo info) { if (map == null) { return null; } StatusAdapter statusAdapter = (StatusAdapter) map.remove(info); if (statusAdapter != START null) END statusAdapter.setProperty( IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.FALSE); return statusAdapter; } Could you follow the code style elsewhere and use braces please?

Target:
public StatusAdapter getStatusAdapter(JobInfo info) { if (map == null) { return null; } StatusAdapter statusAdapter = (StatusAdapter) map.remove(info); if (statusAdapter != null) { statusAdapter.setProperty( IProgressConstants.NO_IMMEDIATE_ERROR_PROMPT_PROPERTY, Boolean.FALSE); } return statusAdapter; }
Source:
private boolean userRequestedSpecificFile(MIBreakpoint miBpt) { assert isFunctionBreakpoint(miBpt); String originalLocation = miBpt.getOriginalLocation(); boolean userRequestedSpecificFile = originalLocation != null && originalLocation.contains(":"); //$NON-NLS-1$ START return userRequestedSpecificFile; END } No need for 'userRequestedSpecificFile', use 'return originalLocation...'

Target:
private boolean userRequestedSpecificFile(MIBreakpoint miBpt) { assert isFunctionBreakpoint(miBpt); String originalLocation = miBpt.getOriginalLocation(); return originalLocation != null && originalLocation.contains(":"); //$NON-NLS-1$ }
Source:
private synchronized void newUpdateThread(@NonNull FlowScopeLog fScope) { cancelUpdate(); if (getSwtChart().isDisposed()) { return; } int numRequests = fOverrideNbPoints != 0 ? fOverrideNbPoints : START (int) Math.min(getWindowEndTime() - getWindowStartTime() + 1, (long) (getSwtChart().getPlotArea().getBounds().width END * fResolution)); fUpdateThread = new UpdateThread(numRequests, fScope); fUpdateThread.start(); } practically, we can theoretically be handling over 2b pixels wide, but then we will have more issues.

Target:
private synchronized void newUpdateThread(@NonNull FlowScopeLog fScope) { if (getSwtChart().isDisposed()) { return; } int numRequests = fOverrideNbPoints != 0 ? fOverrideNbPoints : (int) Math.min(getWindowEndTime() - getWindowStartTime() + 1, (long) (getSwtChart().getPlotArea().getBounds().width * fResolution)); fUpdateThread = new UpdateThread(numRequests, fScope); fUpdateThread.start(); }
Source:
protected void selectCellToFillToDown(final TreeNattableModelManager treeManager) { START System.out.println(treeManager.getBodyLayerStack().getSelectionLayer().getCellByPosition(0, 0).getDataValue().toString()); END treeManager.getBodyLayerStack().getSelectionLayer().setSelectedCell(0, 0); } syso here

Target:
protected void selectCellToFillToDown(final TreeNattableModelManager treeManager) { treeManager.getBodyLayerStack().getSelectionLayer().setSelectedCell(0, 0); }
Source:
public IReconcilingStrategy getReconcilingStrategy(String contentType) { if(fReconcilers.size() == 1) { return fReconcilers.get(0).getReconcilingStrategy(contentType); } List<IReconcilingStrategy> strategies = new ArrayList<>(); for (IReconciler iReconciler : fReconcilers) { IReconcilingStrategy strategy = iReconciler.getReconcilingStrategy(contentType); if(strategy != null) { strategies.add(strategy); } } START return new CompositeReconcilerStrategy(strategies); END } I believe the size of the strategies list matters more here. So I'd get rid of the check on lines 66-68 and would check whether strategies is empty then return null, if size if one then return the single one, otherwise compose them.

Target:
public IReconcilingStrategy getReconcilingStrategy(String contentType) { List<IReconcilingStrategy> strategies = new ArrayList<>(); for (IReconciler iReconciler : fReconcilers) { IReconcilingStrategy strategy = iReconciler.getReconcilingStrategy(contentType); if(strategy != null) { strategies.add(strategy); } } if(strategies.size() == 1) { return strategies.get(0); } return new CompositeReconcilerStrategy(strategies); }
Source:
protected TmfXYChartViewer createChartViewer(Composite parent) { START return new CounterChartViewer(parent, new TmfXYChartSettings(null, null, null, 1), fXYPresentationProvider); END } I think the chart viewer should be responsible for its own presentation provider. The tree viewer could ask the chart viewer for a series appearance directly, perhaps through the ITreeViewerInterface? (could be renamed ICounterChartViewer).

Target:
protected TmfXYChartViewer createChartViewer(Composite parent) { return new CounterChartViewer(parent, new TmfXYChartSettings(null, null, null, 1)); }
Source:
public void loadTrace(ITmfTrace trace) { cancelUpdate(); START clearStyles(); END super.loadTrace(trace); initializeDataProvider(); } The order of colors is changed when switching back and forth to a trace.

Target:
public void loadTrace(ITmfTrace trace) { clearStyles(); super.loadTrace(trace); initializeDataProvider(); }
Source:
START private void handleRepeatedInvocation() { END if (fContentAssistant.isRepeatedInvocationMode()) { fComputedProposals= computeProposals(fFilterOffset); setProposals(fComputedProposals, false); } } Please do not reduce visibility of existing fields as part of this change, there might be reasons to investigate separately before reducing visibility.

Target:
void handleRepeatedInvocation() { if (fContentAssistant.isRepeatedInvocationMode()) { fComputedProposals= computeProposals(fFilterOffset); setProposals(fComputedProposals, false); } }
Source:
public List<UpdateSummaryData> broadcastUpdateItems(Collection<String> ids, Collection<DispoItem> items, DispoSet set) { START List<UpdateSummaryData> summaryData = null; END for (DispoListenerApi listener : listeners) { summaryData = listener.onUpdateItemStats(ids, items, set); } return summaryData; } As a suggestion, you might want to initialize this to new ArrayList<>(); This would help avoid a NPE on the upstream.

Target:
public List<UpdateSummaryData> broadcastUpdateItems(Collection<String> ids, Collection<DispoItem> items, DispoSet set) { List<UpdateSummaryData> summaryData = new ArrayList<>(); for (DispoListenerApi listener : listeners) { summaryData = listener.onUpdateItemStats(ids, items, set); } return summaryData; }
Source:
boolean isSelected(MPart part) { MElementContainer<?> parent = part.getParent(); if (parent == null) { MPlaceholder placeholder = part.getCurSharedRef(); if (placeholder == null) { return false; } parent = placeholder.getParent(); return parent instanceof MGenericStack ? parent.getSelectedElement() == placeholder : parent != null; } START return parent instanceof MGenericStack ? parent.getSelectedElement() == part END : true; } !(parent instanceof MGenericStack) || parent.getSelectedElement() == part

Target:
boolean isSelected(MPart part) { MElementContainer<?> parent = part.getParent(); if (parent == null) { MPlaceholder placeholder = part.getCurSharedRef(); if (placeholder == null) { return false; } parent = placeholder.getParent(); return parent instanceof MGenericStack ? parent.getSelectedElement() == placeholder : parent != null; } return !(parent instanceof MGenericStack) || parent.getSelectedElement() == part; }
Source:
protected void tearDown() throws Exception { Job.getJobManager().cancel(BuildTestProject.class); START IProject testProject = getTestProject(); if (testProject.exists()) { testProject.delete(true, null); } END setWorkspaceAutoBuild(wasAutoBuildOn); logListener.clear(); Platform.removeLogListener(logListener); super.tearDown(); } Please enclose with try/finally and put the autobuild restore code to the finally block.

Target:
protected void tearDown() throws Exception { Job.getJobManager().cancel(BuildTestProject.class); Platform.removeLogListener(logListener); logListener.clear(); try { IProject testProject = getTestProject(); if (testProject.exists()) { testProject.delete(true, null); } } finally { setWorkspaceAutoBuild(wasAutoBuildOn); } super.tearDown(); }
Source:
public START synchronized IncrementalProjectBuilder END getBuilder(IBuildConfiguration config) { synchronized (builderLock) { if (builders != null && supportsConfigs()) return builders.get(config); return builder; } } Please remove this

Target:
public IncrementalProjectBuilder getBuilder(IBuildConfiguration config) { synchronized (builderLock) { if (builders != null && supportsConfigs()) return builders.get(config); return builder; } }
Source:
public boolean isInstanceOfScoped(EObject object, EClass clazz) { Object typeKey = toKey(object.eClass()); if (!doCalculateInstanceOf(typeKey, START clazz)) END { return false; } final Set<EObject> instances = instanceStore.getInstanceSet(typeKey); return instances != null && instances.contains(object); } the second parameter should be toKey(clazz) instead of clazz, to support dynamic EMF mode. (sorry for not catching it earlier)

Target:
public boolean isInstanceOfScoped(EObject object, EClass clazz) { Object typeKey = toKey(object.eClass()); if (!doCalculateInstanceOf(typeKey, toKey(clazz))) { return false; } final Set<EObject> instances = instanceStore.getInstanceSet(typeKey); return instances != null && instances.contains(object); }
Source:
START public void END fireFilterChanged() { for (ITimeGraphViewerFilterListener listener : fViewerFilterListeners) { listener.filterChanged(); } } Does this need to be public?

Target:
private void fireFilterChanged() { for (ITimeGraphViewerFilterListener listener : fViewerFilterListeners) { listener.filterChanged(); } }
Source:
public void addFilter(@NonNull ViewerFilter filter) { fTimeGraphCtrl.addFilter(filter); refresh(); START fTimeGraphCtrl.fireFilterApplied(); END } If a filter is applied directly to the TimeGraphControl, the listeners won't be notified. In that case, perhaps the TimeGraphViewer should be the sole owner of the listener list, and the one to fire the events. Otherwise, the TimeGraphControl should fire the events when addFilter() or removeFilter() is called.

Target:
public void addFilter(@NonNull ViewerFilter filter) { fTimeGraphCtrl.addFilter(filter); refresh(); }
Source:
private static boolean isEntry(ITmfEvent event) { String phase = event.getContent().getFieldValue(String.class, ITraceEventConstants.PHASE); START return "B" == phase || phase == "s"; //$NON-NLS-1$ //$NON-NLS-2$ END } string equals

Target:
private static boolean isEntry(ITmfEvent event) { String phase = event.getContent().getFieldValue(String.class, ITraceEventConstants.PHASE); return "B".equals(phase) || "s".equals(phase); //$NON-NLS-1$ //$NON-NLS-2$ }
Source:
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ITuple)) return false; final ITuple other = (ITuple) obj; START if (cachedHash != other.hashCode()) END return false; return internalEquals(other); } other.hashCode() is only fast for immutable Tuples with cachedHash, not for VolatileTuples. If `obj` is volatile, we can jump straight to internalEquals() I believe. Though this should not matter a lot, I guess most comparisons will happen against other immutable Tuples anyway.

Target:
public boolean equals(Object obj) { if (this == obj) return true; if (obj instanceof ITuple) { final ITuple other = (ITuple) obj; return cachedHash == other.hashCode() && internalEquals(other); } return false; }
Source:
public boolean hasNext() { if (isNextMatchCalculated) { return true; } if (currentPlan == null) { return false; } try { boolean foundMatch = currentPlan.execute(frame); while ((!foundMatch) && planIterator.hasNext()) { foundMatch = selectNextPlan() && currentPlan.execute(frame); } START if (foundMatch) { END isNextMatchCalculated = true; } return foundMatch; } catch (LocalSearchException e) { throw new RuntimeException(e); } } This condition can be omitted as at this point isNextMatchCalculated is known to be false (from the condition at 121). It may be nitpicking, but this particular code is executed many times so I propose to simply put 'isNextMatchCalculated = foundMatch' here.

Target:
public boolean hasNext() { if (isNextMatchCalculated) { return true; } if (currentPlan == null) { return false; } try { boolean foundMatch = currentPlan.execute(frame); while ((!foundMatch) && planIterator.hasNext()) { foundMatch = selectNextPlan() && currentPlan.execute(frame); } isNextMatchCalculated = foundMatch; return foundMatch; } catch (LocalSearchException e) { throw new RuntimeException(e); } }
Source:
protected void fireContentEditorFieldEvent(ContentEditorFieldEvent e) { EventListener[] listeners = m_listenerList.getListeners(ContentEditorFieldListener.class); START if (listeners != null && listeners.length > 0) { END for (int i = 0; i < listeners.length; i++) { ((ContentEditorFieldListener) listeners[i]).contentEditorFieldChanged(e); } } } I'd rather use an early return (if null) and a simple loop, the counter variable is not required here: for (EventListener l : listeners) {

Target:
protected void fireContentEditorFieldEvent(ContentEditorFieldEvent e) { EventListener[] listeners = m_listenerList.getListeners(ContentEditorFieldListener.class); if (listeners == null) { return; } for (EventListener listener : listeners) { ((ContentEditorFieldListener) listener).contentEditorFieldChanged(e); } }
Source:
protected void attachModel() { super.attachModel(); START if (m_modelListener != null) { END throw new IllegalStateException("Already attached"); } m_modelListener = new P_ModelListener(); getModel().addContentEditorFieldListener(m_modelListener); } IllegalStateException is not required here (check is already performed in super call)

Target:
protected void attachModel() { super.attachModel(); m_modelListener = new P_ModelListener(); getModel().addContentEditorFieldListener(m_modelListener); }
Source:
protected boolean isExitState(EObject model) { START if (currentModel == null) { return false; } if (model == null) { return true; } if (model != currentModel) { // return true; } return false; END } return currentmodel!=null && model == null

Target:
protected boolean isExitState(EObject model) { return currentModel != null && model == null; }
Source:
public SelectedCounterQueryFilter(long start, long end, int n, Collection<Long> ids, boolean isCumulative) { START super(start, end, n, ImmutableList.copyOf(ids)); END fIsCumulative = isCumulative; } put it up

Target:
public SelectedCounterQueryFilter(long start, long end, int n, Collection<Long> ids, boolean isCumulative) { super(start, end, n, ids); fIsCumulative = isCumulative; }
Source:
START private byte[] generate(int size, int nullAt) { END byte[] data = new byte[size]; for (int i = 0; i < data.length; i++) { data[i] = (byte) ((i % 72 == 0) ? '\n' : (i%10) + '0'); } if (nullAt >= 0) { data[nullAt] = '\0'; } return data; } static

Target:
private static byte[] generate(int size, int nullAt) { byte[] data = new byte[size]; for (int i = 0; i < data.length; i++) { data[i] = (byte) ((i % 72 == 0) ? '\n' : (i%10) + '0'); } if (nullAt >= 0) { data[nullAt] = '\0'; } return data; }
Source:
public boolean createEObjectDescriptions(EObject eObject, IAcceptor<IEObjectDescription> acceptor) { START if (eObject instanceof PatternModel) { END } else if (eObject instanceof Pattern) { QualifiedName qualifiedName = getQualifiedNameProvider().getFullyQualifiedName(eObject); if (qualifiedName != null) { acceptor.accept(EObjectDescription.create(qualifiedName, eObject, getUserData((Pattern) eObject))); } return false; } return super.createEObjectDescriptions(eObject, acceptor); } This empty if block seems redundant.

Target:
public boolean createEObjectDescriptions(EObject eObject, IAcceptor<IEObjectDescription> acceptor) { if (eObject instanceof Pattern) { QualifiedName qualifiedName = getQualifiedNameProvider().getFullyQualifiedName(eObject); if (qualifiedName != null) { acceptor.accept(EObjectDescription.create(qualifiedName, eObject, getUserData((Pattern) eObject))); } return false; } return super.createEObjectDescriptions(eObject, acceptor); }
Source:
public Collection<Tuple> get(Tuple signature) { Object bucket = matchings.get(signature); if (bucket instanceof MarkedSet<?>) { START return (Collection<Tuple>) bucket; END } else { // singleton or empty if (bucket == null) return null; return Collections.singleton((Tuple)bucket); } } This instanceof/cast pair seems strange. I'd synchronize them if possible (even if on the bytecode level this is the same as the synchronized version).

Target:
public Collection<Tuple> get(Tuple signature) { Object bucket = matchings.get(signature); if (bucket instanceof MarkedSet<?>) { return (MarkedSet<Tuple>) bucket; } else { // singleton or empty if (bucket == null) return null; return Collections.singleton((Tuple)bucket); } }
Source:
WorkbenchSiteProgressService getSiteProgressService() { START return (WorkbenchSiteProgressService) e4Context.get(IWorkbenchSiteProgressService.class); END } I think this cast can be removed.

Target:
IWorkbenchSiteProgressService getSiteProgressService() { return e4Context.get(IWorkbenchSiteProgressService.class); }
Source:
START public Rectangle getBounds() { END return syncExec(() -> this.widget.getBounds()); } Is the super class implementation not working?

Target:
public Rectangle getBounds() { return super.getBounds(); }
Source:
START static URI getStereotypeURI(EObject stereotypeApplication) { END return EcoreUtil.getURI(stereotypeApplication.eClass()); } private

Target:
private static URI getStereotypeURI(EObject stereotypeApplication) { return EcoreUtil.getURI(stereotypeApplication.eClass()); }
Source:
START static <K, L, V> V put(Map<K, Map<L, V>> mapOfMaps, K key1, L key2, V value) { END Map<L, V> map = mapOfMaps.get(key1); if (map == null) { map = Maps.newHashMap(); mapOfMaps.put(key1, map); } return map.put(key2, value); } Done

Target:
private static <K, L, V> V put(Map<K, Map<L, V>> mapOfMaps, K key1, L key2, V value) { Map<L, V> map = mapOfMaps.get(key1); if (map == null) { map = new HashMap<>(); mapOfMaps.put(key1, map); } return map.put(key2, value); }
Source:
public void enterModule(ModuleInfo moduleInfo) { this.indexer.addModuleDeclaration(moduleInfo.moduleName); if (moduleInfo.requires != null) { for (ISourceElementRequestor.RequiresInfo req : moduleInfo.requires) { if (req == null || req.moduleName == null || req.moduleName == CharOperation.NO_CHAR) { continue; START } END this.indexer.addModuleReference(req.moduleName); } } enterPackageVisibilityInfo(moduleInfo.exports); enterPackageVisibilityInfo(moduleInfo.opens); /* note: provides and uses directives processed automatically on IParser (SEParser) */ } why introduce a block here (and in the other ifs)?

Target:
public void enterModule(ModuleInfo moduleInfo) { this.indexer.addModuleDeclaration(moduleInfo.moduleName); if (moduleInfo.requires != null) { for (ISourceElementRequestor.RequiresInfo req : moduleInfo.requires) { if (req == null || req.moduleName == null || req.moduleName == CharOperation.NO_CHAR) continue; this.indexer.addModuleReference(req.moduleName); } } enterPackageVisibilityInfo(moduleInfo.exports); enterPackageVisibilityInfo(moduleInfo.opens); /* note: provides and uses directives processed automatically on IParser (SEParser) */ }
Source:
public static VView loadView(IFile file, Collection<String> registeredEcores) throws IOException { final String path = file.getLocation().toString(); VView view = loadView(path); if (!viewIsResolved(view)) { view = tryResolve(view, path, registeredEcores); if (viewIsResolved(view)) { START return null; END } } return view; } null should only be returned when the view is NOT resolved. However with the new use cases I think it makes more sense to return the view anyway, resolved or unresolved, and let the callers handle it themselves.

Target:
public static VView loadView(IFile file, Collection<String> registeredEcores) throws IOException { final String path = file.getLocation().toString(); final VView view = loadView(path); if (view != null && !viewIsResolved(view)) { return tryResolve(view, path, registeredEcores); } return view; }
Source:
START public BitmapObjectFilter(BitmapBuilder END bitmap) { this.bitmap = bitmap; } use default, no need public.

Target:
BitmapObjectFilter(BitmapBuilder bitmap) { this.bitmap = bitmap; }
Source:
public static <T extends org.eclipse.swt.widgets.Widget> org.hamcrest.Matcher<T> withId(java.lang.String key, java.lang.String value) { return org.eclipse.swtbot.swt.finder.matchers.WithId.withId(key, START value); END } Cast value to (Object) to prevent a deprecation warning

Target:
public static <T extends org.eclipse.swt.widgets.Widget> org.hamcrest.Matcher<T> withId(java.lang.String key, java.lang.String value) { return org.eclipse.swtbot.swt.finder.matchers.WithId.withId(key, (Object)value); }
Source:
public SWTBotButton buttonWithId(String key, Object value) { Matcher matcher = allOf(widgetOfType(Button.class), withId(key, value), withStyle(SWT.PUSH, "SWT.PUSH")); return new SWTBotButton((Button) widget(matcher), matcher); START } END To be consistent, we should probably have buttonWithId(key, value, index)

Target:
public SWTBotButton buttonWithId(String key, Object value) { return buttonWithId(key, value, 0); }
Source:
private void updateExportDialogAutoScaleSettings(boolean value) { IDialogSettings settings = getExportDialogSettings(); settings.put(AbstractExportRepresentationsAsImagesDialog.AUTO_SCALE_SETTING_PROPERTY, value); if (value) { // full autoScale used settings.put(AbstractExportRepresentationsAsImagesDialog.SCALE_LEVEL_SETTING_PROPERTY, START 100); END } else { // no autoScale used settings.put(AbstractExportRepresentationsAsImagesDialog.SCALE_LEVEL_SETTING_PROPERTY, 0); } } 10

Target:
private void updateExportDialogAutoScaleSettings(boolean value) { IDialogSettings settings = getExportDialogSettings(); settings.put(AbstractExportRepresentationsAsImagesDialog.AUTO_SCALE_SETTING_PROPERTY, value); if (value) { // full autoScale used settings.put(AbstractExportRepresentationsAsImagesDialog.SCALE_LEVEL_SETTING_PROPERTY, 10); } else { // no autoScale used settings.put(AbstractExportRepresentationsAsImagesDialog.SCALE_LEVEL_SETTING_PROPERTY, 0); } }
Source:
public int compareTo(LfsPointer o) { int x = getOid().compareTo(o.getOid()); START if (x != 0) { END return 0; } return (int) (getSize() - o.getSize()); } why do we return 0 if the oids aren't equal ? Shouldn't we return x in this case ?

Target:
public int compareTo(LfsPointer o) { int x = getOid().compareTo(o.getOid()); if (x != 0) { return x; } return (int) (getSize() - o.getSize()); }
Source:
public static START LocalFile cleanLfsBlob(Repository END db, InputStream originalContent) throws IOException { LocalFile buffer = new TemporaryBuffer.LocalFile(null); CleanFilter f = new CleanFilter(db, originalContent, buffer); while (f.run() != -1) { // loop as long as command.run() tells there is work to do } return buffer; } Any reason why the interface is specific to LocalFile? Why not TemporaryBuffer?

Target:
public static TemporaryBuffer cleanLfsBlob(Repository db, InputStream originalContent) throws IOException { LocalFile buffer = new TemporaryBuffer.LocalFile(null); CleanFilter f = new CleanFilter(db, originalContent, buffer); try { while (f.run() != -1) { // loop as long as f.run() tells there is work to do } } catch (IOException e) { buffer.close(); throw e; } return buffer; }
Source:
public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream) { if START (isAvailable() && END isEnabled(repo)) { return new LfsPrePushHook(repo, outputStream); } return null; } this is always true hence can be skipped

Target:
public PrePushHook getPrePushHook(Repository repo, PrintStream outputStream) { if (isEnabled(repo)) { return new LfsPrePushHook(repo, outputStream); } return null; }
Source:
protected void onSetUpBeforeClosingWelcomePage() throws Exception { copyFileToTestProject(Activator.PLUGIN_ID, DATA_UNIT_DIR, MODEL_FILE, SESSION_FILE, VSM_FILE, START IMAGE_FILE); END sessionAirdResource = new UIResource(designerProject, SESSION_FILE); localSession = designerPerspective.openSessionFromFile(sessionAirdResource, true); } is it really useful?

Target:
protected void onSetUpBeforeClosingWelcomePage() throws Exception { copyFileToTestProject(Activator.PLUGIN_ID, DATA_UNIT_DIR, MODEL_FILE, SESSION_FILE); sessionAirdResource = new UIResource(designerProject, SESSION_FILE); localSession = designerPerspective.openSessionFromFile(sessionAirdResource, true); }
Source:
public MarkerItem getMarkerItem(IMarker marker) { Map<IMarker, MarkerEntry> entryMap = markerToEntryMap; if (entryMap == null) { entryMap = new HashMap<>(); START for (MarkerEntry markerEntry : markerEntryArray) { END IMarker nextMarker = markerEntry.getMarker(); if (nextMarker != null) { entryMap.put(nextMarker, markerEntry); } } markerToEntryMap = entryMap; } if (entryMap.containsKey(marker)) { return entryMap.get(marker); } return null; } The loop iterates over the mutable array, which is guarded by "this" lock, but the loop itself is not guarded by "this". If we are going to fix MT issue here, we will also need to guard against the inconsistent data we might see in the array, which is changed in two synchronized sort* methods. At the end we might see less entries in the entryMap because we might see same elements multiple times while sorting of the array. So probably the easiest way to fix the original issue is to make the getMarkerItem() synchronized.

Target:
public synchronized MarkerItem getMarkerItem(IMarker marker) { if (markerToEntryMap == null) { markerToEntryMap = new HashMap<>(); for (MarkerEntry markerEntry : markerEntryArray) { IMarker nextMarker = markerEntry.getMarker(); if (nextMarker != null) { markerToEntryMap.put(nextMarker, markerEntry); } } } if (markerToEntryMap.containsKey(marker)) { return markerToEntryMap.get(marker); } return null; }
Source:
public LanguageServerWrapper(@Nullable IProject project, @NonNull LanguageServerDefinition serverDefinition) { this.initialProject = project; this.allWatchedProjects = new HashSet<>(); this.serverDefinition = serverDefinition; this.lspStreamProvider = serverDefinition.createConnectionProvider(); START if (this.lspStreamProvider == null) { END throw new IllegalStateException(Messages.LanguageServerWrapper_initializationException); } this.connectedDocuments = new HashMap<>(); } This would better be made not final and set during the start method. So the LanguageServiceAccessor would store the Wrapper and keep it cached for further usage, and most further usages of the LS would attempt to retry it until it works.

Target:
public LanguageServerWrapper(@Nullable IProject project, @NonNull LanguageServerDefinition serverDefinition) { this.initialProject = project; this.allWatchedProjects = new HashSet<>(); this.serverDefinition = serverDefinition; this.connectedDocuments = new HashMap<>(); }
Source:
public CloseUnrelatedProjectsAction(IShellProvider provider){ super(provider, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text); START TEXT_STRING = IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text; END TOOLTIP_STRING = IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip; TEXT_PLURAL_STRING = IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text_plural; TOOLTIP_PLURAL_STRING = IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip_plural; initAction(); } Ideall in super constructor

Target:
public CloseUnrelatedProjectsAction(IShellProvider provider){ super(provider, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_text_plural, IDEWorkbenchMessages.CloseUnrelatedProjectsAction_toolTip_plural); initAction(); }
Source:
private String getUniqueNameFor(String seriesName) { Integer quark = fQuarkToString.inverse().get(seriesName); int index = 0; String newName = seriesName; while (quark != null) START { newName = seriesName + '(' + index + ')'; quark = fQuarkToString.inverse().get(newName); END } return newName; } don't you need to increment the index to avoid infinite looping? how do you avoid having seriesName, and seriesName(0)?

Target:
private String getUniqueNameFor(String seriesName) { Integer quark = fQuarkToString.inverse().get(seriesName); int index = 1; String newName = seriesName; while (quark != null) { newName = seriesName + '(' + index + ')'; quark = fQuarkToString.inverse().get(newName); index++; } return newName; }
Source:
public CPPASTLiteralExpression(int kind, char[] value, char[] numericCompilerSuffixes) { fKind = kind; START setValue(kind, value); END fNumericCompilerSuffixes = (numericCompilerSuffixes == null) ? CharArrayUtils.EMPTY : numericCompilerSuffixes; } Isn't this equivalent to: fValue = value; fSuffix = CharArrayUtils.EMPTY?

Target:
public CPPASTLiteralExpression(int kind, char[] value, char[] numericCompilerSuffixes) { set(kind, value); fNumericCompilerSuffixes = (numericCompilerSuffixes == null) ? CharArrayUtils.EMPTY : numericCompilerSuffixes; }
Source:
public CPPASTLiteralExpression copy(CopyStyle style) { CPPASTLiteralExpression copy = new CPPASTLiteralExpression(fKind, this.getValue()); copy.fNumericCompilerSuffixes = START fNumericCompilerSuffixes.clone(); END copy.fStringLiteralSize = fStringLiteralSize; copy.fEvaluation = fEvaluation; copy.fUserDefinedLiteralOperator = fUserDefinedLiteralOperator; copy.fImplicitNames = fImplicitNames == null ? null : fImplicitNames.clone(); return copy(copy, style); } It is unfortunate that compiler suffixes, which are not really supposed to change, are cloned here. Cloning can be avoided by passing compiler suffixes to the constructor as a parameter.

Target:
public CPPASTLiteralExpression copy(CopyStyle style) { CPPASTLiteralExpression copy = new CPPASTLiteralExpression(fKind, this.getValue(), fNumericCompilerSuffixes); copy.fStringLiteralSize = fStringLiteralSize; copy.fEvaluation = fEvaluation; copy.fUserDefinedLiteralOperator = fUserDefinedLiteralOperator; copy.fImplicitNames = fImplicitNames; return copy(copy, style); }