auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void roundTripEquivalence(IonDatagram input, boolean myExpectedEquality) throws IOException { IonDatagram[] data = roundTripDatagram(input); for(int i = 0; i < data.length - 1; i++){ <START> runEquivalenceChecks(data[i], myExpectedEquality); <END> checkEquivalence(data[i], data[i + 1], true); } }</code><technical_language>element in data array is subjected runEquivalenceChecks</technical_language>

Target:
public void roundTripEquivalence(IonDatagram input, boolean myExpectedEquality) throws IOException { IonDatagram[] data = roundTripDatagram(input); for(int i = 0; i < data.length; i++){ runEquivalenceChecks(data[i], myExpectedEquality); checkEquivalence(data[i], data[((i + 1) % data.length)], true); } }
Source:
<code><START> public JLabel getConnectingLabel(ImageIcon icon){ <END> if(connectingLabel == null ){ connectingLabel = new JLabel(Constant.messages.getString("websocket.manual_send.try_to_reopen")); } return connectingLabel; }</code><technical_language>icon is set. I a preference for icon location, if want previous location do changing horizontal text position (to leading)</technical_language>

Target:
public JLabel getConnectingLabel(ImageIcon icon){ if(connectingLabel == null ){ connectingLabel = new JLabel(Constant.messages.getString("websocket.manual_send.adv_dialog.connecting")); connectingLabel.setIcon(icon); } return connectingLabel; }
Source:
<code>public Void visitEnhancedForLoop(EnhancedForLoopTree node, Void p) { AnnotatedTypeMirror var = atypeFactory.getAnnotatedTypeLhs(node.getVariable()); AnnotatedTypeMirror iteratedType = atypeFactory.getIteratedType(node.getExpression()); boolean valid = validateTypeOf(node.getVariable()); <START> if (valid) { <END> commonAssignmentCheck( var, iteratedType, node.getExpression(), "enhancedfor.type.incompatible"); } return super.visitEnhancedForLoop(node, p); }</code><technical_language>AnnotatedTypes.getIteratedType is longer called. Checker Framework compiles if I delete it. I removed</technical_language>

Target:
public Void visitEnhancedForLoop(EnhancedForLoopTree node, Void p) { AnnotatedTypeMirror var = atypeFactory.getAnnotatedTypeLhs(node.getVariable()); AnnotatedTypeMirror iteratedType = atypeFactory.getIterableElementType(node.getExpression()); boolean valid = validateTypeOf(node.getVariable()); if (valid) { commonAssignmentCheck( var, iteratedType, node.getExpression(), "enhancedfor.type.incompatible"); } return super.visitEnhancedForLoop(node, p); }
Source:
<code>public static void updateNewNodeName(final Graph<?, Node> graph, final DMNModelInstrumentedBase dmnModel) { if (dmnModel instanceof BusinessKnowledgeModel) { updateBusinessKnowledgeModelDefaultName(graph, (BusinessKnowledgeModel) dmnModel); } else if (dmnModel instanceof Decision) { updateDecisionDefaultName(graph, (Decision) dmnModel); } else if (dmnModel instanceof InputData) { updateInputDataDefaultName(graph, (InputData) dmnModel); } else if (dmnModel instanceof KnowledgeSource) { updateKnowledgeSourceDefaultName(graph, (KnowledgeSource) dmnModel); } else if (dmnModel instanceof TextAnnotation) { updateTextAnnotationDefaultText(graph, (TextAnnotation) dmnModel); } else { throw new IllegalArgumentException("Default Name for '" + dmnModel.getClass().getSimpleName() + "' is not support."); <START> } <END> }</code><technical_language>error message **.... is supported.**</technical_language>

Target:
public static void updateNewNodeName(final Graph<?, Node> graph, final DMNModelInstrumentedBase dmnModel) { if (dmnModel instanceof BusinessKnowledgeModel) { updateBusinessKnowledgeModelDefaultName(graph, (BusinessKnowledgeModel) dmnModel); } else if (dmnModel instanceof Decision) { updateDecisionDefaultName(graph, (Decision) dmnModel); } else if (dmnModel instanceof InputData) { updateInputDataDefaultName(graph, (InputData) dmnModel); } else if (dmnModel instanceof KnowledgeSource) { updateKnowledgeSourceDefaultName(graph, (KnowledgeSource) dmnModel); } else if (dmnModel instanceof TextAnnotation) { updateTextAnnotationDefaultText(graph, (TextAnnotation) dmnModel); } else { throw new IllegalArgumentException("Default Name for '" + dmnModel.getClass().getSimpleName() + "' is not supported."); } }
Source:
<code>private static synchronized @NonNull List<@NonNull URL> getExtraXsdFiles() { IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(TMF_XSD_BUILTIN_ID); List<@NonNull URL> list = new ArrayList<>(); for (IConfigurationElement element : elements) { if (element.getName().equals(XSD_FILE_ELEMENT)) { final String filename = element.getAttribute(XSD_FILE_ATTRIB); final String name = element.getContributor().getName(); SafeRunner.run(new ISafeRunnable() { <START> @Override public void run() throws IOException { if (name != null) { Bundle bundle = Platform.getBundle(name); if (bundle != null) { URL xmlUrl = bundle.getResource(filename); if (xmlUrl == null) { throw new FileNotFoundException(filename); } URL locatedURL = FileLocator.toFileURL(xmlUrl); list.add(NonNullUtils.checkNotNull(locatedURL)); } } <END> } @Override public void handleException(Throwable exception) { } }); } } return list; }</code><technical_language>reuse</technical_language>

Target:
private static synchronized @NonNull List<@NonNull URL> getExtraXsdFiles() { return getUrlsFromConfiguration(TMF_XSD_ID, XSD_FILE_ELEMENT, XSD_FILE_ATTRIB); }
Source:
<code><START> static AutomationScriptingParamsInjector newInstance(boolean inlinedContext) { <END> if (inlinedContext) { return new AutomationScriptingParamsInjector() { @Override public void inject(Map<String,Object> parms, OperationContext ctx, ScriptingOperationDescriptor desc) { parms.putAll(ctx); } }; } return new AutomationScriptingParamsInjector() { @Override public void inject(Map<String,Object> parms, OperationContext ctx, ScriptingOperationDescriptor desc) { Arrays.stream(desc.getParams()).map(Param::getName).filter(name -> ctx.containsKey(name)) .forEach(name -> parms.put(name, ctx.get(name))); } }; }</code><technical_language>public static</technical_language>

