auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void createsMkCommit() throws Exception { final JsonObject author = Json.createObjectBuilder() .add("name", "Scott").add("email", "Scott@gmail.com") .add("date", "2008-07-09T16:13:30+12:00").build(); final JsonArray tree = Json.createArrayBuilder().add("xyzsha12").build(); MatcherAssert.assertThat( <START> this.repo().git().commits().create( <END> Json.createObjectBuilder().add("message", "my commit message") .add("tree", "abcsha12") .add("parents", tree) .add("author", author).build() ), Matchers.notNullValue() ); }</code><technical_language>commit it</technical_language>

Target:
public final void createsMkCommit() throws Exception { final JsonObject author = Json.createObjectBuilder() .add("name", "Scott").add("email", "Scott@gmail.com") .add("date", "2008-07-09T16:13:30+12:00").build(); final JsonArray tree = Json.createArrayBuilder() .add("xyzsha12").build(); final Commit newCommit = this.repo().git().commits().create( Json.createObjectBuilder().add("message", "my commit message") .add("sha", "12ahscba") .add("tree", "abcsha12") .add("parents", tree) .add("author", author).build() ); MatcherAssert.assertThat( newCommit, Matchers.notNullValue() ); MatcherAssert.assertThat( newCommit.sha(), Matchers.equalTo("12ahscba") ); }
Source:
<code>public void filter(final MethodNode methodNode, final IFilterContext context, final IFilterOutput output) { if ((methodNode.access & Opcodes.ACC_SYNTHETIC) == 0) { return; } if (methodNode.name.startsWith("lambda$")) { return; } if (KotlinGeneratedFilter.isKotlinClass(context)) { if (KotlinDefaultArgumentsFilter .isDefaultArgumentsMethodName(methodNode.name)) { return; } <START> if (KotlinDefaultArgumentsFilter <END> .isDefaultArgumentsConstructor(methodNode)) { return; } if (KotlinCoroutineFilter.isLastArgumentContinuation(methodNode)) { return; } } output.ignore(methodNode.instructions.getFirst(), methodNode.instructions.getLast()); }</code><technical_language>Side note: I this I more more @Godin 's idea separate filters for compilers</technical_language>

Target:
public void filter(final MethodNode methodNode, final IFilterContext context, final IFilterOutput output) { if ((methodNode.access & Opcodes.ACC_SYNTHETIC) == 0) { return; } if (methodNode.name.startsWith("lambda$")) { return; } if (KotlinGeneratedFilter.isKotlinClass(context)) { if (KotlinDefaultArgumentsFilter .isDefaultArgumentsMethod(methodNode)) { return; } if (KotlinDefaultArgumentsFilter .isDefaultArgumentsConstructor(methodNode)) { return; } if (KotlinCoroutineFilter.isLastArgumentContinuation(methodNode)) { return; } } output.ignore(methodNode.instructions.getFirst(), methodNode.instructions.getLast()); }
Source:
<code>private static boolean posixSystemIs64() throws IOException, InterruptedException { Process unameProc = new ProcessBuilder("uname", "-m").start(); <START> BufferedReader unameStdout = new BufferedReader(new InputStreamReader(unameProc.getInputStream())); <END> unameProc.waitFor(); boolean result = unameStdout.readLine().endsWith("64"); unameStdout.close(); return result; }</code><technical_language>try-with-ressources statement here</technical_language>

Target:
private static boolean posixSystemIs64() throws IOException, InterruptedException { Process unameProc = new ProcessBuilder("uname", "-m").start(); unameProc.waitFor(); try (BufferedReader unameStdout = new BufferedReader(new InputStreamReader(unameProc.getInputStream()))) { return unameStdout.readLine().endsWith("64"); } }
Source:
<code>public TraceEventWrapper get(TraceEventType eventType, long endTime, String eventId) { final Pair<TraceEventWrapper, Long> p; if (TraceEventType.DURATION_END.equals(eventType)) { assert eventId == null; p = m_durationEvents.pollLast(); } else if (TraceEventType.ASYNC_END.equals(eventType)) { p = m_asyncEvents.remove(eventId); } else { p = null; } if (p != null) { <START> double diff = (double)(endTime - p.getValue()) / 1000 - m_filterTime; <END> if (diff >= 0) { return p.getKey(); } } return null; }</code><technical_language>cast division repeatedly, change unit of m_filterTime? If endTime is big (in a deadlock situation), this lead overflow</technical_language>

Target:
public TraceEventWrapper get(TraceEventType eventType, long endTime, String eventId) { final Pair<TraceEventWrapper, Long> p; if (TraceEventType.DURATION_END.equals(eventType)) { assert eventId == null; p = m_durationEvents.pollLast(); } else if (TraceEventType.ASYNC_END.equals(eventType)) { p = m_asyncEvents.remove(eventId); } else { p = null; } if (p != null) { double diff = (double)(endTime - p.getSecond()) / 1000 - m_filterTime; if (diff >= 0) { return p.getFirst(); } } return null; }
Source:
<code>public static Double toNumeric(Object o) { Double val = null; o = unpack(o); if (o instanceof Boolean) { val = new Double(((Boolean)o).booleanValue() ? 1 : 0); } else if (o instanceof Double) { val = (Double)o; } else if (o instanceof String) { String s = ((String)o).trim(); double d; try { checkForInvalidNumericCharacters(s); try { <START> val = attemptDateConversion(s); <END> } catch (XPathTypeMismatchException e) { d = Double.parseDouble(s); val = new Double(d); } } catch (NumberFormatException nfe) { val = new Double(Double.NaN); } } else if (o instanceof Date) { val = new Double(DateUtils.daysSinceEpoch((Date)o)); } else if (o instanceof IExprDataType) { val = ((IExprDataType)o).toNumeric(); } if (val != null) { return val; } else { throw new XPathTypeMismatchException("converting '" + (o == null ? "null" : o.toString()) + "' to numeric"); } }</code><technical_language>I try parse a double _first_ (which is a cheaper operation more common) falling attempted date conversion</technical_language>

