auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean delete( final ConcreteResource resource, final EventMetadata eventMetadata ) throws TransferException { final Transfer item = getCacheReference( resource ); if ( !resource.allowsDeletion() ) { throw new TransferException( "Deletion not allowed for: {}", resource ); <START> } <END> return doDelete( item, eventMetadata ); }</code><technical_language>move this line of this method for optimization</technical_language>

Target:
public boolean delete( final ConcreteResource resource, final EventMetadata eventMetadata ) throws TransferException { if ( !resource.allowsDeletion() ) { throw new TransferException( "Deletion not allowed for: {}", resource ); } final Transfer item = getCacheReference( resource ); return doDelete( item, eventMetadata ); }
Source:
<code>public void scan() { HttpMessage message = getNewMsg(); try { sendAndReceive(message); if (message.getResponseHeader().getStatusCode() != HttpStatusCode.FORBIDDEN) { return; } URI uri = message.getRequestHeader().getURI(); String host = uri.getEscapedAuthority(); String path = uri.getEscapedPath(); String schema = uri.getScheme(); if (sendPathPayloads(path, host, schema, uri)) { return; } <START> ; <END> if (sendHeaderPayloads(path, host, schema, uri)) { return; } ; } catch (IOException e) { LOG.warn(e.getMessage(), e); } }</code><technical_language>removed</technical_language>

Target:
public void scan() { HttpMessage message = getNewMsg(); try { sendAndReceive(message); if (message.getResponseHeader().getStatusCode() != HttpStatusCode.FORBIDDEN) { return; } URI uri = message.getRequestHeader().getURI(); String host = uri.getEscapedAuthority(); String path = uri.getEscapedPath(); String schema = uri.getScheme(); if (sendPathPayloads(path, host, schema, uri)) { return; } if (sendHeaderPayloads(path, host, schema, uri)) { return; } } catch (IOException e) { LOG.warn(e.getMessage(), e); } }
Source:
<code>public DocumentModelListImpl fetchDocuments() { DocumentModelListImpl ret = new DocumentModelListImpl(getResponse().getHits().getHits().length); DocumentModel doc; String sid = getSession().getSessionId(); for (SearchHit hit : getResponse().getHits()) { doc = DocumentModelReaders.fromSource(hit.getSource()).sid(sid).getDocumentModel(); Map<String, HighlightField> esHighlights = hit.highlightFields(); if (!esHighlights.isEmpty()) { Map<String, List<String>> fields = new HashMap<>(); for (String field : esHighlights.keySet()) { fields.put(field, new ArrayList<>()); <START> for (Text fragment : esHighlights.get(field).getFragments()) { <END> fields.get(field).add(fragment.toString()); } } doc.putContextData(HIGHLIGHT_CTX_DATA, (Serializable) fields); } ret.add(doc); } return ret; }</code><technical_language>Instead of esHighlights.keySet() loop esHighlights.entrySet() field = entry.getKey() instead of esHighlights.get(field) entry.getValue()</technical_language>

Target:
public DocumentModelListImpl fetchDocuments() { DocumentModelListImpl ret = new DocumentModelListImpl(getResponse().getHits().getHits().length); DocumentModel doc; String sid = getSession().getSessionId(); for (SearchHit hit : getResponse().getHits()) { doc = DocumentModelReaders.fromSource(hit.getSource()).sid(sid).getDocumentModel(); Map<String, HighlightField> esHighlights = hit.highlightFields(); if (!esHighlights.isEmpty()) { Map<String, List<String>> fields = new HashMap<>(); for (Map.Entry<String, HighlightField> entry : esHighlights.entrySet()) { String field = entry.getKey(); List<String> list = new ArrayList<>(); for (Text fragment : entry.getValue().getFragments()) { list.add(fragment.toString()); } fields.put(field, list); } doc.putContextData(HIGHLIGHT_CTX_DATA, (Serializable) fields); } ret.add(doc); } return ret; }
Source:
<code>public void dispose() { getSite().getPage().removeSelectionListener(this); getSite().setSelectionProvider(null); if (mTargetListener != null) { AdtPlugin.getDefault().removeTargetListener(mTargetListener); mTargetListener = null; } if (mReloadListener != null) { LayoutReloadMonitor.getMonitor().removeListener(mReloadListener); mReloadListener = null; } if (mCanvasViewer != null && mCanvasViewer.getCanvas() != null) { <START> mCanvasViewer.getCanvas().dispose(); <END> } super.dispose(); }</code><technical_language>Yes, Tor said: Please add a dispose() in LayoutCanvasViewer chain dispose methods</technical_language>

Target:
public void dispose() { getSite().getPage().removeSelectionListener(this); getSite().setSelectionProvider(null); if (mTargetListener != null) { AdtPlugin.getDefault().removeTargetListener(mTargetListener); mTargetListener = null; } if (mReloadListener != null) { LayoutReloadMonitor.getMonitor().removeListener(mReloadListener); mReloadListener = null; } if (mCanvasViewer != null) { mCanvasViewer.dispose(); mCanvasViewer = null; } super.dispose(); }
Source:
<code>private void testXSDConfigXML(String xmlFileName) throws Exception { SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); URL schemaResource = XMLConfigBuilderTest.class.getClassLoader().getResource("hazelcast-config-" + Versions.CURRENT_CLUSTER_VERSION + ".xsd"); <START> assertNotNull(schemaResource); <END> InputStream xmlResource = XMLConfigBuilderTest.class.getClassLoader().getResourceAsStream(xmlFileName); Schema schema = factory.newSchema(schemaResource); Source source = new StreamSource(xmlResource); Validator validator = schema.newValidator(); try { validator.validate(source); } catch (SAXException ex) { fail(xmlFileName + " is not valid because: " + ex.toString()); } }</code><technical_language>I copied, in general assertions in middle of test is a code smell. Tests structure: // // // then. Anyway, feel free it, I a copy other class</technical_language>

