auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void onPartitionSnapshotRestored(UUID nodeId, int grpId, int partId, long cntr) { Map<Integer, Set<Integer>> grpParts = remaining.get(nodeId); assert grpParts != null : "nodeId=" + nodeId + ", grpId=" + grpId + ", p=" + partId; Set<Integer> parts = grpParts.get(grpId); boolean rmvd = parts.remove(partId); assert rmvd : "nodeId=" + nodeId + ", grpId=" + grpId + ", p=" + partId; Map<UUID, Map<Integer, Long>> grpCntrs = restored.computeIfAbsent(grpId, v -> new ConcurrentHashMap<>()); <START> grpCntrs.computeIfAbsent(nodeId, v -> new ConcurrentHashMap<>()).put(partId, cntr); <END> if (parts.isEmpty() && grpParts.remove(grpId) != null && remaining.values().stream().map(Map::keySet).noneMatch(set -> set.contains(grpId))) onCacheGroupDone(grpId, grpCntrs); }</code><technical_language>Partitions ordered ID putting IgniteDhtDemandedPartitionsMap</technical_language>

Target:
private void onPartitionSnapshotRestored(UUID nodeId, int grpId, int partId, long cntr) { Map<Integer, Set<Integer>> grpParts = remaining.get(nodeId); assert grpParts != null : "nodeId=" + nodeId + ", grpId=" + grpId + ", p=" + partId; Set<Integer> parts = grpParts.get(grpId); boolean rmvd = parts.remove(partId); assert rmvd : "nodeId=" + nodeId + ", grpId=" + grpId + ", p=" + partId; Map<UUID, Map<Integer, Long>> grpCntrs = restored.computeIfAbsent(grpId, v -> new ConcurrentHashMap<>()); grpCntrs.computeIfAbsent(nodeId, v -> new ConcurrentHashMap<>()).put(partId, cntr); GridFutureAdapter<GridDhtPreloaderAssignments> resFut; if (!parts.isEmpty() || grpParts.remove(grpId) == null || remaining.values().stream().map(Map::keySet).anyMatch(grps -> grps.contains(grpId)) || (resFut = futAssigns.remove(grpId)) == null) return; CacheGroupContext grp = cctx.cache().cacheGroup(grpId); assert !grp.localWalEnabled() : "grp=" + grp.cacheOrGroupName(); IgniteInternalFuture<?> idxFut = cctx.database().rebuildIndexes(grp); GridDhtPreloaderAssignments histAssignments = makeHistoricalAssignments(grp, grpCntrs); resFut.onDone(histAssignments); if (histAssignments.isEmpty()) idxFut.listen(f -> cctx.walState().onGroupRebalanceFinished(grp.groupId(), topVer)); boolean finalPreloading = futAssigns.isEmpty() && onDone(true); if (log.isInfoEnabled()) { log.info("Completed" + (finalPreloading ? " (final)" : "") + " partition files preloading [grp=" + grp.cacheOrGroupName() + "]"); } }
Source:
<code>public RetentionMode mode() { <START> return RetentionMode.fromString(mode); <END> }</code><technical_language>mode null. need return null</technical_language>

