auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void notifyChanged(Notification notification) { super.notifyChanged(notification); final int eventType = notification.getEventType(); if (eventType == Notification.ADD || eventType == Notification.SET || eventType == Notification.ADD_MANY) { final ISelection selection; if (eventType == Notification.ADD || eventType == Notification.SET) { selection = new StructuredSelection(notification.getNewValue()); } else { final Collection<EObject> collection = (Collection<EObject>) notification.getNewValue(); selection = new <START> StructuredSelection(collection.iterator().next()); <END> } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { treeViewer.setSelection(selection, true); } }); } }</code><technical_language>This is solely guessing side. a set notification for a feature empty collection? (Maybe a derived feature) get exception here</technical_language>

Target:
public void notifyChanged(Notification notification) { super.notifyChanged(notification); final int eventType = notification.getEventType(); if (eventType == Notification.ADD || eventType == Notification.SET || eventType == Notification.ADD_MANY) { final ISelection selection; if (eventType == Notification.ADD || eventType == Notification.SET) { selection = new StructuredSelection(notification.getNewValue()); } else { final Collection<EObject> collection = (Collection<EObject>) notification.getNewValue(); selection = collection.iterator().hasNext() ? new StructuredSelection(collection.iterator().next()) : null; } if (selection == null) { return; } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { treeViewer.setSelection(selection, true); } }); } }
Source:
<code>public int getDespawnTime() { if (this.age == MAGIC_INFINITE_DESPAWN_TIME) { if ((this.pluginDespawnSet && this.infiniteDespawnDelay) || !this.pluginDespawnSet) { <START> return -1; <END> } } return this.lifespan - this.age; }</code><technical_language>consts for other magic numbers, a pleasing symmetry declare occurrences of -1 such</technical_language>

Target:
public int getDespawnTime() { if (this.age == MAGIC_INFINITE_DESPAWN_TIME) { if ((this.pluginDespawnSet && this.infiniteDespawnDelay) || !this.pluginDespawnSet) { return MAGIC_INFINITE; } } return this.lifespan - this.age; }
Source:
<code>public void testGetTokenWithInvalidState(String opHost, String redirectUrl) throws Exception { final DevelopersApi client = Tester.api(); final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrl); final String invalidState = CoreUtils.secureRandomString(); final String authorizationStr = Tester.getAuthorization(site); final String code = CoreUtils.secureRandomString(); final GetTokensByCodeParams params = new GetTokensByCodeParams(); params.setOxdId(site.getOxdId()); params.setCode(code); params.setState(invalidState); try { client.getTokensByCode(authorizationStr, params); } catch (ApiException ex) { assertEquals(400, ex.getCode()); <START> } <END> }</code><technical_language>above, fail if exception</technical_language>

Target:
public void testGetTokenWithInvalidState(String opHost, String redirectUrl) throws Exception { final DevelopersApi client = Tester.api(); final RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrl); final String invalidState = CoreUtils.secureRandomString(); final String authorizationStr = Tester.getAuthorization(site); final String code = CoreUtils.secureRandomString(); final GetTokensByCodeParams params = new GetTokensByCodeParams(); params.setOxdId(site.getOxdId()); params.setCode(code); params.setState(invalidState); try { client.getTokensByCode(authorizationStr, params); fail("Test should throw an exception"); } catch (ApiException ex) { assertEquals(400, ex.getCode()); } }
Source:
<code>public String getDomain() { if ("nodeid".equalsIgnoreCase(m_domain)) { return Integer.toString(getIfInfo().getNodeId()); } else if ("nodelabel".equalsIgnoreCase(m_domain)) { try { <START> return new NodeLabelDaoImpl().retrieveLabel(getIfInfo().getNodeId()).getLabel(); <END> } catch (Throwable e) { return "nodeid-" + Integer.toString(getIfInfo().getNodeId()); } } else { return m_domain; } }</code><technical_language>Is a reason switch NodeLabelJDBCImpl NodeLabelDaoImpl here</technical_language>

Target:
public String getDomain() { if ("nodeid".equalsIgnoreCase(m_domain)) { return Integer.toString(getIfInfo().getNodeId()); } else if ("nodelabel".equalsIgnoreCase(m_domain)) { try { return new NodeLabelJDBCImpl().retrieveLabel(getIfInfo().getNodeId()).getLabel(); } catch (Throwable e) { return "nodeid-" + Integer.toString(getIfInfo().getNodeId()); } } else { return m_domain; } }
Source:
<code>public static WorkerMetricsProcessor configureMetricProcessor(Map conf) throws MetricException { try { String processorClass = (String)conf.get(DaemonConfig.STORM_METRIC_PROCESSOR_CLASS); WorkerMetricsProcessor processor = (WorkerMetricsProcessor) (Class.forName(processorClass)).newInstance(); processor.prepare(conf); return processor; <START> } catch (Throwable t) { <END> throw new MetricException("Failed to create metric processor", t); } }</code><technical_language>this Exception instead of a Throwable? Errors want try recover from</technical_language>

Target:
public static WorkerMetricsProcessor configureMetricProcessor(Map conf) throws MetricException { try { String processorClass = (String)conf.get(DaemonConfig.STORM_METRIC_PROCESSOR_CLASS); WorkerMetricsProcessor processor = (WorkerMetricsProcessor) (Class.forName(processorClass)).newInstance(); processor.prepare(conf); return processor; } catch (Exception e) { throw new MetricException("Failed to create metric processor", e); } }
Source:
<code>private void cancelSearch() { if (searchTask == null || searchTask.isCancelled() || searchTask.isDone()) { return; } <START> searchTask.cancel(true); <END> if (searchTask.isCancelled()) { LOGGER.debug("Last search has been cancelled"); status.set(Status.INACTIVE); } else { LOGGER.warn("Could not cancel last search"); } }</code><technical_language>Sadly, canceling a task is a bit more complicated that. cancel method sets isCanceled status of BackgroundTask true, kill thread stop progress. task handle itself. usual pattern is a huge for loop beginning of iteration check if task is canceled, in case return results far. <LINK_0></technical_language>