Target:
private static void testXSDConfigXML(String xmlFileName) throws Exception { SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); URL schemaResource = XMLConfigBuilderTest.class.getClassLoader().getResource("hazelcast-config-" + Versions.CURRENT_CLUSTER_VERSION + ".xsd"); InputStream xmlResource = XMLConfigBuilderTest.class.getClassLoader().getResourceAsStream(xmlFileName); Schema schema = factory.newSchema(schemaResource); Source source = new StreamSource(xmlResource); Validator validator = schema.newValidator(); try { validator.validate(source); } catch (SAXException ex) { fail(xmlFileName + " is not valid because: " + ex.toString()); } }
Source:
<code>private void createVMFromTemplate() { <START> VmTemplate template = getSelectedItem(); <END> UnitVmModel model = new UnitVmModel(new NewVmFromTemplateModelBehavior(template)); model.setIsAdvancedModeLocalStorageKey(getEditTemplateAdvancedModelKey()); setWindow(model); model.setTitle(ConstantsManager.getInstance().getConstants().newVmTitle()); model.setTitle(ConstantsManager.getInstance().getConstants().newVmTitle()); model.setHelpTag(HelpTag.new_vm); model.setHashName("new_vm"); model.setIsNew(true); model.getVmType().setSelectedItem(template.getVmType()); model.setCustomPropertiesKeysList(AsyncDataProvider.getInstance().getCustomPropertiesList()); model.setIsAdvancedModeLocalStorageKey("wa_vm_dialog"); model.initialize(this.getSystemTreeSelectedItem()); VmBasedWidgetSwitchModeCommand switchModeCommand = new VmBasedWidgetSwitchModeCommand(); switchModeCommand.init(model); model.getCommands().add(switchModeCommand); model.getProvisioning().setEntity(true); UICommand onSaveVmCommand = UICommand.createDefaultOkUiCommand("OnSaveVm", this); model.getCommands().add(onSaveVmCommand); UICommand cancelCommand = UICommand.createCancelUiCommand("Cancel", this); model.getCommands().add(cancelCommand); }</code><technical_language>part of this method extracted a parent class. called this: setupNewVmModel(new UnitVmModle(new NewVmFromTemplateModelBehavior(template)); some specific setups, much..</technical_language>

Target:
private void createVMFromTemplate() { VmTemplate template = getSelectedItem(); List<UICommand> commands = new ArrayList<>(); commands.add(UICommand.createDefaultOkUiCommand("OnSaveVm", this)); commands.add(UICommand.createCancelUiCommand("Cancel", this)); setupNewVmModel(new UnitVmModel(new NewVmFromTemplateModelBehavior(template)), template.getVmType(), getSystemTreeSelectedItem(), commands); }
Source:
<code>public String getTitle() { <START> return getData(KEY_TITLE).toString(); <END> }</code><technical_language>NPE if key exist</technical_language>

Target:
public String getTitle() { return (getCreativeData(KEY_TITLE) != null) ? creativeData.get(KEY_TITLE).toString() : null; }
Source:
<code>public void testLoadingKryoSerializersFromConfiguration() { StreamExecutionEnvironment envFromConfiguration = StreamExecutionEnvironment.getExecutionEnvironment(); Configuration configuration = new Configuration(); configuration.setString( "pipeline.default-kryo-serializers", "class:'org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentComplexConfigurationTest$CustomPojo'" + ",serializer:'org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentComplexConfigurationTest$CustomPojoSerializer'"); envFromConfiguration.configure( configuration, <START> Thread.currentThread().getContextClassLoader()); <END> LinkedHashMap<Object, Object> serializers = new LinkedHashMap<>(); serializers.put(CustomPojo.class, CustomPojoSerializer.class); assertThat( envFromConfiguration.getConfig().getDefaultKryoSerializerClasses(), equalTo(serializers)); }</code><technical_language>simplified getExecutionEnvironment(Configuration)</technical_language>

Target:
public void testLoadingKryoSerializersFromConfiguration() { Configuration configuration = new Configuration(); configuration.setString( "pipeline.default-kryo-serializers", "class:'org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentComplexConfigurationTest$CustomPojo'" + ",serializer:'org.apache.flink.streaming.api.environment.StreamExecutionEnvironmentComplexConfigurationTest$CustomPojoSerializer'"); StreamExecutionEnvironment envFromConfiguration = StreamExecutionEnvironment.getExecutionEnvironment( configuration); LinkedHashMap<Object, Object> serializers = new LinkedHashMap<>(); serializers.put(CustomPojo.class, CustomPojoSerializer.class); assertThat( envFromConfiguration.getConfig().getDefaultKryoSerializerClasses(), equalTo(serializers)); }
Source:
<code>public void TSDLSimpleTest() throws CTFReaderException { createDummyTrace(simpleTSDL); CTFTrace trace = new CTFTrace(tempTraceDir); assertNotNull(trace); <START> trace.dispose(); <END> }</code><technical_language>Good call that. in a separate @After method</technical_language>

Target:
public void TSDLSimpleTest() throws CTFReaderException { createDummyTrace(simpleTSDL); trace = new CTFTrace(tempTraceDir); assertNotNull(trace); }
Source:
<code>public Tenant createTenant(final TenantData data, final CallContext context) throws TenantApiException { final Tenant tenant = new DefaultTenant(data); try { tenantDao.create(new TenantModelDao(tenant), internalCallContextFactory.createInternalCallContextWithoutAccountRecordId(context)); } catch (final Exception e) { if (e.getCause() instanceof SQLDataException) { throw new TenantApiException(e, ErrorCode.EXTERNAL_KEY_LIMIT_EXCEEDED); } <START> else throw new TenantApiException(e, ErrorCode.TENANT_CREATION_FAILED); <END> } return tenant; }</code><technical_language>Nit: nicer (more java-like) have: } catch (final TenantApiException e) { throw new TenantApiException(e, ErrorCode.TENANT_CREATION_FAILED); } catch (final Exception e) { if (e.getCause() instanceof SQLDataException) { throw new TenantApiException(e, ErrorCode.EXTERNAL_KEY_LIMIT_EXCEEDED); } throw e; }</technical_language>