Target:
public RetentionMode mode() { return this.mode == null ? null : RetentionMode.fromString(this.mode); }
Source:
<code>public List<File> getGeneratedFileList() { List<File> files = new ArrayList<File>(); files.add(getOutputFile(generator.getRecognizerFileName())); files.add(getOutputFile(generator.getVocabFileName())); ST headerExtST = null; ST extST = generator.templates.getInstanceOf("codeFileExtension"); if (generator.templates.isDefined("headerFile")) { headerExtST = generator.templates.getInstanceOf("headerFileExtension"); String suffix = Grammar.getGrammarTypeToFileNameSuffix(g.getType()); String fileName = g.name + suffix + headerExtST.render(); files.add(getOutputFile(fileName)); } if ( g.isCombined() ) { String suffix = Grammar.getGrammarTypeToFileNameSuffix(ANTLRParser.LEXER); String lexer = g.name + suffix + extST.render(); files.add(getOutputFile(lexer)); <START> String lexerTokens = g.name + suffix + ".tokens"; <END> files.add(getOutputFile(lexerTokens)); if (headerExtST != null) { String header = g.name + suffix + headerExtST.render(); files.add(getOutputFile(header)); } } if ( g.tool.gen_listener ) { files.add(getOutputFile(generator.getListenerFileName())); files.add(getOutputFile(generator.getBaseListenerFileName())); } if ( g.tool.gen_visitor ) { files.add(getOutputFile(generator.getVisitorFileName())); files.add(getOutputFile(generator.getBaseVisitorFileName())); } List<Grammar> imports = g.getAllImportedGrammars(); if ( imports!=null ) { for (Grammar g : imports) { files.add(getOutputFile(g.fileName)); } } if (files.isEmpty()) { return null; } return files; }</code><technical_language>This reference [CodeGenerator.VOCAB_FILE_EXTENSION](<LINK_0></technical_language>

Target:
public List<File> getGeneratedFileList() { List<File> files = new ArrayList<File>(); files.add(getOutputFile(generator.getRecognizerFileName())); files.add(getOutputFile(generator.getVocabFileName())); ST headerExtST = null; ST extST = generator.templates.getInstanceOf("codeFileExtension"); if (generator.templates.isDefined("headerFile")) { headerExtST = generator.templates.getInstanceOf("headerFileExtension"); String suffix = Grammar.getGrammarTypeToFileNameSuffix(g.getType()); String fileName = g.name + suffix + headerExtST.render(); files.add(getOutputFile(fileName)); } if ( g.isCombined() ) { String suffix = Grammar.getGrammarTypeToFileNameSuffix(ANTLRParser.LEXER); String lexer = g.name + suffix + extST.render(); files.add(getOutputFile(lexer)); String lexerTokens = g.name + suffix + CodeGenerator.VOCAB_FILE_EXTENSION; files.add(getOutputFile(lexerTokens)); if (headerExtST != null) { String header = g.name + suffix + headerExtST.render(); files.add(getOutputFile(header)); } } if ( g.tool.gen_listener ) { files.add(getOutputFile(generator.getListenerFileName())); files.add(getOutputFile(generator.getBaseListenerFileName())); } if ( g.tool.gen_visitor ) { files.add(getOutputFile(generator.getVisitorFileName())); files.add(getOutputFile(generator.getBaseVisitorFileName())); } List<Grammar> imports = g.getAllImportedGrammars(); if ( imports!=null ) { for (Grammar g : imports) { files.add(getOutputFile(g.fileName)); } } if (files.isEmpty()) { return null; } return files; }
Source:
<code><START> public synchronized void setSoTimeout(int timeout) throws SocketException { <END> underlying.setSoTimeout(timeout); }</code><technical_language>synchronized is harmless superfluous</technical_language>

Target:
public void setSoTimeout(int timeout) throws SocketException { underlying.setSoTimeout(timeout); }
Source:
<code>public void dispose() { <START> this.runInControlledConcurrency(() -> { <END> log.info("IrsProxyData::disposing"); resetIrs(); getSchedulUtil().deleteJob(storagePoolRefreshJobId); getSchedulUtil().deleteJob(domainRecoverOnHostJobId); _disposed = true; }); }</code><technical_language>need for 'this'</technical_language>

Target:
public void dispose() { runInControlledConcurrency(() -> { log.info("IrsProxyData::disposing"); resetIrs(); getSchedulUtil().deleteJob(storagePoolRefreshJobId); getSchedulUtil().deleteJob(domainRecoverOnHostJobId); _disposed = true; }); }
Source:
<code>public ConnectorPartitioningHandle getPartitioningHandleForExchange(ConnectorSession session, int partitionCount, List<Type> partitionTypes) { return new HivePartitioningHandle( partitionCount, partitionTypes.stream() .map(type -> toHiveType( typeTranslator, translateHiveUnsupportedTypeForTemporaryTable(type, typeManager), getDefaultHiveTypeForTemporaryTable(getTemporaryTableStorageFormat(session)))) .collect(toImmutableList()), <START> OptionalInt.empty()); <END> }</code><technical_language>this fail for now. Ideally HivePartitioningHandle hive types if partition handle is for materialized exchange</technical_language>

Target:
public ConnectorPartitioningHandle getPartitioningHandleForExchange(ConnectorSession session, int partitionCount, List<Type> partitionTypes) { return new HivePartitioningHandle( partitionCount, partitionTypes.stream() .map(type -> toHiveType( typeTranslator, translateHiveUnsupportedTypeForTemporaryTable(type, typeManager))) .collect(toImmutableList()), OptionalInt.empty()); }
Source:
<code>public Comparator getComparator() { return new Comparator<HyperLogLogCollector>() { @Override public int compare(HyperLogLogCollector lhs, HyperLogLogCollector rhs) { if(lhs == null) { <START> return rhs == null ? 0 : -1; <END> } if(rhs == null) { return 1; } return lhs.compareTo(rhs); } }; }</code><technical_language>getComparator return Ordering.<HyperLogLogCollector>natural().nullsFirst()</technical_language>

Target:
public Comparator getComparator() { return Ordering.<HyperLogLogCollector>natural().nullsFirst(); }
Source:
<code>private ChannelElementValuesDto findEmptyChannel(final List<ChannelElementValuesDto> channelElementValuesList) { for (final ChannelElementValuesDto channelElementValues : channelElementValuesList) { <START> final boolean deviceIdentificationValues = (channelElementValues.getIdentificationNumber() == null <END> || "00000000".equals(channelElementValues.getIdentificationNumber()) && (channelElementValues.getPrimaryAddress() == 0)); final boolean deviceConfigurationValues = (channelElementValues.getVersion() == 0) && (channelElementValues.getDeviceTypeIdentification() == 0) && channelElementValues.getManufacturerIdentification() == null; if (deviceIdentificationValues && deviceConfigurationValues) { return channelElementValues; } } return null; }</code><technical_language>If want do this in a neat way, extract booleans for deviceIdentificationValues deviceConfigurationValues separate methods. do: if (this.checkDeviceIdentificationValues(channelElementValues) && this.checkDeviceConfigurationValues(channelElementValues)) {return channelElementValues;}</technical_language>

Target:
private ChannelElementValuesDto findEmptyChannel(final List<ChannelElementValuesDto> channelElementValuesList) { for (final ChannelElementValuesDto channelElementValues : channelElementValuesList) { if (this.checkChannelIdentificationValues(channelElementValues) && this.checkChannelConfigurationValues(channelElementValues)) { return channelElementValues; } } return null; }
Source:
<code><START> protected byte[] createTinyBinary(String xml) <END> throws XMLStreamException, SaxonApiException, IOException { SaxonDocBuilder builder = new SaxonDocBuilder(processor); XmlReader xmlReader = new XmlReader(); xmlReader.addHandler(builder); xmlReader.setStripNamespaces(true); xmlReader.read(IOUtils.toInputStream(xml, Charset.defaultCharset().name())); XdmNode node = builder.getDocument(); TinyTree tinyTree = ((TinyDocumentImpl) node.getUnderlyingNode()).getTree(); TinyBinary tinyBinary = new TinyBinary(tinyTree, StandardCharsets.UTF_8); return tinyBinary.getBytes(); }</code><technical_language>inject a Function<byte[], String> in constructor call create tiny binary instead of making method protected override in sub-class? If do that, visibility package-private instead of protected expect tests override</technical_language>

Target:
private byte[] createTinyBinary(String xml) throws XMLStreamException, SaxonApiException, IOException { SaxonDocBuilder builder = new SaxonDocBuilder(processor); XmlReader xmlReader = new XmlReader(); xmlReader.addHandler(builder); xmlReader.setStripNamespaces(true); xmlReader.read(IOUtils.toInputStream(xml, Charset.defaultCharset().name())); XdmNode node = builder.getDocument(); TinyTree tinyTree = ((TinyDocumentImpl) node.getUnderlyingNode()).getTree(); TinyBinary tinyBinary = tinyBinaryFunction.apply(tinyTree); return tinyBinary.getBytes(); }
Source:
<code>private Map<String, Object> createResultMap(Result result) { Map<String, Object> resultMap = new HashMap<String, Object>(); resultMap.put("status", result.getStatus().lowerCaseName()); if (result.getErrorMessage() != null) { resultMap.put("error_message", result.getErrorMessage()); } if (result.getDuration() != 0) { <START> resultMap.put("duration", MILLISECONDS.toNanos(result.getDuration())); <END> } return resultMap; }</code><technical_language>Do need nanos? lost precision of nanos anyway, toNanos() basically scales **1000000** i think. millis if isnt a specific reason for nanos</technical_language>

Target:
private Map<String, Object> createResultMap(Result result) { Map<String, Object> resultMap = new HashMap<String, Object>(); resultMap.put("status", result.getStatus().lowerCaseName()); if (result.getErrorMessage() != null) { resultMap.put("error_message", result.getErrorMessage()); } if (result.getDuration() != 0) { resultMap.put("duration", result.getDuration()); } return resultMap; }
Source:
<code>public BsmAdminPageAttributeEditWindow value(String value) { findElementById("valueField").clear(); <START> findElementById("valueField").sendKeys(String.valueOf(value)); <END> return this; }</code><technical_language>is a String, do need String.valueOf(value) here</technical_language>

Target:
public BsmAdminPageAttributeEditWindow value(String value) { findElementById("valueField").clear(); findElementById("valueField").sendKeys(value); return this; }
Source:
<code>private AbstractPlanNode findScanNodeForWindowFunction(AbstractPlanNode root) { <START> while (root != null <END> && ( ! (( root instanceof AbstractJoinPlanNode ) || (root instanceof AbstractScanPlanNode )))) { root = (root.getChildCount() == 0) ? null : root.getChild(0); } return root; }</code><technical_language>this general code reused in needsOrderBy method</technical_language>

Target:
private IndexUseForOrderBy findScanNodeForWindowFunction(AbstractPlanNode root) { while (root != null) { if (root instanceof IndexSortablePlanNode) { return ((IndexSortablePlanNode) root).indexUse(); } if ((root instanceof AbstractScanPlanNode) || (root instanceof AbstractJoinPlanNode)) { return null; } if (root.getChildCount() == 0) { break; } root = root.getChild(0); } return null; }
Source:
<code><START> public void synchronizeMailboxSynchronous_withNoRemoteFolderProvided_shouldOpenRemoteFolderFromStore() throws Exception { <END> messageCountInRemoteFolder(1); when(account.getRemoteStore()).thenReturn(remoteStore); when(remoteStore.getFolder(FOLDER_NAME)).thenReturn(remoteFolder); controller.synchronizeMailboxSynchronous(account, FOLDER_NAME, listener, null); verify(remoteFolder).open(Folder.OPEN_MODE_RW); }</code><technical_language>Code style issue: This line is longer 120 characters. Please wrap throws. a couple of other instances of this</technical_language>

Target:
public void synchronizeMailboxSynchronous_withNoRemoteFolderProvided_shouldOpenRemoteFolderFromStore() throws Exception { messageCountInRemoteFolder(1); configureRemoteStoreWithFolder(); controller.synchronizeMailboxSynchronous(account, FOLDER_NAME, listener, null); verify(remoteFolder).open(Folder.OPEN_MODE_RW); }
Source:
<code>public void run() { boolean eosWritten = false; try { while (underlying.hasNext()) { List<T> readAhead = new ArrayList<T>(batchSize + 1); for (int i = 0; i < batchSize && underlying.hasNext(); i++) { readAhead.add(underlying.next()); } buffer.put(readAhead); <START> if (readAhead.size() == 0) { <END> eosWritten = true; } } } catch (InterruptedException ie) { } catch (Throwable t) { ex.set(t); throw new RuntimeException(t); } finally { Thread.interrupted(); try { if (!eosWritten) { buffer.put(new ArrayList<T>()); } } catch (InterruptedException e2) { log.warn("Thread interrupt received whilst writing end of stream indicator"); } } }</code><technical_language>isEmpty instead</technical_language>

Target:
public void run() { boolean eosWritten = false; try { while (underlying.hasNext()) { final List<T> readAhead = new ArrayList<T>(bufferSize); for (int i = 0; i < bufferSize && underlying.hasNext(); i++) { readAhead.add(underlying.next()); } buffer.put(readAhead); if (readAhead.isEmpty()) { eosWritten = true; } } } catch (InterruptedException ie) { } catch (Throwable t) { ex.set(t); throw new RuntimeException(t); } finally { Thread.interrupted(); try { if (!eosWritten) { buffer.put(new ArrayList<T>()); } } catch (InterruptedException e2) { log.warn("Thread interrupt received whilst writing end of stream indicator"); } } }
Source:
<code>public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options) { checkArgument(location == null || location.equals(region), "location must be null or %s", region); boolean containerCreated; if (options.isPublicRead()) { containerCreated = api.getContainerApi(regionId).create(container, ANYBODY_READ); } else { containerCreated = api.getContainerApi(regionId).create(container, BASIC_CONTAINER); <START> } <END> if (containerCreated) { containerCache.put(container, Optional.fromNullable(api.getContainerApi(regionId).get(container))); } return containerCreated; }</code><technical_language>simplify this to: java boolean containerCreated = api.getContainerApi(regionId).create(container, options.isPublicRead() ? ANYBODY_READ : BASIC_CONTAINER);</technical_language>