Target:
public static Double toNumeric(Object o) { Double val = null; o = unpack(o); if (o instanceof Boolean) { val = new Double(((Boolean)o).booleanValue() ? 1 : 0); } else if (o instanceof Double) { val = (Double)o; } else if (o instanceof String) { String s = ((String)o).trim(); if (checkForInvalidNumericOrDatestringCharacters(s)) { return new Double(Double.NaN); } try { val = new Double(Double.parseDouble(s)); } catch (NumberFormatException nfe) { try { val = attemptDateConversion(s); } catch (XPathTypeMismatchException e) { val = new Double(Double.NaN); } } } else if (o instanceof Date) { val = new Double(DateUtils.daysSinceEpoch((Date)o)); } else if (o instanceof IExprDataType) { val = ((IExprDataType)o).toNumeric(); } if (val != null) { return val; } else { throw new XPathTypeMismatchException("converting '" + (o == null ? "null" : o.toString()) + "' to numeric"); } }
Source:
<code>public void updateModel(final OperationContext context, ModelNode model, ListAttributeDefinition attributeDefinition, ModelNode listAttribute) throws OperationFailedException { int index = INDEX.resolveModelAttribute(context, model).asInt(); <START> context.getResult().set(listAttribute.get(index)); <END> }</code><technical_language>WFLY-1069 stuff tie this</technical_language>

Target:
void updateModel(final OperationContext context, ModelNode model, ListAttributeDefinition attributeDefinition, ModelNode listAttribute) throws OperationFailedException { int index = INDEX.resolveModelAttribute(context, model).asInt(); context.getResult().set(listAttribute.get(index)); }
Source:
<code><START> public ChangePreview getChangePreview(RefactoringChange change) throws RefactoringException, CoreException { <END> return manager.getChangePreview(change); }</code><technical_language>deal RefactoringException, CoreException? response be</technical_language>

Target:
public ChangePreview getChangePreview(RefactoringChange change) throws RefactoringException { return manager.getChangePreview(change); }
Source:
<code>public ByteBufList computeDigestAndPackageForSending(long entryId, long lastAddConfirmed, long length, ByteBuf data) { ByteBuf sendBuffer = byteBufAllocator.buffer(METADATA_LENGTH + macCodeLength + data.readableBytes()); sendBuffer.writeLong(ledgerId); sendBuffer.writeLong(entryId); sendBuffer.writeLong(lastAddConfirmed); sendBuffer.writeLong(length); update(sendBuffer); update(data); populateValueAndReset(sendBuffer); if (data.hasArray()) { sendBuffer.writeBytes(data.array(), data.arrayOffset(), data.readableBytes()); } else { byte[] sendArray = new byte[sendBuffer.readableBytes()]; sendBuffer.getBytes(sendBuffer.readerIndex(), sendArray); sendBuffer.writeBytes(sendArray); } <START> return ByteBufList.get(sendBuffer); <END> }</code><technical_language>in a follow change get rid of ByteBufList ByteBuf. Cc @merlimat</technical_language>

Target:
public ByteBufList computeDigestAndPackageForSending(long entryId, long lastAddConfirmed, long length, ByteBuf data) { if (this.useV2Protocol) { ByteBuf headersBuffer = PooledByteBufAllocator.DEFAULT.buffer(METADATA_LENGTH + macCodeLength); headersBuffer.writeLong(ledgerId); headersBuffer.writeLong(entryId); headersBuffer.writeLong(lastAddConfirmed); headersBuffer.writeLong(length); update(headersBuffer); update(data); populateValueAndReset(headersBuffer); return ByteBufList.get(headersBuffer, data); } else { ByteBuf sendBuffer = Unpooled.buffer(METADATA_LENGTH + macCodeLength + data.readableBytes()); sendBuffer.writeLong(ledgerId); sendBuffer.writeLong(entryId); sendBuffer.writeLong(lastAddConfirmed); sendBuffer.writeLong(length); update(sendBuffer); update(data); populateValueAndReset(sendBuffer); sendBuffer.writeBytes(data, data.readerIndex(), data.readableBytes()); return ByteBufList.get(sendBuffer); } }
Source:
<code><START> public void sputnikTest(){ <END> int x= 2+1; return; }</code><technical_language>[Checkstyle] ERROR: '{' is preceded whitespace</technical_language>

Target:
public void sputnikTest() { return; }
Source:
<code>private void processData() { String timeStampString = fData.get(CustomTraceDefinition.TAG_TIMESTAMP); String timeStampInputFormat = fData.get(TIMESTAMP_INPUT_FORMAT_KEY); Date date = null; if (timeStampInputFormat != null && timeStampString != null) { SimpleDateFormat dateFormat = new SimpleDateFormat(timeStampInputFormat); try { date = dateFormat.parse(timeStampString); setTimestamp(new TmfTimestamp(date.getTime(), TIMESTAMP_SCALE)); } catch (ParseException e) { setTimestamp(TmfTimestamp.ZERO); } } else { setTimestamp(TmfTimestamp.ZERO); } int i = 0; fColumnData = new TmfEventField[fDefinition.outputs.size()]; for (OutputColumn outputColumn : fDefinition.outputs) { String value = fData.get(outputColumn.name); if (outputColumn.name.equals(CustomTraceDefinition.TAG_TIMESTAMP) && date != null) { SimpleDateFormat dateFormat = new SimpleDateFormat(fDefinition.timeStampOutputFormat); fColumnData[i++] = new TmfEventField(outputColumn.name, dateFormat.format(date)); } else { fColumnData[i++] = new TmfEventField(outputColumn.name, (value != null ? value : "")); } } CustomEventContent curContent = (CustomEventContent) fContent; <START> fContent = new CustomEventContent(curContent.getName(), curContent.getValue(), fColumnData); <END> fData = null; }</code><technical_language>create ITmfEventField implementation then..</technical_language>