Target:
private void cancelSearch() { if (searchTask == null || searchTask.isCancelled() || searchTask.isDone()) { return; } status.set(Status.IN_PROGRESS); searchTask.cancel(true); }
Source:
<code>public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException { CompositeChange change = new CompositeChange(MessageFormat.format(PDEUIMessages.RenameExtensionPointProcessor_changeTitle, new Object[] {fInfo.getCurrentValue(), fInfo.getNewValue()})); <START> SubMonitor subMonitor = SubMonitor.convert(pm, "", 2); END> changeExtensionPoint(change, subMonitor.newChild(1)); if (fInfo.isUpdateReferences()) findReferences(change, subMonitor.newChild(1)); return change; }</code><technical_language>parameter constructor</technical_language>

Target:
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException { CompositeChange change = new CompositeChange(MessageFormat.format(PDEUIMessages.RenameExtensionPointProcessor_changeTitle, new Object[] {fInfo.getCurrentValue(), fInfo.getNewValue()})); SubMonitor subMonitor = SubMonitor.convert(pm, 2); changeExtensionPoint(change, subMonitor.newChild(1)); if (fInfo.isUpdateReferences()) findReferences(change, subMonitor.newChild(1)); return change; }
Source:
<code>private String createJsonObject(final Map<String, Object> parameterMap) throws IOException { Buffer b = new Buffer(); JsonWriter writer = JsonWriter.of(b); writer.beginObject(); for (Entry<String, Object> pair : parameterMap.entrySet()) { String name = pair.getKey(); Object value = pair.getValue(); <START> if (value instanceof Number) { <END> writer.name(name).value((Number) value); } else if (value instanceof String) { writer.name(name).value((String) value); } else if (value instanceof Boolean) { writer.name(name).value((Boolean) value); } else { writer.name(name).value(value.toString()); } } writer.endObject(); return b.readString(Charset.forName("utf-8")); }</code><technical_language>moshi library a specific behavior deserializing numbers: <LINK_0> I hope casting Number is enough data type JSON object created here</technical_language>

Target:
private String createJsonObject(final Map<String, Object> parameterMap) throws IOException { Buffer b = new Buffer(); JsonWriter writer = JsonWriter.of(b); writer.beginObject(); for (Entry<String, Object> pair : parameterMap.entrySet()) { String name = pair.getKey(); Object value = pair.getValue(); if (value instanceof Number) { Number number = (Number) value; writer.name(name).value(number); } else if (value instanceof String) { writer.name(name).value((String) value); } else if (value instanceof Boolean) { writer.name(name).value((Boolean) value); } else { writer.name(name).value(String.valueOf(value)); } } writer.endObject(); return b.readString(Charset.forName("utf-8")); }
Source:
<code>public List<Ref> call() throws GitAPIException { checkCallable(); List<Ref> resultRefs; try { Collection<Ref> refs = new ArrayList<>(); Ref head = repo.exactRef(HEAD); if (head != null && head.getLeaf().getName().equals(HEAD)) { refs.add(head); } if (null == listMode) { refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_HEADS)); <START> } else switch (listMode) { <END> case REMOTE: refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_REMOTES)); break; default: refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_HEADS, R_REMOTES)); break; } resultRefs = new ArrayList<>(filterRefs(refs)); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } Collections.sort(resultRefs, new Comparator<Ref>() { @Override public int compare(Ref o1, Ref o2) { return o1.getName().compareTo(o2.getName()); } }); setCallable(false); return resultRefs; }</code><technical_language>This is a pointless refactoring improve code in way. reverted</technical_language>

Target:
public List<Ref> call() throws GitAPIException { checkCallable(); List<Ref> resultRefs; try { Collection<Ref> refs = new ArrayList<>(); Ref head = repo.exactRef(HEAD); if (head != null && head.getLeaf().getName().equals(HEAD)) { refs.add(head); } if (listMode == null) { refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_HEADS)); } else if (listMode == ListMode.REMOTE) { refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_REMOTES)); } else { refs.addAll(repo.getRefDatabase().getRefsByPrefix(R_HEADS, R_REMOTES)); } resultRefs = new ArrayList<>(filterRefs(refs)); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } Collections.sort(resultRefs, new Comparator<Ref>() { @Override public int compare(Ref o1, Ref o2) { return o1.getName().compareTo(o2.getName()); } }); setCallable(false); return resultRefs; }
Source:
<code>public Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args) { String channelName = "channel/trades/" + CoinmateStreamingAdapter.getChannelPostfix(currencyPair); ObjectReader reader = StreamingObjectMapperHelper.getObjectMapper().readerFor(new TypeReference<List<CoinmateWebSocketTrade>>() {}); CoinmateStreamingService service = serviceFactory.createAndConnect(channelName, false); return service.subscribeMessages() .map( s -> { List<CoinmateWebSocketTrade> list = reader.readValue(s); return list; }) .flatMapIterable(coinmateWebSocketTrades -> coinmateWebSocketTrades) .map( <START> coinmateWebSocketTrade -> CoinmateStreamingAdapter.adaptTrade(coinmateWebSocketTrade, currencyPair) <END> ); }</code><technical_language>A problems here: - socket is scoped a single subscription, needs onDispose in methods close StreamingService Observable is disposed - **However**, a great idea scope a socket a single subscription. pattern is Observables share()ed, if multiple subscriptions made, separate subscribers share socket. I need do is maintain a ConcurrentMap of CoinmateStreamingService, re-use existing if exists Observable.using() close socket subscriber disposes</technical_language>