Target:
public boolean createContainerInLocation(Location location, String container, CreateContainerOptions options) { checkArgument(location == null || location.equals(region), "location must be null or %s", region); boolean containerCreated = api.getContainerApi(regionId).create(container, options.isPublicRead() ? ANYBODY_READ : BASIC_CONTAINER); if (containerCreated) { containerCache.put(container, Optional.fromNullable(api.getContainerApi(regionId).get(container))); } return containerCreated; }
Source:
<code>public void testReadStatistics() throws IOException { describe("Testing the values of statistics from read operation in " + "AbfsInputStream"); AzureBlobFileSystem fs = getFileSystem(); AzureBlobFileSystemStore abfss = fs.getAbfsStore(); Path readStatPath = path(getMethodName()); AbfsOutputStream out = null; AbfsInputStream in = null; try { out = createAbfsOutputStreamWithFlushEnabled(fs, readStatPath); out.write(defBuffer); out.hflush(); in = abfss.openFileForRead(readStatPath, fs.getFsStatistics()); for (int i = 0; i < OPERATIONS; i++) { in.read(); } AbfsInputStreamStatisticsImpl stats = (AbfsInputStreamStatisticsImpl) in.getStreamStatistics(); assertEquals("Mismatch in bytesRead value", OPERATIONS, stats.getBytesRead()); assertEquals("Mismatch in readOps value", OPERATIONS, stats.getReadOperations()); assertEquals("Mismatch in remoteReadOps value", 1, stats.getRemoteReadOperations()); <START> <END> } finally { IOUtils.cleanupWithLogger(LOG, out, in); } }</code><technical_language>1. close() stream ask for stats again, verify readable 2. call toString opened closed streams</technical_language>