Target:
private void processData() { String timeStampString = fData.get(CustomTraceDefinition.TAG_TIMESTAMP); String timeStampInputFormat = fData.get(TIMESTAMP_INPUT_FORMAT_KEY); Date date = null; if (timeStampInputFormat != null && timeStampString != null) { SimpleDateFormat dateFormat = new SimpleDateFormat(timeStampInputFormat); try { date = dateFormat.parse(timeStampString); setTimestamp(new TmfTimestamp(date.getTime(), TIMESTAMP_SCALE)); } catch (ParseException e) { setTimestamp(TmfTimestamp.ZERO); } } else { setTimestamp(TmfTimestamp.ZERO); } int i = 0; fColumnData = new TmfEventField[fDefinition.outputs.size()]; for (OutputColumn outputColumn : fDefinition.outputs) { String value = fData.get(outputColumn.name); if (outputColumn.name.equals(CustomTraceDefinition.TAG_TIMESTAMP) && date != null) { SimpleDateFormat dateFormat = new SimpleDateFormat(fDefinition.timeStampOutputFormat); fColumnData[i++] = new TmfEventField(outputColumn.name, dateFormat.format(date)); } else { fColumnData[i++] = new TmfEventField(outputColumn.name, (value != null ? value : "")); } } CustomEventContent curContent = (CustomEventContent) getContent(); setContent(new CustomEventContent(curContent.getName(), curContent.getValue(), fColumnData)); fData = null; }
Source:
<code>public void testWriteStatistics() throws IOException { Path objectPath = new Path(ghfs.getFileSystemRoot(), "dir/object2.txt"); FileSystem.Statistics statistics = new FileSystem.Statistics(ghfs.getScheme()); GoogleHadoopSyncableOutputStream fout = new GoogleHadoopSyncableOutputStream( ghfs, ghfs.getGcsPath(objectPath), statistics, CreateFileOptions.DEFAULT_OVERWRITE, SyncableOutputStreamOptions.DEFAULT, mockExecutorService); byte[] data1 = new byte[] {0x0f, 0x0e, 0x0e, 0x0d}; <START> byte[] data2 = new byte[] {0x0b, 0x0e, 0x0e, 0x0f}; <END> fout.write(data1, 0, data1.length); fout.sync(); assertThat(statistics.getBytesWritten()).isEqualTo(4); assertThat(statistics.getWriteOps()).isEqualTo(1); fout.write(data2, 0, data2.length); fout.sync(); assertThat(statistics.getBytesWritten()).isEqualTo(8); assertThat(statistics.getWriteOps()).isEqualTo(2); verify(mockExecutorService).submit(any(Callable.class)); }</code><technical_language>data of size</technical_language>

Target:
public void testWriteStatistics() throws IOException { Path objectPath = new Path(ghfs.getFileSystemRoot(), "dir/object2.txt"); FileSystem.Statistics statistics = new FileSystem.Statistics(ghfs.getScheme()); GoogleHadoopSyncableOutputStream fout = new GoogleHadoopSyncableOutputStream( ghfs, ghfs.getGcsPath(objectPath), statistics, CreateFileOptions.DEFAULT_OVERWRITE, SyncableOutputStreamOptions.DEFAULT, mockExecutorService); byte[] data1 = new byte[] {0x0f, 0x0e, 0x0e, 0x0d}; byte[] data2 = new byte[] {0x0b, 0x0d, 0x0e, 0x0e, 0x0f}; fout.write(data1, 0, data1.length); fout.sync(); assertThat(statistics.getBytesWritten()).isEqualTo(4); assertThat(statistics.getWriteOps()).isEqualTo(1); fout.write(data2, 0, data2.length); fout.sync(); assertThat(statistics.getBytesWritten()).isEqualTo(9); assertThat(statistics.getWriteOps()).isEqualTo(2); verify(mockExecutorService).submit(any(Callable.class)); }
Source:
<code>public static SetDataRequest fromParameterMap(final Map<String, String> requestParameters) { final SetDataRequest setDataRequest = new SetDataRequest(); setDataRequest.setDeviceIdentification(requestParameters.get(Keys.KEY_DEVICE_IDENTIFICATION)); SetDataSystemIdentifier system = new SystemBuilder().withSettings(requestParameters).build(); system.getSetPoint().addAll(new SetPointBuilder().withSettings(requestParameters).buildList()); <START> system.getProfile().addAll(new ProfileBuilder().withSettings(requestParameters).buildList()); <END> setDataRequest.getSystem().add(system); return setDataRequest; }</code><technical_language>profile entries added request here</technical_language>

Target:
public static SetDataRequest fromParameterMap(final Map<String, String> requestParameters) { final SetDataRequest setDataRequest = new SetDataRequest(); setDataRequest.setDeviceIdentification(requestParameters.get(Keys.KEY_DEVICE_IDENTIFICATION)); final List<SetDataSystemIdentifier> systems = new SetDataSystemIdentifierBuilder() .withSettings(requestParameters).buildList(); setDataRequest.getSystem().addAll(systems); return setDataRequest; }
Source:
<code>public void setValues() { fontOverrideProperty.setValue(preferences.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONT_SIZE)); fontSizeProperty.setValue(String.valueOf(preferences.getInt(JabRefPreferences.MAIN_FONT_SIZE))); String currentTheme = preferences.get(JabRefPreferences.FX_THEME); if (ThemeLoader.DARK_CSS.equals(currentTheme)) { themeLightProperty.setValue(false); themeDarkProperty.setValue(true); themeCustomProperty.setValue(false); <START> } else if (ThemeLoader.MAIN_CSS.equals(currentTheme) || currentTheme.isBlank() || currentTheme.isEmpty()) { <END> themeLightProperty.setValue(true); themeDarkProperty.setValue(false); themeCustomProperty.setValue(false); } else { themeLightProperty.setValue(false); themeDarkProperty.setValue(false); themeCustomProperty.setValue(true); } }</code><technical_language>I think, isBlank() includes isEmpty(), it</technical_language>

Target:
public void setValues() { fontOverrideProperty.setValue(preferences.getBoolean(JabRefPreferences.OVERRIDE_DEFAULT_FONT_SIZE)); fontSizeProperty.setValue(String.valueOf(preferences.getInt(JabRefPreferences.MAIN_FONT_SIZE))); String currentTheme = preferences.get(JabRefPreferences.FX_THEME); if (ThemeLoader.DARK_CSS.equals(currentTheme)) { themeLightProperty.setValue(false); themeDarkProperty.setValue(true); themeCustomProperty.setValue(false); } else if (ThemeLoader.MAIN_CSS.equals(currentTheme) || currentTheme.isBlank()) { themeLightProperty.setValue(true); themeDarkProperty.setValue(false); themeCustomProperty.setValue(false); } else { themeLightProperty.setValue(false); themeDarkProperty.setValue(false); themeCustomProperty.setValue(true); } }
Source:
<code>public InfoboxBuilderPage verifySelectedComponentBorderStyle(int index) { wait.forElementVisible(component.get(index)); component.get(index).click(); String script = "return window.getComputedStyle(" + "document.querySelector('.active'),':before').getPropertyValue('Border')"; JavascriptExecutor js = (JavascriptExecutor)driver; <START> String borderValues = (String) js.executeScript(script); <END> Assertion.assertEquals(borderValues, "1px solid rgb(26, 94, 184)"); return this; }</code><technical_language>replace (String) js.executeScript(script) js.executeScript(script).toString()</technical_language>