Target:
public Observable<Trade> getTrades(CurrencyPair currencyPair, Object... args) { String channelName = "channel/trades/" + CoinmateStreamingAdapter.getChannelPostfix(currencyPair); ObjectReader reader = StreamingObjectMapperHelper.getObjectMapper().readerFor(new TypeReference<List<CoinmateWebSocketTrade>>() {}); return serviceFactory.createConnection(channelName, false) .map( s -> reader.<List<CoinmateWebSocketTrade>>readValue(s)) .flatMapIterable(coinmateWebSocketTrades -> coinmateWebSocketTrades) .map( coinmateWebSocketTrade -> CoinmateStreamingAdapter.adaptTrade(coinmateWebSocketTrade, currencyPair) ); }
Source:
<code>public void startElement(final String uri, final String localName, final String qName, final Attributes atts) throws SAXException { final DitaClass cls = atts.getValue(ATTRIBUTE_NAME_CLASS) != null ? new DitaClass(atts.getValue(ATTRIBUTE_NAME_CLASS)) : null; classes.addFirst(cls); if (cls != null && (TOPIC_TOPIC.matches(cls) || MAP_MAP.matches(cls))) { final String domains = atts.getValue(ATTRIBUTE_NAME_DOMAINS); if (domains == null) { logger.info(MessageUtils.getInstance().getMessage("DOTJ029I", localName).toString()); } else { props = StringUtils.getExtProps(domains); } } if (exclude) { level++; } else { <START> if (cls!=null && filterUtils.needExclude(atts, props)) { <END> exclude = true; level = 0; } else { elementOutput = true; for (final Map.Entry<String, String> prefix: prefixes.entrySet()) { getContentHandler().startPrefixMapping(prefix.getKey(), prefix.getValue()); } prefixes.clear(); getContentHandler().startElement(uri, localName, qName, atts); } } }</code><technical_language>Whitespace !=</technical_language>

Target:
public void startElement(final String uri, final String localName, final String qName, final Attributes atts) throws SAXException { final DitaClass cls = atts.getValue(ATTRIBUTE_NAME_CLASS) != null ? new DitaClass(atts.getValue(ATTRIBUTE_NAME_CLASS)) : new DitaClass(""); if (cls.isValid()) { classes.addFirst(cls); } else { classes.addFirst(null); } if (cls.isValid() && (TOPIC_TOPIC.matches(cls) || MAP_MAP.matches(cls))) { final String domains = atts.getValue(ATTRIBUTE_NAME_DOMAINS); if (domains == null) { logger.info(MessageUtils.getInstance().getMessage("DOTJ029I", localName).toString()); } else { props = StringUtils.getExtProps(domains); } } if (exclude) { level++; } else { if (cls.isValid() && filterUtils.needExclude(atts, props)) { exclude = true; level = 0; } else { elementOutput = true; for (final Map.Entry<String, String> prefix: prefixes.entrySet()) { getContentHandler().startPrefixMapping(prefix.getKey(), prefix.getValue()); } prefixes.clear(); getContentHandler().startElement(uri, localName, qName, atts); } } }
Source:
<code>private static Collection<?> getRows(DBObject document, AssociationKey associationKey, AssociationStorageStrategy storageStrategy) { Collection<?> rows; if ( storageStrategy == AssociationStorageStrategy.IN_ENTITY ) { if ( associationKey.getMetadata().isOneToOne() ) { <START> Object oneToOneValue = getValueOrNull( (Map<?,?>) document, associationKey.getMetadata().getCollectionRole(), Object.class ); <END> rows = oneToOneValue != null ? Collections.singletonList( oneToOneValue ) : Collections.emptyList(); } else { rows = getValueOrNull( (Map<?,?>) document, associationKey.getMetadata().getCollectionRole(), Collection.class ); } } else { rows = (Collection<?>) document.get( MongoDBDialect.ROWS_FIELDNAME ); } return rows != null ? rows : Collections.emptyList(); }</code><technical_language>DBObject is safe cast Map. default implementation BasicDBObject is, a slippery slope enter relying it. prefer duplicate code for (apparently, MongoDB driver 3 a replacement for DBObject al. anyways, re-visit topic then)</technical_language>

Target:
private static Collection<?> getRows(DBObject document, AssociationKey associationKey, AssociationStorageStrategy storageStrategy) { Collection<?> rows = null; if ( associationKey.getMetadata().isOneToOne() ) { Object oneToOneValue = getValueOrNull( document, associationKey.getMetadata().getCollectionRole(), Object.class ); if ( oneToOneValue != null ) { rows = Collections.singletonList( oneToOneValue ); } } else { Object toManyValue; if ( storageStrategy == AssociationStorageStrategy.IN_ENTITY ) { toManyValue = getValueOrNull( document, associationKey.getMetadata().getCollectionRole() ); } else { toManyValue = document.get( MongoDBDialect.ROWS_FIELDNAME ); } if ( toManyValue instanceof Collection ) { rows = (Collection<?>) toManyValue; } else if ( toManyValue instanceof DBObject ) { rows = getRowsFromMapAssociation( associationKey, (DBObject) toManyValue ); } } return rows != null ? rows : Collections.emptyList(); }
Source:
<code>protected void renderProperties(ContentRenderer renderer) throws IOException { super.renderProperties(renderer); if (Strings.isEmpty(_src)) throw new UiException("src must be specified."); if ("subtitles".equals(_kind) && Strings.isEmpty(_srclang)) throw new UiException("srclang must be specified if kind is \"subtitles\""); render(renderer, "default", _default); render(renderer, "kind", _kind); <START> render(renderer, "label", _label); <END> render(renderer, "src", getEncodedSrc()); render(renderer, "srclang", _srclang); }</code><technical_language>check null in setter</technical_language>

Target:
protected void renderProperties(ContentRenderer renderer) throws IOException { super.renderProperties(renderer); _init = false; if (Strings.isEmpty(_src)) throw new UiException("src must be specified."); if ("subtitles".equals(_kind) && Strings.isEmpty(_srclang)) throw new UiException("srclang must be specified if kind is \"subtitles\""); render(renderer, "default", _default); render(renderer, "kind", _kind); render(renderer, "label", _label); render(renderer, "src", getEncodedSrc()); render(renderer, "srclang", _srclang); }
Source:
<code>public static void writeProperties(Properties toWrite) { try { FileOutputStream fileOutputStream; String homeDirectory = System.getProperty("user.home"); File file = new File(homeDirectory + "/" + PROPERTIES_DIRECTORY); file.mkdirs(); file = new File(PROPERTIES_FILEPATH); if(file.exists()) { file.delete(); } file.createNewFile(); fileOutputStream = new FileOutputStream(file); toWrite.store(fileOutputStream, null); <START> fileOutputStream.close(); <END> } catch(IOException exception) { Exceptions.printStackTrace(exception); } }</code><technical_language>streams closed in finally block (since currently get executed in case of exception, leave opened stream)</technical_language>