Target:
public void testReadStatistics() throws IOException { describe("Testing the values of statistics from read operation in " + "AbfsInputStream"); AzureBlobFileSystem fs = getFileSystem(); AzureBlobFileSystemStore abfss = fs.getAbfsStore(); Path readStatPath = path(getMethodName()); AbfsOutputStream out = null; AbfsInputStream in = null; try { out = createAbfsOutputStreamWithFlushEnabled(fs, readStatPath); out.write(defBuffer); out.hflush(); in = abfss.openFileForRead(readStatPath, fs.getFsStatistics()); for (int i = 0; i < OPERATIONS; i++) { in.read(); } AbfsInputStreamStatisticsImpl stats = (AbfsInputStreamStatisticsImpl) in.getStreamStatistics(); LOG.info("STATISTICS: {}", stats.toString()); assertEquals("Mismatch in bytesRead value", OPERATIONS, stats.getBytesRead()); assertEquals("Mismatch in readOps value", OPERATIONS, stats.getReadOperations()); assertEquals("Mismatch in remoteReadOps value", 1, stats.getRemoteReadOperations()); in.close(); LOG.info("STATISTICS after closing: {}", stats.toString()); } finally { IOUtils.cleanupWithLogger(LOG, out, in); } }
Source:
<code>public MonoReilSolver(final IInstructionGraph instructionGraph, final AnalysisDirection analysisDirection, final ILattice<LatticeElementType> lattice) { m_graph = Preconditions.checkNotNull(instructionGraph, <START> "Instruction graph argument can not be null"); <END> m_direction = Preconditions.checkNotNull(analysisDirection, "Analysis direction argument can not be null"); m_lattice = Preconditions.checkNotNull(lattice, "Latice argument can not be null"); m_workList = MinMaxPriorityQueue.expectedSize(m_graph.size()).create(); }</code><technical_language>Please leave Error: prefix in files. give unique error numbers individual errors making more precise. If want change Error message prefix please provide a good justification</technical_language>

Target:
public MonoReilSolver(final IInstructionGraph instructionGraph, final AnalysisDirection analysisDirection, final ILattice<LatticeElementType> lattice) { m_graph = Preconditions.checkNotNull(instructionGraph, "Error: instruction graph argument can not be null"); m_direction = Preconditions.checkNotNull(analysisDirection, "Error: analysis direction argument can not be null"); m_lattice = Preconditions.checkNotNull(lattice, "Error: latice argument can not be null"); m_workList = MinMaxPriorityQueue.expectedSize(m_graph.size()).create(); }
Source:
<code>private static void verifyIssue(TestIssue expected, PreciseIssue actual) { if (line(actual) > expected.line()) { fail("Missing issue at line " + expected.line()); } if (line(actual) < expected.line()) { fail("Unexpected issue at line " + line(actual) + ": \"" + actual.primaryLocation().message() + "\""); } if (expected.message() != null) { assertThat(actual.primaryLocation().message()).as("Bad message at line " + expected.line()).isEqualTo(expected.message()); } if (expected.effortToFix() != null) { assertThat(actual.cost()).as("Bad effortToFix at line " + expected.line()).isEqualTo(expected.effortToFix()); } if (expected.startColumn() != null) { <START> assertThat(((PreciseIssue) actual).primaryLocation().startLineOffset() + 1).as("Bad start column at line " + expected.line()).isEqualTo(expected.startColumn()); <END> } if (expected.endColumn() != null) { assertThat(((PreciseIssue) actual).primaryLocation().endLineOffset() + 1).as("Bad end column at line " + expected.line()).isEqualTo(expected.endColumn()); } if (expected.endLine() != null) { assertThat(((PreciseIssue) actual).primaryLocation().endLine()).as("Bad end line at line " + expected.line()).isEqualTo(expected.endLine()); } if (expected.secondaryLines() != null) { assertThat(secondary(actual)).as("Bad secondary locations at line " + expected.line()).isEqualTo(expected.secondaryLines()); } }</code><technical_language>@vilchik-elena Eclipse tells is unnecessary cast PreciseIssue lines 89 92</technical_language>

Target:
private static void verifyIssue(TestIssue expected, PreciseIssue actual) { if (line(actual) > expected.line()) { fail("Missing issue at line " + expected.line()); } if (line(actual) < expected.line()) { fail("Unexpected issue at line " + line(actual) + ": \"" + actual.primaryLocation().message() + "\""); } if (expected.message() != null) { assertThat(actual.primaryLocation().message()).as("Bad message at line " + expected.line()).isEqualTo(expected.message()); } if (expected.effortToFix() != null) { assertThat(actual.cost()).as("Bad effortToFix at line " + expected.line()).isEqualTo(expected.effortToFix()); } if (expected.startColumn() != null) { assertThat(actual.primaryLocation().startLineOffset() + 1).as("Bad start column at line " + expected.line()).isEqualTo(expected.startColumn()); } if (expected.endColumn() != null) { assertThat(actual.primaryLocation().endLineOffset() + 1).as("Bad end column at line " + expected.line()).isEqualTo(expected.endColumn()); } if (expected.endLine() != null) { assertThat(actual.primaryLocation().endLine()).as("Bad end line at line " + expected.line()).isEqualTo(expected.endLine()); } if (expected.secondaryLines() != null) { assertThat(secondary(actual)).as("Bad secondary locations at line " + expected.line()).isEqualTo(expected.secondaryLines()); } }
Source:
<code>private Component getComponent(String name, AbstractProject firstJob, AbstractProject lastJob, boolean showAggregatedPipeline, int componentNumber) throws PipelineException { Pipeline pipeline = Pipeline.extractPipeline(name, firstJob, lastJob); Component component = new Component(name, firstJob.getName(), firstJob.getUrl(), firstJob.isParameterized(), noOfPipelines, pagingEnabled, componentNumber); List<Pipeline> pipelines = new ArrayList<Pipeline>(); if (showAggregatedPipeline) { pipelines.add(pipeline.createPipelineAggregated(getOwnerItemGroup(), showAggregatedChanges)); } if (isFullScreenView()) { <START> pipelines.addAll(pipeline.createPipelineLatest(noOfPipelines, getOwnerItemGroup(), false, component)); <END> } else { pipelines.addAll(pipeline.createPipelineLatest(noOfPipelines, getOwnerItemGroup(), pagingEnabled, component)); } component.setPipeines(pipelines); return component; }</code><technical_language>totalNoOfPipelines for component set in this method instead of passed createPipelineLatest</technical_language>