Target:
public InfoboxBuilderPage verifySelectedComponentBorderStyle(int index) { JavascriptExecutor js = (JavascriptExecutor)driver; WebElement selectedComponent = component.get(index); wait.forElementVisible(selectedComponent); selectedComponent.click(); String script = "return window.getComputedStyle(" + "document.querySelector('.active'),':before').getPropertyValue('Border')"; String borderValues = js.executeScript(script).toString(); Assertion.assertEquals(borderValues, "1px solid rgb(26, 94, 184)"); return this; }
Source:
<code>private void sortByDuration(final boolean reverse) { Collections.sort(episodes, new Comparator<FeedItem>() { @Override public int compare(FeedItem lhs, FeedItem rhs) { <START> int code = lhs.getMedia().getDuration() - rhs.getMedia().getDuration(); <END> if (reverse) { return -1 * code; } else { return code; } } }); refreshTitles(); refreshCheckboxes(); }</code><technical_language>This break for feeds items media</technical_language>

Target:
private void sortByDuration(final boolean reverse) { Collections.sort(episodes, new Comparator<FeedItem>() { @Override public int compare(FeedItem lhs, FeedItem rhs) { int ordering; if (false == lhs.hasMedia()) { ordering = 1; } else if (false == rhs.hasMedia()) { ordering = -1; } else { ordering = lhs.getMedia().getDuration() - rhs.getMedia().getDuration(); } if(reverse) { return -1 * ordering; } else { return ordering; } } }); refreshTitles(); refreshCheckboxes(); }
Source:
<code>public void checkPrivatePatternCall(PatternCall call) { final Pattern calledPattern = call.getPatternRef(); <START> if (calledPattern != null && calledPattern.getModifiers() != null) { <END> if (calledPattern.getModifiers().isPrivate() && calledPattern.eResource() != call.eResource()){ error(String.format("The pattern %s is not visible.", getFormattedPattern(calledPattern)), PatternLanguagePackage.Literals.PATTERN_CALL__PATTERN_REF, IssueCodes.PRIVATE_PATTERN_CALLED); } } }</code><technical_language>simplified CorePatternLanguageHelper.isPrivate()</technical_language>

Target:
public void checkPrivatePatternCall(PatternCall call) { final Pattern calledPattern = call.getPatternRef(); if (calledPattern != null && calledPattern.getModifiers() != null) { if (CorePatternLanguageHelper.isPrivate(calledPattern) && calledPattern.eResource() != call.eResource()){ error(String.format("The pattern %s is not visible.", getFormattedPattern(calledPattern)), PatternLanguagePackage.Literals.PATTERN_CALL__PATTERN_REF, IssueCodes.PRIVATE_PATTERN_CALLED); } } }
Source:
<code>private CloneImageGroupVolumesStructureCommandParameters buildCloneImageGroupVolumesStructureCommandParams() { CloneImageGroupVolumesStructureCommandParameters p = new CloneImageGroupVolumesStructureCommandParameters(getParameters().getStoragePoolId(), getParameters().getSourceStorageDomainId(), getParameters().getTargetStorageDomainId(), getImageGroupId(), getActionType(), <START> getParameters()); <END> p.setDestImageGroupId(getImageGroupId()); p.setEndProcedure(EndProcedure.COMMAND_MANAGED); return p; }</code><technical_language>unrelated here, if class getParamaters() once, unrequired feed getParamaters().getter well</technical_language>

Target:
private CloneImageGroupVolumesStructureCommandParameters buildCloneImageGroupVolumesStructureCommandParams() { CloneImageGroupVolumesStructureCommandParameters p = new CloneImageGroupVolumesStructureCommandParameters(getParameters().getStoragePoolId(), getParameters().getSourceStorageDomainId(), getParameters().getTargetStorageDomainId(), getImageGroupId(), getActionType(), getParameters()); p.setDestImageGroupId(getImageGroupId()); p.setEndProcedure(EndProcedure.COMMAND_MANAGED); p.setJobWeight(Job.MAX_WEIGHT); return p; }
Source:
<code>private void verifyLog(String... expected) throws IOException { File file = new File("audit.log"); List<String> lines = FileUtils.readLines(file, (String)null); final int retry = 5; int i = 0; while (lines.isEmpty() && i < retry) { <START> lines = FileUtils.readLines(file, (String)null); <END> try { Thread.sleep(500 * (i + 1)); } catch(InterruptedException ie) { Thread.currentThread().interrupt(); break; } i++; } assertTrue(lines.size() != 0); for(String exp: expected){ assertTrue(lines.get(0).contains(exp)); } lines.clear(); FileUtils.writeLines(file, lines, false); }</code><technical_language>Minor: GenericTestUtils.waitFor()</technical_language>