Target:
public static AutomationScriptingParamsInjector newInstance(boolean inlinedContext) { if (inlinedContext) { return (params, ctx, desc) -> params.putAll(ctx); } return (params, ctx, desc) -> Arrays.stream(desc.getParams()).map(Param::getName).filter(ctx::containsKey) .forEach(name -> params.put(name, ctx.get(name))); }
Source:
<code>public CatalogQueryScan(final String sql, final Schema outputSchema, final MasterCatalog catalog) { <START> Objects.requireNonNull(sql); <END> Objects.requireNonNull(outputSchema); Objects.requireNonNull(catalog); this.sql = sql; this.outputSchema = outputSchema; this.catalog = catalog; tuples = null; }</code><technical_language>inline calls requireNonNull() assignments</technical_language>

Target:
public CatalogQueryScan(final String sql, final Schema outputSchema, final MasterCatalog catalog) { this.sql = Objects.requireNonNull(sql);; this.outputSchema = Objects.requireNonNull(outputSchema); this.catalog = Objects.requireNonNull(catalog); }
Source:
<code>protected void addDCValue(Context c, Item i, String schema, Node n) throws TransformerException, SQLException, AuthorizeException { String value = getStringValue(n); if (value == null) { value = ""; } else { value = value.trim(); } String element = getAttributeValue(n, "element"); String qualifier = getAttributeValue(n, "qualifier"); String language = null; <START> if (!"".equals(getAttributeValue(n, "language"))){ <END> language = getAttributeValue(n, "language"); } if (language != null) { language = language.trim(); } if (!isQuiet) { System.out.println("\tSchema: " + schema + " Element: " + element + " Qualifier: " + qualifier + " Value: " + value); } if ("none".equals(qualifier) || "".equals(qualifier)) { qualifier = null; } if (!isTest && !value.equals("")) { itemService.addMetadata(c, i, schema, element, qualifier, language, value); } else { MetadataSchema foundSchema = metadataSchemaService.find(c,schema); if (foundSchema == null) { System.out.println("ERROR: schema '"+schema+"' was not found in the registry."); return; } MetadataField foundField = metadataFieldService.findByElement(c, foundSchema, element, qualifier); if (foundField == null) { System.out.println("ERROR: Metadata field: '"+schema+"."+element+"."+qualifier+"' was not found in the registry."); return; } } }</code><technical_language>I suggest lang3.isNotBlank() comparing "", catch whitespace of nonzero length. I this happen. (Separately, Metadatavalue require a non-null language a valid ISO 639-1 code?)</technical_language>

Target:
protected void addDCValue(Context c, Item i, String schema, Node n) throws TransformerException, SQLException, AuthorizeException { String value = getStringValue(n); if (value == null) { value = ""; } else { value = value.trim(); } String element = getAttributeValue(n, "element"); String qualifier = getAttributeValue(n, "qualifier"); String language = null; if (StringUtils.isNotBlank(getAttributeValue(n, "language"))){ language = getAttributeValue(n, "language").trim(); } if (!isQuiet) { System.out.println("\tSchema: " + schema + " Element: " + element + " Qualifier: " + qualifier + " Value: " + value); } if ("none".equals(qualifier) || "".equals(qualifier)) { qualifier = null; } if (!isTest && !value.equals("")) { itemService.addMetadata(c, i, schema, element, qualifier, language, value); } else { MetadataSchema foundSchema = metadataSchemaService.find(c,schema); if (foundSchema == null) { System.out.println("ERROR: schema '"+schema+"' was not found in the registry."); return; } MetadataField foundField = metadataFieldService.findByElement(c, foundSchema, element, qualifier); if (foundField == null) { System.out.println("ERROR: Metadata field: '"+schema+"."+element+"."+qualifier+"' was not found in the registry."); return; } } }
Source:
<code>private HttpRequestBase setContent(HttpEntityEnclosingRequestBase req, String content, String mediaType) { <START> if (content != null) <END> req.setEntity(new StringEntity(content, HTTP.DEF_CONTENT_CHARSET)); return req; }</code><technical_language>mediaType is ignored. This important</technical_language>

Target:
private HttpRequestBase setContent(HttpEntityEnclosingRequestBase req, String content, String mediaType) { if (content != null) { if (!mediaType.equals(MediaType.TEXT_PLAIN)) { throw new IllegalArgumentException("RequestBuilder: the only supported content type is " + mediaType); } req.setEntity(new StringEntity(content, HTTP.DEF_CONTENT_CHARSET)); } return req; }
Source:
<code>public LlapDaemonProtocolProtos.EvictEntityResponseProto evictEntity( RpcController controller, LlapDaemonProtocolProtos.EvictEntityRequestProto protoRequest) throws ServiceException { LlapDaemonProtocolProtos.EvictEntityResponseProto.Builder responseProtoBuilder = LlapDaemonProtocolProtos.EvictEntityResponseProto.newBuilder(); LlapIo<?> llapIo = LlapProxy.getIo(); if (llapIo != null) { llapIo.evictEntity(protoRequest); <START> responseProtoBuilder.setAck(true); <END> } else { responseProtoBuilder.setAck(false); } return responseProtoBuilder.build(); }</code><technical_language>do for purge return amount of data purged</technical_language>