Target:
public Tenant createTenant(final TenantData data, final CallContext context) throws TenantApiException { final Tenant tenant = new DefaultTenant(data); if (null != tenant.getExternalKey() && tenant.getExternalKey().length() > 255) { throw new TenantApiException(ErrorCode.EXTERNAL_KEY_LIMIT_EXCEEDED); } try { tenantDao.create(new TenantModelDao(tenant), internalCallContextFactory.createInternalCallContextWithoutAccountRecordId(context)); } catch (final TenantApiException e) { throw new TenantApiException(e, ErrorCode.TENANT_CREATION_FAILED); } return tenant; }
Source:
<code>public void getTaskData(Set<String> taskIds, TaskRepository taskRepository, TaskDataCollector collector, IOperationMonitor monitor) throws BugzillaRestException { HashSet<String> taskIdsTemp = new HashSet<String>(taskIds); BugzillaRestConfiguration config; try { config = connector.getRepositoryConfiguration(taskRepository); } catch (CoreException e1) { throw new BugzillaRestException(e1); } while (taskIdsTemp.size() > 0) { Set<String> idsToRetrieve = new HashSet<String>(); Iterator<String> itr = taskIdsTemp.iterator(); int xid = 0; String urlIDList = ""; <START> for (int x = 0; itr.hasNext() && x < MAX_RETRIEVED_PER_QUERY; x++) { <END> String taskId = itr.next(); while (taskId.startsWith("0")) { taskId = taskId.substring(1); } urlIDList = ((xid++ > 0 ? "," : "id=") + taskId); idsToRetrieve.add(taskId); } try { List<TaskData> taskDataArray = new BugzillaRestGetTaskData(client, connector, urlIDList, taskRepository) .run(monitor); for (TaskData taskData : taskDataArray) { config.updateProductOptions(taskData.getRoot() .getMappedAttribute(BugzillaRestTaskSchema.getDefault().PRODUCT.getKey())); config.addValidOperations(taskData); collector.accept(taskData); } } catch (BugzillaRestException e) { e.printStackTrace(); } taskIdsTemp.removeAll(idsToRetrieve); } }</code><technical_language>replace this loop Guava</technical_language>

Target:
public void getTaskData(Set<String> taskIds, TaskRepository taskRepository, TaskDataCollector collector, IOperationMonitor monitor) throws BugzillaRestException { BugzillaRestConfiguration config; try { config = connector.getRepositoryConfiguration(taskRepository); } catch (CoreException e1) { throw new BugzillaRestException(e1); } Iterable<String> taskIdsTemp = Iterables.transform(taskIds, function); Iterable<List<String>> partitions = Iterables.partition(taskIdsTemp, MAX_RETRIEVED_PER_QUERY); for (List<String> list : partitions) { Joiner joiner = Joiner.on(",id=").skipNulls(); String urlIDList = "id=" + joiner.join(list); List<TaskData> taskDataArray = new BugzillaRestGetTaskData(client, connector, urlIDList, taskRepository) .run(monitor); for (TaskData taskData : taskDataArray) { config.updateProductOptions( taskData.getRoot().getMappedAttribute(BugzillaRestTaskSchema.getDefault().PRODUCT.getKey())); config.addValidOperations(taskData); collector.accept(taskData); } } }
Source:
<code>protected void saveAdditionalChildInfo(XmlMemento child, TableColumn column) { TableColumnDescriptor desc = (TableColumnDescriptor) column .getData(TableColumnDescriptor.TABLE_COLUMN_DESCRIPTOR_KEY); <START> XmlMemento descriptor = child.createChild("TableColumnDescriptors"); END> descriptor.putInteger("alignment", desc.getAlignment()); descriptor.putInteger("sortDirection", desc.getSortDirection()); descriptor.putInteger("widths", desc.getWidths()); descriptor.putBoolean("autoSize", desc.isAutoSize()); descriptor.putBoolean("defaultSortColumn", desc.isDefaultSortColumn()); }</code><technical_language>consider extracting strings constants referenced in save restore methods</technical_language>

Target:
protected void saveAdditionalChildInfo(XmlMemento child, TableColumn column) { TableColumnDescriptor desc = (TableColumnDescriptor) column .getData(TableColumnDescriptor.TABLE_COLUMN_DESCRIPTOR_KEY); XmlMemento descriptor = child.createChild(xmlChildName); descriptor.putInteger(xmlFieldAlignment, desc.getAlignment()); descriptor.putInteger(xmlFieldSortDirection, desc.getSortDirection()); descriptor.putInteger(xmlFieldWidth, desc.getWidth()); descriptor.putBoolean(xmlFieldAutoSize, desc.isAutoSize()); descriptor.putBoolean(xmlFieldDefaultSortColumn, desc.isDefaultSortColumn()); }
Source:
<code>protected int doWork() { IOUtil.assertFilesAreReadable(INPUT); final MetricsFile<?, ?> metricsA = new MetricsFile(); final MetricsFile<?, ?> metricsB = new MetricsFile(); int retVal = 1; try { <START> metricsA.read(new FileReader(INPUT.get(0))); <END> metricsB.read(new FileReader(INPUT.get(1))); retVal = compareMetricsFiles(INPUT.get(0), INPUT.get(1)); final String status = retVal == 0 ? "EQUAL" : "NOT EQUAL"; log.info("Files " + INPUT.get(0) + " and " + INPUT.get(1) + " are " + status); } catch (final Exception e) { throw new PicardException(e.getMessage()); } return retVal; }</code><technical_language>metricsA metricsB initialized used. deleted</technical_language>