Target:
private Component getComponent(String name, AbstractProject firstJob, AbstractProject lastJob, boolean showAggregatedPipeline, int componentNumber) throws PipelineException { Pipeline pipeline = Pipeline.extractPipeline(name, firstJob, lastJob); Component component = new Component(name, firstJob.getName(), firstJob.getUrl(), firstJob.isParameterized(), noOfPipelines, pagingEnabled, componentNumber); List<Pipeline> pipelines = new ArrayList<Pipeline>(); if (showAggregatedPipeline) { pipelines.add(pipeline.createPipelineAggregated(getOwnerItemGroup(), showAggregatedChanges)); } if (isFullScreenView()) { pipelines.addAll(pipeline.createPipelineLatest(noOfPipelines, getOwnerItemGroup(), false, component)); } else { pipelines.addAll(pipeline.createPipelineLatest(noOfPipelines, getOwnerItemGroup(), pagingEnabled, component)); } component.setPipelines(pipelines); return component; }
Source:
<code>public boolean matches(Object item) { if(item instanceof Shell){ Shell shell = (Shell)item; CompositeHandler compositeHandler = CompositeHandler.getInstance(); LabelHandler lHandler = LabelHandler.getInstance(); try{ Composite shellComposite = (Composite)compositeHandler.getChildren(shell)[0]; Control[] compositeChildren = compositeHandler.getChildren(shellComposite); Control labelControl = compositeChildren[2]; if(labelControl instanceof Label){ String labelText = lHandler.getText((Label)labelControl); <START> if(title != null){ <END> return title.equals(labelText); } return matcher.matches(labelText); } }catch (Exception e) { return false; } } return false; }</code><technical_language>change in constructor, matcher.matches(labelText)</technical_language>

Target:
public boolean matches(Object item) { if(item instanceof Shell){ Shell shell = (Shell)item; CompositeHandler compositeHandler = CompositeHandler.getInstance(); LabelHandler lHandler = LabelHandler.getInstance(); try{ Composite shellComposite = (Composite)compositeHandler.getChildren(shell)[0]; Control[] compositeChildren = compositeHandler.getChildren(shellComposite); Control labelControl = compositeChildren[2]; if(labelControl instanceof Label){ String labelText = lHandler.getText((Label)labelControl); return matcher.matches(labelText); } }catch (Exception e) { return false; } } return false; }
Source:
<code>public Connector processImageActionName() { return integrationContext -> { Map<String, Object> inBoundVariables = integrationContext.getInBoundVariables(); System.out.println("processImageActionName inbound variables keys: " + inBoundVariables.keySet()); System.out.println("processImageActionName inbound variables values: " + inBoundVariables.values()); boolean expectedValue = (Boolean) inBoundVariables.get("expectedKey"); integrationContext.addOutBoundVariable("approved", expectedValue); assertThat(((String) inBoundVariables.get("input-variable-name-1"))).isEqualTo("input-variable-name-1"); <START> return integrationContext; <END> }; }</code><technical_language>checked test fails if this assertion fails</technical_language>

Target:
public Connector processImageActionName() { return integrationContext -> { Map<String, Object> inBoundVariables = integrationContext.getInBoundVariables(); LOGGER.info("processImageActionName inbound variables keys: " + inBoundVariables.keySet()); LOGGER.info("processImageActionName inbound variables values: " + inBoundVariables.values()); boolean expectedValue = (Boolean) inBoundVariables.get("expectedKey"); integrationContext.addOutBoundVariable("approved", expectedValue); assertThat(((String) inBoundVariables.get("input-variable-name-1"))).isEqualTo("input-variable-name-1"); return integrationContext; }; }
Source:
<code>private RbContentService.RbEndpoints createRbService(Site site) { RbContentService.RbEndpoints webService; <START> webService = RestAdapterFactory.newInstance(site, <END> String.format(Locale.ROOT, Prefs.getRestbaseUriFormat(), WikipediaApp.getInstance().getNetworkProtocol(), site.getDomain())) .create(RbContentService.RbEndpoints.class); return webService; }</code><technical_language>This line combined previous line</technical_language>

Target:
private RbContentService.RbEndpoints createRbService(Site site) { RbContentService.RbEndpoints webService = RestAdapterFactory.newInstance(site, String.format(Locale.ROOT, Prefs.getRestbaseUriFormat(), WikipediaApp.getInstance().getNetworkProtocol(), site.getDomain())) .create(RbContentService.RbEndpoints.class); return webService; }
Source:
<code>public void testGetSelectedElementUUIDWhenNotSelected() { selectedItems.clear(); assertEquals(null, ClientUtils.getSelectedElementUUID(viewerSession)); <START> assertEquals(null, ClientUtils.getSelectedElementUUID(editorSession)); <END> }</code><technical_language>assertNull instead</technical_language>

Target:
public void testGetSelectedElementUUIDWhenNotSelected() { selectedItems.clear(); assertNull(ClientUtils.getSelectedElementUUID(viewerSession)); assertNull(ClientUtils.getSelectedElementUUID(editorSession)); }
Source:
<code>public Response shutdownTasksForDataSource(@PathParam("dataSource") final String dataSource) { return asLeaderWith( taskMaster.getTaskQueue(), new Function<TaskQueue, Response>() { @Override public Response apply(TaskQueue taskQueue) { final List<Task> tasks = taskStorageQueryAdapter.getActiveTasks(); boolean ownTask = false; for (final Task task : tasks) { if (task.getDataSource().equals(dataSource)) { taskQueue.shutdown(task.getId()); ownTask = true; } } if (!ownTask) { <START> return Response.status(Response.Status.BAD_REQUEST) <END> .entity(StringUtils.format( "Cannot find any active task for this dataSource: [%s]", dataSource )) .build(); } else { return Response.ok(ImmutableMap.of("dataSource", dataSource)).build(); } } } ); }</code><technical_language>IMO, return OK in this case, kill-all operation idempotent. a good property have, especially in done "just in case" removing a datasource</technical_language>