Target:
public static void writeProperties(Properties toWrite) { FileOutputStream fileOutputStream = null; try { String homeDirectory = System.getProperty("user.home"); File file = new File(homeDirectory + "/" + PROPERTIES_DIRECTORY); file.mkdirs(); file = new File(PROPERTIES_FILEPATH); if(file.exists()) { file.delete(); } file.createNewFile(); fileOutputStream = new FileOutputStream(file); toWrite.store(fileOutputStream, null); } catch(IOException exception) { Exceptions.printStackTrace(exception); } finally { IOUtils.closeQuietly(fileOutputStream); } }
Source:
<code>public void typeAmountOfRows(int rows) { tablePropertiesInputs.get(0).clear(); tablePropertiesInputs.get(0).sendKeys(Integer.toString(rows)); <START> PageObjectLogging.log("typeAmountOfRows", "amount of rows was typed", true, driver); <END> }</code><technical_language>if screenshots needed please do them. resource consuming</technical_language>

Target:
public void typeAmountOfRows(int rows) { tablePropertiesInputs.get(0).clear(); tablePropertiesInputs.get(0).sendKeys(Integer.toString(rows)); PageObjectLogging.log( "typeAmountOfRows", "amount of rows was typed: " + rows, true ); }
Source:
<code>protected static void verifyXml(String expectedOutputFile, ByteArrayOutputStream actualOutputStream, BiPredicate<Node, Node> ordered, String... messages) throws Exception { String expectedContents = readFile(expectedOutputFile); for (int i = 0; i < messages.length; i++) { expectedContents = expectedContents.replace("$" + i, messages[i]); } final Document expectedDocument = XmlUtil.getRawXml("audit output", expectedContents, expectedContents); final Document actualDocument = getOutputStreamXml(actualOutputStream); <START> Assert.assertEquals("xml encoding should be the same: ", expectedDocument.getXmlEncoding(), <END> actualDocument.getXmlEncoding()); Assert.assertEquals("xml version should be the same: ", expectedDocument.getXmlVersion(), actualDocument.getXmlVersion()); verifyXmlNode(expectedDocument, actualDocument, "/", ordered); }</code><technical_language>Do need : end of text? assertion text end this way</technical_language>

Target:
protected static void verifyXml(String expectedOutputFile, ByteArrayOutputStream actualOutputStream, BiPredicate<Node, Node> ordered, String... messages) throws Exception { String expectedContents = readFile(expectedOutputFile); for (int i = 0; i < messages.length; i++) { expectedContents = expectedContents.replace("$" + i, messages[i]); } final Document expectedDocument = XmlUtil.getRawXml("audit output", expectedContents, expectedContents); final Document actualDocument = getOutputStreamXml(actualOutputStream); Assert.assertEquals("xml encoding should be the same", expectedDocument.getXmlEncoding(), actualDocument.getXmlEncoding()); Assert.assertEquals("xml version should be the same", expectedDocument.getXmlVersion(), actualDocument.getXmlVersion()); verifyXmlNode(expectedDocument, actualDocument, "/", ordered); }
Source:
<code>public static ApiEndpointValidationResponseDTO sendHttpHEADRequest(String urlVal) { ApiEndpointValidationResponseDTO apiEndpointValidationResponseDTO = new ApiEndpointValidationResponseDTO(); HttpHead head = new HttpHead(urlVal); org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient(); head.addHeader("Host", urlVal.replaceAll("https?://", ""). replaceAll("(/.*)?", "")); client.getParams().setParameter("http.socket.timeout", 4000); client.getParams().setParameter("http.connection.timeout", 4000); HttpMethod method = new HeadMethod(urlVal); if (System.getProperty(APIConstants.HTTP_PROXY_HOST) != null && System.getProperty(APIConstants.HTTP_PROXY_PORT) != null) { log.debug("Proxy configured, hence routing through configured proxy"); String proxyHost = System.getProperty(APIConstants.HTTP_PROXY_HOST); String proxyPort = System.getProperty(APIConstants.HTTP_PROXY_PORT); client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, new HttpHost(proxyHost, Integer.parseInt(proxyPort))); } try { int statusCode = client.executeMethod(method); apiEndpointValidationResponseDTO.setStatusCode(statusCode); apiEndpointValidationResponseDTO.setStatusMessage(HttpStatus.getStatusText(statusCode)); } catch (Exception e) { <START> log.error("Error occurred while sending the request to the given endpoint url:" + e); <END> apiEndpointValidationResponseDTO.setError(e.getMessage()); } finally { method.releaseConnection(); } return apiEndpointValidationResponseDTO; }</code><technical_language>log with, e +</technical_language>

Target:
public static ApiEndpointValidationResponseDTO sendHttpHEADRequest(String urlVal) { ApiEndpointValidationResponseDTO apiEndpointValidationResponseDTO = new ApiEndpointValidationResponseDTO(); HttpHead head = new HttpHead(urlVal); org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient(); head.addHeader("Host", urlVal.replaceAll("https?://", ""). replaceAll("(/.*)?", "")); client.getParams().setParameter("http.socket.timeout", 4000); client.getParams().setParameter("http.connection.timeout", 4000); HttpMethod method = new HeadMethod(urlVal); if (System.getProperty(APIConstants.HTTP_PROXY_HOST) != null && System.getProperty(APIConstants.HTTP_PROXY_PORT) != null) { log.debug("Proxy configured, hence routing through configured proxy"); String proxyHost = System.getProperty(APIConstants.HTTP_PROXY_HOST); String proxyPort = System.getProperty(APIConstants.HTTP_PROXY_PORT); client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, new HttpHost(proxyHost, Integer.parseInt(proxyPort))); } try { int statusCode = client.executeMethod(method); apiEndpointValidationResponseDTO.setStatusCode(statusCode); apiEndpointValidationResponseDTO.setStatusMessage(HttpStatus.getStatusText(statusCode)); } catch (Exception e) { log.error("Error occurred while sending the request to the given endpoint url:", e); apiEndpointValidationResponseDTO.setError(e.getMessage()); } finally { method.releaseConnection(); } return apiEndpointValidationResponseDTO; }
Source:
<code>private void doRefresh() { try { AccessToken newToken = credentials.refreshAccessToken(); if (newToken == null) { this.tokenCache.set(new TokenCache(new IOException("Could not load the token for credentials: " + credentials))); } else { long expiresTime = newToken.getExpirationTime().getTime(); String header = "Bearer " + newToken.getTokenValue(); long stateTime = expiresTime - TOKEN_STALENESS_MS; long cacheExpiration = expiresTime - TOKEN_EXPIRES_MS; this.tokenCache.set(new TokenCache(header, stateTime, cacheExpiration)); } } catch (IOException e) { this.tokenCache.set(new TokenCache(e)); <START> } catch (RuntimeException e) { <END> this.tokenCache.set(new TokenCache(new IOException("Could not read headers", e))); } finally { synchronized (isRefreshing) { isRefreshing.set(false); isRefreshing.notifyAll(); } } }</code><technical_language>cuases RuntimeException? Exception</technical_language>