Target:
public LlapDaemonProtocolProtos.EvictEntityResponseProto evictEntity( RpcController controller, LlapDaemonProtocolProtos.EvictEntityRequestProto protoRequest) throws ServiceException { LlapDaemonProtocolProtos.EvictEntityResponseProto.Builder responseProtoBuilder = LlapDaemonProtocolProtos.EvictEntityResponseProto.newBuilder(); LlapIo<?> llapIo = LlapProxy.getIo(); if (llapIo != null) { long evicted = llapIo.evictEntity(protoRequest); responseProtoBuilder.setEvictedBytes(evicted); } else { responseProtoBuilder.setEvictedBytes(-1L); } return responseProtoBuilder.build(); }
Source:
<code>protected void aggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) { Collection<Tuple> currentGroup = projection.get(signature); Object oldAggregate = mainAggregates.get(signature); Object safeOldAggregate = oldAggregate == null ? aggregateGroup(signature, null) : oldAggregate; boolean empty = currentGroup == null || currentGroup.isEmpty(); Object newAggregate = empty ? null : aggregateGroupAfterUpdate(signature, currentGroup, safeOldAggregate , direction, updateElement, change); if (!empty) mainAggregates.put(signature, newAggregate); else mainAggregates.remove(signature); Tuple oldTuple = packResult(signature, safeOldAggregate); Tuple newTuple = packResult(signature, newAggregate == null ? aggregateGroup(signature, null) : newAggregate); if (oldAggregate != null) <START> propagateUpdate(Direction.REVOKE, oldTuple, null); END> if (newAggregate != null) propagateUpdate(Direction.INSERT, newTuple, null); if (aggregatorOuterIndexer != null) aggregatorOuterIndexer.propagate(signature, oldTuple, newTuple); if (aggregatorOuterIdentityIndexers != null) for (AggregatorOuterIdentityIndexer aggregatorOuterIdentityIndexer : aggregatorOuterIdentityIndexers) if (aggregatorOuterIdentityIndexer != null) aggregatorOuterIdentityIndexer.propagate(signature, oldTuple, newTuple); }</code><technical_language>ZERO</technical_language>

Target:
protected void aggregateUpdate(Direction direction, Tuple updateElement, Tuple signature, boolean change) { Collection<Tuple> currentGroup = projection.get(signature); Object oldAggregate = mainAggregates.get(signature); Object safeOldAggregate = oldAggregate == null ? aggregateGroup(signature, null) : oldAggregate; boolean empty = currentGroup == null || currentGroup.isEmpty(); Object newAggregate = empty ? null : aggregateGroupAfterUpdate(signature, currentGroup, safeOldAggregate , direction, updateElement, change); if (!empty) mainAggregates.put(signature, newAggregate); else mainAggregates.remove(signature); Tuple oldTuple = packResult(signature, safeOldAggregate); Tuple newTuple = packResult(signature, newAggregate == null ? aggregateGroup(signature, null) : newAggregate); if (oldAggregate != null) propagateUpdate(Direction.REVOKE, oldTuple, DifferentialTimestamp.ZERO); if (newAggregate != null) propagateUpdate(Direction.INSERT, newTuple, DifferentialTimestamp.ZERO); if (aggregatorOuterIndexer != null) aggregatorOuterIndexer.propagate(signature, oldTuple, newTuple); if (aggregatorOuterIdentityIndexers != null) for (AggregatorOuterIdentityIndexer aggregatorOuterIdentityIndexer : aggregatorOuterIdentityIndexers) if (aggregatorOuterIdentityIndexer != null) aggregatorOuterIdentityIndexer.propagate(signature, oldTuple, newTuple); }
Source:
<code>public void changeConfigFile(String configName) { <START> for (LoggerContext context: loggerContexts) { <END> LogManager.getFactory().removeContext(context); } configFile = configName != null ? URI.create(configName) : null; clearLoadedLoggers(); }</code><technical_language>loggerContexts.clear() is missing loop</technical_language>

Target:
public void changeConfigFile(String configName) { for (LoggerContext context: loggerContexts) { LogManager.getFactory().removeContext(context); } configFile = configName != null ? URI.create(configName) : null; clearLoadedLoggers(); loggerContexts.clear(); }
Source:
<code>public MEMORY_BASIC_INFORMATION64() { <START> } <END></code><technical_language>leave this empty - add call (implicit) _super()_ this enables setting a breakpoint in constructor</technical_language>

Target:
public MEMORY_BASIC_INFORMATION64() { super(); }
Source:
<code>public void testGetVMsForStorageDomain() { dao = dbFacade.getUnregisteredOVFDataDao(); <START> List<OvfEntityData> ovfEntityDataList = dao.getAllForStorageDomain(FixturesTool.STORAGE_DOAMIN_NFS2_1, "VM"); <END> assertTrue("a VM should be fetched for the specified storage domain", !ovfEntityDataList.isEmpty()); }</code><technical_language>please appropiate constant instead of "VM"</technical_language>

Target:
public void testGetVMsForStorageDomain() { dao = dbFacade.getUnregisteredOVFDataDao(); List<OvfEntityData> ovfEntityDataList = dao.getAllForStorageDomainByEntityType(FixturesTool.STORAGE_DOAMIN_NFS2_1, "VM"); assertTrue("A VM should be fetched for the specified storage domain", !ovfEntityDataList.isEmpty()); }
Source:
<code>public ICubePrimer generateCube(int cubeX, int cubeY, int cubeZ) { ICubePrimer primer = new CubePrimer(); int floorY = cubeY * Cube.SIZE; <START> int topY = (cubeY + 1) * Cube.SIZE; <END> NavigableMap<Integer, Layer> cubeLayerSubMap = conf.layers.subMap(conf.layers.floorKey(floorY), true, topY, false); for (Entry<Integer, Layer> entry : cubeLayerSubMap.entrySet()) { Layer layer = entry.getValue(); int fromY = layer.fromY - floorY; int toY = layer.toY - floorY; IBlockState iBlockState = layer.blockState; for (int y = fromY > 0 ? fromY : 0; y < (toY < 16 ? toY : 16); y++) { for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { primer.setBlockState(x, y, z, iBlockState); } } } } return primer; }</code><technical_language>Coords class instead of this. Coords.cubeToMinBlock Coords.cubeToMaxBlock</technical_language>