Target:
public Response shutdownTasksForDataSource(@PathParam("dataSource") final String dataSource) { return asLeaderWith( taskMaster.getTaskQueue(), new Function<TaskQueue, Response>() { @Override public Response apply(TaskQueue taskQueue) { final List<TaskInfo<Task, TaskStatus>> tasks = taskStorageQueryAdapter.getActiveTaskInfo(dataSource); for (final TaskInfo<Task, TaskStatus> task : tasks) { taskQueue.shutdown(task.getId()); } return Response.ok(ImmutableMap.of("dataSource", dataSource)).build(); } } ); }
Source:
<code>void triggerReload() throws Exception { LiveReloadWebSocketHandler handler = connect(); this.server.triggerReload(); <START> await().atMost(Duration.ofSeconds(1)).until(handler::getMessages, msgs -> msgs.get(0).contains("<LINK_0>") && msgs.get(1).contains("command\":\"reload\"")); <END> }</code><technical_language>I need this call stop()</technical_language>

Target:
void triggerReload() throws Exception { LiveReloadWebSocketHandler handler = connect(); this.server.triggerReload(); await().atMost(Duration.ofSeconds(1)).until(handler::getMessages, (msgs) -> msgs.get(0).contains("<LINK_0>") && msgs.get(1).contains("command\":\"reload\"")); }
Source:
<code>protected Message<?> toMessagingMessage(org.springframework.amqp.core.Message amqpMessage) { if (this.batchingStrategy.canDebatch(amqpMessage.getMessageProperties())) { if (this.converterAdapter.isMessageList()) { List<Message<?>> messages = new ArrayList<>(); this.batchingStrategy.deBatch(amqpMessage, fragment -> { messages.add(super.toMessagingMessage(fragment)); }); return new GenericMessage<>(messages); } else { <START> List<Object> list = new ArrayList<Object>(); <END> this.batchingStrategy.deBatch(amqpMessage, fragment -> { list.add(this.converterAdapter.extractPayload(fragment)); }); return MessageBuilder.withPayload(list) .copyHeaders(this.converterAdapter .getHeaderMapper() .toHeaders(amqpMessage.getMessageProperties())) .build(); } } return super.toMessagingMessage(amqpMessage); }</code><technical_language>diamond operator</technical_language>

Target:
protected Message<?> toMessagingMessage(org.springframework.amqp.core.Message amqpMessage) { if (this.batchingStrategy.canDebatch(amqpMessage.getMessageProperties())) { if (this.converterAdapter.isMessageList()) { List<Message<?>> messages = new ArrayList<>(); this.batchingStrategy.deBatch(amqpMessage, fragment -> { messages.add(super.toMessagingMessage(fragment)); }); return new GenericMessage<>(messages); } else { List<Object> list = new ArrayList<>(); this.batchingStrategy.deBatch(amqpMessage, fragment -> { list.add(this.converterAdapter.extractPayload(fragment)); }); return MessageBuilder.withPayload(list) .copyHeaders(this.converterAdapter .getHeaderMapper() .toHeaders(amqpMessage.getMessageProperties())) .build(); } } return super.toMessagingMessage(amqpMessage); }
Source:
<code>private void checkLogDir() throws LogdirContentCheckException { <START> File[] files = this.dataDir.listFiles(); <END> if(files != null) { boolean hasSnapshotFiles = false; for (File file : files) { if(Util.isSnapshotFile(file)){ hasSnapshotFiles = true; break; } } if (hasSnapshotFiles) { throw new LogdirContentCheckException("Log directory has snapshot files. Check if dataLogDir and dataDir configuration is correct."); } } }</code><technical_language>do of of filtered version of listFiles() files in directory? For example, FilenameFilter: <LINK_0></technical_language>

Target:
private void checkLogDir() throws LogDirContentCheckException { File[] files = this.dataDir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return Util.isSnapshotFileName(name); } }); if (files != null && files.length > 0) { throw new LogDirContentCheckException("Log directory has snapshot files. Check if dataLogDir and dataDir configuration is correct."); } }
Source:
<code>public boolean provides(String pageId) { if <START> (DebugPage.PAGE_ID.equals(pageId)) { <END> return true; } return false; }</code><technical_language>"return DebugPage.PAGE_ID.equals(pageId)"</technical_language>

Target:
public boolean provides(String pageId) { return DebugPage.PAGE_ID.equals(pageId); }
Source:
<code>public List<Snippet> choose(Segmenter segmenter, HitEnum e, int max) { if (!e.next()) { return Collections.emptyList(); } S state = init(segmenter, max); while (mustKeepGoing(state)) { int startOffset = e.startOffset(); int lastEndOffset = e.endOffset(); if (!segmenter.acceptable(startOffset, lastEndOffset)) { if (!e.next()) { return results(state); } continue; } List<Hit> hits = new ArrayList<Hit>(); hits.add(hitBuilder.buildHit(e)); while (true) { boolean done = !e.next(); if (done) { snippet(state, startOffset, lastEndOffset, hits); return results(state); } <START> final int thisEndOffset = e.endOffset(); <END> if (!segmenter.acceptable(startOffset, thisEndOffset)) { snippet(state, startOffset, lastEndOffset, hits); break; } hits.add(hitBuilder.buildHit(e)); lastEndOffset = thisEndOffset; } } return results(state); }</code><technical_language>final super helpful here</technical_language>