Target:
private void doRefresh() { boolean requiresRefresh = false; synchronized (isRefreshing) { if (!isRefreshing.get()) { isRefreshing.set(true); requiresRefresh = true; HeaderCacheElement headerCache = this.headerCache.get(); CacheState state = (headerCache == null) ? CacheState.Expired : headerCache.getCacheState(); requiresRefresh = state != CacheState.Good; } } if (!requiresRefresh) { return; } HeaderCacheElement cacheElement = null; try { AccessToken newToken = credentials.refreshAccessToken(); if (newToken == null) { cacheElement = new HeaderCacheElement( new IOException("Could not load the token for credentials: " + credentials)); } else { cacheElement = new HeaderCacheElement(newToken); } } catch (IOException e) { cacheElement = new HeaderCacheElement(e); } catch (Exception e) { cacheElement = new HeaderCacheElement(new IOException("Could not read headers", e)); } finally { synchronized (isRefreshing) { this.headerCache.set(cacheElement); isRefreshing.set(false); isRefreshing.notifyAll(); } } }
Source:
<code>protected void processFiltered(File file, List<String> lines) throws CheckstyleException { if (CommonUtils.matchesFileExtension(file, getFileExtensions())) { final String msg = "%s occurred during the analysis of file %s."; final String fileName = file.getPath(); try { if (!ordinaryChecks.isEmpty() || !commentChecks.isEmpty()) { final FileText text = FileText.fromLines(file, lines); final FileContents contents = new FileContents(text); final DetailAST rootAST = parse(contents); <START> getMessageCollector().reset(); <END> if (!ordinaryChecks.isEmpty()) { walk(rootAST, contents, AstState.ORDINARY); } if (!commentChecks.isEmpty()) { final DetailAST astWithComments = appendHiddenCommentNodes(rootAST); walk(astWithComments, contents, AstState.WITH_COMMENTS); } } } catch (final TokenStreamRecognitionException tre) { final String exceptionMsg = String.format(Locale.ROOT, msg, "TokenStreamRecognitionException", fileName); throw new CheckstyleException(exceptionMsg, tre); } catch (RecognitionException | TokenStreamException ex) { final String exceptionMsg = String.format(Locale.ROOT, msg, ex.getClass().getSimpleName(), fileName); throw new CheckstyleException(exceptionMsg, ex); } } }</code><technical_language>@romani remove this line if is needed</technical_language>

Target:
protected void processFiltered(File file, List<String> lines) throws CheckstyleException { if (CommonUtils.matchesFileExtension(file, getFileExtensions())) { final String msg = "%s occurred during the analysis of file %s."; final String fileName = file.getPath(); try { if (!ordinaryChecks.isEmpty() || !commentChecks.isEmpty()) { final FileText text = FileText.fromLines(file, lines); final FileContents contents = new FileContents(text); final DetailAST rootAST = parse(contents); if (!ordinaryChecks.isEmpty()) { walk(rootAST, contents, AstState.ORDINARY); } if (!commentChecks.isEmpty()) { final DetailAST astWithComments = appendHiddenCommentNodes(rootAST); walk(astWithComments, contents, AstState.WITH_COMMENTS); } } } catch (final TokenStreamRecognitionException tre) { final String exceptionMsg = String.format(Locale.ROOT, msg, "TokenStreamRecognitionException", fileName); throw new CheckstyleException(exceptionMsg, tre); } catch (RecognitionException | TokenStreamException ex) { final String exceptionMsg = String.format(Locale.ROOT, msg, ex.getClass().getSimpleName(), fileName); throw new CheckstyleException(exceptionMsg, ex); } } }
Source:
<code>private List<String> tabCompleteLongFlag(String longFlag, CommandSource src, CommandArgs args, CommandContext context) { String[] flagSplit = longFlag.split("=", 2); CommandElement element = this.longFlags.get(flagSplit[0].toLowerCase()); if (element == null) { return this.longFlags.keySet().stream() .filter(new StartsWithPredicate(flagSplit[0])) .map(f -> "--" + f) .collect(Collectors.toList()); } else if (flagSplit.length == 2) { args.insertArg(flagSplit[1]); } Object state = args.getState(); try { element.parse(src, args, context); } catch (ArgumentParseException ex) { args.setState(state); <START> String start = flagSplit.length == 2 ? flagSplit[0] + "=" : args.hasNext() ? "" : flagSplit[0] + " "; <END> return element.complete(src, args, context).stream() .map(s -> start + s) .collect(Collectors.toList()); } return null; }</code><technical_language>If nesting a ternary in a ternary, splitting this out if statements, a moment realise this was</technical_language>