Target:
protected int doWork() { IOUtil.assertFilesAreReadable(INPUT); try { final int retVal = compareMetricsFiles(INPUT.get(0), INPUT.get(1)); final String status = retVal == 0 ? "equal" : "NOT equal"; log.info(metricClassName + " Metric files " + INPUT.get(0) + " and " + INPUT.get(1) + " are " + status); if (!differences.isEmpty()) { for (String difference : differences) { log.error(difference); } } if (OUTPUT != null) { final String header = "Comparison of " + metricClassName + " metrics between files " + INPUT.get(0).getAbsolutePath() + " and " + INPUT.get(1).getAbsolutePath() + "\n\nMetrics are " + status; writeTextToFile(OUTPUT, header, differences); } return retVal; } catch (final Exception e) { throw new PicardException(e.getMessage()); } }
Source:
<code>public String getMetadataStoreRealm(String namespace, String shardingKey) { if (!_routingDataMap.containsKey(namespace)) { <START> throw new IllegalArgumentException( <END> "Failed to get all mapping under path: Namespace " + namespace + " is not found!"); } return _routingDataMap.get(namespace).getMetadataStoreRealm(shardingKey); }</code><technical_language>NoSuchElementException</technical_language>

Target:
public String getMetadataStoreRealm(String namespace, String shardingKey) { if (!_routingDataMap.containsKey(namespace)) { throw new NoSuchElementException( "Failed to get metadata store realm: Namespace " + namespace + " is not found!"); } return _routingDataMap.get(namespace).getMetadataStoreRealm(shardingKey); }
Source:
<code>public List<Map<String, Object>> toMaps() { <START> return contentlets.stream().map(this::copy).map(this::transform).collect(Collectors.toList()); <END> }</code><technical_language>CollectionUtils.toImmutableList</technical_language>

Target:
public List<Map<String, Object>> toMaps() { return contentlets.stream().map(this::copy).map(this::transform).collect(CollectionsUtils.toImmutableList()); }
Source:
<code>public void testFullPath() throws Exception { final String xpath = "/CLASS_DEF/OBJBLOCK/METHOD_DEF[1]/SLIST/VARIABLE_DEF[2]"; final DetailAST rootAst = getRootAst("InputXpathMapperAst.java"); <START> final RootNode rootNode = new RootNode(rootAst); <END> final DetailAST[] actual = convertToDetailAstArray(getXpathItems(xpath, rootNode)); final DetailAST realVariableDefNode = getSiblingByType(rootAst, TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST) .findFirstToken(TokenTypes.VARIABLE_DEF) .getNextSibling() .getNextSibling(); final DetailAST[] expected = {realVariableDefNode}; assertArrayEquals(expected, actual); }</code><technical_language>do getRootAst new RootNode. sense util method getRootNode</technical_language>

Target:
public void testFullPath() throws Exception { final String xpath = "/CLASS_DEF/OBJBLOCK/METHOD_DEF[1]/SLIST/VARIABLE_DEF[2]"; final RootNode rootNode = getRootNode("InputXpathMapperAst.java"); final DetailAST[] actual = convertToArray(getXpathItems(xpath, rootNode)); final DetailAST expectedVariableDefNode = getSiblingByType(rootNode.getUnderlyingNode(), TokenTypes.CLASS_DEF) .findFirstToken(TokenTypes.OBJBLOCK) .findFirstToken(TokenTypes.METHOD_DEF) .findFirstToken(TokenTypes.SLIST) .findFirstToken(TokenTypes.VARIABLE_DEF) .getNextSibling() .getNextSibling(); final DetailAST[] expected = {expectedVariableDefNode}; assertArrayEquals("Result nodes differ from expected", expected, actual); }
Source:
<code>protected void doStart() throws Exception { if (raftHandle == null && jgroupsConfig != null && !jgroupsConfig.isEmpty()) { raftHandle = new RaftHandle( new JChannel(jgroupsConfig), new NopStateMachine()).raftId(raftId); <START> } else if(raftHandle == null) { <END> raftHandle = new RaftHandle(new JChannel(JGroupsRaftEndpoint.DEFAULT_JGROUPSRAFT_CONFIG), new NopStateMachine()).raftId(raftId); } fireLeadershipChangedEvent(Optional.empty()); raftHandle.addRoleListener(new ClusterRoleChangeListener(this)); raftHandle.channel().connect(jgroupsClusterName); }</code><technical_language>Please run mvn -Pcheckstyle for resolve code style issues</technical_language>

Target:
protected void doStart() throws Exception { if (raftHandle == null && jgroupsConfig != null && !jgroupsConfig.isEmpty()) { raftHandle = new RaftHandle(new JChannel(jgroupsConfig), new NopStateMachine()).raftId(raftId); } else if (raftHandle == null) { raftHandle = new RaftHandle(new JChannel(JGroupsRaftConstants.DEFAULT_JGROUPSRAFT_CONFIG), new NopStateMachine()).raftId(raftId); } fireLeadershipChangedEvent(Optional.empty()); raftHandle.addRoleListener(new ClusterRoleChangeListener(this)); raftHandle.channel().connect(jgroupsClusterName); }
Source:
<code>private void display(final GroupMembersList groupMembers) { final PrintWriter stdout = toPrintWriter(out); try { printWarnings(stdout, groupMembers); final Set<Account> accounts = groupMembers.getAllAccounts(); final Set<GroupMembersList> includedGroups = groupMembers.getAllIncludedGroups(); if (!accounts.isEmpty()) { stdout.println("Accounts:"); for (final Account account : accounts) { stdout.println(accountFormatter.formatWithFullnameEmailAndId(account)); } if (!includedGroups.isEmpty()) { <START> stdout.println(); <END> } } if (!includedGroups.isEmpty()) { stdout.println("Included Groups:"); for (final GroupMembersList includedGroupMembers : includedGroups) { if (includedGroupMembers.isGroupVisible()) { final AccountGroup group = includedGroupMembers.getGroup(); stdout.println(group.getName() + " (" + group.getId() + ")"); } } } } finally { stdout.flush(); } }</code><technical_language>If I understand print("\n") instead of println() in order break tests parse output of commands. Windows println() print "\r\n". a more println usages in this class</technical_language>