Target:
public ICubePrimer generateCube(int cubeX, int cubeY, int cubeZ) { ICubePrimer primer = new CubePrimer(); int floorY = Coords.cubeToMinBlock(cubeY); int topY = Coords.cubeToMinBlock(cubeY + 1); NavigableMap<Integer, Layer> cubeLayerSubMap = conf.layers.subMap(conf.layers.floorKey(floorY), true, topY, false); for (Entry<Integer, Layer> entry : cubeLayerSubMap.entrySet()) { Layer layer = entry.getValue(); int fromY = layer.fromY - floorY; int toY = layer.toY - floorY; IBlockState iBlockState = layer.blockState; for (int y = fromY > 0 ? fromY : 0; y < (toY < 16 ? toY : 16); y++) { for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { primer.setBlockState(x, y, z, iBlockState); } } } } return primer; }
Source:
<code>private Trigger(Parcel parcel) { this.id = parcel.readString(); this.description = parcel.readString(); <START> this.enabled = (boolean) parcel.readValue(null); <END> }</code><technical_language>json true false received Strings. a [example](<LINK_0> for save receive</technical_language>

Target:
private Trigger(Parcel parcel) { this.id = parcel.readString(); this.description = parcel.readString(); this.tags = parcel.readHashMap(String.class.getClassLoader()); this.enabled = parcel.readString().equals("true"); }
Source:
<code>public Builder(Context context) { this.context = context; <START> } <END></code><technical_language>This a pain for if want add vanilla Java support, get problem exists parent class already</technical_language>

Target:
public Builder(Context context) { this.context = context; if (context != null) { Context applicationContext = context.getApplicationContext(); Bundle metaData = ManifestInfo.getApplicationMetadata(applicationContext); if (metaData != null) { applicationId = metaData.getString(PARSE_APPLICATION_ID); clientKey = metaData.getString(PARSE_CLIENT_KEY); } } }
Source:
<code>public void deletePost(Long postId, String username) { Post post = postRepository.findOne(postId); if (post == null) { throw new PostNotFoundException(postId); } else if (post.getAuthor().getUsername().compareTo(username) != 0){ throw new UnauthorizedException("Sorry ! this content is private."); <START> } <END> postRepository.delete(post); }</code><technical_language>Dont Ask principal if (post.getAuthor().getUsername().compareTo(username) != 0) a good solution in this create a anemic object(Post) i suggest combine data process in Post object. if(post.isOwnedBy(username) is more expressive readable [<LINK_0>](url)</technical_language>

Target:
public void deletePost(Long postId, String username) { Post post = postRepository.findOne(postId); if (post == null) { throw new PostNotFoundException(postId); } else if (!post.isOwnedBy(username)){ throw new ResourceNotAuthorizedException("Sorry ! this content is private."); } postRepository.delete(post); }
Source:
<code>private Monitor() { machineName = getMachineName(); eventSender = new IEventSender() { @Override <START> public void sendThroughputEvent(String service, String messageId) { <END> try { connection.getClient().event() .metric(1) .service(machineName + " " + service + " throughput.") .tags("storm", "throughput").send(); } catch (Throwable t) { logger.warn("Riemann error during send : " + t.getStackTrace()); } } }; startTimestampPerId = Maps.newConcurrentMap(); connection = new RiemannConnection(); connection.connect(); }</code><technical_language>EventSender extends IEventSender</technical_language>

Target:
private Monitor() { machineName = getMachineName(); startTimestampPerId = Maps.newConcurrentMap();; eventSender = new EventSender(machineName); }
Source:
<code>public void resolve(TemplateVariable variable, TemplateContext context) { super.resolve(variable, context); List params= variable.getVariableType().getParams(); if (params.size() >= 2) { DateFormat format= new SimpleDateFormat((String)params.get(0), <START> Locale.forLanguageTag((String)params.get(1))); <END> resolveWithFormat(variable, context, format); } else if (params.size() == 1) { DateFormat format= new SimpleDateFormat((String)params.get(0)); resolveWithFormat(variable, context, format); } else { super.resolve(variable, context); } }</code><technical_language>method. Java developers usual Local format, e.g. de_CH</technical_language>

Target:
public void resolve(TemplateVariable variable, TemplateContext context) { super.resolve(variable, context); List<String> params= variable.getVariableType().getParams(); if (params.size() >= 2) { DateFormat format= new SimpleDateFormat(params.get(0), new ULocale(params.get(1))); resolveWithFormat(variable, context, format); } else if (params.size() == 1) { DateFormat format= new SimpleDateFormat(params.get(0)); resolveWithFormat(variable, context, format); } else { super.resolve(variable, context); } }
Source:
<code>private E makeRecord() { <START> if (recordClass != null && recordClass != GenericData.Record.class) { <END> E record = makeReflectRecord(); if (record != null) { return record; } } return makeGenericRecord(); }</code><technical_language>allowing this null if null is passed in, add a Precondition check</technical_language>

Target:
private E makeRecord() { if (recordClass != GenericData.Record.class) { E record = makeReflectRecord(); if (record != null) { return record; } } return makeGenericRecord(); }
Source:
<code>public void registerIndexes(final Collection<IndexDefinition> indexDefinitions) { for (final IndexDefinition indexDefinition : indexDefinitions) { final String indexPropertyName = indexDefinition.propertyName(); final Class<?> propertyType = getPropertyType(indexPropertyName); indexDefinition.setPropertyType(propertyType); final StringBuilder indexPropertyNameBuilder = new StringBuilder(indexPropertyName); if (CompoundIndexDefinition.class.isAssignableFrom(indexDefinition.getClass())) { <START> final CompoundIndexDefinition compoundIndexDefinition = (CompoundIndexDefinition) indexDefinition; <END> final String supportingPropertyName = compoundIndexDefinition.supportingPropertyName(); final Class<?> supportingPropertyType = getPropertyType(supportingPropertyName); compoundIndexDefinition.setSupportingPropertyType(supportingPropertyType); indexPropertyNameBuilder.append("_"); indexPropertyNameBuilder.append(supportingPropertyName); } this.indexDefinitions.put(indexPropertyNameBuilder.toString(), indexDefinition); } }</code><technical_language>I sure, this is duplicated logic a simple helper method construct a compound name component parts clearer? java private String compoundName(String propertyName, String supportingPropertyName) { return propertyName + "_" + supportingPropertyName; } StringBuilder equivalent. I leave judgement</technical_language>

Target:
public void registerIndexes(final Collection<IndexDefinition> indexDefinitions) { for (final IndexDefinition indexDefinition : indexDefinitions) { final String propertyName = indexDefinition.propertyName(); final Class<?> propertyType = getPropertyType(propertyName); indexDefinition.setPropertyType(propertyType); String indexName; if (CompoundIndexDefinition.class.isAssignableFrom(indexDefinition.getClass())) { final CompoundIndexDefinition compoundIndexDefinition = (CompoundIndexDefinition) indexDefinition; final String supportingPropertyName = compoundIndexDefinition.supportingPropertyName(); final Class<?> supportingPropertyType = getPropertyType(supportingPropertyName); compoundIndexDefinition.setSupportingPropertyType(supportingPropertyType); indexName = compoundName(propertyName, supportingPropertyName); } else { indexName = indexDefinition.propertyName(); } this.indexDefinitions.put(indexName, indexDefinition); } }
Source:
<code>public void testProcess() throws Exception { HashMap<String, FProcessorFunction> map = new HashMap<>(); FProcessorFunction oneWayFunction = new FProcessorFunction() { @Override public void process(FContext ctx, FProtocol in, FProtocol out) throws TException { return; } }; map.put(oneWay, oneWayFunction); FBaseProcessor processor = new FBaseProcessor(map); FProtocol iprot = mock(FProtocol.class); FProtocol oprot = mock(FProtocol.class); FContext ctx = new FContext(); TMessage thriftMessage = new TMessage(oneWay, (byte) 0x00, 1); when(iprot.readRequestHeader()).thenReturn(ctx); when(iprot.readMessageBegin()).thenReturn(thriftMessage); processor.process(iprot, oprot); <START> } <END></code><technical_language>is this testing exactly</technical_language>

Target:
public void testProcess() throws Exception { map.put(oneWay, oneWayFunction); FContext ctx = new FContext(); TMessage thriftMessage = new TMessage(oneWay, (byte) 0x00, 1); when(iprot.readRequestHeader()).thenReturn(ctx); when(iprot.readMessageBegin()).thenReturn(thriftMessage); processor.process(iprot, oprot); verify(oneWayFunction).process(ctx, iprot, oprot); }
Source:
<code>public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) throws Exception { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: <START> return null; <END> } }</code><technical_language>Question: throw exception here? IlligalStateException? a chance understand happened logs in runtime</technical_language>