Target:
private void verifyLog(String... expected) throws Exception { File file = new File("audit.log"); final List<String> lines = FileUtils.readLines(file, (String)null); GenericTestUtils.waitFor(() -> (lines != null) ? true : false, 100, 60000); try{ assertTrue(lines.size() != 0); for(String exp: expected){ assertTrue(lines.get(0).contains(exp)); } } catch (AssertionError ex){ LOG.error("Error occurred in log verification", ex); if(lines.size() != 0){ LOG.error("Actual line ::: " + lines.get(0)); LOG.error("Expected tokens ::: " + Arrays.toString(expected)); } throw ex; } finally { emptyAuditLog(); } }
Source:
<code>public Component[] getOwners() { Objects.requireNonNull(listenOnComponents, "listenOnComponents must be initialized " + "(by calling listenOn()) before calling this method!"); <START> return listenOnComponents; <END> }</code><technical_language>![INFO](<LINK_0> 'Severity: INFO') com.vaadin.flow.component.ShortcutRegistration.getOwners() expose internal representation returning ShortcutRegistration.listenOnComponents [![rule](<LINK_2>](<LINK_1></technical_language>

Target:
public Component[] getOwners() { if (listenOnComponents == null) { return new Component[0]; } return listenOnComponents; }
Source:
<code>public static <ViewModelType extends ViewModel> void initializeViewModel(ViewModelType viewModel) { if (viewModel == null) { return; } try { Method annotatedMethod = getInitializeMethod(viewModel); final Method initMethod = annotatedMethod != null ? annotatedMethod : viewModel.getClass().getMethod("initialize"); if(initMethod.isAnnotationPresent(PostConstruct.class)) { throw new IllegalStateException(String.format("initialize method of ViewModel [%s] is annotated with @PostConstruct. " + "This will lead to unexpected behaviour and duplicate initialization. " + "Please rename the method or remove the @PostConstruct annotation. " + "See mvvmFX wiki for more details: " + "<LINK_0>", viewModel)); } AccessController.doPrivileged((PrivilegedAction<?>) () -> <START> ReflectionUtils.accessMember(initMethod, () -> initMethod.invoke(viewModel), "mvvmFX wasn't able to call the initialize method of ViewModel [" + viewModel + "].")); <END> } catch (NoSuchMethodException e) { } }</code><technical_language>need AccessController.doPrivileged call anymore this is done of ReflectionUtils.accessMember. ReflectionUtils.accessMember(initMethod, () -> initMethod.invoke(viewModel), "mvvmFX able call initialize method of ViewModel [" + viewModel + "]."); work</technical_language>

Target:
public static <ViewModelType extends ViewModel> void initializeViewModel(ViewModelType viewModel) { if (viewModel == null) { return; } try { Method annotatedMethod = getInitializeMethod(viewModel); final Method initMethod = annotatedMethod != null ? annotatedMethod : viewModel.getClass().getMethod("initialize"); if(initMethod.isAnnotationPresent(PostConstruct.class)) { throw new IllegalStateException(String.format("initialize method of ViewModel [%s] is annotated with @PostConstruct. " + "This will lead to unexpected behaviour and duplicate initialization. " + "Please rename the method or remove the @PostConstruct annotation. " + "See mvvmFX wiki for more details: " + "<LINK_0>", viewModel)); } ReflectionUtils.accessMember(initMethod, () -> initMethod.invoke(viewModel), "mvvmFX wasn't able to call the initialize method of ViewModel [" + viewModel + "]."); } catch (NoSuchMethodException e) { } }
Source:
<code>public ColumnRangesSystemTable(RaptorTableHandle sourceTable, IDBI dbi) { this.sourceTable = requireNonNull(sourceTable, "sourceTable is null"); this.dbi = requireNonNull(dbi, "dbi is null"); <START> this.indexedRaptorColumns = dbi.onDemand(MetadataDao.class).listTableColumns(sourceTable.getTableId()).stream() <END> .filter(column -> isIndexedType(column.getDataType())) .collect(toImmutableList()); List<ColumnMetadata> systemTableColumns = this.indexedRaptorColumns.stream() .flatMap(column -> Stream.of( new ColumnMetadata(column.getColumnName() + MIN_COLUMN_SUFFIX, column.getDataType(), null, false), new ColumnMetadata(column.getColumnName() + MAX_COLUMN_SUFFIX, column.getDataType(), null, false))) .collect(toImmutableList()); SchemaTableName tableName = new SchemaTableName(sourceTable.getSchemaName(), sourceTable.getTableName() + COLUMN_RANGES_TABLE_SUFFIX); this.tableMetadata = new ConnectorTableMetadata(tableName, systemTableColumns); }</code><technical_language>Nit: wrap call listTableColumns() this easier read</technical_language>

Target:
public ColumnRangesSystemTable(RaptorTableHandle sourceTable, IDBI dbi) { this.sourceTable = requireNonNull(sourceTable, "sourceTable is null"); this.dbi = requireNonNull(dbi, "dbi is null"); this.indexedRaptorColumns = dbi.onDemand(MetadataDao.class) .listTableColumns(sourceTable.getTableId()).stream() .filter(column -> isIndexedType(column.getDataType())) .collect(toImmutableList()); List<ColumnMetadata> systemTableColumns = indexedRaptorColumns.stream() .flatMap(column -> Stream.of( new ColumnMetadata(column.getColumnName() + MIN_COLUMN_SUFFIX, column.getDataType(), null, false), new ColumnMetadata(column.getColumnName() + MAX_COLUMN_SUFFIX, column.getDataType(), null, false))) .collect(toImmutableList()); SchemaTableName tableName = new SchemaTableName(sourceTable.getSchemaName(), sourceTable.getTableName() + COLUMN_RANGES_TABLE_SUFFIX); this.tableMetadata = new ConnectorTableMetadata(tableName, systemTableColumns); }
Source:
<code><START> public static String fetchConsoleUrl(Provider<KubevirtProviderProperties> provider, AuditLogDirector auditLogDirector) throws IOException, <END> ApiException, URISyntaxException { OpenshiftApi api = KubevirtUtils.getOpenshiftApi(provider); Optional<V1Route> route; try { V1RouteList routes = api.listNamespacedRoute("openshift-console", null, "metadata.name=console", null, null, null, null, null, Boolean.FALSE); route = routes.getItems().stream().findAny(); } catch (ApiException e) { KubevirtUtils.auditAuthorizationIssues(e, auditLogDirector, provider); log.error("failed to retrieve console url for kubevirt provider (url = {}): {}", provider.getUrl(), ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception", e); throw e; } if (route.isPresent()) { String host = route.get().getSpec().getHost(); String scheme = route.get().getSpec().getPort().getTargetPort(); try { return new URI(scheme, host, null, null).toString(); } catch (URISyntaxException e) { log.error("failed to retrieve console url for kubevirt provider (url = {}): {}", provider.getUrl(), ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception", e); throw e; } } return null; }</code><technical_language>pls formatter - line long</technical_language>

Target:
public static String fetchConsoleUrl(Provider<KubevirtProviderProperties> provider, AuditLogDirector auditLogDirector) throws IOException, ApiException, URISyntaxException { OpenshiftApi api = KubevirtUtils.getOpenshiftApi(provider); Optional<V1Route> route; try { V1RouteList routes = api.listNamespacedRoute("openshift-console", null, "metadata.name=console", null, null, null, null, null, Boolean.FALSE); route = routes.getItems().stream().findAny(); } catch (ApiException e) { KubevirtAuditUtils.auditAuthorizationIssues(e, auditLogDirector, provider); log.error("failed to retrieve console url for kubevirt provider (url = {}): {}", provider.getUrl(), ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception", e); throw e; } if (route.isPresent()) { String host = route.get().getSpec().getHost(); String scheme = route.get().getSpec().getPort().getTargetPort(); try { return new URI(scheme, host, null, null).toString(); } catch (URISyntaxException e) { log.error("failed to retrieve console url for kubevirt provider (url = {}): {}", provider.getUrl(), ExceptionUtils.getRootCauseMessage(e)); log.debug("Exception", e); throw e; } } return null; }
Source:
<code>public void suspend() { LOG.info("Suspending the slot manager."); resourceTracker.clear(); <START> if (taskExecutorManager != null) { <END> taskExecutorManager.close(); for (InstanceID registeredTaskManager : taskExecutorManager.getTaskExecutors()) { unregisterTaskManager(registeredTaskManager, new SlotManagerException("The slot manager is being suspended.")); } } taskExecutorManager = null; resourceManagerId = null; resourceActions = null; started = false; }</code><technical_language>add @Nullable taskExecutorManager</technical_language>

Target:
public void suspend() { if (!started) { return; } LOG.info("Suspending the slot manager."); resourceTracker.clear(); if (taskExecutorManager != null) { taskExecutorManager.close(); for (InstanceID registeredTaskManager : taskExecutorManager.getTaskExecutors()) { unregisterTaskManager(registeredTaskManager, new SlotManagerException("The slot manager is being suspended.")); } } taskExecutorManager = null; resourceManagerId = null; resourceActions = null; started = false; }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new ServletException("HttpServletRequest required"); } if (!(response instanceof HttpServletResponse)) { throw new ServletException("HttpServletResponse required"); } try { chain.doFilter(request, response); LOGGER.finer("Chain processed normally"); } catch (AuthenticationException | AccessDeniedException ex) { handleException(request, response, chain, ex); } catch (ServletException ex) { <START> AcegiSecurityException securityException = containsAccessException(ex); <END> if (securityException != null) { handleException(request, response, chain, (AcegiSecurityException) securityException); } else { throw ex; } } catch (IOException ex) { throw ex; } }</code><technical_language>this is a larger change. if I handle access denied exception wrap another exception exception current logic is show top level exception. wheras punts access denied exception. whats case for deeper level</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (!(request instanceof HttpServletRequest)) { throw new ServletException("HttpServletRequest required"); } if (!(response instanceof HttpServletResponse)) { throw new ServletException("HttpServletResponse required"); } try { chain.doFilter(request, response); LOGGER.finer("Chain processed normally"); } catch (AuthenticationException | AccessDeniedException ex) { handleException(request, response, chain, ex); } catch (ServletException ex) { if (ex.getRootCause() instanceof AuthenticationException || ex.getRootCause() instanceof AccessDeniedException) { handleException(request, response, chain, (AcegiSecurityException) ex.getRootCause()); } else { throw ex; } } catch (IOException ex) { throw ex; } }
Source:
<code>public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); <START> ArrayList<LatLng> coordinatesAList = new ArrayList<>(coordinatesList); <END> return coordinatesAList; }</code><technical_language>simplified return new ArrayList<>(coordinatesList);</technical_language>