Target:
private void display(final GroupMembersList groupMembers) { final PrintWriter stdout = toPrintWriter(out); try { printWarnings(stdout, groupMembers); final Set<Account> accounts = groupMembers.getAllAccounts(); final Set<GroupMembersList> includedGroups = groupMembers.getAllIncludedGroups(); if (!accounts.isEmpty()) { stdout.print("Accounts:\n"); for (final Account account : accounts) { stdout.print(accountFormatter.formatWithFullnameEmailAndId(account) + "\n"); } if (!includedGroups.isEmpty()) { stdout.print("\n"); } } if (!includedGroups.isEmpty()) { stdout.print("Included Groups:\n"); for (final GroupMembersList includedGroupMembers : includedGroups) { if (includedGroupMembers.isGroupVisible()) { final AccountGroup group = includedGroupMembers.getGroup(); stdout.print(group.getName() + " (" + group.getId() + ")\n"); } } } } finally { stdout.flush(); } }
Source:
<code>public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) { if (AbstractParam.class.isAssignableFrom(rawType)) { final String parameterName = JerseyParameterNameProvider.getParameterNameFromAnnotations(annotations).orElse("Parameter"); final Constructor<T> constructor; try { constructor = rawType.getConstructor(String.class, String.class); } catch (NoSuchMethodException ignored) { return null; } <START> return new ParamConverter<T>() { <END> @Override @SuppressWarnings("unchecked") public T fromString(String s) { if (rawType != NonEmptyStringParam.class && Strings.isNullOrEmpty(s)) { return null; } try { return constructor.newInstance(s, parameterName); } catch (InstantiationException | IllegalAccessException e) { throw new InternalServerErrorException(String.format("Unable to convert parameter %s: %s", parameterName, e.getMessage())); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t instanceof RuntimeException) { throw (RuntimeException) t; } return null; } } @Override public String toString(T t) { return t == null ? null : t.toString(); } }; } return null; }</code><technical_language>Do break compatibility current classes get instantiated [StringConstructor](<LINK_1>, calls [AbstractStringReader](<LINK_0></technical_language>

Target:
public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) { if (AbstractParam.class.isAssignableFrom(rawType)) { final String parameterName = JerseyParameterNameProvider.getParameterNameFromAnnotations(annotations).orElse("Parameter"); final Constructor<T> constructor; try { constructor = rawType.getConstructor(String.class, String.class); } catch (NoSuchMethodException ignored) { return null; } return new ParamConverter<T>() { @Override @SuppressWarnings("unchecked") public T fromString(String value) { if (rawType != NonEmptyStringParam.class && Strings.isNullOrEmpty(value)) { return null; } try { return _fromString(value); } catch (InvocationTargetException ex) { final Throwable cause = ex.getCause(); if (cause instanceof WebApplicationException) { throw (WebApplicationException) cause; } else { throw new ExtractorException(cause); } } catch (final Exception ex) { throw new ProcessingException(ex); } } protected T _fromString(String value) throws Exception { return constructor.newInstance(value, parameterName); } @Override public String toString(T value) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException(LocalizationMessages.METHOD_PARAMETER_CANNOT_BE_NULL("value")); } return value.toString(); } }; } return null; }
Source:
<code>boolean setIdFor(final SObjectNode node, final String referenceId, final String id) { <START> final org.apache.camel.component.salesforce.api.dto.Attributes attributes = <END> node.getObject().getAttributes(); final String attributesReferenceId = attributes.getReferenceId(); if (Objects.equals(attributesReferenceId, referenceId)) { final Object object = node.getObject(); if (object != null) { return updateBaseObjectId(id, (AbstractSObjectBase) object); } else { return updateGeneralObjectId(id, object); } } return StreamSupport.stream(node.getChildNodes().spliterator(), false) .anyMatch(n -> setIdFor(n, referenceId, id)); }</code><technical_language>Nitpicking: suggestion final Attributes attributes =</technical_language>

Target:
boolean setIdFor(final SObjectNode node, final String referenceId, final String id) { final Attributes attributes = node.getObject().getAttributes(); final String attributesReferenceId = attributes.getReferenceId(); if (Objects.equals(attributesReferenceId, referenceId)) { final Object object = node.getObject(); if (object != null) { return updateBaseObjectId(id, (AbstractSObjectBase) object); } else { return updateGeneralObjectId(id, object); } } return StreamSupport.stream(node.getChildNodes().spliterator(), false) .anyMatch(n -> setIdFor(n, referenceId, id)); }
Source:
<code>public void afterPropertiesSet() throws Exception { <START> Assert.hasText(realmName, "realmName must be specified"); <END> }</code><technical_language>inject this in constructor, instead of unused get assertion for this set</technical_language>

Target:
public void afterPropertiesSet() throws Exception { }
Source:
<code>public void addConfiguration(MultipleJGitEnvironmentProperties environmentProperties) throws GeneralSecurityException { if (environmentProperties.getUri().startsWith("http")) { httpClientBuildersByUriAuthority.put(environmentProperties.getUri(), HttpClientSupport.builder(environmentProperties)); } for (JGitEnvironmentProperties repo : environmentProperties.getRepos().values()) { if (repo.getUri().startsWith("http")) { httpClientBuildersByUriAuthority.put(repo.getUri(), HttpClientSupport.builder(repo)); <START> } <END> } }</code><technical_language>IntelliJ messing whitespacing</technical_language>

Target:
public void addConfiguration(MultipleJGitEnvironmentProperties environmentProperties) throws GeneralSecurityException { addHttpClient(environmentProperties); for (JGitEnvironmentProperties repo : environmentProperties.getRepos().values()) { addHttpClient(repo); } }
Source:
<code>public static PinotDataType getSpecificMapDataTypeFromMap(Map<Object, Object> map) { Iterator<Object> iterator = map.values().iterator(); Object obj = iterator.next(); if (obj instanceof Integer) { return PinotDataType.INTEGER_MAP; } else if (obj instanceof Long) { return PinotDataType.LONG_MAP; } else if (obj instanceof Float) { return PinotDataType.FLOAT_MAP; } else if (obj instanceof Double) { return PinotDataType.DOUBLE_MAP; } else if (obj instanceof String) { return PinotDataType.STRING_MAP; } else { <START> throw new IllegalStateException(String.format("'%s' isn't supported in the hash map.", obj.getClass())); <END> } }</code><technical_language>nested Map? single-entry map multi-valued (e.g. Object[])</technical_language>