Target:
public Background createBackground(Path context, ScenarioSimulationModel.Type type, String value) throws Exception { switch (type) { case RULE: return ruleSimulationCreationStrategy.createBackground(context, value); case DMN: return dmnSimulationCreationStrategy.createBackground(context, value); default: throw new IllegalStateException("Unknown ScenarioSimulationModel.Type " + type); } }
Source:
<code>public static ClientConfiguration toClientConf(AccumuloConfiguration conf) { ClientConfiguration clientConf = ClientConfiguration.create(); final String serverPrincipal = conf.get(Property.GENERAL_KERBEROS_PRINCIPAL); final KerberosName krbName; if (serverPrincipal != null && !serverPrincipal.isEmpty()) { krbName = new KerberosName(serverPrincipal); clientConf.setProperty(KERBEROS_SERVER_PRIMARY, krbName.getServiceName()); } for (Map.Entry<String,String> entry : conf) { String key = entry.getKey(); <START> clientConf.setProperty(key, entry.getValue()); <END> } return clientConf; }</code><technical_language>I preserve code filters out invalid properties. This is a one-way conversion need internally... recognize internally. If keeping stuff avoids a failure, mask failure including unknown properties</technical_language>

Target:
public static ClientConfiguration toClientConf(AccumuloConfiguration conf) { ClientConfiguration clientConf = ClientConfiguration.create(); final String serverPrincipal = conf.get(Property.GENERAL_KERBEROS_PRINCIPAL); final KerberosName krbName; if (serverPrincipal != null && !serverPrincipal.isEmpty()) { krbName = new KerberosName(serverPrincipal); clientConf.setProperty(KERBEROS_SERVER_PRIMARY, krbName.getServiceName()); } HashSet<String> clientKeys = new HashSet<>(); for (ClientConfiguration.ClientProperty prop : ClientConfiguration.ClientProperty.values()) { clientKeys.add(prop.getKey()); } String key; for (Map.Entry<String,String> entry : conf) { key = entry.getKey(); if (clientKeys.contains(key)) { clientConf.setProperty(key, entry.getValue()); } } return clientConf; }
Source:
<code>public long getNextSequenceValue(String name,long init,long inc) { LOGGER.debug("getNextSequenceValue({})",name); BasicDBObject q=new BasicDBObject(NAME,name); DBObject doc=coll.findOne(q); if(doc==null) { LOGGER.debug("inserting sequence record name={}, init={}, inc={}",name,init,inc); if(inc==0) inc=1; initIndex(); BasicDBObject u=new BasicDBObject(). append(NAME,name). append(INIT,init). append(INC,inc). append(VALUE,init); try { <START> coll.insert(u); <END> } catch (Exception e) { LOGGER.debug("Insertion failed with {}, trying to read",e); } doc=coll.findOne(q); if(doc==null) throw new RuntimeException("Cannot generate value for "+name); } LOGGER.debug("Sequence doc={}",doc); Long increment=(Long)doc.get(INC); BasicDBObject u=new BasicDBObject(). append("$inc",new BasicDBObject(VALUE,increment)); doc=coll.findAndModify(q,u); Long l=(Long)doc.get(VALUE); LOGGER.debug("{} -> {}",name,l); return l; }</code><technical_language>Put SAFE here. This needs safe</technical_language>