Target:
public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); }
Source:
<code>public double priceFromYield(double yield, LocalDate settlementDate) { <START> double accrualFactor = dayCount.relativeYearFraction(settlementDate, notional.getDate().getUnadjusted()); <END> if (yieldConvention.equals(DISCOUNT)) { double price = 1.0d - accrualFactor * yield; return price; } if (yieldConvention.equals(INTEREST_AT_MATURITY) || yieldConvention.equals(FRANCE_CD) || yieldConvention.equals(JAPAN_BILLS)) { double price = 1.0d / (1.0d + accrualFactor * yield); return price; } throw new UnsupportedOperationException("The convention " + yieldConvention.name() + " is not supported."); }</code><technical_language>logic move BillConvention (taking accrualFactor)</technical_language>

Target:
public double priceFromYield(double yield, LocalDate settlementDate) { double accrualFactor = dayCount.relativeYearFraction(settlementDate, notional.getDate().getUnadjusted()); return yieldConvention.priceFromYield(yield, accrualFactor); }
Source:
<code>public void stopJobExecution(long executionId) { String uriTemplate = resources.get("batch/executions").toString() + "/{executionId}"; <START> restTemplate.delete(uriTemplate, Collections.singletonMap("executionId", executionId)); <END> }</code><technical_language>I this is scope of PR do "delete", a "put". reason I this is stopping a resource (changing state) removing it</technical_language>

Target:
public void stopJobExecution(long executionId) { String uriTemplate = resources.get("batch/executions").toString() + "/{executionId}"; MultiValueMap<String, Object> values = new LinkedMultiValueMap<String, Object>(); values.add("executionId", executionId); restTemplate.put(uriTemplate, values, executionId); }
Source:
<code>RemoteQueryEngine(AdvancedCache<?, ?> cache, boolean isIndexed) { super(cache, isIndexed, ProtobufMatcher.class, new ProtobufFieldBridgeAndAnalyzerProvider()); <START> boolean indexed = cache.getCacheConfiguration().indexing().index().isEnabled(); <END> if (indexed) { this.cache = cache.getAdvancedCache().withWrapper(ProtostreamWrapper.class); } }</code><technical_language>need for this one; isIndexed is a parameter of this constructor</technical_language>