Target:
public static PinotDataType getSpecificMapDataTypeFromMap(Map<Object, Object> map) { Iterator<Object> iterator = map.values().iterator(); Object obj = iterator.next(); if (obj instanceof Integer) { return PinotDataType.INTEGER_VALUE_MAP; } else if (obj instanceof Long) { return PinotDataType.LONG_VALUE_MAP; } else if (obj instanceof Float) { return PinotDataType.FLOAT_VALUE_MAP; } else if (obj instanceof Double) { return PinotDataType.DOUBLE_VALUE_MAP; } else if (obj instanceof String) { return PinotDataType.STRING_VALUE_MAP; } else { throw new IllegalStateException(String.format("'%s' isn't supported in the hash map.", obj.getClass())); } }
Source:
<code>public void restartWorkspace() throws Exception { <START> if (testWorkspaceServiceClient.getStatus(workspace.getId()).equals(WorkspaceStatus.RUNNING)) { <END> editor.closeAllTabs(); testWorkspaceServiceClient.stop(workspace.getName(), workspace.getOwner().getName()); ide.open(workspace); ide.waitOpenedWorkspaceIsReadyToUse(); restoreLanguageServer(); projectExplorer.quickRevealToItemWithJavaScript(PROJECT_NAME + "/Program.cs"); } }</code><technical_language>if workspace is running moment? workspace is restarting moment, language server restarted well, do it</technical_language>

Target:
public void restartWorkspace() throws Exception { editor.closeAllTabs(); testWorkspaceServiceClient.stop(workspace.getName(), workspace.getOwner().getName()); ide.open(workspace); ide.waitOpenedWorkspaceIsReadyToUse(); restoreDependenciesForLanguageServerByCommand(); projectExplorer.quickRevealToItemWithJavaScript(PROJECT_NAME + "/Program.cs"); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle(R.string.box_sharesdk_sample_name); BoxConfig.IS_LOG_ENABLED = true; BoxConfig.CLIENT_ID = "your_client_id"; BoxConfig.CLIENT_SECRET = "your_client_secret"; <START> BoxConfig.CLIENT_SECRET = "your_client_secret"; <END> if (savedInstanceState != null) { mSampleFolder = (BoxFolder) savedInstanceState.getSerializable(EXTRA_SAMPLE_FOLDER); } initialize(); }</code><technical_language>duplicate line..</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setTitle(R.string.box_sharesdk_sample_name); BoxConfig.IS_LOG_ENABLED = true; BoxConfig.CLIENT_ID = "your_client_id"; BoxConfig.CLIENT_SECRET = "your_client_secret"; if (savedInstanceState != null) { mSampleFolder = (BoxFolder) savedInstanceState.getSerializable(EXTRA_SAMPLE_FOLDER); } initialize(); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) <START> return true; <END> if (this == obj) { return true; } if (!(obj instanceof JobSubjectEntityId)) { return false; } JobSubjectEntityId other = (JobSubjectEntityId) obj; return Objects.equals(entityId, other.entityId) && Objects.equals(jobId, other.jobId); }</code><technical_language>repeated</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof JobSubjectEntityId)) { return false; } JobSubjectEntityId other = (JobSubjectEntityId) obj; return Objects.equals(entityId, other.entityId) && Objects.equals(jobId, other.jobId); }
Source:
<code>public String toString() { <START> if (mOptions.size() == 0) { return mName; } else { StringBuilder options = new StringBuilder(); for (TestOption option : mOptions) { options.append(option.toString() + ", "); } <END> options.delete(options.length() - 2, options.length()); return String.format("%s: Options: %s", mName, options); } }</code><technical_language>Joiner format list</technical_language>

Target:
public String toString() { if (mOptions.size() == 0) { return mName; } else { return String.format( "%s: Options: %s", mName, Joiner.on(",") .join( mOptions.stream() .map(TestOption::toString) .collect(Collectors.toList()))); } }
Source:
<code>HelixClusterManagerMetrics(MetricRegistry registry, final HelixClusterManager.HelixClusterManagerCallback clusterMapCallback) { this.clusterMapCallback = clusterMapCallback; this.registry = registry; liveInstanceChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "liveInstanceChangeTriggerCount")); externalViewChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "externalViewChangeTriggerCount")); instanceConfigChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "instanceConfigChangeTriggerCount")); getPartitionIdFromStreamMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getPartitionIdFromStreamMismatchCount")); getWritablePartitionIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getWritablePartitionIdsMismatchCount")); <START> getAllPartitionsMismatchCount = <END> registry.counter(MetricRegistry.name(HelixClusterManager.class, "getAllPartitionsMismatchCount")); hasDatacenterMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "hasDatacenterMismatchCount")); getDataNodeIdMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getDataNodeIdMismatchCount")); getReplicaIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getReplicaIdsMismatchCount")); getDataNodeIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getDataNodeIdsMismatchCount")); }</code><technical_language>getAllPartitionIdsMismatchCount now</technical_language>