Target:
public List<Snippet> choose(Segmenter segmenter, HitEnum e, int max) { if (!e.next()) { return Collections.emptyList(); } S state = init(segmenter, max); while (mustKeepGoing(state)) { int startOffset = e.startOffset(); int lastEndOffset = e.endOffset(); if (!segmenter.acceptable(startOffset, lastEndOffset)) { if (!e.next()) { return results(state); } continue; } List<Hit> hits = new ArrayList<Hit>(); hits.add(hitBuilder.buildHit(e)); while (true) { boolean done = !e.next(); if (done) { snippet(state, startOffset, lastEndOffset, hits); return results(state); } int thisEndOffset = e.endOffset(); if (!segmenter.acceptable(startOffset, thisEndOffset)) { snippet(state, startOffset, lastEndOffset, hits); break; } hits.add(hitBuilder.buildHit(e)); lastEndOffset = thisEndOffset; } } return results(state); }
Source:
<code>public void DeleteAndRestoreMapTests_006_SysOpCanDeleteMap() { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userNameSysop, credentials.passwordSysop, wikiURL); <START> InteractiveMapPageObject selectedMap = base.openInteractiveMapById(wikiURL, InteractiveMapsContent.mapToDeleteAndRestore); <END> selectedMap.verifyMapOpened(); String deletedMapId = selectedMap.getEmbedMapID(); DeleteAMapComponentObject deleteMapModal = selectedMap.deleteMap(); InteractiveMapsPageObject specialMap = deleteMapModal.deleteMap(); specialMap.verifyMapDeletedMessage(); }</code><technical_language>suggest another MapID for 006 007 break dependency 001 002 successful</technical_language>

Target:
public void DeleteAndRestoreMapTests_006_SysOpCanDeleteMap() { WikiBasePageObject base = new WikiBasePageObject(driver); base.logInCookie(credentials.userNameSysop, credentials.passwordSysop, wikiURL); InteractiveMapPageObject selectedMap = base.openInteractiveMapById(wikiURL, InteractiveMapsContent.mapToDeleteAndRestore[3]); selectedMap.verifyMapOpened(); DeleteAMapComponentObject deleteMapModal = selectedMap.deleteMap(); InteractiveMapsPageObject specialMap = deleteMapModal.deleteMap(); }
Source:
<code>protected void channelRead0( ChannelHandlerContext ctx, T request ) throws Exception { <START> log.debug( "Handling request " + request ); <END> StoreCopyFinishedResponse.Status responseStatus = StoreCopyFinishedResponse.Status.E_UNKNOWN; try { NeoStoreDataSource neoStoreDataSource = dataSource.get(); if ( !hasSameStoreId( request.expectedStoreId(), neoStoreDataSource ) ) { responseStatus = StoreCopyFinishedResponse.Status.E_STORE_ID_MISMATCH; } else if ( !isTransactionWithinReach( request.requiredTransactionId(), checkpointerSupplier.get() ) ) { responseStatus = StoreCopyFinishedResponse.Status.E_TOO_FAR_BEHIND; } else { File storeDir = neoStoreDataSource.getStoreDir(); try ( ResourceIterator<StoreFileMetadata> resourceIterator = files( request, neoStoreDataSource ) ) { while ( resourceIterator.hasNext() ) { StoreFileMetadata storeFileMetadata = resourceIterator.next(); storeFileStreamingProtocol.stream( ctx, new StoreResource( storeFileMetadata.file(), relativePath( storeDir, storeFileMetadata.file() ), storeFileMetadata.recordSize(), pageCache, fs ) ); } } responseStatus = StoreCopyFinishedResponse.Status.SUCCESS; } } finally { storeFileStreamingProtocol.end( ctx, responseStatus ); protocol.expect( CatchupServerProtocol.State.MESSAGE_TYPE ); } }</code><technical_language>This create message string time, if debug logging is on. parameterised method avoid that</technical_language>

Target:
protected void channelRead0( ChannelHandlerContext ctx, T request ) throws Exception { log.debug( "Handling request %s", request ); StoreCopyFinishedResponse.Status responseStatus = StoreCopyFinishedResponse.Status.E_UNKNOWN; try { NeoStoreDataSource neoStoreDataSource = dataSource.get(); if ( !hasSameStoreId( request.expectedStoreId(), neoStoreDataSource ) ) { responseStatus = StoreCopyFinishedResponse.Status.E_STORE_ID_MISMATCH; } else if ( !isTransactionWithinReach( request.requiredTransactionId(), checkpointerSupplier.get() ) ) { responseStatus = StoreCopyFinishedResponse.Status.E_TOO_FAR_BEHIND; } else { File storeDir = neoStoreDataSource.getStoreDir(); try ( ResourceIterator<StoreFileMetadata> resourceIterator = files( request, neoStoreDataSource ) ) { while ( resourceIterator.hasNext() ) { StoreFileMetadata storeFileMetadata = resourceIterator.next(); storeFileStreamingProtocol.stream( ctx, new StoreResource( storeFileMetadata.file(), relativePath( storeDir, storeFileMetadata.file() ), storeFileMetadata.recordSize(), pageCache, fs ) ); } } responseStatus = StoreCopyFinishedResponse.Status.SUCCESS; } } finally { storeFileStreamingProtocol.end( ctx, responseStatus ); protocol.expect( CatchupServerProtocol.State.MESSAGE_TYPE ); } }
Source:
<code>private void testEditResponse() throws Exception { ______TS("edit responses"); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); <START> assertEquals("<p>Student 1 self feedback.</p>", fr.getResponseDetails().getAnswerString()); <END> submitPage = loginToInstructorEditStudentFeedbackPage("IESFPTCourseinstr", "student1InIESFPTCourse@gmail.tmt", "session1InIESFPTCourse"); submitPage.verifyHtmlMainContent("/instructorEditStudentFeedbackPageOpen.html"); submitPage.fillResponseRichTextEditor(1, 0, "Good design"); submitPage.clickSubmitButton(); submitPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, Const.StatusMessages.FEEDBACK_UNANSWERED_QUESTIONS + "2, 3."); submitPage.verifyAndCloseSuccessfulSubmissionModal("2, 3."); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertEquals("<p>Good design</p>", fr.getResponseDetails().getAnswerString()); }</code><technical_language>tag is added</technical_language>