Target:
RemoteQueryEngine(AdvancedCache<?, ?> cache, boolean isIndexed) { super(isIndexed ? cache.withWrapping(ByteArrayWrapper.class, ProtostreamWrapper.class) : cache, isIndexed, ProtobufMatcher.class, new ProtobufFieldBridgeAndAnalyzerProvider()); }
Source:
<code>private static synchronized Geometry readGeometry( final String wkt, final CoordinateReferenceSystem mapCRS) throws Exception { String[] wktContents = wkt.split(";"); Geometry geom = reader.read(wktContents[wktContents.length - 1]); <START> if (!(geom.getClass().isAssignableFrom(Polygon.class) <END> || geom.getClass().isAssignableFrom(MultiPolygon.class))) return null; if (wktContents.length == 2 && SRID_REGEX.matcher(wktContents[0].toUpperCase()).matches()) { String sridString = wktContents[0].split("=")[1]; CoordinateReferenceSystem geomCRS = CRS.decode("EPSG:" + sridString, true); CoordinateReferenceSystem mapCRSXY = CRS.decode("EPSG:" + CRS.lookupEpsgCode(mapCRS, false), true); if (CRS.isTransformationRequired(mapCRSXY, geomCRS)) { MathTransform transform = CRS.findMathTransform(geomCRS, mapCRSXY); geom = JTS.transform(geom, transform); } } geom.setSRID(CRS.lookupEpsgCode(mapCRS, false)); return geom; }</code><technical_language>Throw a service exception in this case, indicating content of "clip" is invalid. (untested): throw new ServiceException("Clip a polygon multipolygon", "InvalidParameterValue", "clip")</technical_language>

Target:
public static synchronized Geometry readGeometry( final String wkt, final CoordinateReferenceSystem mapCRS) throws Exception { String[] wktContents = wkt.split(";"); Geometry geom = reader.read(wktContents[wktContents.length - 1]); if (!(geom.getClass().isAssignableFrom(Polygon.class) || geom.getClass().isAssignableFrom(MultiPolygon.class))) throw new ServiceException( "Clip must be a polygon or multipolygon", "InvalidParameterValue", "clip"); if (wktContents.length == 2 && SRID_REGEX.matcher(wktContents[0].toUpperCase()).matches()) { String sridString = wktContents[0].split("=")[1]; CoordinateReferenceSystem geomCRS = CRS.decode("EPSG:" + sridString, true); CoordinateReferenceSystem mapCRSXY = CRS.decode("EPSG:" + CRS.lookupEpsgCode(mapCRS, false), true); if (CRS.isTransformationRequired(mapCRSXY, geomCRS)) { MathTransform transform = CRS.findMathTransform(geomCRS, mapCRSXY); geom = JTS.transform(geom, transform); } } geom.setSRID(CRS.lookupEpsgCode(mapCRS, false)); return geom; }
Source:
<code>Optional<BufferAndAvailability> getNextBuffer() throws IOException, InterruptedException { checkError(); <START> BufferAndAvailability bufferAndAvailability = getNextRecoveredStateBuffer(); <END> if (bufferAndAvailability != null) { updateMetrics(bufferAndAvailability.buffer()); return Optional.of(bufferAndAvailability); } ResultSubpartitionView subpartitionView = this.subpartitionView; if (subpartitionView == null) { if (isReleased) { return Optional.empty(); } subpartitionView = checkAndWaitForSubpartitionView(); } BufferAndBacklog next = subpartitionView.getNextBuffer(); if (next == null) { if (subpartitionView.isReleased()) { throw new CancelTaskException("Consumed partition " + subpartitionView + " has been released."); } else { return Optional.empty(); } } updateMetrics(next.buffer()); return Optional.of(new BufferAndAvailability(next.buffer(), next.isDataAvailable(), next.buffersInBacklog())); }</code><technical_language>getRecoveredStateBuffer() time is clean</technical_language>

Target:
Optional<BufferAndAvailability> getNextBuffer() throws IOException, InterruptedException { checkError(); ResultSubpartitionView subpartitionView = this.subpartitionView; if (subpartitionView == null) { if (isReleased) { return Optional.empty(); } subpartitionView = checkAndWaitForSubpartitionView(); } BufferAndBacklog next = subpartitionView.getNextBuffer(); if (next == null) { if (subpartitionView.isReleased()) { throw new CancelTaskException("Consumed partition " + subpartitionView + " has been released."); } else { return Optional.empty(); } } numBytesIn.inc(next.buffer().getSize()); numBuffersIn.inc(); return Optional.of(new BufferAndAvailability(next.buffer(), next.isDataAvailable(), next.buffersInBacklog())); }
Source:
<code>private void assertNoHead() throws GitAPIException { try { <START> this.git.log().call(); <END> fail(); } catch (NoHeadException e) { } }</code><technical_language>attempt resolve HEAD a commit instead</technical_language>

Target:
private void assertNoHead() throws IOException { assertNull(db.resolve("HEAD")); }
Source:
<code>public void shouldCreateOneAlertPerSuspiciousComment() throws HttpMalformedHeaderException, URIException { String body = "Some text <script>Some Script Element FIXME: DO something \n FIXME: DO something else </script>\nLine 2\n"; HttpMessage msg = createHttpMessageWithRespBody(body, "text/javascript;charset=ISO-8859-1"); assertTrue(msg.getResponseHeader().isText()); assertTrue(msg.getResponseHeader().isJavaScript()); scanHttpResponseReceive(msg); assertEquals(2, alertsRaised.size()); <START> assertEquals(Alert.CONFIDENCE_LOW, alertsRaised.get(0).getConfidence()); <END> }</code><technical_language>Worth checking alerts expected evidence too</technical_language>

Target:
public void shouldCreateOneAlertPerSuspiciousComment() throws HttpMalformedHeaderException, URIException { String body = "Some text <script>Some Script Element FIXME: DO something\nFIXME: DO something else </script>\nLine 2\n"; HttpMessage msg = createHttpMessageWithRespBody(body, "text/javascript;charset=ISO-8859-1"); assertTrue(msg.getResponseHeader().isText()); assertTrue(msg.getResponseHeader().isJavaScript()); scanHttpResponseReceive(msg); assertEquals(2, alertsRaised.size()); assertEquals(Alert.CONFIDENCE_LOW, alertsRaised.get(0).getConfidence()); assertEquals( "Some text <script>Some Script Element FIXME: DO something", alertsRaised.get(0).getEvidence()); assertEquals("FIXME: DO something else </script>", alertsRaised.get(1).getEvidence()); }
Source:
<code>public int calculateProjectProgress() { try { <START> ChunkPlugin chunks = project.getChunkPlugin(new ChunkPluginLoader(context)); <END> int numChapters = chunks.numChapters(); int allChaptersProgress = 0; List<Chapter> chapters = chunks.getChapters(); for (Chapter chapter: chapters) { int chapterProgress = calculateChapterProgress(chapter); allChaptersProgress += chapterProgress; } int projectProgress = (int) Math.ceil((float) allChaptersProgress / numChapters); return projectProgress; } catch (IOException e) { Logger.i(this.toString(), e.getMessage()); } return 0; }</code><technical_language>do this in constructor, move top a member variable method it</technical_language>

