auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Observable<Server> resolve() { return refreshServerCache().concatMap(new Func1<List<Server>, Observable<? extends Server>>() { @Override public Observable<? extends Server> call(List<Server> servers) { if (servers.isEmpty()) { return Observable.error(SERVER_CACHE_EMPTY_EXCEPTION); } <START> int currentPos = positionRef.getAndIncrement(); <END> Server toReturn = servers.get(currentPos % servers.size()); return Observable.just(toReturn); } }); }</code><technical_language>I do this module servers.size() avoid Integer overflow. I is unlikely, is strict if is cost it</technical_language>

Target:
public Observable<Server> resolve() { return refreshServerCache().concatMap(new Func1<List<Server>, Observable<? extends Server>>() { @Override public Observable<? extends Server> call(List<Server> servers) { if (servers.isEmpty()) { return Observable.error(SERVER_CACHE_EMPTY_EXCEPTION); } int currentPos = Math.abs(positionRef.getAndIncrement()); Server toReturn = servers.get(currentPos % servers.size()); return Observable.just(toReturn); } }); }
Source:
<code>protected String doInBackground(Void... voids) { String response; HttpURLConnection connection = null; try { URL url = new URL(newPipeApiUrl); connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setConnectTimeout(timeoutPeriod); connection.setReadTimeout(timeoutPeriod); connection.setRequestProperty("Content-length", "0"); connection.setUseCaches(false); connection.setAllowUserInteraction(false); connection.connect(); int responseStatus = connection.getResponseCode(); switch (responseStatus) { case 200: case 201: BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(connection.getInputStream())); StringBuilder stringBuilder = new StringBuilder(); String line; while ((line = bufferedReader.readLine()) != null) { stringBuilder.append(line); stringBuilder.append("\n"); } bufferedReader.close(); response = stringBuilder.toString(); return response; } } catch (MalformedURLException ex) { ex.printStackTrace(); <START> } catch (IOException ex) { <END> ex.printStackTrace(); } finally { if (connection != null) { try { connection.disconnect(); } catch (Exception ex) { ex.printStackTrace(); } } } return null; }</code><technical_language>do a difference MalformedURLException IOException execute method? I shorten this a little: Java } catch (MalformedURLException | IOException ex) {</technical_language>

Target:
protected String doInBackground(Void... voids) { if (client == null) { client = new OkHttpClient .Builder() .readTimeout(timeoutPeriod, TimeUnit.SECONDS) .build(); } Request request = new Request.Builder() .url(newPipeApiUrl) .build(); try { Response response = client.newCall(request).execute(); return response.body().string(); } catch (IOException ex) { ErrorActivity.reportError(app, ex, null, null, ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", "app update API fail", R.string.app_ui_crash)); } return null; }
Source:
<code>public void actionPerformed(ActionEvent e) { TopComponent tc = WindowManager.getDefault().findTopComponent("EditorTopComponent"); <START> EditorTopComponent etc = (EditorTopComponent) tc; <END> try { etc.spellCheckAllText(); } catch (BadLocationException ex) { Exceptions.printStackTrace(ex); } etc.getEditorState().setDirty(true); }</code><technical_language>factory retrieve top components - it. class name is TopComponentFactory in of classes</technical_language>

Target:
public void actionPerformed(ActionEvent e) { try { etc.spellCheckAllText(); } catch (BadLocationException ex) { Exceptions.printStackTrace(ex); } }
Source:
<code>protected File generate(final int studyId, final int datasetId, final Set<Integer> instanceIds, final int collectionOrderId, final DatasetFileGenerator generator, final boolean singleFile, final String fileExtension) throws IOException{ final Study study = this.studyDataManager.getStudy(studyId); final DatasetDTO dataSet = this.datasetService.getDataset(datasetId); final List<MeasurementVariable> columns = this.getColumns(study.getId(), dataSet.getDatasetId()); final Map<Integer, StudyInstance> selectedDatasetInstancesMap = getSelectedDatasetInstancesMap(dataSet.getInstances(), instanceIds); final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap = this.getObservationUnitRowMap(study, dataSet, collectionOrderId, selectedDatasetInstancesMap); final DatasetCollectionOrderServiceImpl.CollectionOrder collectionOrder = DatasetCollectionOrderServiceImpl.CollectionOrder.findById(collectionOrderId); final int trialDatasetId = this.studyDataManager.getDataSetsByType(study.getId(), DataSetType.SUMMARY_DATA).get(0).getId(); this.datasetCollectionOrderService.reorder(collectionOrder, trialDatasetId, selectedDatasetInstancesMap, observationUnitRowMap); if(singleFile) { <START> return this.generateInSingleFile(study, observationUnitRowMap, columns, fileExtension); <END> } else { return this.generateFiles(study, dataSet, selectedDatasetInstancesMap, observationUnitRowMap, columns, generator, fileExtension); } }</code><technical_language>this function receive generator object</technical_language>

Target:
protected File generate(final int studyId, final int datasetId, final Set<Integer> instanceIds, final int collectionOrderId, final DatasetFileGenerator generator, final boolean singleFile, final String fileExtension) throws IOException{ final Study study = this.studyDataManager.getStudy(studyId); final DatasetDTO dataSet = this.datasetService.getDataset(datasetId); final List<MeasurementVariable> columns = this.getColumns(study.getId(), dataSet.getDatasetId()); final Map<Integer, StudyInstance> selectedDatasetInstancesMap = getSelectedDatasetInstancesMap(dataSet.getInstances(), instanceIds); final Map<Integer, List<ObservationUnitRow>> observationUnitRowMap = this.getObservationUnitRowMap(study, dataSet, collectionOrderId, selectedDatasetInstancesMap); final DatasetCollectionOrderServiceImpl.CollectionOrder collectionOrder = DatasetCollectionOrderServiceImpl.CollectionOrder.findById(collectionOrderId); final int trialDatasetId = this.studyDataManager.getDataSetsByType(study.getId(), DataSetType.SUMMARY_DATA).get(0).getId(); this.datasetCollectionOrderService.reorder(collectionOrder, trialDatasetId, selectedDatasetInstancesMap, observationUnitRowMap); if(singleFile) { return this.generateInSingleFile(study, observationUnitRowMap, columns, generator, fileExtension); } else { return this.generateFiles(study, dataSet, selectedDatasetInstancesMap, observationUnitRowMap, columns, generator, fileExtension); } }
Source:
<code>public Entity<TreeReference> getEntity(TreeReference data) throws SessionUnavailableException { EvaluationContext nodeContext = new EvaluationContext(ec, data); Hashtable<String, XPathExpression> variables = getDetail().getVariableDeclarations(); for(Enumeration<String> en = variables.keys(); en.hasMoreElements();) { String key = en.nextElement(); nodeContext.setVariable(key, XPathFuncExpr.unpack(variables.get(key).eval(nodeContext))); } int length = detail.getHeaderForms().length; String[] details = new String[length]; String[] sortDetails = new String[length]; boolean[] relevancyDetails = new boolean[length]; int count = 0; for(DetailField f : this.getDetail().getFields()) { try { details[count] = f.getTemplate().evaluate(nodeContext); Text sortText = f.getSort(); if(sortText == null) { sortDetails[count] = details[count]; } else { sortDetails[count] = sortText.evaluate(nodeContext); } String relevancy = f.getRelevancy(); boolean isRelevant = true; if (relevancy != null) { try { <START> XPathExpression parsed = XPathParseTool.parseXPath(relevancy); <END> isRelevant = XPathFuncExpr.toBoolean(parsed.eval(nodeContext)).booleanValue(); } catch (XPathSyntaxException e) { e.printStackTrace(); } } relevancyDetails[count] = isRelevant; } catch(XPathException xpe) { xpe.printStackTrace(); details[count] = "<invalid xpath: " + xpe.getMessage() + ">"; } count++; } return new Entity<TreeReference>(details, sortDetails, relevancyDetails, data); }</code><technical_language>noticed this: Parsing XPath expressions is of computationally intensive processes in codebase, do in a loop. Easiest do is move lazily evaluated in DetailField class get parsed field</technical_language>

Target:
public Entity<TreeReference> getEntity(TreeReference data) throws SessionUnavailableException { EvaluationContext nodeContext = new EvaluationContext(ec, data); Hashtable<String, XPathExpression> variables = getDetail().getVariableDeclarations(); for(Enumeration<String> en = variables.keys(); en.hasMoreElements();) { String key = en.nextElement(); nodeContext.setVariable(key, XPathFuncExpr.unpack(variables.get(key).eval(nodeContext))); } int length = detail.getHeaderForms().length; String[] details = new String[length]; String[] sortDetails = new String[length]; boolean[] relevancyDetails = new boolean[length]; int count = 0; for(DetailField f : this.getDetail().getFields()) { try { details[count] = f.getTemplate().evaluate(nodeContext); Text sortText = f.getSort(); if(sortText == null) { sortDetails[count] = details[count]; } else { sortDetails[count] = sortText.evaluate(nodeContext); } relevancyDetails[count] = f.isRelevant(nodeContext); } catch(XPathException xpe) { xpe.printStackTrace(); details[count] = "<invalid xpath: " + xpe.getMessage() + ">"; } catch (XPathSyntaxException e) { e.printStackTrace(); } count++; } return new Entity<TreeReference>(details, sortDetails, relevancyDetails, data); }
Source:
<code><START> public Property[] getProperties() { <END> return m_properties.toArray(new Property[m_properties.size()]); }</code><technical_language>change List<Properties> is this API fixed</technical_language>

Target:
public List<Property> getProperties() { return m_properties; }
Source:
<code>private void createPropertiesEditorCategory() { category = new PropertyEditorCategory("Properties"); category.setIdEvent(id); for (Map.Entry<String, PropertyFormType> property : preference.getPropertiesTypes().entrySet()) { final String propertyName = property.getKey(); final PropertyEditorType propertyType = getPropertyEditorType(property.getValue()); final Object propertyValue = preference.get(propertyName); final PropertyEditorFieldInfo fieldInfo = createFieldInfo(propertyName, propertyType, propertyValue); <START> if(property.getValue() == PropertyFormType.COMBO) { <END> fillEnumValues(propertyValue, fieldInfo); } category.withField(fieldInfo); } }</code><technical_language>Missing space if. other cases in this PR</technical_language>

Target:
private void createPropertiesEditorCategory() { category = new PropertyEditorCategory("Properties"); category.setIdEvent(id); for (Map.Entry<String, PropertyFormType> property : preference.getPropertiesTypes().entrySet()) { final String propertyName = property.getKey(); final PropertyEditorType propertyType = getPropertyEditorType(property.getValue()); final Object propertyValue = preference.get(propertyName); final PropertyEditorFieldInfo fieldInfo = createFieldInfo(propertyName, propertyType, propertyValue); category.withField(fieldInfo); } }
Source:
<code>private void writeOldEntityToNBT(NBTTagCompound nbt) { if (!nil()) { try { NBTTagCompound entity = new NBTTagCompound(); <START> entityCreature.dead = false; END> entityCreature.writeUnlessPassenger(entity); entityCreature.dead = true; nbt.put("entity_old", entity); } catch (Exception e) { LOGGER.error(String.format("Failed to write old entity (%s) to NBT. If this happens more often please report this to the mod author.", entityCreature), e); this.setEntityCreature(null); } } }</code><technical_language>Careful. This is a completely variable one. (Different class, effect) original Entity#isDead is inverted renamed Entity#isAlive (or removed). intention is trick check in Entity#writeUnlessPassenger</technical_language>

Target:
private void writeOldEntityToNBT(NBTTagCompound nbt) { if (!nil()) { try { NBTTagCompound entity = new NBTTagCompound(); entityCreature.removed = false; entityCreature.writeUnlessPassenger(entity); entityCreature.removed = true; nbt.put("entity_old", entity); } catch (Exception e) { LOGGER.error(String.format("Failed to write old entity (%s) to NBT. If this happens more often please report this to the mod author.", entityCreature), e); this.setEntityCreature(null); } } }
Source:
<code>public String getDir() { String methodName = desc.getMethodName(); String className = desc.getClassName(); <START> return "target/tests/" + className + "/" + methodName; <END> }</code><technical_language>Is required for upgrade</technical_language>

Target:
public String getDir() { String methodName = desc.getMethodName(); String className = desc.getClassName(); return "target/" + className + "/" + methodName; }
Source:
<code>public AbstractTransformerAdapter(Map<String, Object> properties) { <START> this.properties = Collections.unmodifiableMap(properties); <END> this.id = properties.getOrDefault(Constants.SERVICE_ID, NOT_AVAILABLE).toString(); this.mimeTypes = getTransformerMimeTypes(properties); }</code><technical_language>If objective is caller modify properties constructing this object create a new map</technical_language>

Target:
public AbstractTransformerAdapter(Map<String, Object> properties) { this.properties = new HashMap<>(properties); this.id = properties.getOrDefault(Constants.SERVICE_ID, NOT_AVAILABLE).toString(); this.mimeTypes = getTransformerMimeTypes(properties); }
Source:
<code>public static boolean isK8SFileSystemProviderAsDefault(FileSystemProvider provider) { <START> return isOpenShiftSupported() && K8S_FS_SCHEME.equals(provider.getScheme()); <END> }</code><technical_language>isOpenShiftSupported() && K8S_FS_SCHEME.equals(provider.getScheme()) && ServerType.isMonitoring();</technical_language>

Target:
public static boolean isK8SFileSystemProviderAsDefault(FileSystemProvider provider) { return K8S_FS_SCHEME.equals(provider.getScheme()) && isOpenShiftSupported() && isSimplifiedMonitoringEnabled(); }
Source:
<code>public static ThriftService getThriftServiceAnnotation(Class<?> serviceClass) { Set<ThriftService> serviceAnnotations = getAllClassAnnotations(serviceClass, ThriftService.class); Preconditions.checkArgument(!serviceAnnotations.isEmpty(), "Service class %s is not annotated with @ThriftService", serviceClass.getName()); Preconditions.checkArgument(serviceAnnotations.size() == 1, <START> "Service class %s is has multiple conflicting @ThriftService annotations: %s", <END> serviceClass.getName(), serviceAnnotations ); return Iterables.getOnlyElement(serviceAnnotations); }</code><technical_language>typo: "is has"</technical_language>

Target:
public static ThriftService getThriftServiceAnnotation(Class<?> serviceClass) { Set<ThriftService> serviceAnnotations = getAllClassAnnotations(serviceClass, ThriftService.class); Preconditions.checkArgument(!serviceAnnotations.isEmpty(), "Service class %s is not annotated with @ThriftService", serviceClass.getName()); Preconditions.checkArgument(serviceAnnotations.size() == 1, "Service class %s has multiple conflicting @ThriftService annotations: %s", serviceClass.getName(), serviceAnnotations ); return Iterables.getOnlyElement(serviceAnnotations); }
Source:
<code>private OutputStreamWriter recreateWriter(Socket socket) throws IOException { if (writer != null) { try { writer.close(); } catch (IOException e) { <START> log.warn(String.format("Error while closing tcp stream %s:%s", serverName, port), e); <END> } writer = null; } BufferedOutputStream stream = new BufferedOutputStream(socket.getOutputStream(), BUFFER_SIZE); return new OutputStreamWriter(stream, "UTF8"); }</code><technical_language>Slf4j API: log.warn("Error while closing tcp stream {}:{}", serverName, port, e);</technical_language>

Target:
private OutputStreamWriter recreateWriter(Socket socket) throws IOException { closeWriter(); BufferedOutputStream stream = new BufferedOutputStream(socket.getOutputStream(), BUFFER_SIZE); return new OutputStreamWriter(stream, "UTF8"); }
Source:
<code>public void checkAndNotify() { synchronized (listenerLock) { if (listener == null) { return; } final File root = rootFile.getFile(); if (root.exists()) { checkAndNotify(rootFile, rootFile.getChildren(), listFiles(rootFile.getFile())); } else { <START> LOGGER.debug( <END> "The monitored file does not exist. No file processing will be done through the CDM", rootFile.getName()); } } }</code><technical_language>frequently checkAndNotify() called? If frequency high, want log info warn instead of debug problem a more obvious alert admin</technical_language>

Target:
public boolean checkAndNotify() { synchronized (processingLock) { if (processing.get() != 0) { LOGGER.debug( "{} files are still processing. Waiting until the list is empty", processing.get()); return false; } else if (isProcessing) { LOGGER.debug("Another thread is currently running, returning until next poll"); return false; } isProcessing = true; } AsyncFileAlterationListener listenerCopy; synchronized (listenerLock) { if (listener == null) { isProcessing = false; return false; } listenerCopy = listener; } if (rootFile.checkNetwork()) { checkAndNotify(rootFile, rootFile.getChildren(), listFiles(rootFile.getFile()), listenerCopy); } else { LOGGER.debug( "The monitored file does not exist. No file fileLocks will be done through the CDM", rootFile.getName()); } isProcessing = false; return true; }
Source:
<code>public List<Block> listBlocks(byte[] fromHash, byte[] toHash) { Block from = blocks.get(fromHash); Block to = blocks.get(toHash); if (from == null || to == null || to.getNumber() < from.getNumber()) return Collections.emptyList(); long qty = to.getNumber() - from.getNumber() + 1; List<Block> ret = new ArrayList<>(); Block block = to; for (long i = 0; i < qty && block != null && !from.isEqual(block); ++i) { ret.add(block); block = blocks.get(block.getParentHash()); } <START> if (ret.size() > 0 && !ret.get(ret.size() - 1).isEqual(from)) <END> return Collections.emptyList(); return ret; }</code><technical_language>this happens</technical_language>

Target:
public List<Block> listBlocks(byte[] fromHash, byte[] toHash) { Block from = blocks.get(fromHash); Block to = blocks.get(toHash); if (from == null || to == null || to.getNumber() < from.getNumber()) return Collections.emptyList(); long qty = to.getNumber() - from.getNumber() + 1; List<Block> ret = new ArrayList<>(); Block block = to; for (long i = 0; i < qty && block != null; ++i) { ret.add(0, block); if (from.isEqual(block)) break; block = blocks.get(block.getParentHash()); } if (ret.isEmpty() || !ret.get(0).isEqual(from)) return Collections.emptyList(); return ret; }
Source:
<code>private static void validateRanges(ITimeDataProvider timeprovider, TmfTimeRange selectionBegin, TmfTimeRange selectionEnd, TmfTimeRange time0, TmfTimeRange time1) { TmfTimeRange begin = time0; TmfTimeRange end = time1; <START> if (time0.getStartTime().compareTo(time1.getStartTime()) > 0) { <END> begin = time1; end = time0; } assertTrue("Selection Low" + selectionBegin + " " + timeprovider.getSelectionBegin(), selectionBegin.contains(TmfTimestamp.fromNanos(timeprovider.getSelectionBegin()))); assertTrue("Selection High " + selectionEnd + " " + timeprovider.getSelectionEnd(), selectionEnd.contains(TmfTimestamp.fromNanos(timeprovider.getSelectionEnd()))); assertTrue("Window Low " + begin + " " + timeprovider.getTime0(), begin.contains(TmfTimestamp.fromNanos(timeprovider.getTime0()))); assertTrue("Window High " + end + " " + timeprovider.getTime1(), end.contains(TmfTimestamp.fromNanos(timeprovider.getTime1()))); }</code><technical_language>I this is correct. line 465, dragged right left zoom. line 467 passing windowUp time0 value, windowDown time1 value</technical_language>

Target:
private static void validateRanges(ITimeDataProvider timeprovider, TmfTimeRange selectionBegin, TmfTimeRange selectionEnd, TmfTimeRange time0, TmfTimeRange time1) { TmfTimeRange end = time1; assertTrue("Selection Low" + selectionBegin + " " + timeprovider.getSelectionBegin(), selectionBegin.contains(TmfTimestamp.fromNanos(timeprovider.getSelectionBegin()))); assertTrue("Selection High " + selectionEnd + " " + timeprovider.getSelectionEnd(), selectionEnd.contains(TmfTimestamp.fromNanos(timeprovider.getSelectionEnd()))); assertTrue("Window Low " + time0 + " " + timeprovider.getTime0(), time0.contains(TmfTimestamp.fromNanos(timeprovider.getTime0()))); assertTrue("Window High " + end + " " + timeprovider.getTime1(), end.contains(TmfTimestamp.fromNanos(timeprovider.getTime1()))); }
Source:
<code>public void excludesFileFilter() throws Exception { final File tmp = File.createTempFile("findbugs-filter", ".xml"); final Document document = DocumentHelper.createDocument(); final Element match = document .addElement("FindBugsFilter") .addElement("Match"); match.addElement("Bug").addAttribute( "pattern", "NM_SAME_SIMPLE_NAME_AS_INTERFACE" ); match.addElement("Class").addAttribute( "name", "Remote" ); new XMLWriter( new FileOutputStream(tmp) ).write(document); final byte[] bytecode = new BytecodeMocker() .withSource("class Remote implements java.rmi.Remote { }") .mock(); final Environment env = new Environment.Mock() .withFile("target/classes/Remote.class", bytecode) .withDefaultClasspath() .withExcludes( <START> "findbugs-filter", <END> tmp.getAbsolutePath() ); new FindBugsValidator().validate(env); }</code><technical_language>@ilyakharlamov put findbugs-filter in a constant try avoid @SuppressWarnings("PMD.AvoidDuplicateLiterals") start of file</technical_language>

Target:
public void excludesFileFilter() throws Exception { final File tmp = File.createTempFile( FindBugsValidator.EXCLUDE_FILTER, ".xml" ); final Document document = DocumentHelper.createDocument(); final Element match = document .addElement("FindBugsFilter") .addElement("Match"); match.addElement("Bug").addAttribute( "pattern", "NM_SAME_SIMPLE_NAME_AS_INTERFACE" ); match.addElement("Class").addAttribute( "name", "Remote" ); new XMLWriter( new FileOutputStream(tmp) ).write(document); final Environment env = new Environment.Mock() .withFile( FindBugsValidatorTest.REMOTE_FILE, new BytecodeMocker() .withSource(FindBugsValidatorTest.REMOTE_SOURCE) .mock() ) .withDefaultClasspath() .withExcludes( FindBugsValidator.EXCLUDE_FILTER, tmp.getAbsolutePath() ); new FindBugsValidator().validate(env); }
Source:
<code>protected Constraint mixedDurations(ConstraintFactory constraintFactory) { <START> return constraintFactory.from(Exam.class) .ifExists(Exam.class, equal(Exam::getPeriod, Exam::getPeriod)) .ifNotExistsOther(Exam.class, equal(Exam::getPeriod, Exam::getPeriod), equal(Exam::getRoom, Exam::getRoom), lessThan(Exam::getId, Exam::getId)) <END> .join(Exam.class, equal(Exam::getPeriod), equal(Exam::getRoom), greaterThan(Exam::getId), filtering((leftExam, rightExam) -> rightExam.getTopicDuration() != leftExam.getTopicDuration())) .ifNotExists(Exam.class, equal((leftExam, rightExam) -> rightExam.getPeriod(), Exam::getPeriod), equal((leftExam, rightExam) -> rightExam.getRoom(), Exam::getRoom), equal((leftExam, rightExam) -> rightExam.getTopicDuration(), Exam::getTopicDuration), greaterThan((leftExam, rightExam) -> rightExam.getId(), Exam::getId)) .join(ExaminationConstraintConfiguration.class) .penalize("Mixed durations", HardSoftScore.ONE_SOFT, (leftExam, rightExam, config) -> config.getMixedDurationPenalty()); }</code><technical_language>return constraintFactory.from(Exam.class) .ifNotExists(Exam.class, equal(Exam::getPeriod), equal(Exam::getRoom), lessThan(Exam::getId)) change much, if anything</technical_language>

Target:
protected Constraint mixedDurations(ConstraintFactory constraintFactory) { return constraintFactory.fromUniquePair(Exam.class, equal(Exam::getPeriod), equal(Exam::getRoom)) .filter((leftExam, rightExam) -> leftExam.getTopicDuration() != rightExam.getTopicDuration()) .ifNotExists(Exam.class, equal((leftExam, rightExam) -> leftExam.getPeriod(), Exam::getPeriod), equal((leftExam, rightExam) -> leftExam.getRoom(), Exam::getRoom), greaterThan((leftExam, rightExam) -> leftExam.getId(), Exam::getId)) .ifNotExists(Exam.class, equal((leftExam, rightExam) -> leftExam.getPeriod(), Exam::getPeriod), equal((leftExam, rightExam) -> leftExam.getRoom(), Exam::getRoom), equal((leftExam, rightExam) -> rightExam.getTopicDuration(), Exam::getTopicDuration), greaterThan((leftExam, rightExam) -> rightExam.getId(), Exam::getId)) .penalizeConfigurable("mixedDurations"); }
Source:
<code>public void shouldGetCreateTaskSensor() { final String operation = "task-created"; final String totalDescription = "The total number of newly created tasks"; final String rateDescription = "The average per-second number of newly created tasks"; <START> expect(streamsMetrics.threadLevelSensor(operation, RecordingLevel.INFO)).andReturn(dummySensor); <END> expect(streamsMetrics.threadLevelTagMap()).andReturn(dummyTagMap); StreamsMetricsImpl.addInvocationRateAndCountToSensor( dummySensor, THREAD_LEVEL_GROUP, dummyTagMap, operation, totalDescription, rateDescription); replayAll(); replay(StreamsMetricsImpl.class); final Sensor sensor = ThreadMetrics.createTaskSensor(streamsMetrics); verifyAll(); verify(StreamsMetricsImpl.class); assertThat(sensor, is(dummySensor)); }</code><technical_language>Is this intentional</technical_language>

Target:
public void shouldGetCreateTaskSensor() { final String operation = "task-created"; final String totalDescription = "The total number of newly created tasks"; final String rateDescription = "The average per-second number of newly created tasks"; mockStatic(StreamsMetricsImpl.class); expect(streamsMetrics.threadLevelSensor(operation, RecordingLevel.INFO)).andReturn(dummySensor); expect(streamsMetrics.threadLevelTagMap()).andReturn(dummyTagMap); StreamsMetricsImpl.addInvocationRateAndCountToSensor( dummySensor, THREAD_LEVEL_GROUP, dummyTagMap, operation, totalDescription, rateDescription); replayAll(); replay(StreamsMetricsImpl.class); final Sensor sensor = ThreadMetrics.createTaskSensor(streamsMetrics); verifyAll(); verify(StreamsMetricsImpl.class); assertThat(sensor, is(dummySensor)); }
Source:
<code>private boolean matchEObjectAndItsContainers(Comparison comparison, EObject eObject) { boolean completed = true; if (comparison.getMatch(eObject) == null) { EObject container = eObject.eContainer(); <START> if (container != null && isInScope(container) && comparison.getMatch(container) == null) { <END> completed = matchEObjectAndItsContainers(comparison, container); } if (completed) { completed = tryToMatch(comparison, eObject); } } return completed; }</code><technical_language>this call getMatch() is a duplicate recursive call do</technical_language>

Target:
private boolean matchEObjectAndItsContainers(Comparison comparison, EObject eObject) { boolean completed = true; if (comparison.getMatch(eObject) == null) { EObject container = eObject.eContainer(); if (container != null && isInScope(container)) { completed = matchEObjectAndItsContainers(comparison, container); } if (completed) { completed = tryToMatch(comparison, eObject); } } return completed; }
Source:
<code>public LocalDateTime getEndDate() { int lastLine = -1; <START> String message = ""; <END> if (null == endDate) { try { loadContents(); lastLine = getContentLineCount() - 1; endDate = getDate(lastLine); } catch (DataFileException e) { message = e.getMessage(); } catch (IndexOutOfBoundsException arrex) { message = "Date column don't exist."; } } if (!"".equals(message)) { if (lastLine > -1) { addMessage(lastLine, message); } else { addMessage(message); } } return endDate; }</code><technical_language>null instead of empty String</technical_language>

Target:
public LocalDateTime getEndDate() { int lastLine = -1; String message = null; if (null == endDate) { try { loadContents(); lastLine = getContentLineCount() - 1; endDate = getDate(lastLine); } catch (DataFileException e) { message = e.getMessage(); } catch (IndexOutOfBoundsException arrex) { message = "Date column don't exist."; } } if (null != message) { if (lastLine > -1) { addMessage(lastLine, message); } else { addMessage(message); } } return endDate; }
Source:
<code>private Optional<OperatingSystem> tryExtractOperatingSystemFrom(final String imageId) { Set<OperatingSystem> operatingSystemsAvailable = createObjectOptionsSupplier.get().getVirtualGuestOperatingSystems(); return tryFind(FluentIterable.from(operatingSystemsAvailable) .filter(new Predicate<OperatingSystem>() { @Override public boolean apply(OperatingSystem input) { return input.getId().contains(imageId); } <START> }), Predicates.notNull()); <END> }</code><technical_language>[minor] is notNull() for? operatingSystemsAvailable null elements? check understanding logic correctly here: image ID a substring of ID of OperatingSystem, is looking</technical_language>

Target:
private Optional<OperatingSystem> tryExtractOperatingSystemFrom(final String imageId) { Set<OperatingSystem> operatingSystemsAvailable = createObjectOptionsSupplier.get().getVirtualGuestOperatingSystems(); return FluentIterable.from(operatingSystemsAvailable) .filter(new Predicate<OperatingSystem>() { @Override public boolean apply(OperatingSystem input) { if (input == null) return false; return input.getId().contains(imageId); } }) .first(); }
Source:
<code>public Builder(ResourceAddress address, String name) { this.address = address; this.name = name; this.parameter = new ModelNode(); this.header = new ModelNode(); this.roles = new HashSet<>(); if (name.equals(READ_RESOURCE_OPERATION)) { <START> parameter.get(RESOLVE_EXPRESSION).set(true); <END> } }</code><technical_language>This add flag *all* read-resource operations. add necessary suggested <LINK_0></technical_language>

Target:
public Builder(ResourceAddress address, String name) { this.address = address; this.name = name; this.parameter = new ModelNode(); this.header = new ModelNode(); this.roles = new HashSet<>(); }
Source:
<code>protected void executeCommand() { if (networkExists()) { getNetworkClusterDAO().update(getNetworkCluster()); } else { getNetworkClusterDAO().save(new NetworkCluster(getVdsGroupId(), getNetwork().getId(), NetworkStatus.OPERATIONAL, false, getNetworkCluster().isRequired(), getNetworkCluster().isMigration())); } if (getNetwork().getCluster().isDisplay()) { getNetworkClusterDAO().setNetworkExclusivelyAsDisplay(getVdsGroupId(), getNetwork().getId()); } if (getNetwork().getCluster().isMigration()) { getNetworkClusterDAO().setNetworkExclusivelyAsMigration(getVdsGroupId(), getNetwork().getId()); } NetworkClusterHelper.setStatus(getVdsGroupId(), getNetwork()); setSucceeded(true); <START> setActionReturnValue(getNetwork().getId()); <END> }</code><technical_language>attached network id original one? iirc new NetworkCluster is created attach</technical_language>

Target:
protected void executeCommand() { if (networkExists()) { getNetworkClusterDAO().update(getNetworkCluster()); } else { getNetworkClusterDAO().save(new NetworkCluster(getVdsGroupId(), getNetwork().getId(), NetworkStatus.OPERATIONAL, false, getNetworkCluster().isRequired(), getNetworkCluster().isMigration())); } if (getNetwork().getCluster().isDisplay()) { getNetworkClusterDAO().setNetworkExclusivelyAsDisplay(getVdsGroupId(), getNetwork().getId()); } if (getNetwork().getCluster().isMigration()) { getNetworkClusterDAO().setNetworkExclusivelyAsMigration(getVdsGroupId(), getNetwork().getId()); } NetworkClusterHelper.setStatus(getVdsGroupId(), getNetwork()); setSucceeded(true); }
Source:
<code>public void createTelephoneChargeForFailedStatusP0010() { postBody.replace("payment_outcome", Map.of( "status", "failed", "code", "P0010", "supplemental", Map.of( "error_code", "ECKOH01234", "error_message", "textual message describing error code" ) ) ); <START> postBody.put("card_expiry", null); <END> connectorRestApiClient .postCreateTelephoneCharge(toJson(postBody)) .statusCode(201) .contentType(JSON) .body("amount", isNumber(12000)) .body("reference", is("MRPC12345")) .body("description", is("New passport application")) .body("processor_id", is("183f2j8923j8")) .body("provider_id", is("17498-8412u9-1273891239")) .body("payment_outcome.status", is("failed")) .body("payment_outcome.code", is("P0010")) .body("payment_outcome.supplemental.error_code", is("ECKOH01234")) .body("payment_outcome.supplemental.error_message", is("textual message describing error code")) .body("card_details.card_brand", is("master-card")) .body("card_details.expiry_date", is(nullValue())) .body("card_details.last_digits_card_number", is("1234")) .body("card_details.first_digits_card_number", is("123456")) .body("charge_id.length()", is(26)) .body("state.status", is("failed")) .body("state.code", is("P0010")) .body("state.finished", is(true)) .body("state.message", is("Payment method rejected")); }</code><technical_language>I this is unnecessary postBody card_expiry send null anyway</technical_language>

Target:
public void createTelephoneChargeForFailedStatusP0010() { postBody.replace("payment_outcome", Map.of( "status", "failed", "code", "P0010", "supplemental", Map.of( "error_code", "ECKOH01234", "error_message", "textual message describing error code" ) ) ); connectorRestApiClient .postCreateTelephoneCharge(toJson(postBody)) .statusCode(201) .contentType(JSON) .body("amount", isNumber(12000)) .body("reference", is("MRPC12345")) .body("description", is("New passport application")) .body("processor_id", is("183f2j8923j8")) .body("provider_id", is("17498-8412u9-1273891239")) .body("payment_outcome.status", is("failed")) .body("payment_outcome.code", is("P0010")) .body("payment_outcome.supplemental.error_code", is("ECKOH01234")) .body("payment_outcome.supplemental.error_message", is("textual message describing error code")) .body("card_details.card_brand", is("master-card")) .body("card_details.expiry_date", is(nullValue())) .body("card_details.last_digits_card_number", is("1234")) .body("card_details.first_digits_card_number", is("123456")) .body("charge_id.length()", is(26)) .body("state.status", is("failed")) .body("state.code", is("P0010")) .body("state.finished", is(true)) .body("state.message", is("Payment method rejected")); }
Source:
<code>public static void enableHaReservationCheck() { if (Config.<Boolean> getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start HA Reservation check"); SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(instance, "performHaResevationCheck", new Class[] {}, new Object[] {}, <START> Config.<Integer> getValue(ConfigValues.VdsHaReservationIntervalInMinutes), <END> Config.<Integer> getValue(ConfigValues.VdsHaReservationIntervalInMinutes), TimeUnit.MINUTES); log.info("Finished HA Reservation check"); } }</code><technical_language>Consider this once, save it, instead of calling twice</technical_language>

Target:
public static void enableHaReservationCheck() { if (Config.<Boolean> getValue(ConfigValues.EnableVdsLoadBalancing)) { log.info("Start HA Reservation check"); Integer interval = Config.<Integer> getValue(ConfigValues.VdsHaReservationIntervalInMinutes); SchedulerUtilQuartzImpl.getInstance().scheduleAFixedDelayJob(instance, "performHaResevationCheck", new Class[] {}, new Object[] {}, interval, interval, TimeUnit.MINUTES); log.info("Finished HA Reservation check"); } }
Source:
<code>public void addRemoteRepo(MavenRemoteRepository repository) { Builder builder = new Builder(repository.getId(), repository.getType(), repository.getUrl()); builder.setPolicy(new RepositoryPolicy(true, repository.getUpdatePolicy() == null ? null : repository .getUpdatePolicy().apiValue(), repository.getChecksumPolicy() == null ? null : repository .getChecksumPolicy().apiValue())); for (RemoteRepository r : this.additionalRemoteRepositories) { <START> if (r.getId().equals(repository.getId())) { <END> return; } } this.additionalRemoteRepositories.add(builder.build()); }</code><technical_language>latest _win_ here, discussion</technical_language>

Target:
public void addRemoteRepo(MavenRemoteRepository repository) { Builder builder = new Builder(repository.getId(), repository.getType(), repository.getUrl()); builder.setPolicy(new RepositoryPolicy(true, repository.getUpdatePolicy() == null ? null : repository .getUpdatePolicy().apiValue(), repository.getChecksumPolicy() == null ? null : repository .getChecksumPolicy().apiValue())); for (RemoteRepository r : this.additionalRemoteRepositories) { if (r.getId().equals(repository.getId())) { this.additionalRemoteRepositories.remove(r); } } this.additionalRemoteRepositories.add(builder.build()); }
Source:
<code>private void handleAuditLog(HttpServletRequest request, HttpServletResponse response) { try { String clientSecret = request.getParameter("clientSecret"); String engineClientSecret = EngineLocalConfig.getInstance().getProperty("ENGINE_SSO_CLIENT_SECRET"); if <START> (EnvelopePBE.check(clientSecret, <END> engineClientSecret)) { String loginErrMsg = request.getParameter("loginErrMsg"); String userName = request.getParameter("userName"); AuditLogable event = new AuditLogableImpl(); event.addCustomValue("LoginErrMsg", loginErrMsg); event.setUserName(userName); auditLogDirector.log(event, AuditLogType.USER_LOGIN_FAILED_WITH_MSG); } } catch (Exception ex) { response.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR); } finally { response.setStatus(HttpURLConnection.HTTP_OK); } }</code><technical_language>condition ? If check returns true, expected valid credentials</technical_language>

Target:
private void handleAuditLog(HttpServletRequest request, HttpServletResponse response) { try { String clientSecret = request.getParameter("clientSecret"); String engineClientSecret = EngineLocalConfig.getInstance().getProperty("ENGINE_SSO_CLIENT_SECRET"); if (EnvelopePBE.check(clientSecret, engineClientSecret)) { String loginErrMsg = request.getParameter("loginErrMsg"); String userName = request.getParameter("userName"); String sourceIp = request.getParameter("sourceIp"); AuditLogable event = new AuditLogableImpl(); event.addCustomValue("LoginErrMsg", String.format(" : '%s'", loginErrMsg)); event.addCustomValue("SourceIP", sourceIp); event.setUserName(userName); auditLogDirector.log(event, AuditLogType.USER_VDC_LOGIN_FAILED); } } catch (Exception ex) { response.setStatus(HttpURLConnection.HTTP_INTERNAL_ERROR); } finally { response.setStatus(HttpURLConnection.HTTP_OK); } }
Source:
<code>protected ESClient createLocalRestClient(ElasticSearchEmbeddedServerConfig serverConfig) { if (!serverConfig.httpEnabled()) { throw new IllegalArgumentException( "Embedded configuration has no HTTP port enable, use TransportClient instead of Rest"); } RestClientBuilder lowLevelRestClient = RestClient.builder( new HttpHost("localhost", Integer.parseInt(serverConfig.getHttpPort()))); RestHighLevelClient client = new RestHighLevelClient(lowLevelRestClient); <START> return new ESRestClient(client.getLowLevelClient(), client); <END> }</code><technical_language>observation this code strange. call a build() a builder build() is called</technical_language>

Target:
protected ESClient createLocalRestClient(ElasticSearchEmbeddedServerConfig serverConfig) { if (!serverConfig.httpEnabled()) { throw new IllegalArgumentException( "Embedded configuration has no HTTP port enable, use TransportClient instead of Rest"); } RestClientBuilder lowLevelRestClientBuilder = RestClient.builder( new HttpHost("localhost", Integer.parseInt(serverConfig.getHttpPort()))); RestHighLevelClient client = new RestHighLevelClient(lowLevelRestClientBuilder); return new ESRestClient(client.getLowLevelClient(), client); }
Source:
<code>private Iterable<AbstractPolicy> getPoliciesWithFilter(String groupId, Predicate<AbstractPolicy> predicate) { <START> return Iterables.filter(getTopology().getGroups().get(groupId).getPolicies(), predicate); <END> }</code><technical_language>Do need null checks here</technical_language>

Target:
private Iterable<AbstractPolicy> getPoliciesWithFilter(String groupId, Predicate<AbstractPolicy> predicate) { Map<String, NodeGroup> groups = getTopology().getGroups(); if (groups == null || groups.get(groupId) == null || groups.get(groupId).getPolicies() == null) { return Collections.emptyList(); } return Iterables.filter(groups.get(groupId).getPolicies(), predicate); }
Source:
<code>protected void enforceTimeLimits() { checkState(Thread.holdsLock(root), "Must hold lock to enforce time limits"); synchronized (root) { for (InternalResourceGroup group : subGroups.values()) { group.enforceTimeLimits(); } long runningTimeoutMillis = runningTimeout.toMillis(); long queuedTimeoutMillis = queuedTimeout.toMillis(); for (QueryExecution query : ImmutableList.copyOf(activeQueries)) { if (runningQueries.contains(query)) { <START> if (Optional.ofNullable(query.getQueryInfo().getQueryStats().getExecutionTime()) <END> .orElse(new Duration(0, NANOSECONDS)).toMillis() > runningTimeoutMillis) { cachedMemoryUsageBytes -= query.getTotalMemoryReservation(); query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "query exceeded resource group runtime limit")); } } else if (Optional.ofNullable(query.getQueryInfo().getQueryStats().getElapsedTime()) .orElse(new Duration(0, NANOSECONDS)).toMillis() - Optional.ofNullable(query.getQueryInfo().getQueryStats().getExecutionTime()) .orElse(new Duration(0, NANOSECONDS)).toMillis() > queuedTimeoutMillis) { query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "query exceeded resource group queued time limit")); } } } }</code><technical_language>Pull this out a variable, if - need for nesting</technical_language>

Target:
protected void enforceTimeLimits() { checkState(Thread.holdsLock(root), "Must hold lock to enforce time limits"); synchronized (root) { for (InternalResourceGroup group : subGroups.values()) { group.enforceTimeLimits(); } for (QueryExecution query : runningQueries) { Duration runningTime = query.getQueryInfo().getQueryStats().getExecutionTime(); if (runningQueries.contains(query) && runningTime != null && runningTime.compareTo(runningTimeLimit) > 0) { query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "query exceeded resource group runtime limit")); } } for (QueryExecution query : queuedQueries) { Duration elapsedTime = query.getQueryInfo().getQueryStats().getElapsedTime(); if (queuedQueries.contains(query) && elapsedTime != null && elapsedTime.compareTo(queuedTimeLimit) > 0) { query.fail(new PrestoException(EXCEEDED_TIME_LIMIT, "query exceeded resource group queued time limit")); } } } }
Source:
<code>public static MortarScope getScope(Context context) { MortarScope scope = (MortarScope) context.getSystemService(MORTAR_SCOPE_SERVICE); if (scope == null) { throw new IllegalArgumentException( <START> format("Cannot find scope in %s.", context.getClass().getName())); <END> } return scope; }</code><technical_language>give a clue wrong, I verbiage top of head. README need updating too</technical_language>