Target:
private void testEditResponse() throws Exception { ______TS("edit responses"); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertEquals("Student 1 self feedback.", fr.getResponseDetails().getAnswerString()); submitPage = loginToInstructorEditStudentFeedbackPage("IESFPTCourseinstr", "student1InIESFPTCourse@gmail.tmt", "session1InIESFPTCourse"); submitPage.verifyHtmlMainContent("/instructorEditStudentFeedbackPageOpen.html"); submitPage.fillResponseRichTextEditor(1, 0, "Good design"); submitPage.clickSubmitButton(); submitPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED, Const.StatusMessages.FEEDBACK_UNANSWERED_QUESTIONS + "2."); submitPage.verifyAndCloseSuccessfulSubmissionModal("2."); fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 1); fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertEquals("<p>Good design</p>", fr.getResponseDetails().getAnswerString()); }
Source:
<code>public boolean retrieveDocument(PatientSearchBean patientQuerySearch) throws IOException { DocumentRetrieve docRetrieve = new DocumentRetrieve(); docRetrieve.setDocumentId(patientQuerySearch.getSelectedCurrentDocument().getDocumentId()); docRetrieve.setHCID(patientQuerySearch.getOrganization()); docRetrieve.setRepositoryId(patientQuerySearch.getSelectedCurrentDocument().getRepositoryUniqueId()); DocumentRetrieveResults response = documentRetrieveService.retrieveDocuments(docRetrieve); if (response.getDocument() != null) { if (response.getContentType().contains("text/xml")) { <START> InputStream xsl = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/WEB-INF/CDA.xsl"); <END> InputStream xml = new ByteArrayInputStream(response.getDocument()); byte[] convertXmlToHtml = null; if (xsl != null) { convertXmlToHtml = convertXMLToHTML(xml, xsl); xsl.close(); } patientQuerySearch.getSelectedCurrentDocument().setDocumentContent(convertXmlToHtml); } else { patientQuerySearch.getSelectedCurrentDocument().setDocumentContent(response.getDocument()); } patientQuerySearch.getSelectedCurrentDocument().setDocumentRetrieved(true); LOG.debug("Successfully retrieved the content of document with documentid:" + response.getContentType()); return true; } return false; }</code><technical_language>hard coding this xsl option. configurable. (This addressed in next pull request)</technical_language>

Target:
public boolean retrieveDocument(PatientSearchBean patientQuerySearch) { DocumentRetrieve docRetrieve = new DocumentRetrieve(); docRetrieve.setDocumentId(patientQuerySearch.getSelectedCurrentDocument().getDocumentId()); docRetrieve.setHCID(patientQuerySearch.getOrganization()); docRetrieve.setRepositoryId(patientQuerySearch.getSelectedCurrentDocument().getRepositoryUniqueId()); DocumentRetrieveResults response = documentRetrieveService.retrieveDocuments(docRetrieve); if (response.getDocument() != null) { if (response.getContentType().contains("text/xml")) { InputStream xsl = FacesContext.getCurrentInstance().getExternalContext().getResourceAsStream("/WEB-INF/CDA.xsl"); InputStream xml = new ByteArrayInputStream(response.getDocument()); byte[] convertXmlToHtml = null; if (xsl != null) { convertXmlToHtml = convertXMLToHTML(xml, xsl); closeStreamSilently(xsl); } patientQuerySearch.getSelectedCurrentDocument().setDocumentContent(convertXmlToHtml); } else { patientQuerySearch.getSelectedCurrentDocument().setDocumentContent(response.getDocument()); } patientQuerySearch.getSelectedCurrentDocument().setDocumentRetrieved(true); LOG.debug("Successfully retrieved the content of document with documentid:" + response.getContentType()); return true; } return false; }
Source:
<code>public TransportHints(boolean tcpNoDelay) { <START> tcpNoDelay(tcpNoDelay); <END> }</code><technical_language>This constructor yields a NullPointerException called, default constructor is called map is created. Please consider either: - Calling default constructor first. - Moving initialization of map instance initializer. - Initialize options inline (i.e. Map<String, String> options = Maps.newConcurrentMap<String, String>();). I in Java 7 necessary <String, String> twice, please do easier compile rosjava for older Java versions</technical_language>

Target:
public TransportHints(boolean tcpNoDelay) { this.tcpNoDelay = tcpNoDelay; }
Source:
<code>private boolean isThreadSuspended(IExecutionDMContext ctx) { assert ctx != null; <START> IRunControl runControl = getServicesTracker().getService(IRunControl.class); <END> return runControl.isSuspended(ctx); }</code><technical_language>check for null in case</technical_language>

Target:
private boolean isThreadSuspended(IExecutionDMContext ctx) { assert ctx != null; IRunControl runControl = getServicesTracker().getService(IRunControl.class); if (runControl != null) { return runControl.isSuspended(ctx); } else { return false; } }
Source:
<code>private static SubscriberScopeManager createScopeManager( final IResource[] resources) { ResourceMapping[] mappings = GitScopeUtil .getResourceMappings(resources); GitSynchronizeDataSet set = new GitSynchronizeDataSet(); final GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber( set); Job initJob = new WorkspaceJob( <START> UIText.GitModelSynchonize_fetchGitDataJobName) { <END> @Override public IStatus runInWorkspace(IProgressMonitor monitor) { subscriber.init(monitor); return Status.OK_STATUS; } }; initJob.setUser(true); initJob.setRule(RuleUtil.getRuleForRepositories(resources)); initJob.schedule(); try { initJob.join(); } catch (InterruptedException e) { Activator.logError(UIText.GitModelSynchonize_fetchInterrupted, e); } SubscriberScopeManager manager = new SubscriberScopeManager( UIText.GitScopeOperation_GitScopeManager, mappings, subscriber, true); return manager; }</code><technical_language>typo: s/Synchonize/Synchronize/</technical_language>

Target:
private static SubscriberScopeManager createScopeManager( final IResource[] resources) { ResourceMapping[] mappings = GitScopeUtil .getResourceMappings(resources); GitSynchronizeDataSet set = new GitSynchronizeDataSet(); final GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber( set); Job initJob = new WorkspaceJob( UIText.GitModelSynchronize_fetchGitDataJobName) { @Override public IStatus runInWorkspace(IProgressMonitor monitor) { subscriber.init(monitor); return Status.OK_STATUS; } }; initJob.setUser(true); initJob.setRule(RuleUtil.getRuleForRepositories(resources)); initJob.schedule(); try { initJob.join(); } catch (InterruptedException e) { Activator.logError(UIText.GitModelSynchronize_fetchInterrupted, e); } SubscriberScopeManager manager = new SubscriberScopeManager( UIText.GitScopeOperation_GitScopeManager, mappings, subscriber, true); return manager; }