Target:
HelixClusterManagerMetrics(MetricRegistry registry, final HelixClusterManager.HelixClusterManagerCallback clusterMapCallback) { this.clusterMapCallback = clusterMapCallback; this.registry = registry; liveInstanceChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "liveInstanceChangeTriggerCount")); externalViewChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "externalViewChangeTriggerCount")); instanceConfigChangeTriggerCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "instanceConfigChangeTriggerCount")); getPartitionIdFromStreamMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getPartitionIdFromStreamMismatchCount")); getWritablePartitionIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getWritablePartitionIdsMismatchCount")); getAllPartitionIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getAllPartitionIdsMismatchCount")); hasDatacenterMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "hasDatacenterMismatchCount")); getDataNodeIdMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getDataNodeIdMismatchCount")); getReplicaIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getReplicaIdsMismatchCount")); getDataNodeIdsMismatchCount = registry.counter(MetricRegistry.name(HelixClusterManager.class, "getDataNodeIdsMismatchCount")); }
Source:
<code>public AnsibleReturnValue runCommand(AnsibleCommandConfig command, Logger originLogger, Consumer<String> eventUrlConsumer) { int timeout = EngineLocalConfig.getInstance().getInteger("ANSIBLE_PLAYBOOK_EXEC_DEFAULT_TIMEOUT"); return runCommand( command, timeout, (String taskName, String eventUrl) -> { AuditLogable logable = createAuditLogable(command, taskName); <START> Injector.get(AuditLogDirector.class).log(logable, <END> AuditLogType.ANSIBLE_RUNNER_EVENT_NOTIFICATION); try { eventUrlConsumer.accept(eventUrl); } catch (Exception ex) { originLogger.error("Error: {}", ex.getMessage()); originLogger.debug("Exception: ", ex); } }); }</code><technical_language>replace this instance variable annotated @Inject</technical_language>

Target:
public AnsibleReturnValue runCommand(AnsibleCommandConfig command, Logger originLogger, Consumer<String> eventUrlConsumer) { int timeout = EngineLocalConfig.getInstance().getInteger("ANSIBLE_PLAYBOOK_EXEC_DEFAULT_TIMEOUT"); return runCommand( command, timeout, (String taskName, String eventUrl) -> { AuditLogable logable = createAuditLogable(command, taskName); auditLogDirector.log(logable, AuditLogType.ANSIBLE_RUNNER_EVENT_NOTIFICATION); try { eventUrlConsumer.accept(eventUrl); } catch (Exception ex) { originLogger.error("Error: {}", ex.getMessage()); originLogger.debug("Exception: ", ex); } }); }
Source:
<code>beginReleasePhoneNumbers(List<PhoneNumber> phoneNumbers, Duration pollInterval) { Objects.requireNonNull(phoneNumbers, "'phoneNumbers' cannot be null."); <START> Objects.requireNonNull(pollInterval, "'pollInterval' cannot be null."); <END> return new PollerFlux<PhoneNumberRelease, PhoneNumberRelease>(pollInterval, releaseNumbersActivationOperation(phoneNumbers), releaseNumbersPollOperation(), (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), releaseNumbersFetchResultOperation()); }</code><technical_language>Similar other, default interval well</technical_language>

Target:
beginReleasePhoneNumbers(List<PhoneNumber> phoneNumbers, Duration pollInterval) { Objects.requireNonNull(phoneNumbers, "'phoneNumbers' cannot be null."); if (pollInterval == null) { pollInterval = defaultPollInterval; } return new PollerFlux<PhoneNumberRelease, PhoneNumberRelease>(pollInterval, releaseNumbersActivationOperation(phoneNumbers), releaseNumbersPollOperation(), (activationResponse, pollingContext) -> monoError(logger, new RuntimeException("Cancellation is not supported")), releaseNumbersFetchResultOperation()); }
Source:
<code>public String docs() { return "void {world, region, flagName, flagValue, [group]} Add/change/remove flag for selected region. FlagName should be any" + " supported flag from this list <LINK_1>. For flagValue use types which" + " are supported by WorldGuard. Add group argument if you want to add WorldGuard group flag (read more about group" + " flag type here: <LINK_0>). Set flagValue as null (and don't set" + " group) if you want to delete flag from region."; <START> } <END></code><technical_language>Change this "void {world, region, flagName, flagValue, [group]} Add/change/remove flag for selected region. FlagName any" - " supported flag [<LINK_1> this list]. For flagValue, types which" - " supported WorldGuard. Add group argument if want add WorldGuard group flag (read more group" - " flag types [<LINK_0> here]). Set flagValue null (and set" - " group) delete flag region."</technical_language>