Target:
private List<String> tabCompleteLongFlag(String longFlag, CommandSource src, CommandArgs args, CommandContext context) { String[] flagSplit = longFlag.split("=", 2); CommandElement element = this.longFlags.get(flagSplit[0].toLowerCase()); if (element == null || flagSplit.length == 1 && !args.hasNext()) { return this.longFlags.keySet().stream() .filter(new StartsWithPredicate(flagSplit[0])) .map(f -> "--" + f) .collect(Collectors.toList()); } else if (flagSplit.length == 2) { args.insertArg(flagSplit[1]); } Object state = args.getState(); try { element.parse(src, args, context); return null; } catch (ArgumentParseException ex) { args.setState(state); String prefix = flagSplit.length == 2 ? flagSplit[0] + "=" : ""; return element.complete(src, args, context).stream() .map(s -> prefix + s) .collect(Collectors.toList()); } }
Source:
<code>public void shouldNotCreateAnyStandByTasksForStateStoreWithLoggingDisabled() throws Exception { final StreamsBuilder builder = new StreamsBuilder(); final String stateStoreName = "myTransformState"; final StoreBuilder<KeyValueStore<Integer, Integer>> keyValueStoreBuilder = Stores.keyValueStoreBuilder(Stores.persistentKeyValueStore(stateStoreName), Serdes.Integer(), Serdes.Integer()).withLoggingDisabled(); builder.addStateStore(keyValueStoreBuilder); builder.stream(INPUT_TOPIC, Consumed.with(Serdes.Integer(), Serdes.Integer())) .transform(() -> new Transformer<Integer, Integer, KeyValue<Integer, Integer>>() { @SuppressWarnings("unchecked") @Override public void init(final ProcessorContext context) @Override public KeyValue<Integer, Integer> transform(final Integer key, final Integer value) { return null; } @Override public void close() }, stateStoreName); final Topology topology = builder.build(); client1 = new KafkaStreams(topology, streamsConfiguration()); client2 = new KafkaStreams(topology, streamsConfiguration()); client1.setStateListener((newState, oldState) -> { if (newState == State.RUNNING && client1.localThreadsMetadata().stream().allMatch(thread -> thread.standbyTasks().isEmpty())) { <START> <END> client1IsOk = true; } }); client2.setStateListener((newState, oldState) -> { if (newState == State.RUNNING && client2.localThreadsMetadata().stream().allMatch(thread -> thread.standbyTasks().isEmpty())) { client2IsOk = true; } }); client1.start(); client2.start(); TestUtils.waitForCondition( () -> client1IsOk && client2IsOk, 30 * 1000, "At least one client did not reach state RUNNING without any stand-by tasks"); }</code><technical_language>nit: extra line</technical_language>

Target:
public void shouldNotCreateAnyStandByTasksForStateStoreWithLoggingDisabled() throws Exception { final StreamsBuilder builder = new StreamsBuilder(); final String stateStoreName = "myTransformState"; final StoreBuilder<KeyValueStore<Integer, Integer>> keyValueStoreBuilder = Stores.keyValueStoreBuilder(Stores.persistentKeyValueStore(stateStoreName), Serdes.Integer(), Serdes.Integer()).withLoggingDisabled(); builder.addStateStore(keyValueStoreBuilder); builder.stream(INPUT_TOPIC, Consumed.with(Serdes.Integer(), Serdes.Integer())) .transform(() -> new Transformer<Integer, Integer, KeyValue<Integer, Integer>>() { @SuppressWarnings("unchecked") @Override public void init(final ProcessorContext context) @Override public KeyValue<Integer, Integer> transform(final Integer key, final Integer value) { return null; } @Override public void close() }, stateStoreName); final Topology topology = builder.build(); createClients(topology, streamsConfiguration(), topology, streamsConfiguration()); setStateListenersForVerification(thread -> thread.standbyTasks().isEmpty() && !thread.activeTasks().isEmpty()); startClients(); waitUntilBothClientAreOK( "At least one client did not reach state RUNNING with active tasks but no stand-by tasks" ); }
Source:
<code>static Process establishSocksProxyProcess(String proxyHost, int proxyPort) { <START> LOG.info("Establishing SOCKS proxy..."); <END> return ShellUtils.runASyncProcess(String.format("ssh -ND %d %s", proxyPort, proxyHost)); }</code><technical_language>pls include host port</technical_language>

Target:
static Process establishSocksProxyProcess(String proxyHost, int proxyPort) { LOG.info(String.format("Establishing SOCKS proxy to: %s:%d", proxyHost, proxyPort)); return ShellUtils.runASyncProcess(String.format("ssh -ND %d %s", proxyPort, proxyHost)); }
Source:
<code>public void equal() throws Exception { execute("a == null"); <START> assertSingleValueInStack(EqualitySymbolicValue.class); <END> RelationalSymbolicValue sv = (RelationalSymbolicValue) stack.peek(); assertThat(sv.leftOperand()).isEqualTo(simple1); assertThat(sv.rightOperand()).isEqualTo(SpecialSymbolicValue.NULL); assertSingleValueInStackWithConstraint(Constraint.BOOLEAN); }</code><technical_language>3 tests asserting thing. I improve assert relation kind</technical_language>

Target:
public void equal() throws Exception { execute("a == null"); assertSingleValueInStack(RelationalSymbolicValue.create(Kind.EQUAL_TO, simple1, SpecialSymbolicValue.NULL)); }
Source:
<code>public static OperatorType convertOperatorType(String sqlType) { if (sqlType != null) { sqlType = sqlType.trim().toUpperCase(); switch (sqlType) { case "=": case "==": case "EQ": case "EQUALS_TO": return OperatorType.EQUALS_TO; case "<>": case "!=": case "NE": case "NOT_EQUAL": case "NOT_EQUAL_TO": case "NOT_EQUALS": case "NOT_EQUALS_TO": case "DIFFERENT_FROM": return OperatorType.DIFFERENT_FROM; case ">": case "GT": case "GREATER_THAN": return OperatorType.GREATER_THAN; case ">=": case "=>": case "GREATER_THAN_OR_EQUAL": return OperatorType.GREATER_THAN_OR_EQUAL; case "NOT IN": return OperatorType.NOT_IN; case "IN": return OperatorType.IN; case "<": case "LT": case "LESS_THAN": return OperatorType.LESS_THAN; case "<=": case "=<": case "LESS_THAN_OR_EQUAL": return OperatorType.LESS_THAN_OR_EQUAL; case "LIKE": return OperatorType.LIKE; <START> case "NOT_LIKE": <END> return OperatorType.NOT_LIKE; } } return null; }</code><technical_language>definately add "NOT LIKE" (with space instead of underscore)</technical_language>