Target:
public long getNextSequenceValue(String name,long init,long inc) { LOGGER.debug("getNextSequenceValue({})",name); BasicDBObject q=new BasicDBObject(NAME,name); DBObject doc=coll.findOne(q); if(doc==null) { LOGGER.debug("inserting sequence record name={}, init={}, inc={}",name,init,inc); if(inc==0) inc=1; initIndex(); BasicDBObject u=new BasicDBObject(). append(NAME,name). append(INIT,init). append(INC,inc). append(VALUE,init); try { coll.insert(u, WriteConcern.SAFE); } catch (Exception e) { LOGGER.debug("Insertion failed with {}, trying to read",e); } doc=coll.findOne(q); if(doc==null) throw new RuntimeException("Cannot generate value for "+name); } LOGGER.debug("Sequence doc={}",doc); Long increment=(Long)doc.get(INC); BasicDBObject u=new BasicDBObject(). append("$inc",new BasicDBObject(VALUE,increment)); doc=coll.findAndModify(q,u); Long l=(Long)doc.get(VALUE); LOGGER.debug("{} -> {}",name,l); return l; }
Source:
<code>public Object readResolve() { if (allowEmptyArchive == null) { this.allowEmptyArchive = Boolean.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty"); } if (defaultExcludes == null){ defaultExcludes = true; } if (caseSensitive == null) { caseSensitive = true; } if (flattenDirectories == null) { <START> flattenDirectories = false; <END> } return this; }</code><technical_language>a boolean then. This is needed if default false</technical_language>

Target:
public Object readResolve() { if (allowEmptyArchive == null) { this.allowEmptyArchive = SystemProperties.getBoolean(ArtifactArchiver.class.getName()+".warnOnEmpty"); } if (defaultExcludes == null){ defaultExcludes = true; } if (caseSensitive == null) { caseSensitive = true; } return this; }
Source:
<code>private int executeIncrementalLoad(DriverContext driverContext) { try { IncrementalLoad load = work.getIncrementalLoad(); <START> childTasks = Collections.singletonList(load.execute(driverContext, getHive(), LOG)); <END> if (work.getIncrementalIterator().hasNext()) { createBuilderTask(childTasks); } return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }</code><technical_language>this.childTasks precise</technical_language>

Target:
private int executeIncrementalLoad(DriverContext driverContext) { try { IncrementalLoadTasksBuilder load = work.getIncrementalLoadTaskBuilder(); this.childTasks = Collections.singletonList(load.build(driverContext, getHive(), LOG)); if (work.getIncrementalIterator().hasNext()) { createBuilderTask(this.childTasks); } return 0; } catch (Exception e) { LOG.error("failed replication", e); setException(e); return 1; } }
Source:
<code>public TransactionSynchronization create(Object key) { Assert.notNull(key, "'key' must not be null"); <START> if (!TransactionSynchronizationManager.hasResource(key)) { <END> DefaultTransactionalResourceSynchronization synchronization = new DefaultTransactionalResourceSynchronization(key); TransactionSynchronizationManager.bindResource(key, synchronization.getResourceHolder()); return synchronization; } return null; }</code><technical_language>I cleaner move this test callers this strange return null if something's bound key</technical_language>

Target:
public TransactionSynchronization create(Object key) { Assert.notNull(key, "'key' must not be null"); return new DefaultTransactionalResourceSynchronization(key); }
Source:
<code>public void backupDatabase(long stackId, String backupId) { stackUpdater.updateStackStatus(stackId, DetailedStackStatus.DATABASE_BACKUP_IN_PROGRESS, "Initiating database backup " + backupId); <START> clusterService.updateClusterStatusByStackId(stackId, Status.UPDATE_IN_PROGRESS); <END> flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), DATALAKE_DATABASE_BACKUP); }</code><technical_language>applies updateClusterStatusByStackId fireEventAndLog</technical_language>

Target:
public void backupDatabase(long stackId, String backupId) { stackUpdater.updateStackStatus(stackId, DetailedStackStatus.DATABASE_BACKUP_IN_PROGRESS, "Initiating database backup " + backupId); clusterService.updateClusterStatusByStackId(stackId, Status.BACKUP_IN_PROGRESS); flowMessageService.fireEventAndLog(stackId, Status.UPDATE_IN_PROGRESS.name(), DATALAKE_DATABASE_BACKUP); }
Source:
<code><START> public FileAndName(File f, String n) { <END> file = f; name = n; fConfiguration = null; }</code><technical_language>one-letter variables</technical_language>

Target:
public FileAndName(File f, String n) { fFile = f; fName = n; fTraceTypeId = null; }
Source:
<code>public void writeToParcel(Parcel out, int flags) { out.writeLong(mId); out.writeInt(mForceBroken ? 1 : 0); out.writeString(mType == null ? null : mType.toString()); out.writeLong(mStartTimeInSecs); out.writeLong(mEndTimeInSecs); out.writeString(mVisibility); out.writeParcelable(mFrom, 0); out.writeParcelable(mTo, 0); out.writeParcelable(mSingleLocation, 0); out.writeString(mAction); out.writeInt(mDirection); out.writeString(mNotes); out.writeInt(mIsFrequencyBased ? 1 : 0); out.writeInt(mFrequency); out.writeString(mServiceTripId); out.writeString(mServiceName); out.writeInt(mServiceColor == null ? Color.BLACK : mServiceColor.getColor()); out.writeString(mServiceNumber); out.writeString(mServiceOperator); out.writeString(mServiceDirection); out.writeString(mStartStopCode); out.writeString(mEndStopCode); out.writeList(mStreets); out.writeList(mShapes); out.writeParcelable(mRealTimeVehicle, 0); out.writeList(mAlerts); out.writeString(mTerms); out.writeByte((byte) (mIsContinuation ? 1 : 0)); out.writeString(transportModeId); out.writeByte((byte) (isRealTime ? 1 : 0)); out.writeLong(durationWithoutTraffic); out.writeLong(templateHashCode); out.writeParcelable(modeInfo, 0); out.writeParcelable(booking, 0); out.writeString(platform); out.writeInt(stopCount); if (wheelchairAccessible != null) { out.writeInt(wheelchairAccessible ? 1 : 0); } else { out.writeInt(-1); <START> } <END> }</code><technical_language>This if-else removed if w/ boolean instead of Boolean for wheelchairAccessible. Wdyt</technical_language>

Target:
public void writeToParcel(Parcel out, int flags) { out.writeLong(mId); out.writeInt(mForceBroken ? 1 : 0); out.writeString(mType == null ? null : mType.toString()); out.writeLong(mStartTimeInSecs); out.writeLong(mEndTimeInSecs); out.writeString(mVisibility); out.writeParcelable(mFrom, 0); out.writeParcelable(mTo, 0); out.writeParcelable(mSingleLocation, 0); out.writeString(mAction); out.writeInt(mDirection); out.writeString(mNotes); out.writeInt(mIsFrequencyBased ? 1 : 0); out.writeInt(mFrequency); out.writeString(mServiceTripId); out.writeString(mServiceName); out.writeInt(mServiceColor == null ? Color.BLACK : mServiceColor.getColor()); out.writeString(mServiceNumber); out.writeString(mServiceOperator); out.writeString(mServiceDirection); out.writeString(mStartStopCode); out.writeString(mEndStopCode); out.writeList(mStreets); out.writeList(mShapes); out.writeParcelable(mRealTimeVehicle, 0); out.writeList(mAlerts); out.writeString(mTerms); out.writeByte((byte) (mIsContinuation ? 1 : 0)); out.writeString(transportModeId); out.writeByte((byte) (isRealTime ? 1 : 0)); out.writeLong(durationWithoutTraffic); out.writeLong(templateHashCode); out.writeParcelable(modeInfo, 0); out.writeParcelable(booking, 0); out.writeString(platform); out.writeInt(stopCount); out.writeByte((byte) (wheelchairAccessible ? 1 : 0)); }
Source:
<code>private void updateSlaveNodeAndVolumeId(GlusterGeoRepSession session) { List<VDS> slaveHosts = getVdsDao().getAllForHostname(session.getSlaveHostName()); <START> if (slaveHosts != null && !slaveHosts.isEmpty()) { <END> session.setSlaveNodeUuid(slaveHosts.get(0).getId()); GlusterVolumeEntity slaveVol = getVolumeDao().getByName(slaveHosts.get(0).getVdsGroupId(), session.getSlaveVolumeName()); if (slaveVol != null) { session.setSlaveVolumeId(slaveVol.getId()); } } }</code><technical_language>consider : org.apache.commons.collections.CollectionUtils.isNotEmpty</technical_language>

Target:
private void updateSlaveNodeAndVolumeId(GlusterGeoRepSession session) { List<VDS> slaveHosts = getVdsDao().getAllForHostname(session.getSlaveHostName()); if (!CollectionUtils.isEmpty(slaveHosts)) { session.setSlaveNodeUuid(slaveHosts.get(0).getId()); GlusterVolumeEntity slaveVol = getVolumeDao().getByName(slaveHosts.get(0).getVdsGroupId(), session.getSlaveVolumeName()); if (slaveVol != null) { session.setSlaveVolumeId(slaveVol.getId()); } } }
Source:
<code>public void tick(TickEvent.WorldTickEvent event) { if(!event.world.isRemote) { List<EntityPlayer> players = event.world.playerEntities; int i = 0; for(Village village : event.world.villageCollectionObj.getVillageList()) { if(village.hasCapability(TEST_CAP, null)) { boolean playerInRadius = false; <START> for(EntityPlayer player : players) <END> if(new Vec3d(player.posX, 0, player.posZ).squareDistanceTo(new Vec3d(village.getCenter().getX(), 0, village.getCenter().getZ())) <= village.getVillageRadius() * village.getVillageRadius()) { playerInRadius = playerInRadius || true; } if(village.getCapability(TEST_CAP, null).getVal() && !playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.RED + "All Players Have Exited Village " + i)); } else if(!village.getCapability(TEST_CAP, null).getVal() && playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.GREEN + "Some Players Have Entered Village " + i)); } } i++; } } }</code><technical_language>this for loop needs braces</technical_language>