Target:
public int calculateProjectProgress() { int numChapters = numChapters(); int allChaptersProgress = 0; for (Chapter chapter: chapters) { int chapterProgress = calculateChapterProgress(chapter); allChaptersProgress += chapterProgress; } int projectProgress = (int) Math.ceil((float) allChaptersProgress / numChapters); return projectProgress; }
Source:
<code>public GroupData loadFromJson(InputStream json) { GroupData groupFromFile = new GroupData(); try { gson = new Gson(); groupFromFile = gson.fromJson(new InputStreamReader(json), GroupData.class); <START> } catch (Exception e) { <END> groupFromFile.setGroupLabel("ERROR"); e.printStackTrace(); } return groupFromFile; }</code><technical_language>Trivial is Exception narrow fit for this try</technical_language>

Target:
public GroupData loadFromJson(InputStream json) { GroupData groupFromFile = new GroupData(); try { gson = new Gson(); groupFromFile = gson.fromJson(new InputStreamReader(json), GroupData.class); } catch (JsonSyntaxException e) { groupFromFile.setGroupLabel("ERROR - Syntax"); e.printStackTrace(); } catch (JsonIOException e) { groupFromFile.setGroupLabel("ERROR - IO"); e.printStackTrace(); } return groupFromFile; }
Source:
<code>public static void showWhile(Display display, Runnable runnable) { if (runnable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (display == null) { display = Display.getCurrent(); if (display == null) { runnable.run(); return; } } Integer busyId = Integer.valueOf(nextBusyId); nextBusyId++; Cursor cursor = display.getSystemCursor(SWT.CURSOR_WAIT); stream(display.getShells()) .filter(shell -> !shell.isDisposed() && shell.getData(BUSYID_NAME) == null) .forEach(shell -> { shell.setCursor(cursor); shell.setData(BUSYID_NAME, busyId); }); try { runnable.run(); } finally { stream(display.getShells()) .filter(shell -> !shell.isDisposed() && shell.getData(BUSYID_NAME) == busyId) .forEach(shell -> { <START> shell.setCursor(cursor); <END> shell.setData(BUSYID_NAME, null); }); } }</code><technical_language>I noticed this is argument is null in original patch, 'cursor' in patch. Is this design copy & paste typo</technical_language>

Target:
public static void showWhile(Display display, Runnable runnable) { if (runnable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (display == null) { display = Display.getCurrent(); if (display == null) { runnable.run(); return; } } Integer busyId = Integer.valueOf(nextBusyId); nextBusyId++; Cursor cursor = display.getSystemCursor(SWT.CURSOR_WAIT); stream(display.getShells()) .filter(shell -> !shell.isDisposed() && shell.getData(BUSYID_NAME) == null) .forEach(shell -> { shell.setCursor(cursor); shell.setData(BUSYID_NAME, busyId); }); try { runnable.run(); } finally { stream(display.getShells()) .filter(shell -> !shell.isDisposed() && shell.getData(BUSYID_NAME) == busyId) .forEach(shell -> { shell.setCursor(null); shell.setData(BUSYID_NAME, null); }); } }
Source:
<code>public void testDeserialize() throws Exception { String json = getResourceAsString("/api_fixtures/ephemeral_key.json"); EphemeralKey resource = APIResource.GSON.fromJson(json, EphemeralKey.class); assertNotNull(resource); assertEquals("ephkey_123", resource.getId()); <START> assertEquals("ephemeral_key", resource.getObject()); <END> }</code><technical_language>stripe-mock</technical_language>

Target:
public void testDeserialize() throws Exception { final String json = getResourceAsString("/api_fixtures/ephemeral_key.json"); final EphemeralKey resource = APIResource.GSON.fromJson(json, EphemeralKey.class); assertNotNull(resource); assertEquals("ephkey_123", resource.getId()); assertEquals("ephemeral_key", resource.getObject()); }
Source:
<code>public void setChannelMapping(String key, String channelName) { super.setChannelMapping(key, channelName); <START> this.classNameMappings.put(key, resolveClassFromName(key)); <END> }</code><technical_language>Need create, copy, put, replace a new Map in remove... (and in super class) avoid CME</technical_language>

Target:
public void setChannelMapping(String key, String channelName) { super.setChannelMapping(key, channelName); Map<String, Class<?>> newClassNameMappings = new ConcurrentHashMap<String, Class<?>>(this.classNameMappings); newClassNameMappings.put(key, resolveClassFromName(key)); this.classNameMappings = newClassNameMappings; }
Source:
<code>public String toString() { <START> return "group " + getItemName() + " changed from " + getOldItemState().toString() + " to " <END> + getItemState().toString() + " caused by member " + memberName; }</code><technical_language>I prefer short log messages for events. suggest change return itemName + " changed " + oldItemState.toString() + " " + itemState.toString() + " " + memberName;</technical_language>

Target:
public String toString() { return itemName + " changed from " + oldItemState.toString() + " to " + itemState.toString() + " through " + memberName; }
Source:
<code><START> public UserTermExpected(SubmitRecord.Label label) { <END> super("A label with the status " + label.toString() + " must contain a user."); }</code><technical_language>Fixed in next patch set: - private. - Added dummy serialVersionUID prevent Eclipse warning</technical_language>

Target:
public UserTermExpected(SubmitRecord.Label label) { super(String.format("A label with the status %s must contain a user.", label.toString())); }
Source:
<code>void removeHotFolder(String jobIdentifier) { <START> FileAlterationObserver observer = _registeredHotFolders.get(jobIdentifier); <END> _hotFolderMonitor.removeObserver(observer); try { observer.destroy(); } catch (Exception e) { logger.info("Removing hot folder trigger for job {}", jobIdentifier); } }</code><technical_language>final</technical_language>

Target:
void removeHotFolder(String jobIdentifier) { final FileAlterationObserver observer = _registeredHotFolders.get(jobIdentifier); _hotFolderMonitor.removeObserver(observer); try { observer.destroy(); } catch (Exception e) { logger.info("Removing hot folder trigger for job {}", jobIdentifier); } }