Target:
public static OperatorType convertOperatorType(String sqlType) { if (sqlType != null) { sqlType = sqlType.trim().toUpperCase(); switch (sqlType) { case "=": case "==": case "EQ": case "EQUALS_TO": return OperatorType.EQUALS_TO; case "<>": case "!=": case "NE": case "NOT_EQUAL": case "NOT_EQUAL_TO": case "NOT_EQUALS": case "NOT_EQUALS_TO": case "DIFFERENT_FROM": return OperatorType.DIFFERENT_FROM; case ">": case "GT": case "GREATER_THAN": return OperatorType.GREATER_THAN; case ">=": case "=>": case "GREATER_THAN_OR_EQUAL": return OperatorType.GREATER_THAN_OR_EQUAL; case "NOT_IN": case "NOT IN": return OperatorType.NOT_IN; case "IN": return OperatorType.IN; case "<": case "LT": case "LESS_THAN": return OperatorType.LESS_THAN; case "<=": case "=<": case "LESS_THAN_OR_EQUAL": return OperatorType.LESS_THAN_OR_EQUAL; case "LIKE": return OperatorType.LIKE; case "NOT_LIKE": case "NOT LIKE": return OperatorType.NOT_LIKE; } } return null; }
Source:
<code>private void displayPopup() { this.popup.center(); this.popup.setData(column.getRowData()); <START> this.popup.setPopupPosition( <END> this.parent.getAbsoluteLeft(), (this.parent.getAbsoluteTop() + this.parent.getOffsetHeight() + 10) ); }</code><technical_language>this need calculated.. position</technical_language>

Target:
private void displayPopup() { this.popup.center(); this.popup.setData(column.getRowData()); calculatePopupPosition(); this.popup.setPopupPosition( popupLeftPosition, popupTopPosition ); }
Source:
<code><START> public static Method lookupMethod(String methodName, Class<?>... parameterTypes) { <END> return lookup0(initData().extensionType, methodName, parameterTypes); }</code><technical_language>add suppressions for unused methods called reflective code? current state hand, adds maintenance code changes other</technical_language>

Target:
public static Method lookupMethod(String methodName, Class<?>... parameterTypes) { return lookupMethod(initData().extensionType, methodName, parameterTypes); }
Source:
<code>public GroupBuilder addApplicationOptions(GroupBuilder gbuilder) { final DefaultOptionBuilder obuilder = new DefaultOptionBuilder(); final ArgumentBuilder abuilder = new ArgumentBuilder(); optVersion = obuilder .withLongName("version") .withDescription("print the version information and exit") .create(); optHelp = obuilder .withShortName("h") .withLongName("help") .withDescription("print this help") .withArgument(abuilder .withName("command") .withMaximum(1) .create() ) .create(); optLogLevel = obuilder .withLongName("log-level") .withDescription("the log4j log level") .withArgument(abuilder .withName("level") .withMaximum(1) .create() ) .create(); optInsecureHttps = obuilder .withLongName("insecure") .withDescription("allow expired ssl certs for https") .withArgument(abuilder .withName("command") .withMaximum(1) .create() ) .create(); <START> optInsecureHttps = <END> obuilder .withLongName("insecure") .withDescription("allow expired ssl certs for https") .withArgument(abuilder .withName("command") .withMaximum(1) .create() ) .create(); gbuilder .withName("Global options:") .withOption(CliCommand.OPT_VERBOSE) .withOption(CliCommand.OPT_QUIET) .withOption(optVersion) .withOption(optLogLevel) .withOption(optHelp) .withOption(optInsecureHttps) .withMinimum(0); return gbuilder; }</code><technical_language>twice</technical_language>

Target:
public GroupBuilder addApplicationOptions(GroupBuilder gbuilder) { final DefaultOptionBuilder obuilder = new DefaultOptionBuilder(); final ArgumentBuilder abuilder = new ArgumentBuilder(); optVersion = obuilder .withLongName("version") .withDescription("print the version information and exit") .create(); optHelp = obuilder .withShortName("h") .withLongName("help") .withDescription("print this help") .withArgument(abuilder .withName("command") .withMaximum(1) .create() ) .create(); optLogLevel = obuilder .withLongName("log-level") .withDescription("the log4j log level") .withArgument(abuilder .withName("level") .withMaximum(1) .create() ) .create(); optInsecureHttps = obuilder .withLongName("insecure") .withDescription("allow expired ssl certs for https") .withArgument(abuilder .withName("command") .withMaximum(1) .create() ) .create(); gbuilder .withName("Global options:") .withOption(CliCommand.OPT_VERBOSE) .withOption(CliCommand.OPT_QUIET) .withOption(optVersion) .withOption(optLogLevel) .withOption(optHelp) .withOption(optInsecureHttps) .withMinimum(0); return gbuilder; }
Source:
<code>void lockAllNodesAndConsumeRelationships( long nodeId, final KernelTransactionImplementation transaction ) throws KernelException { boolean retry; do { retry = false; firstRelId = NO_SUCH_RELATIONSHIP; collectAndSortNodeIds( nodeId, transaction ); lockAllNodes( transaction, sortedNodeIds ); NodeCursor nodes = transaction.nodeCursor(); org.neo4j.internal.kernel.api.Read read = transaction.dataRead(); read.singleNode( nodeId, nodes ); RelationshipSelectionCursor rels = RelationshipSelections.allCursor( transaction.cursors(), nodes, null ); boolean first = true; while ( rels.next() && !retry ) { retry = performAction( transaction, rels.relationshipReference(), first ); <START> first = false; <END> } } while ( retry ); }</code><technical_language>alternatively a regular RelationshipTraversalCursor here, is preferable</technical_language>