Target:
public void tick(TickEvent.WorldTickEvent event) { if(!event.world.isRemote) { List<EntityPlayer> players = event.world.playerEntities; int i = 0; for(Village village : event.world.villageCollectionObj.getVillageList()) { if(village.hasCapability(TEST_CAP, null)) { boolean playerInRadius = false; for(EntityPlayer player : players) { if(new Vec3d(player.posX, 0, player.posZ).squareDistanceTo(new Vec3d(village.getCenter().getX(), 0, village.getCenter().getZ())) <= village.getVillageRadius() * village.getVillageRadius()) { playerInRadius = playerInRadius || true; } } if(village.getCapability(TEST_CAP, null).getVal() && !playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.RED + "All Players Have Exited Village " + i)); } else if(!village.getCapability(TEST_CAP, null).getVal() && playerInRadius) { village.getCapability(TEST_CAP, null).toggleVal(); for(EntityPlayer player : players) player.sendMessage(new TextComponentString(TextFormatting.GREEN + "Some Players Have Entered Village " + i)); } } i++; } } }
Source:
<code>public void updateSubscription(Subscription modifiedSubscription) { <START> consumerHolder.get(modifiedSubscription.getTopicName(), modifiedSubscription.getName()). <END> ifPresent((consumer) -> consumer.updateSubscription(modifiedSubscription)); }</code><technical_language>This method synchronized subscription lock</technical_language>

Target:
public void updateSubscription(Subscription modifiedSubscription) { synchronized (subscriptionsLocks.getLock(modifiedSubscription)) { consumerHolder.get(modifiedSubscription.getTopicName(), modifiedSubscription.getName()). ifPresent((consumer) -> consumer.updateSubscription(modifiedSubscription)); } }
Source:
<code>public Optional<Config.ConfigProvider> create() { ServletContext context = Resteasy.getContextData(ServletContext.class); JsonNode node = null; try { String dmrConfig = loadDmrConfig(context); if (dmrConfig != null) { <START> node = new ObjectMapper().readTree(dmrConfig); <END> ServicesLogger.LOGGER.loadingFrom("standalone.xml or domain.xml"); } } catch (IOException e) { LOG.warn("Failed to load DMR config", e); } return createJsonProvider(node); }</code><technical_language>Ideally, org.keycloak.util.JsonSerialization for parsing Json Jackson. object mapper instance is there</technical_language>

Target:
public Optional<Config.ConfigProvider> create() { ServletContext context = Resteasy.getContextData(ServletContext.class); JsonNode node = null; try { String dmrConfig = loadDmrConfig(context); if (dmrConfig != null) { node = JsonSerialization.mapper.readTree(dmrConfig); ServicesLogger.LOGGER.loadingFrom("standalone.xml or domain.xml"); } } catch (IOException e) { LOG.warn("Failed to load DMR config", e); } return createJsonProvider(node); }
Source:
<code>@Override public Result visit(Join e) { final Result leftResult = visitChild(0, e.getLeft()).resetAlias(); final Result rightResult = visitChild(1, e.getRight()).resetAlias(); final Context leftContext = leftResult.qualifiedContext(); final Context rightContext = rightResult.qualifiedContext(); SqlNode sqlCondition = null; SqlLiteral condType = JoinConditionType.ON.symbol(POS); JoinType joinType = joinType(e.getJoinType()); <START> if ((e.getJoinType() == JoinRelType.INNER || e.isSemiJoin()) && e.getCondition().isAlwaysTrue()) { <END> joinType = JoinType.COMMA; condType = JoinConditionType.NONE.symbol(POS); } else { sqlCondition = convertConditionToSqlNode(e.getCondition(), leftContext, rightContext, e.getLeft().getRowType().getFieldCount()); } SqlNode join = new SqlJoin(POS, leftResult.asFrom(), SqlLiteral.createBoolean(false, POS), joinType.symbol(POS), rightResult.asFrom(), condType, sqlCondition); return result(join, leftResult, rightResult); }</code><technical_language>Existing logic wrong. for SEMI JOIN JoinType.COMMA condition is created (in case condition is true). @jcamachor JDBC tests I test this logic for SEMI JOIN type</technical_language>