Target:
public String docs() { return "void {world, region, flagName, flagValue, [group]} Add/change/remove flag for selected region. FlagName should be any" + " supported flag from [<LINK_1> this list]. For the flagValue, use types which" + " are supported by WorldGuard. Add group argument if you want to add WorldGuard group flag (read more about group" + " flag types [<LINK_0> here]). Set flagValue as null (and don't set" + " group) to delete the flag from the region."; }
Source:
<code>public static ArrayList<String> getAllVariants(Entity en, Campaign campaign) { final String METHOD_NAME = "getAllVariants(Entity, Campaign)"; CampaignOptions options = campaign.getCampaignOptions(); ArrayList<String> variants = new ArrayList<>(); for(MechSummary summary : MechSummaryCache.getInstance().getAllMechs()) { if (!en.getChassis().equalsIgnoreCase(summary.getChassis()) || en.getModel().equalsIgnoreCase(summary.getModel()) || !summary.getUnitType().equals(UnitType.determineUnitType(en))) { continue; } if (!summary.isCanon() && options.allowCanonRefitOnly()) { continue; } if (en instanceof BattleArmor) { <START> if (((BattleArmor)en).getTroopers() != (int) summary.getTWweight()) { <END> continue; } } else { if (summary.getTons() != en.getWeight()) { continue; } } ITechnology techProg = UnitTechProgression.getProgression(summary, campaign.getTechFaction(), true); if (null == techProg) { MekHQ.getLogger().log(Utilities.class, METHOD_NAME, LogLevel.WARNING, "Could not determine tech progression for " + summary.getName() + ", including among available refits."); } else if (!campaign.isLegal(techProg)) { continue; } variants.add(summary.getModel()); } return variants; }</code><technical_language>suggestion if (((BattleArmor) en).getTroopers() != (int) summary.getTWweight()) {</technical_language>

Target:
public static ArrayList<String> getAllVariants(Entity en, Campaign campaign) { final String METHOD_NAME = "getAllVariants(Entity, Campaign)"; CampaignOptions options = campaign.getCampaignOptions(); ArrayList<String> variants = new ArrayList<>(); for(MechSummary summary : MechSummaryCache.getInstance().getAllMechs()) { if (!en.getChassis().equalsIgnoreCase(summary.getChassis()) || en.getModel().equalsIgnoreCase(summary.getModel()) || !summary.getUnitType().equals(UnitType.getTypeName(en.getUnitType()))) { continue; } if (en instanceof BattleArmor) { if (((BattleArmor) en).getTroopers() != (int) summary.getTWweight()) { continue; } } else { if (summary.getTons() != en.getWeight()) { continue; } } if (!summary.isCanon() && options.allowCanonRefitOnly()) { continue; } ITechnology techProg = UnitTechProgression.getProgression(summary, campaign.getTechFaction(), true); if (null == techProg) { MekHQ.getLogger().log(Utilities.class, METHOD_NAME, LogLevel.WARNING, "Could not determine tech progression for " + summary.getName() + ", including among available refits."); } else if (!campaign.isLegal(techProg)) { continue; } variants.add(summary.getModel()); } return variants; }
Source:
<code>public void testJobSuspensionWhenDispatcherIsTerminated() throws Exception { dispatcher = createAndStartDispatcher(heartbeatServices, haServices, new ExpectedJobIdJobManagerRunnerFactory(TEST_JOB_ID, createdJobManagerRunnerLatch)); jobMasterLeaderElectionService.isLeader(UUID.randomUUID()); DispatcherGateway dispatcherGateway = dispatcher.getSelfGateway(DispatcherGateway.class); dispatcherGateway.submitJob(jobGraph, TIMEOUT).get(); <START> CommonTestUtils.waitUntilJobManagerIsInitialized(() -> dispatcherGateway.requestJobStatus(jobGraph.getJobID(), TIMEOUT).get()); <END> final CompletableFuture<JobResult> jobResultFuture = dispatcherGateway.requestJobResult(jobGraph.getJobID(), TIMEOUT); assertThat(jobResultFuture.isDone(), is(false)); dispatcher.closeAsync(); try { jobResultFuture.get(); fail("Expected the job result to throw an exception."); } catch (ExecutionException ee) { assertThat(ExceptionUtils.findThrowable(ee, JobNotFinishedException.class).isPresent(), is(true)); } }</code><technical_language>do wait this here</technical_language>

Target:
public void testJobSuspensionWhenDispatcherIsTerminated() throws Exception { dispatcher = createAndStartDispatcher(heartbeatServices, haServices, new ExpectedJobIdJobManagerRunnerFactory(TEST_JOB_ID, createdJobManagerRunnerLatch)); DispatcherGateway dispatcherGateway = dispatcher.getSelfGateway(DispatcherGateway.class); dispatcherGateway.submitJob(jobGraph, TIMEOUT).get(); final CompletableFuture<JobResult> jobResultFuture = dispatcherGateway.requestJobResult(jobGraph.getJobID(), TIMEOUT); assertThat(jobResultFuture.isDone(), is(false)); dispatcher.closeAsync(); try { jobResultFuture.get(); fail("Expected the job result to throw an exception."); } catch (ExecutionException ee) { assertThat(ExceptionUtils.findThrowable(ee, JobNotFinishedException.class).isPresent(), is(true)); } }
Source:
<code>public void onMetricsServiceReady(@Observes @ServiceReady ServiceReadyEvent event) { publishPeriod = getPublishPeriod(); Observable<List<Metric<?>>> events = event.getInsertedData() .filter(m -> m.getType() != MetricType.STRING) <START> .filter(m -> publish.isPublished(m.getMetricId())) <END> .buffer(publishPeriod, TimeUnit.MILLISECONDS, 100) .filter(list -> !list.isEmpty()) .onBackpressureBuffer() .observeOn(Schedulers.io()); subscription = events.subscribe(list -> list.forEach(this::onInsertedData)); }</code><technical_language>@lucasponce Is this comparing apples apples? is m.getMetricId() match id in cache alerting? OK, checking alerting is a type-prefixed this type-prefixed. asking tenant needs involved</technical_language>

Target:
public void onMetricsServiceReady(@Observes @ServiceReady ServiceReadyEvent event) { if (!Boolean.parseBoolean(disableMetricsForwarding)) { publishPeriod = getPublishPeriod(); Observable<List<Metric<?>>> events; if (Boolean.parseBoolean(disablePublishFiltering)) { events = event.getInsertedData() .buffer(publishPeriod, TimeUnit.MILLISECONDS, 100) .filter(list -> !list.isEmpty()); } else { events = event.getInsertedData() .filter(m -> m.getType() != MetricType.STRING) .filter(m -> publish.isPublished(m.getMetricId())) .buffer(publishPeriod, TimeUnit.MILLISECONDS, 100) .filter(list -> !list.isEmpty()); } events = events.onBackpressureBuffer() .observeOn(Schedulers.io()); subscription = events.subscribe(list -> list.forEach(this::onInsertedData)); } }
Source:
<code>public static void registerMigrationListener(MigrationListener listener) { if (!sIsMigrationInProgress) { <START> listener.onCompletion(); <END> } else { sMigrationListener = listener; } }</code><technical_language>call onCompletion callback here</technical_language>

Target:
public static void registerMigrationListener(MigrationListener listener) { sMigrationListener = listener; }
Source:
<code>@Override public Float convert(JsonParser parser, Supplier<String> contentString) { <START> String body = contentString.get(); <END> String version = null; try { version = OBJECT_MAPPER.readTree(body).at("/version/number").textValue(); } catch (RuntimeException | IOException possiblyParseException) { } if (version == null) { throw new IllegalArgumentException(".version.number not found in response: " + body); } return Float.valueOf(version.substring(0, 3)); }</code><technical_language>big deal readTree accepts JsonParser too</technical_language>

Target:
@Override public Float convert(JsonParser parser, Supplier<String> contentString) { String version = null; try { if (enterPath(parser, "version", "number") != null) version = parser.getText(); } catch (RuntimeException | IOException possiblyParseException) { } if (version == null) { throw new IllegalArgumentException( ".version.number not found in response: " + contentString.get()); } return Float.valueOf(version.substring(0, 3)); }