Target:
public static MortarScope getScope(Context context) { MortarScope scope = (MortarScope) context.getSystemService(MORTAR_SCOPE_SERVICE); if (scope == null) { throw new IllegalArgumentException( format("Cannot find scope in %s. Make sure your Activity's content view is set using " + " an inflater from MortarScope.createContext()", context.getClass().getName())); } return scope; }
Source:
<code>public static EnterpriseArchive createDeployment() { <START> final EnterpriseArchive enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:8.0.0-SNAPSHOT") <END> .withoutTransitivity().asSingle(EnterpriseArchive.class); System.out.println(enterpriseArchive.toString(true)); return enterpriseArchive; }</code><technical_language>I if get version project version. fix issue permanently</technical_language>

Target:
public static EnterpriseArchive createDeployment() { ResourceBundle mavenVersion = ResourceBundle.getBundle("version"); final EnterpriseArchive enterpriseArchive = Maven.resolver().resolve("org.superbiz:moviefun-ear:ear:" + mavenVersion.getString("version")) .withoutTransitivity().asSingle(EnterpriseArchive.class); System.out.println(enterpriseArchive.toString(true)); return enterpriseArchive; }
Source:
<code>public void createExternalIdEnforcesStudyId() { when(substudyService.getSubstudy(TestConstants.TEST_STUDY, SUBSTUDY_ID, false)) .thenReturn(Substudy.create()); EXT_ID.setSubstudyId(SUBSTUDY_ID); EXT_ID.setStudyId("some-dumb-id"); externalIdService.createExternalId(EXT_ID, false); <START> verify(externalIdDao).createExternalId(EXT_ID); <END> }</code><technical_language>This test do does, verifies EXT_ID matches itself. (Same of subsequent tests.)</technical_language>

Target:
public void createExternalIdEnforcesStudyId() { when(substudyService.getSubstudy(TestConstants.TEST_STUDY, SUBSTUDY_ID, false)) .thenReturn(Substudy.create()); ExternalIdentifier newExtId = ExternalIdentifier.create(new StudyIdentifierImpl("some-dumb-id"), ID); newExtId.setSubstudyId(SUBSTUDY_ID); externalIdService.createExternalId(newExtId, false); verify(externalIdDao).createExternalId(extId); }
Source:
<code>Object doConvert(BoxedValue input) throws CoreException { if (input instanceof EclString) { String value = ((EclString) input).getValue(); <START> if (value.equals("inf") || value.equals("+inf")) { <END> return Double.POSITIVE_INFINITY; } if (value.equals("-inf")) { return Double.NEGATIVE_INFINITY; } } return BoxedValues.toDouble(input); }</code><technical_language>Lets check if Java allows uppercase literals if accept too</technical_language>

Target:
Object doConvert(BoxedValue input) throws CoreException { if (input instanceof EclString) { final String value = ((EclString) input).getValue(); return Double.valueOf(value); } return BoxedValues.toDouble(input); }
Source:
<code><START> public String getHeader(){ <END> return selectedPageHeader.getText(); }</code><technical_language>this private method</technical_language>

Target:
private String getHeader(){ return selectedPageHeader.getText(); }
Source:
<code>public void stop() { synchronized (this.directReplyToContainers) { if (this.directReplyToContainers.size() > 0) { Iterator<Entry<ConnectionFactory, DirectReplyToMessageListenerContainer>> iterator = this.directReplyToContainers.entrySet().iterator(); while (iterator.hasNext()) { Entry<ConnectionFactory, DirectReplyToMessageListenerContainer> entry = iterator.next(); if (entry.getValue().isRunning()) { entry.getValue().stop(); } <START> iterator.remove(); <END> } } } }</code><technical_language>this.directReplyToContainers.clear() good in end instead ? OTOH: @Override public void stop() { synchronized (this.directReplyToContainers) { this.directReplyToContainers.values() .stream() .filter(AbstractMessageListenerContainer::isRunning) .forEach(AbstractMessageListenerContainer::stop); this.directReplyToContainers.clear(); } }</technical_language>

Target:
public final void stop() { synchronized (this.directReplyToContainers) { this.directReplyToContainers.values() .stream() .filter(AbstractMessageListenerContainer::isRunning) .forEach(AbstractMessageListenerContainer::stop); this.directReplyToContainers.clear(); } doStop(); }
Source:
<code><START> private Error parseRestcommErrorCode(String errCode) { <END> Error error = null; if (SUCCESS_CODE.equals(errCode)) { error = null; } else if (errorMap.containsKey(errCode)) { error = errorMap.get(errCode); } else { error = Error.UNKNOWN_ERROR; } if (logger.isDebugEnabled()) { logger.debug("Mapped to: " + error); } return error; }</code><technical_language>Duplicated logic in ErrorCodeMapper, difference code is a String. maintain consistency in single place</technical_language>

Target:
private MessageError parseRestcommErrorCode(String errCode) { MessageError error = null; if (SUCCESS_CODE.equals(errCode)) { error = null; } else if (errorMap.containsKey(errCode)) { error = errorMap.get(errCode); } else { error = MessageError.UNKNOWN_ERROR; } if (logger.isDebugEnabled()) { logger.debug("Mapped to: " + error); } return error; }
Source:
<code>public int[] getRequiredTokens() { return new int[] { <START> TokenTypes.PARAMETER_DEF, <END> TokenTypes.LAMBDA, }; }</code><technical_language>@romani naming conventions parameters lambdas? If so, this a required field, acceptable default</technical_language>

Target:
public int[] getRequiredTokens() { return CommonUtils.EMPTY_INT_ARRAY; }
Source:
<code><START> private Decoder<?> getKeyDecoder() throws ClassNotFoundException, IllegalAccessException, InstantiationException { <END> String keyDecoder = properties.getKeyDecoder(); if (keyDecoder == null) { return new DefaultDecoder(new VerifiableProperties()); } Class keyDecoderClass = Class.forName(keyDecoder); return (Decoder) keyDecoderClass.newInstance(); }</code><technical_language>refactor of getKeyDecoder() getPayloadDecoder() getDecoder(String decoderType) functionally same</technical_language>

Target:
private Decoder<?> getKeyDecoder() throws IllegalAccessException, InstantiationException { Class keyDecoder = properties.getKeyDecoder(); return getDecoder(keyDecoder); }