Target:
@Override public Result visit(Join e) { final Result leftResult = visitChild(0, e.getLeft()).resetAlias(); final Result rightResult = visitChild(1, e.getRight()).resetAlias(); final Context leftContext = leftResult.qualifiedContext(); final Context rightContext = rightResult.qualifiedContext(); SqlNode sqlCondition = null; SqlLiteral condType = JoinConditionType.ON.symbol(POS); JoinType joinType = joinType(e.getJoinType()); if (e.getJoinType() == JoinRelType.INNER && e.getCondition().isAlwaysTrue()) { joinType = JoinType.COMMA; condType = JoinConditionType.NONE.symbol(POS); } else { sqlCondition = convertConditionToSqlNode(e.getCondition(), leftContext, rightContext, e.getLeft().getRowType().getFieldCount()); } SqlNode join = new SqlJoin(POS, leftResult.asFrom(), SqlLiteral.createBoolean(false, POS), joinType.symbol(POS), rightResult.asFrom(), condType, sqlCondition); return result(join, leftResult, rightResult); }
Source:
<code>public void testSubscriptionLoad() throws IOException, InterruptedException { final TimeLogger timeLogger = new TimeLogger(); final List<EventType> eventTypeList = createEventTypes(EVENT_TYPE_COUNT, PARTITION_PER_EVENT_TYPE); timeLogger.mark("Create event types"); eventTypeList.parallelStream().forEach(et -> sendEvents(et, MESSAGES_PER_EVENT_TYPE, PARTITION_PER_EVENT_TYPE)); timeLogger.mark("Publishing " + (MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT) + " messages"); final Subscription subscription = createSubscription(eventTypeList); timeLogger.mark("Create subscription"); final List<TestStreamingClient> clients = createSteamingClients( <START> subscription, Math.min(EVENT_TYPE_COUNT + 5, EVENT_TYPE_COUNT * PARTITION_PER_EVENT_TYPE)); <END> clients.forEach(TestStreamingClient::start); timeLogger.mark("Create " + clients.size() + " clients"); final Map<String, String> receivedEvents = streamAllData( clients, MESSAGES_PER_EVENT_TYPE * eventTypeList.size()); timeLogger.mark("Receive and commit " + receivedEvents.size() + " events"); clients.parallelStream().forEach(TestStreamingClient::close); timeLogger.mark("Closing connections"); Assert.assertEquals(EVENT_TYPE_COUNT * MESSAGES_PER_EVENT_TYPE, receivedEvents.size()); clients.stream().map(TestStreamingClient::getSessionId).forEach( sessionId -> Assert.assertTrue( receivedEvents.values().stream().filter(v -> v.equals(sessionId)).count() > 0)); }</code><technical_language>explain is EVENT_TYPE_COUNT + 5</technical_language>

Target:
public void testSubscriptionLoad() throws IOException, InterruptedException { final TimeLogger timeLogger = new TimeLogger(); final List<EventType> eventTypeList = createEventTypes(EVENT_TYPE_COUNT, PARTITION_PER_EVENT_TYPE); timeLogger.mark("Create event types"); eventTypeList.parallelStream().forEach(et -> sendEvents(et, MESSAGES_PER_EVENT_TYPE, PARTITION_PER_EVENT_TYPE)); timeLogger.mark("Publishing " + (MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT) + " messages"); final Subscription subscription = createSubscription(eventTypeList); timeLogger.mark("Create subscription"); final List<TestStreamingClient> clients = createSteamingClients( subscription, Math.min(EVENT_TYPE_COUNT + 5, EVENT_TYPE_COUNT * PARTITION_PER_EVENT_TYPE)); clients.forEach(TestStreamingClient::start); timeLogger.mark("Create " + clients.size() + " clients"); final Map<String, String> receivedEvents = streamAllData( clients, MESSAGES_PER_EVENT_TYPE * EVENT_TYPE_COUNT); timeLogger.mark("Receive and commit " + receivedEvents.size() + " events"); clients.parallelStream().forEach(TestStreamingClient::close); timeLogger.mark("Closing connections"); Assert.assertEquals(EVENT_TYPE_COUNT * MESSAGES_PER_EVENT_TYPE, receivedEvents.size()); clients.stream().map(TestStreamingClient::getSessionId).forEach( sessionId -> Assert.assertTrue( receivedEvents.values().stream().filter(v -> v.equals(sessionId)).count() > 0)); }
Source:
<code>public ResourceReference parse(String rawReference) { <START> while(true) { <END> ResourceReference resourceReference = parseURILinks(rawReference); if (resourceReference != null) { String parseReturn = resourceReference; break; } StringBuilder content = new StringBuilder(rawReference); resourceReference = parseInterWikiLinks(content); if (resourceReference != null) { String parseReturn = resourceReference; break; } if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); String parseReturn = resourceReference; break; } } if (parseReturn == null) { String parseReturn = parseDocumentLink(content); } return parseReturn; }</code><technical_language>I of while for intended repeat</technical_language>

Target:
public ResourceReference parse(String rawReference) { ResourceReference resourceReference = parseURILinks(rawReference); if (resourceReference != null) { return resourceReference; } StringBuilder content = new StringBuilder(rawReference); resourceReference = parseInterWikiLinks(content); if (resourceReference != null) { return resourceReference; } if (!isInWikiMode()) { resourceReference = new ResourceReference(rawReference, ResourceType.URL); resourceReference.setTyped(false); return resourceReference; } return parseDocumentLink(content); }
Source:
<code>public void initialize() { <START> centroids = memoryStore.get(Centroids.class.getName()); <END> }</code><technical_language>This sense me. put memoryStore. Instead, in other places centroids is independently of memoryStore</technical_language>

Target:
public void initialize() { centroids = memoryStore.get(ClusteringPreCtrlTask.KEY_CENTROIDS); }