Target:
void lockAllNodesAndConsumeRelationships( long nodeId, final KernelTransactionImplementation transaction ) throws KernelException { boolean retry; do { retry = false; firstRelId = NO_SUCH_RELATIONSHIP; collectAndSortNodeIds( nodeId, transaction ); lockAllNodes( transaction, sortedNodeIds ); NodeCursor nodes = transaction.nodeCursor(); org.neo4j.internal.kernel.api.Read read = transaction.dataRead(); read.singleNode( nodeId, nodes ); if ( nodes.next() ) { RelationshipSelectionCursor rels = RelationshipSelections.allCursor( transaction.cursors(), nodes, null ); boolean first = true; while ( rels.next() && !retry ) { retry = performAction( transaction, rels.relationshipReference(), first ); first = false; } } } while ( retry ); }
Source:
<code>public void collectChanges(Consumer<NodeChange> collector) { boolean hasChanges = false; for (Entry<String, Serializable> entry : getChangeTracker() .entrySet()) { String key = entry.getKey(); Serializable value = entry.getValue(); boolean containsNow = values != null && values.containsKey(key); boolean containedEarlier = value != REMOVED_MARKER; if (containedEarlier && !containsNow) { collector.accept(new MapRemoveChange(this, key)); hasChanges = true; <START> } else if (containsNow) { <END> Object currentValue = values.get(key); if (producePutChange(key, containedEarlier, value)) { collector.accept(new MapPutChange(this, key, currentValue)); hasChanges = true; } } } if (!isPopulated) { if (!hasChanges) { collector.accept(new EmptyChange(this)); } isPopulated = true; } }</code><technical_language>simplify code removing if. For instance: else if (containsNow && producePutChange(key, containedEarlier, value)) { Object currentValue = values.get(key); // New changed collector.accept(new MapPutChange(this, key, currentValue)); hasChanges = true; }</technical_language>

Target:
public void collectChanges(Consumer<NodeChange> collector) { boolean hasChanges = false; for (Entry<String, Serializable> entry : getChangeTracker() .entrySet()) { String key = entry.getKey(); Serializable value = entry.getValue(); boolean containsNow = values != null && values.containsKey(key); boolean containedEarlier = value != REMOVED_MARKER; if (containedEarlier && !containsNow) { collector.accept(new MapRemoveChange(this, key)); hasChanges = true; } else if (containsNow && producePutChange(key, containedEarlier, value)) { Object currentValue = values.get(key); collector.accept(new MapPutChange(this, key, currentValue)); hasChanges = true; } } if (!isPopulated) { if (!hasChanges) { collector.accept(new EmptyChange(this)); } isPopulated = true; } }
Source:
<code>public void testValidateStorageDomainClusterMismatch() { <START> when(cluster.getStoragePoolId()).thenReturn(Guid.newGuid()); <END> ValidateTestUtils.runAndAssertValidateFailure(cmd, EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_AND_CLUSTER_IN_DIFFERENT_POOL); }</code><technical_language>Style suggestion (to match test above): Guid newStoragePoolId = Guid.newGuid(); when(cluster.getStoragePoolId()).thenReturn(newStoragePoolId);</technical_language>

Target:
public void testValidateStorageDomainClusterMismatch() { Guid newStoragePoolId = Guid.newGuid(); when(cluster.getStoragePoolId()).thenReturn(newStoragePoolId); ValidateTestUtils.runAndAssertValidateFailure(cmd, EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_AND_CLUSTER_IN_DIFFERENT_POOL); }
Source:
<code>public static Archive<?> deployment() { final WebArchive archive = ShrinkWrap .create(WebArchive.class, APP_NAME + ".war") .addClasses(BasicSecurityDomainASetup.class, CXFRSSecureUtils.class) .addPackage(CxfRsRouteBuilder.class.getPackage()) <START> .addAsWebInfResource(new StringAsset(""), "beans.xml") <END> ; SecurityUtils.enhanceArchive(archive, BasicSecurityDomainASetup.SECURITY_DOMAIN, BasicSecurityDomainASetup.AUTH_METHOD, PATH_ROLE_MAP); return archive; }</code><technical_language>Minor EmptyAsset.INSTANCE instead of explicitly creating a empty StringAsset</technical_language>

Target:
public static Archive<?> deployment() { final WebArchive archive = ShrinkWrap .create(WebArchive.class, APP_NAME + ".war") .addClasses(BasicSecurityDomainASetup.class, CXFRSSecureUtils.class) .addPackage(CxfRsRouteBuilder.class.getPackage()) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") ; SecurityUtils.enhanceArchive(archive, BasicSecurityDomainASetup.SECURITY_DOMAIN, BasicSecurityDomainASetup.AUTH_METHOD, PATH_ROLE_MAP); return archive; }
Source:
<code>public void handleCustomEvent(UIEvent event) { <START> EventType<UIEvent> eventType = (EventType<UIEvent>) event <END> .getEventType(); if (eventType.equals(UIEvent.TAP)) { for(Node n : cup.getChildren()){ if(n instanceof Block){ if(((Block) n).isSelected){ ((Block) n).setSelected(false); } } } this.setSelected(true); System.out.println("Block is selected"); } else if (eventType.equals(UIEvent.TAP_HOLD)) { } }</code><technical_language>Is this cast necessary? sure, get calling this EventType instead of EventType<UIEvent></technical_language>

Target:
public void handleCustomEvent(UIEvent event) { EventType eventType = event .getEventType(); if (eventType.equals(UIEvent.TAP)) { for(Node n : cup.getChildren()){ if(n instanceof Block){ if(((Block) n).isSelected){ ((Block) n).setSelected(false); } } } this.setSelected(true); System.out.println("Block is selected"); } else if (eventType.equals(UIEvent.TAP_HOLD)) { } }
Source:
<code>public void toggleFlagDown() { if (flagdown == true) { flagdown = false; } if (flagdown == false) { flagdown = true; } <START> } <END></code><technical_language>This work this way. u meant: flagdown = !flagdown</technical_language>

Target:
public void toggleFlagDown() { flagdown = !flagdown; }
Source:
<code>public void setFastViewBarVisible(boolean visible) { <START> boolean oldValue = fastViewBarVisible; <END> fastViewBarVisible = visible; if (oldValue != fastViewBarVisible) { } }</code><technical_language>Replace method // supported anymore</technical_language>

Target:
public void setFastViewBarVisible(boolean visible) { }
Source:
<code>public ArrayList<Pair<AbstractIngredient[], Float>> lookupShapedRecipes(Item i) { if (shapedReverseLookupTable.get(i) != null) return shapedReverseLookupTable.get(i); <START> return new ArrayList<Pair<AbstractIngredient[], Float>>(); <END> }</code><technical_language>internal cache, return null this</technical_language>

Target:
public List<Pair<AbstractIngredient[], Float>> lookupShapedRecipes(Item i) { return shapedReverseLookupTable.get(i); }