auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static public void say(@ParamDoc(name = "text") Object text) { say(text.toString(), null); }

Target:
public static void say(@ParamDoc(name = "text") Object text) { say(text.toString(), null); }
Source:
private int handleException(Exception e, Path sourcePath, Path targetPath, int currentRetry, UserGroupInformation proxyUser) { try { LOG.warn("Checking if source path " + sourcePath + " is missing for exception ", e); if (!checkIfPathExist(sourcePath, proxyUser)) { LOG.warn("Source path is missing. Ignoring exception."); return 0; } } catch (Exception ex) { LOG.warn("Source path missing check failed. ", ex); } if (!(e instanceof IOException)) { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } if (currentRetry <= MAX_COPY_RETRY) { LOG.warn("Unable to copy to {}", sourcePath, targetPath, e); } else { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.REPL_FILE_SYSTEM_OPERATION_RETRY.getErrorCode(); } int sleepTime = FileUtils.getSleepTime(currentRetry); LOG.info("Sleep for " + sleepTime + " milliseconds before retry " + (currentRetry)); try { Thread.sleep(sleepTime); } catch (InterruptedException timerEx) { LOG.info("Sleep interrupted", timerEx.getMessage()); } try { if (proxyUser == null) { proxyUser = Utils.getUGI(); } FileSystem.closeAllForUGI(proxyUser); } catch (Exception ex) { LOG.warn("Unable to closeAllForUGI for user " + proxyUser, ex); } return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); }

Target:
private int handleException(Exception e, Path sourcePath, Path targetPath, int currentRetry, UserGroupInformation proxyUser) { try { LOG.info("Checking if source path " + sourcePath + " is missing for exception ", e); if (!checkIfPathExist(sourcePath, proxyUser)) { LOG.info("Source path is missing. Ignoring exception."); return 0; } } catch (Exception ex) { LOG.warn("Source path missing check failed. ", ex); } if (!(e instanceof IOException)) { LOG.error("Unable to copy to {}", sourcePath, targetPath, e); setException(e); return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); } if (currentRetry <= MAX_COPY_RETRY) { LOG.warn("Unable to copy to {}", sourcePath, targetPath, e); } else { LOG.error("Unable to copy to even after retrying for time", sourcePath, targetPath, currentRetry, e); setException(e); return ErrorMsg.REPL_FILE_SYSTEM_OPERATION_RETRY.getErrorCode(); } int sleepTime = FileUtils.getSleepTime(currentRetry); LOG.info("Sleep for " + sleepTime + " milliseconds before retry no " + (currentRetry)); try { Thread.sleep(sleepTime); } catch (InterruptedException timerEx) { LOG.info("Sleep interrupted", timerEx.getMessage()); } try { if (proxyUser == null) { proxyUser = Utils.getUGI(); } FileSystem.closeAllForUGI(proxyUser); } catch (Exception ex) { LOG.warn("Unable to closeAllForUGI for user " + proxyUser, ex); } return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode(); }
Source:
public void setValidationProvider(){ validationProvider = new BeansXmlValidationProviderCDI11(); requireBeansXML = false; prepareBeanXml("all", true); new WaitWhile(new JobIsRunning()); }

Target:
public void setValidationProvider(){ validationProvider = new BeansXmlValidationProviderCDI20(); requireBeansXML = false; prepareBeanXml("all", true); new WaitWhile(new JobIsRunning()); }
Source:
private void readProxyConf() { String proxyHostString = StringUtils.isBlank(System.getenv("https_proxy")) ? System.getenv("HTTPS_PROXY") : System.getenv("https_proxy"); if (StringUtils.isBlank(proxyHostString)) { proxyHostString = StringUtils.isBlank(System.getenv("http_proxy")) ? System.getenv("HTTP_PROXY") : System.getenv("http_proxy"); } if (!StringUtils.isBlank(proxyHostString)) { URI uri = null; try { uri = new URI(proxyHostString); } catch (URISyntaxException e) { LOG.error("Proxy uri doesn't follow correct syntax", e); } if (uri != null) { PROXY_ON = true; proxyClient = HttpProxyClient.newInstance(uri); } } }

Target:
private void readProxyConf() { String proxyHostString = StringUtils.isBlank(System.getenv("https_proxy")) ? System.getenv("HTTPS_PROXY") : System.getenv("https_proxy"); if (StringUtils.isBlank(proxyHostString)) { proxyHostString = StringUtils.isBlank(System.getenv("http_proxy")) ? System.getenv("HTTP_PROXY") : System.getenv("http_proxy"); } if (!StringUtils.isBlank(proxyHostString)) { URI uri = null; try { uri = new URI(proxyHostString); } catch (URISyntaxException e) { LOG.warn("Proxy uri doesn't follow correct syntax", e); } if (uri != null) { PROXY_ON = true; proxyClient = HttpProxyClient.newInstance(uri); } } }
Source:
protected Optional<Process> fetchStandbyProcess(String type, String tenantId) { Process process = standbyProcessCache.get(type + "-" + tenantId); if (process != null) { return Optional.of(process); } process = elastic.select(Process.class) .eq(Process.STATE, ProcessState.STANDBY) .eq(Process.TENANT_ID, tenantId) .eq(Process.PROCESS_TYPE, type) .first() .orElse(null); return Optional.ofNullable(process); }

Target:
protected Process fetchStandbyProcess(String type, String tenantId) { Process process = standbyProcessCache.get(type + "-" + tenantId); if (process != null) { return process; } process = elastic.select(Process.class) .eq(Process.STATE, ProcessState.STANDBY) .eq(Process.TENANT_ID, tenantId) .eq(Process.PROCESS_TYPE, type) .first() .orElse(null); if (process != null) { standbyProcessCache.put(type + "-" + tenantId, process); } return process; }
Source:
public int hashCode() { int result = _networkUuid != null ? _networkUuid.hashCode() : 0; result = 31 * result + (_nicFromDdUuid != null ? _nicFromDdUuid.hashCode() : 0); result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0); result = 31 * result + (_nicIp4Address != null ? _nicIp4Address.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_networksDomainUuid != null ? _networksDomainUuid.hashCode() : 0); result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0); result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0); result = 31 * result + (_isExpungingState ? 1 : 0); return result; }

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_networkUuid != null ? _networkUuid.hashCode() : 0); result = 31 * result + (_nicFromDdUuid != null ? _nicFromDdUuid.hashCode() : 0); result = 31 * result + (_nicMacAddress != null ? _nicMacAddress.hashCode() : 0); result = 31 * result + (_nicIp4Address != null ? _nicIp4Address.hashCode() : 0); result = 31 * result + (_isL3Network ? 1 : 0); result = 31 * result + (_isSharedNetwork ? 1 : 0); result = 31 * result + (_vpcUuid != null ? _vpcUuid.hashCode() : 0); result = 31 * result + (_networksDomainUuid != null ? _networksDomainUuid.hashCode() : 0); result = 31 * result + (_vmInstanceName != null ? _vmInstanceName.hashCode() : 0); result = 31 * result + (_vmUuid != null ? _vmUuid.hashCode() : 0); result = 31 * result + (_isExpungingState ? 1 : 0); return result; }
Source:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); StudentAttributes student; String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); if (studentEmail == null) { student = getUnregisteredStudent().orElseGet(() -> { if (userInfo == null) { return null; } return logic.getStudentForGoogleId(courseId, userInfo.id); }); } else { student = logic.getStudentForEmail(courseId, studentEmail); } if (student == null) { return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } StudentData studentData = new StudentData(student); if (isBackdoor()) { studentData.setKey(student.getKey()); } if (studentEmail == null) { studentData.hideInformationForStudent(); } return new JsonResult(studentData); }

Target:
public ActionResult execute() { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); StudentAttributes student; String studentEmail = getRequestParamValue(Const.ParamsNames.STUDENT_EMAIL); if (studentEmail == null) { student = getUnregisteredStudent().orElseGet(() -> { if (userInfo == null) { return null; } return logic.getStudentForGoogleId(courseId, userInfo.id); }); } else { student = logic.getStudentForEmail(courseId, studentEmail); } if (student == null) { return new JsonResult(STUDENT_NOT_FOUND, HttpStatus.SC_NOT_FOUND); } StudentData studentData = new StudentData(student); if (userInfo != null && userInfo.isAdmin) { studentData.setKey(student.getKey()); } if (studentEmail == null) { studentData.hideInformationForStudent(); } return new JsonResult(studentData); }
Source:
public void should_pass_if_actual_contains_only_expected_entries() throws Exception { maps.assertContainsOnlyKeys(someInfo(), actual, "name", "color"); }

Target:
public void should_pass_if_actual_contains_only_expected_entries() throws Exception { maps.assertContainsOnlyKeys(someInfo(), actual, "color", "name"); }
Source:
protected void createLoaders() { final Map loaders = getLoaders(); loaders.put( LockMode.NONE, createEntityLoader( LockMode.NONE ) ); noneLockLoader = createEntityLoader( LockMode.NONE ); readLockLoader = createEntityLoader( LockMode.READ ); loaders.put( "merge", new CascadeEntityLoader( this, CascadingActions.MERGE, getFactory() ) ); loaders.put( "refresh", new CascadeEntityLoader( this, CascadingActions.REFRESH, getFactory() ) ); }

Target:
protected void createLoaders() { noneLockLoader = createEntityLoader( LockMode.NONE ); readLockLoader = createEntityLoader( LockMode.READ ); final Map loaders = getLoaders(); loaders.put( "merge", new CascadeEntityLoader( this, CascadingActions.MERGE, getFactory() ) ); loaders.put( "refresh", new CascadeEntityLoader( this, CascadingActions.REFRESH, getFactory() ) ); }
Source:
public RedisResponse executeCommand(Command command, ExecutionHandlerContext context) { String result; List<ByteArrayWrapper> commands = command.getProcessedCommandWrappers(); if (containsTooManyParameters(commands)) { throw new RedisParametersMismatchException(RedisConstants.ERROR_SYNTAX); } if (containsSectionParameter(commands)) { result = getSpecifiedSection(context, commands); } else { result = getAllSections(context); } return RedisResponse.bulkString(result); }

Target:
public RedisResponse executeCommand(Command command, ExecutionHandlerContext context) { String result; List<ByteArrayWrapper> commands = command.getProcessedCommandWrappers(); if (containsSectionParameter(commands)) { result = getSpecifiedSection(context, commands); } else { result = getAllSections(context); } return RedisResponse.bulkString(result); }
Source:
protected FileType doGetType() throws Exception { return (this.stat == null) ? FileType.IMAGINARY : FileType.FILE_OR_FOLDER; }

Target:
protected FileType doGetType() throws Exception { return this.stat == null ? FileType.IMAGINARY : FileType.FILE_OR_FOLDER; }
Source:
private void interpolateElevationsOfTowerNodes() { final AllEdgesIterator edge = storage.getAllEdges(); final GHBitSet visitedEdgeIds = new GHBitSetImpl(edge.getMaxId()); final EdgeExplorer edgeExplorer = storage.createEdgeExplorer(); while (edge.next()) { final int edgeId = edge.getEdge(); if(edgeId == 6){ System.out.println(6); } if (isInterpolatableEdge(edge)) { if (!visitedEdgeIds.contains(edgeId)) { interpolateEdge(edge, visitedEdgeIds, edgeExplorer); } } visitedEdgeIds.add(edgeId); } }

Target:
private void interpolateElevationsOfTowerNodes() { final AllEdgesIterator edge = storage.getAllEdges(); final GHBitSet visitedEdgeIds = new GHBitSetImpl(edge.getMaxId()); final EdgeExplorer edgeExplorer = storage.createEdgeExplorer(); while (edge.next()) { final int edgeId = edge.getEdge(); if (isInterpolatableEdge(edge)) { if (!visitedEdgeIds.contains(edgeId)) { interpolateEdge(edge, visitedEdgeIds, edgeExplorer); } } visitedEdgeIds.add(edgeId); } }
Source:
public Cursor getAddress(String rowId, String[] columns) { String selection = "rowId = ?"; String[] selectionArgs = new String[]{rowId}; return query(selection, selectionArgs, columns); }

Target:
public final Cursor getAddress(String rowId, String[] columns) { String selection = "rowId = ?"; String[] selectionArgs = new String[]{rowId}; return query(selection, selectionArgs, columns); }
Source:
public void testEventIterator() { AnalysisScriptingModule scriptModule = new AnalysisScriptingModule(); TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(this, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); ScriptedAnalysis analysis = scriptModule.getAnalysis(ANALYSIS_NAME); assertNotNull(analysis); Iterator<ITmfEvent> eventIterator = analysis.getEventIterator(); assertNotNull(eventIterator); int count = 0; while (eventIterator.hasNext()) { eventIterator.next(); count++; } assertTrue(count > 0); } finally { trace.dispose(); } }

Target:
public void testEventIterator() { AnalysisScriptingModule scriptModule = new AnalysisScriptingModule(); TmfXmlTraceStub trace = new TmfXmlTraceStubNs(); try { IPath filePath = ActivatorTest.getAbsoluteFilePath(CALLSTACK_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } TmfTraceOpenedSignal signal = new TmfTraceOpenedSignal(this, trace, null); trace.traceOpened(signal); TmfTraceManager.getInstance().traceOpened(signal); ScriptedAnalysis analysis = scriptModule.getAnalysis(ANALYSIS_NAME); assertNotNull(analysis); Iterator<ITmfEvent> eventIterator = analysis.getEventIterator(); assertNotNull(eventIterator); int count = 0; while (eventIterator.hasNext()) { eventIterator.next(); count++; } assertEquals(36, count); } finally { trace.dispose(); } }
Source:
public String apply(final String key) { if (key == null) { return null; } final String presentVal; try { presentVal = loadingCache.get(key, new Callable<String>() { @Override public String call() throws Exception { return Strings.nullToEmpty(dataFetcher.fetch(key)); } }); return Strings.emptyToNull(presentVal); } catch (ExecutionException e) { LOGGER.debug("value not found for key [%s]", key); return null; } }

Target:
public String apply(final String key) { if (key == null) { return null; } final String presentVal; try { presentVal = loadingCache.get(key, new applyCallable(key)); return Strings.emptyToNull(presentVal); } catch (ExecutionException e) { LOGGER.debug("value not found for key [%s]", key); return null; } }
Source:
public int read() throws IOException { try { int b = this.currentStream.read(); nextBytePos++; return b; } catch (IOException ex) { log.warn( "Failed to read byte at position (space: {}, contentId: {}, startByte:{}, endByte: {}. " + "Starting attempts to re-acquire stream from current position.", nextBytePos, spaceId, contentId, startByte, endByte); try { new Retrier(3, 1000, 2).execute(() -> { RestHttpHelper.HttpResponse response = contentStore.doGetContent(spaceId, contentId, nextBytePos, endByte); currentStream = response.getResponseStream(); log.info( "Successfully re-acquired stream (space: {}, contentId: {}, nextBytePos:{}," + " endByte: {}. ", spaceId, contentId, nextBytePos, endByte); return null; }); return read(); } catch (Exception e) { log.error( "Exhausted max retries to re-acquire stream (space: {}, contentId: {}, nextBytePos:{}," + " endByte: {}. ", spaceId, contentId, nextBytePos, endByte, e); throw new IOException(e.getMessage(), e); } } }

Target:
public int read() throws IOException { try { int b = this.currentStream.read(); nextBytePos++; return b; } catch (IOException ex) { retryFromNextByte(); return read(); } }
Source:
public void init(MonthDescriptor month, List<List<MonthCellDescriptor>> cells, boolean displayOnly) { Logr.d("Initializing MonthView (%d) for %s", System.identityHashCode(this), month); long start = System.currentTimeMillis(); title.setText(month.getLabel()); final int numRows = cells.size(); grid.setNumRows(numRows); for (int i = 0; i < 6; i++) { CalendarRowView weekRow = (CalendarRowView) grid.getChildAt(i + 1); weekRow.setListener(listener); if (i < numRows) { weekRow.setVisibility(VISIBLE); List<MonthCellDescriptor> week = cells.get(i); for (int c = 0; c < week.size(); c++) { MonthCellDescriptor cell = week.get(c); CalendarCellView cellView = (CalendarCellView) weekRow.getChildAt(c); if(cellView.getText().equals("")) cellView.setText(Integer.toString(cell.getValue())); cellView.setEnabled(cell.isCurrentMonth()); cellView.setClickable(!displayOnly); cellView.setSelectable(cell.isSelectable()); cellView.setSelected(cell.isSelected()); cellView.setCurrentMonth(cell.isCurrentMonth()); cellView.setToday(cell.isToday()); cellView.setRangeState(cell.getRangeState()); cellView.setHighlighted(cell.isHighlighted()); cellView.setTag(cell); } } else { weekRow.setVisibility(GONE); } } Logr.d("MonthView.init took %d ms", System.currentTimeMillis() - start); }

Target:
public void init(MonthDescriptor month, List<List<MonthCellDescriptor>> cells, boolean displayOnly) { Logr.d("Initializing MonthView (%d) for %s", System.identityHashCode(this), month); long start = System.currentTimeMillis(); title.setText(month.getLabel()); final int numRows = cells.size(); grid.setNumRows(numRows); for (int i = 0; i < 6; i++) { CalendarRowView weekRow = (CalendarRowView) grid.getChildAt(i + 1); weekRow.setListener(listener); if (i < numRows) { weekRow.setVisibility(VISIBLE); List<MonthCellDescriptor> week = cells.get(i); for (int c = 0; c < week.size(); c++) { MonthCellDescriptor cell = week.get(c); CalendarCellView cellView = (CalendarCellView) weekRow.getChildAt(c); String cellDate = Integer.toString(cell.getValue()); if (!cellView.getText().equals(cellDate)) { cellView.setText(cellDate); } cellView.setEnabled(cell.isCurrentMonth()); cellView.setClickable(!displayOnly); cellView.setSelectable(cell.isSelectable()); cellView.setSelected(cell.isSelected()); cellView.setCurrentMonth(cell.isCurrentMonth()); cellView.setToday(cell.isToday()); cellView.setRangeState(cell.getRangeState()); cellView.setHighlighted(cell.isHighlighted()); cellView.setTag(cell); } } else { weekRow.setVisibility(GONE); } } Logr.d("MonthView.init took %d ms", System.currentTimeMillis() - start); }
Source:
private void upgradeToResourcesV10(String tableName, SQLiteDatabase db) { try { upgradeXFormAndroidInstallerV1(tableName, db); } catch (Exception e) { try { SqlStorage<Resource> newResourceStorage = new SqlStorage<>( tableName, Resource.class, new ConcreteAndroidDbHelper(context, db)); for (Resource resource : newResourceStorage) { } } catch (Exception ex) { SqlStorage.wipeTable(db, tableName); Logger.log(LogTypes.SOFT_ASSERT, "Wiped table on upgrade " + tableName); } } }

Target:
private void upgradeToResourcesV10(String tableName, SQLiteDatabase db) { if (tableName.contentEquals(GLOBAL_RESOURCE_TABLE_NAME)) { return; } try { upgradeXFormAndroidInstallerV1(tableName, db); } catch (Exception e) { try { SqlStorage<Resource> newResourceStorage = new SqlStorage<>( tableName, Resource.class, new ConcreteAndroidDbHelper(context, db)); for (Resource resource : newResourceStorage) { } } catch (Exception ex) { SqlStorage.wipeTable(db, tableName); Logger.log(LogTypes.SOFT_ASSERT, "Wiped table on upgrade " + tableName); } } }
Source:
public void status_filter_only_shows_enabled_jobs() { List<Job> jobs = createAmountOfJobs(3, false); String jobDisabled = "exampled-disabled"; String jobDslScript = "job('"+jobDisabled+"') {\n" + " disabled()\n" + "}\n" + "listView('"+ LIST_VIEW_NAME +"') {\n" + " statusFilter(StatusFilter.ENABLED)\n" + " columns {\n" + " name()\n" + " }\n" + " jobs {\n" + " names('"+jobs.get(0).name+"', '"+jobs.get(1).name+"', '"+jobs.get(2).name+"', '"+jobDisabled+"')\n" + " }\n" + "}"; openNewlyCreatedListView(jobDslScript, LIST_VIEW_NAME); Assert.assertThat(driver, not(hasElement(By.xpath(" Assert.assertThat(driver, hasElement(By.xpath(" Assert.assertThat(driver, hasElement(By.xpath(" Assert.assertThat(driver, hasElement(By.xpath(" }

Target:
public void status_filter_only_shows_enabled_jobs() { List<Job> jobs = createAmountOfJobs(3, false); Job jobDisabled = createDisabledJob(); String jobDslScript = "listView('"+ LIST_VIEW_NAME +"') {\n" + " statusFilter(StatusFilter.ENABLED)\n" + " columns {\n" + " name()\n" + " }\n" + " jobs {\n" + " names('"+jobs.get(0).name+"', '"+jobs.get(1).name+"', '"+jobs.get(2).name+"', '"+jobDisabled.name+"')\n" + " }\n" + "}"; View view = openNewlyCreatedListView(jobDslScript, LIST_VIEW_NAME); assertThat(view, not(containsJob(jobDisabled))); assertThat(view, containsJob(jobs.get(0))); assertThat(view, containsJob(jobs.get(1))); assertThat(view, containsJob(jobs.get(2))); }
Source:
public int hashCode() { return Arrays.hashCode(new Object[]{ name, prefetchCount, prefetchValidityMillis, epochStart, nodeIdOffset, bitsSequence, bitsNodeId, allowedFutureMillis, statisticsEnabled}); }

Target:
public int hashCode() { return Objects.hash( name, prefetchCount, prefetchValidityMillis, epochStart, nodeIdOffset, bitsSequence, bitsNodeId, allowedFutureMillis, statisticsEnabled); }
Source:
private List<Object> serialize() { return Lists.newArrayList(_time.getMillis(), _value); }

Target:
private ImmutableList<Object> serialize() { return ImmutableList.of(_time.getMillis(), _value); }
Source:
public TopicRepository getTopicRepository(final Storage storage) throws TopicRepositoryException { readWriteLock.readLock().lock(); try { final TopicRepository topicRepository = storageTopicRepository.get(storage); if (topicRepository != null) { return topicRepository; } } finally { readWriteLock.readLock().unlock(); } readWriteLock.writeLock().lock(); try { TopicRepository topicRepository = storageTopicRepository.get(storage); if (topicRepository != null) { return topicRepository; } topicRepository = createTopicRepository(storage); storageTopicRepository.put(storage, topicRepository); return topicRepository; } finally { readWriteLock.writeLock().unlock(); } }

Target:
public TopicRepository getTopicRepository(final Storage storage) throws TopicRepositoryException { readWriteLock.readLock().lock(); try { final TopicRepository topicRepository = storageTopicRepository.get(storage); if (topicRepository != null) { return topicRepository; } } finally { readWriteLock.readLock().unlock(); } readWriteLock.writeLock().lock(); try { TopicRepository topicRepository = storageTopicRepository.get(storage); if (topicRepository != null) { return topicRepository; } topicRepository = getTopicRepositoryCreator(storage.getType()).createTopicRepository(storage); storageTopicRepository.put(storage, topicRepository); return topicRepository; } finally { readWriteLock.writeLock().unlock(); } }
Source:
public static AssociationList fromString(String encoded) { if (encoded.isEmpty()) return new AssociationList(); else return new AssociationList( Arrays.asList(encoded.split(",")).stream() .map(AssociationDeclaration::fromString) .collect(Collectors.toList())); }

Target:
public static AssociationList fromString(String encoded) { if (encoded.isEmpty()) { return new AssociationList(); } else { return new AssociationList( Arrays.stream(encoded.split(",")) .map(AssociationDeclaration::fromString) .collect(Collectors.toList())); } }
Source:
public void startExport(Iterable<Process> processList, OutputStream outputStream, String xslt) { Document answer = new Document(); Element root = new Element("processes"); answer.setRootElement(root); Namespace xmlns = Namespace.getNamespace(NAMESPACE); Namespace xsi = Namespace.getNamespace("xsi", "<LINK_0>"); root.addNamespaceDeclaration(xsi); root.setNamespace(xmlns); Attribute attSchema = new Attribute("schemaLocation", NAMESPACE + " XML-logfile.xsd", xsi); root.setAttribute(attSchema); for (Process p : processList) { Document doc = createDocument(p, false); Element processRoot = doc.getRootElement(); processRoot.detach(); root.addContent(processRoot); } XMLOutputter outp = new XMLOutputter(); outp.setFormat(Format.getPrettyFormat()); try { outp.output(answer, outputStream); outputStream.close(); } catch (IOException e) { logger.error(e.getMessage(), e); } }

Target:
public void startExport(Iterable<Process> processList, OutputStream outputStream, String xslt) throws IOException { Document answer = new Document(); Element root = new Element("processes"); answer.setRootElement(root); Namespace xmlns = Namespace.getNamespace(NAMESPACE); Namespace xsi = Namespace.getNamespace("xsi", "<LINK_0>"); root.addNamespaceDeclaration(xsi); root.setNamespace(xmlns); Attribute attSchema = new Attribute("schemaLocation", NAMESPACE + " XML-logfile.xsd", xsi); root.setAttribute(attSchema); for (Process p : processList) { Document doc = createDocument(p, false); Element processRoot = doc.getRootElement(); processRoot.detach(); root.addContent(processRoot); } XMLOutputter outp = new XMLOutputter(); outp.output(answer, outputStream); }
Source:
public static boolean isSane(String path) { final int lenght = path.length(); if (lenght > PATH_MAX) { log.error("The path is " + lenght + " characters long, which is longer than the maximum allowed " + PATH_MAX + "."); return false; } if (path.contains("..") || path.contains(" log.error("The path contains potentially dangerous directory navigation sequences."); return false; } return true; }

Target:
public static boolean isSane(String path) { final int length = path.length(); if (length > PATH_MAX) { log.error("The path is " + length + " characters long, which is longer than the maximum allowed " + PATH_MAX + "."); return false; } if (path.contains("..") || path.contains(" log.error("The path contains potentially dangerous directory navigation sequences."); return false; } return true; }
Source:
public long getSerializedSize() { return baseIntBuffers.getSerializedSize() + 1 + 4 + 4 + 1; }

Target:
public long getSerializedSize() { return 1 + 4 + 4 + 1 + baseIntBuffers.getSerializedSize(); }
Source:
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { try { final Player player = getPlayer(args[0]); if (args.length < 2) { return false; } if (player == null) { sender.sendMessage(FreedomCommand.PLAYER_NOT_FOUND); return true; } String outCommand = StringUtils.join(args, " ", 1, args.length); if (BLOCKED_COMMANDS.contains(outCommand)) { msg("Blocked. Yes, I mean blocked.", ChatColor.RED); return true; } if (plugin.cb.isCommandBlocked(outCommand, sender)) { return true; } try { msg("Sending command as " + player.getName() + ": " + outCommand); if (server.dispatchCommand(player, outCommand)) { msg("Command sent."); } else { msg("Unknown error sending command."); } } catch (Throwable ex) { msg("Error sending command: " + ex.getMessage()); } } catch (Exception e) { msg("/gcmd <fromname> <outcommand>"); } return true; }

Target:
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { if (args.length < 2) { return false; } final Player player = getPlayer(args[0]); if (player == null) { sender.sendMessage(FreedomCommand.PLAYER_NOT_FOUND); return true; } final String outCommand = StringUtils.join(args, " ", 1, args.length); if (plugin.cb.isCommandBlocked(outCommand, sender)) { return true; } try { msg("Sending command as " + player.getName() + ": " + outCommand); if (server.dispatchCommand(player, outCommand)) { msg("Command sent."); } else { msg("Unknown error sending command."); } } catch (Throwable ex) { msg("Error sending command: " + ex.getMessage()); } return true; }
Source:
public boolean checkIfDnsZonesDeployed(String resourceGroupName, List<AzurePrivateDnsZoneServiceEnum> services) { LOGGER.debug("Checking DNS Zones for services {}", services.stream() .map(AzurePrivateDnsZoneServiceEnum::getDnsZoneName) .collect(Collectors.toList())); PagedList<PrivateZone> dnsZones = listPrivateDnsZonesByResourceGroup(resourceGroupName); for (AzurePrivateDnsZoneServiceEnum service : services) { String dnsZoneName = service.getDnsZoneName(); Optional<PrivateZone> foundDnsZone = dnsZones.stream() .filter(dnsZone -> dnsZone.name().equals(dnsZoneName)) .filter(dnsZone -> dnsZone.provisioningState() == SUCCEEDED) .findAny(); if (foundDnsZone.isEmpty()) { LOGGER.info("DNS Zone is not provisioned successfully yet!", dnsZoneName); return false; } } return true; }

Target:
public boolean checkIfDnsZonesDeployed(String resourceGroupName, List<AzurePrivateDnsZoneServiceEnum> services) { LOGGER.debug("Checking DNS Zones for services {}", services.stream() .map(AzurePrivateDnsZoneServiceEnum::getDnsZoneName) .collect(Collectors.toList())); PagedList<PrivateZone> dnsZones = listPrivateDnsZonesByResourceGroup(resourceGroupName); for (AzurePrivateDnsZoneServiceEnum service : services) { String dnsZoneName = service.getDnsZoneName(); boolean dnsZoneFound = dnsZones.stream() .filter(dnsZone -> dnsZone.name().equals(dnsZoneName)) .anyMatch(dnsZone -> dnsZone.provisioningState().equals(SUCCEEDED)); if (!dnsZoneFound) { LOGGER.info("DNS Zone is not provisioned successfully yet!", dnsZoneName); return false; } } return true; }
Source:
public void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames) { if (selectedFieldNames != null && !selectedFieldNames.contains(DISORDER_PROPERTIES)) { return; } PatientData<Disorder> data = patient.getData(getName()); json.put(JSON_KEY_DISORDERS, diseasesToJSON(data, selectedFieldNames)); }

Target:
public void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames) { if (!isFieldIncluded(selectedFieldNames, DISORDER_PROPERTIES)) { return; } PatientData<Disorder> data = patient.getData(getName()); json.put(JSON_KEY_DISORDERS, diseasesToJSON(data, selectedFieldNames)); }
Source:
void handleContainerLaunchFail(String processorId, String containerId, String preferredHost, ContainerAllocator containerAllocator) { if (processorId != null && hasActiveContainerPlacementAction(processorId)) { ContainerPlacementMetadata metaData = getPlacementActionMetadata(processorId).get(); String sourceHost = hostAffinityEnabled ? metaData.getSourceHost() : ResourceRequestState.ANY_HOST; handleControlActionFailure(processorId, metaData, String.format("failed to start container on destination host %s, attempting to start on source host %s", preferredHost, sourceHost)); containerAllocator.requestResource(processorId, sourceHost); } else if (processorId != null && standbyContainerManager.isPresent()) { standbyContainerManager.get().handleContainerLaunchFail(processorId, containerId, containerAllocator); } else if (processorId != null) { LOG.info("Falling back to ANY_HOST for Processor ID: since launch failed for Container ID: on host: {}", processorId, containerId, preferredHost); containerAllocator.requestResource(processorId, ResourceRequestState.ANY_HOST); } else { LOG.warn("Did not find a pending Processor ID for Container ID: on host: {}. " + "Ignoring invalid/redundant notification.", containerId, preferredHost); } }

Target:
void handleContainerLaunchFail(String processorId, String containerId, String preferredHost, ContainerAllocator containerAllocator) { if (processorId != null && hasActiveContainerPlacementAction(processorId)) { ContainerPlacementMetadata metaData = getPlacementActionMetadata(processorId).get(); String sourceHost = hostAffinityEnabled ? metaData.getSourceHost() : ResourceRequestState.ANY_HOST; markContainerPlacementActionFailed(metaData, String.format("failed to start container on destination host %s, attempting to start on source host %s", preferredHost, sourceHost)); containerAllocator.requestResource(processorId, sourceHost); } else if (processorId != null && standbyContainerManager.isPresent()) { standbyContainerManager.get().handleContainerLaunchFail(processorId, containerId, containerAllocator); } else if (processorId != null) { LOG.info("Falling back to ANY_HOST for Processor ID: since launch failed for Container ID: on host: {}", processorId, containerId, preferredHost); containerAllocator.requestResource(processorId, ResourceRequestState.ANY_HOST); } else { LOG.warn("Did not find a pending Processor ID for Container ID: on host: {}. " + "Ignoring invalid/redundant notification.", containerId, preferredHost); } }
Source:
public CompositeDriverExecutionProfile( @NonNull DriverConfig primaryConfig, @NonNull DriverConfig fallbackConfig, @NonNull String profileName) { this.primaryConfig = Objects.requireNonNull(primaryConfig); this.fallbackConfig = Objects.requireNonNull(fallbackConfig); this.profileName = Objects.requireNonNull(profileName); refresh(); }

Target:
public CompositeDriverExecutionProfile( @NonNull DriverConfig primaryConfig, @NonNull DriverConfig fallbackConfig, @NonNull String profileName) { this.primaryConfig = Objects.requireNonNull(primaryConfig); this.fallbackConfig = Objects.requireNonNull(fallbackConfig); this.profileName = Objects.requireNonNull(profileName); refreshInternal(); }
Source:
protected void configure(ServerHttpSecurity http) { this.reactiveAuthenticationManagerResolver = this.reactiveAuthenticationManagerResolver != null ? this.reactiveAuthenticationManagerResolver : request -> getAuthenticationManager(); AuthenticationWebFilter oauth2 = new AuthenticationWebFilter(reactiveAuthenticationManagerResolver); oauth2.setServerAuthenticationConverter(bearerTokenConverter); oauth2.setAuthenticationFailureHandler(new ServerAuthenticationEntryPointFailureHandler(entryPoint)); http .addFilterAt(oauth2, SecurityWebFiltersOrder.AUTHENTICATION); }

Target:
protected void configure(ServerHttpSecurity http) { ReactiveAuthenticationManager authenticationManager = getAuthenticationManager(); AuthenticationWebFilter oauth2 = new AuthenticationWebFilter(authenticationManager); oauth2.setServerAuthenticationConverter(bearerTokenConverter); oauth2.setAuthenticationFailureHandler(new ServerAuthenticationEntryPointFailureHandler(entryPoint)); http .addFilterAt(oauth2, SecurityWebFiltersOrder.AUTHENTICATION); }
Source:
public int hashCode() { int hash = 1; hash = hash * 31 + command.hashCode(); hash = hash * 31 + spec.hashCode(); return hash; }

Target:
public int hashCode() { return Arrays.hashCode(new Object[] { command, spec }); }
Source:
private Guid getNewMacPoolId() { return getParameters().getStoragePool().getMacPoolId(); }

Target:
private Guid getNewMacPoolId() { return getParameters().getStoragePool() == null ? null : getParameters().getStoragePool().getMacPoolId(); }
Source:
public void onReceive(Context ctx, Intent intent) { String referrerStr = intent.getStringExtra(REFERRER_KEY); L.d(">>>>> Received install referrer: " + referrerStr); if (!INSTALL_ACTION.equals(intent.getAction()) || TextUtils.isEmpty(referrerStr)) { return; } Uri uri = Uri.parse("/?" + referrerStr); InstallReferrerFunnel funnel = new InstallReferrerFunnel(WikipediaApp.getInstance(), Site.forLanguage("test")); funnel.logInstall(uri.getQueryParameter(InstallReferrerFunnel.PARAM_REFERRER_URL), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_ID), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_INSTALL_ID)); }

Target:
public void onReceive(Context ctx, Intent intent) { String referrerStr = intent.getStringExtra(REFERRER_KEY); L.d("Received install referrer: " + referrerStr); if (!INSTALL_ACTION.equals(intent.getAction()) || TextUtils.isEmpty(referrerStr)) { return; } Uri uri = Uri.parse("/?" + referrerStr); InstallReferrerFunnel funnel = new InstallReferrerFunnel(WikipediaApp.getInstance(), Site.forLanguage("test")); funnel.logInstall(uri.getQueryParameter(InstallReferrerFunnel.PARAM_REFERRER_URL), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_ID), uri.getQueryParameter(InstallReferrerFunnel.PARAM_CAMPAIGN_INSTALL_ID)); }
Source:
public static SkullType getSkullType(int skullType) { return SpongeImpl.getRegistry().getAllOf(SkullType.class).stream() .filter(type -> type instanceof SpongeSkullType && ((SpongeSkullType) type).getByteId() == skullType) .findAny().orElse(DEFAULT_TYPE); }

Target:
public static SkullType getSkullType(int skullType) { for(SkullType type : SpongeImpl.getRegistry().getAllOf(SkullType.class)){ if((type instanceof SpongeSkullType) && (((SpongeSkullType) type).getByteId() == skullType)) { return type; } } return DEFAULT_TYPE; }
Source:
public void channelActive(ChannelHandlerContext ctx) throws Exception { final long count = counter.incrementAndGet(); long limit = DatabaseDescriptor.getNativeTransportMaxConcurrentConnections(); if(limit < 0) { limit = Long.MAX_VALUE; } if (count > limit) { noSpamLogger.error("Exceeded maximum native connection limit of by using connections", limit, count); ctx.close(); } else { long perIpLimit = DatabaseDescriptor.getNativeTransportMaxConcurrentConnectionsPerIp(); if (perIpLimit > 0) { InetAddress address = ((InetSocketAddress) ctx.channel().remoteAddress()).getAddress(); AtomicLong perIpCount = connectionsPerClient.get(address); if (perIpCount == null) { perIpCount = new AtomicLong(0); AtomicLong old = connectionsPerClient.putIfAbsent(address, perIpCount); if (old != null) { perIpCount = old; } } if (perIpCount.incrementAndGet() > perIpLimit) { noSpamLogger.error("Exceeded maximum native connection limit per ip of by using connections", perIpLimit, perIpCount); ctx.close(); return; } } ctx.fireChannelActive(); } }

Target:
public void channelActive(ChannelHandlerContext ctx) throws Exception { final long count = counter.incrementAndGet(); long limit = DatabaseDescriptor.getNativeTransportMaxConcurrentConnections(); if(limit < 0) { limit = Long.MAX_VALUE; } if (count > limit) { noSpamLogger.error("Exceeded maximum native connection limit of by using connections (see native_transport_max_concurrent_connections in cassandra.yaml)", limit, count); ctx.close(); } else { long perIpLimit = DatabaseDescriptor.getNativeTransportMaxConcurrentConnectionsPerIp(); if (perIpLimit > 0) { InetAddress address = ((InetSocketAddress) ctx.channel().remoteAddress()).getAddress(); AtomicLong perIpCount = connectionsPerClient.get(address); if (perIpCount == null) { perIpCount = new AtomicLong(0); AtomicLong old = connectionsPerClient.putIfAbsent(address, perIpCount); if (old != null) { perIpCount = old; } } if (perIpCount.incrementAndGet() > perIpLimit) { noSpamLogger.error("Exceeded maximum native connection limit per ip of by using connections (see native_transport_max_concurrent_connections_per_ip)", perIpLimit, perIpCount); ctx.close(); return; } } ctx.fireChannelActive(); } }
Source:
@Test public void shouldHandleBookingErrorResponse() { String responseError = "{\"error\":\"That userToken is unrecognised.\",\"errorCode\":401,\"usererror\":false}"; ResponseBody responseBody = ResponseBody.create(MediaType.parse("application/json"), responseError); final Response<BookingForm> response = Response.error(401, responseBody); final TestSubscriber<BookingForm> subscriber = new TestSubscriber<>(); service.handleBookingResponse.call(response).subscribe(subscriber); subscriber.awaitTerminalEvent(); subscriber.assertError(BookingError.class); Throwable error = subscriber.getOnErrorEvents().get(0); assertThat(error instanceof BookingError).isTrue(); }

Target:
@Test public void shouldHandleBookingErrorResponse() { String responseError = "{\"error\":\"That userToken is unrecognised.\",\"errorCode\":401,\"usererror\":false}"; ResponseBody responseBody = ResponseBody.create(MediaType.parse("application/json"), responseError); final Response<BookingForm> response = Response.error(401, responseBody); final TestSubscriber<BookingForm> subscriber = new TestSubscriber<>(); service.handleBookingResponse.call(response).subscribe(subscriber); subscriber.awaitTerminalEvent(); subscriber.assertError(BookingError.class); Throwable error = subscriber.getOnErrorEvents().get(0); assertThat(error.getMessage()).isEqualTo("That userToken is unrecognised."); }
Source:
public static WebArchive createDeployment() { File[] testDeps = Maven.configureResolver() .workOffline() .loadPomFromFile("pom.xml") .resolve("org.modeshape:modeshape-jcr:test-jar:tests:?").withTransitivity().asFile(); return ShrinkWrap.create(WebArchive.class, "query-test.war").addAsLibraries(testDeps) .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")) .addAsWebInfResource(new File("src/main/webapp/WEB-INF/jboss-deployment-structure.xml"), ArchivePaths.create("jboss-deployment-structure.xml")) .addAsResource(new File("src/test/resources/text-extractor/text-file.txt")) .setManifest(new File("src/main/webapp/META-INF/MANIFEST.MF")); }

Target:
public static WebArchive createDeployment() { File[] testDeps = Maven.configureResolver() .workOffline() .loadPomFromFile("pom.xml") .resolve("org.modeshape:modeshape-jcr:test-jar:tests:?").withTransitivity().asFile(); return ShrinkWrap.create(WebArchive.class, "query-test.war").addAsLibraries(testDeps) .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")) .addAsResource(new File("src/test/resources/text-extractor/text-file.txt")) .setManifest(new File("src/main/webapp/META-INF/MANIFEST.MF")); }
Source:
protected void endWithFailure() { if (getMoveOrCopyImageOperation() == ImageOperation.Copy) { unLockImage(); if (getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().remove (new image_storage_domain_map_id(getParameters().getImageId(), getParameters().getStorageDomainId())); } revertTasks(); } else { unLockImage(); } setSucceeded(true); }

Target:
protected void endWithFailure() { unLockImage(); if (getMoveOrCopyImageOperation() == ImageOperation.Copy) { if (getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().remove (new image_storage_domain_map_id(getParameters().getImageId(), getParameters().getStorageDomainId())); } revertTasks(); } setSucceeded(true); }
Source:
public void setupDB() throws DockerException, InterruptedException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( getClass().getClassLoader()); client = new DBDockerClient(dbi); client.createContainer(); client.startContainer(); } finally { Thread.currentThread().setContextClassLoader(cl); } jdbcUri = URI.create(dbi.getJDBCURL( client.getHostPort(dbi.getDBPort()), client.getHostName())); jdbcUri = URI.create("jdbc:oracle:thin:@ TestUtil.startConversionService(); TestUtil.startService( Arrays.asList("eu.esdihumboldt.hale.io.jdbc.oracle"), ConversionService.class); }

Target:
public void setupDB() throws DockerException, InterruptedException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( getClass().getClassLoader()); client = new DBDockerClient(dbi); client.createContainer(); client.startContainer(); } finally { Thread.currentThread().setContextClassLoader(cl); } jdbcUri = URI.create(dbi.getJDBCURL( client.getHostPort(dbi.getDBPort()), client.getHostName())); TestUtil.startConversionService(); }
Source:
public LRAParticipantRegistry(Map<String, LRAParticipant> lraParticipants) { this.lraParticipants = new HashMap<>(lraParticipants); }

Target:
LRAParticipantRegistry(Map<String, LRAParticipant> lraParticipants) { this.lraParticipants = new HashMap<>(lraParticipants); }
Source:
private static String parseFields(SimpleFeatureType schema) { JSONArray jsfields = new JSONArray(); try { Collection<PropertyDescriptor> types = schema.getDescriptors(); for (PropertyDescriptor type : types) { JSONObject obj = new JSONObject(); String name = type.getName().getLocalPart(); obj.put("name", name); obj.put("type", type.getType().getBinding().getSimpleName()); JSONObject locales = new JSONObject(); if (KMLParser.KML_NAME.equals(name)){ locales.put("fi", "Nimi"); locales.put("en", "Name"); locales.put("sv", "Namn"); } else if (KMLParser.KML_DESC.equals(name)){ locales.put("fi", "Kuvaus"); locales.put("en", "Description"); locales.put("sv", "Beskrivning"); } else { locales.put("fi", name); locales.put("en", name); locales.put("sv", name); } obj.put("locales", locales); jsfields.put(obj); } } catch (Exception ex) { log.error(ex, "Couldn't parse field schema"); } return JSONHelper.getStringFromJSON(jsfields, "[]"); }

Target:
private static String parseFields(SimpleFeatureType schema) { JSONArray jsfields = new JSONArray(); try { Collection<PropertyDescriptor> types = schema.getDescriptors(); for (PropertyDescriptor type : types) { JSONObject obj = new JSONObject(); String name = type.getName().getLocalPart(); obj.put("name", name); obj.put("type", type.getType().getBinding().getSimpleName()); if (!KMLParser.KML_GEOM.equals(name)){ JSONObject locales = new JSONObject(); String localizedName = name; if (KMLParser.KML_NAME.equals(name)){ localizedName = "Name"; } else if (KMLParser.KML_DESC.equals(name)){ localizedName = "Description"; } locales.put(DEFAULT_LOCALES_LANGUAGE, localizedName); obj.put("locales", locales); } jsfields.put(obj); } } catch (Exception ex) { log.error(ex, "Couldn't parse field schema"); } return JSONHelper.getStringFromJSON(jsfields, "[]"); }
Source:
public void validate(final List<Throwable> errors, final Configuration configuration) { final In inputParameter = createInputParameter(); final Set<String> allInputAttributeNames; if (inputParameter != null) { allInputAttributeNames = ParserUtils.getAllAttributeNames(inputParameter.getClass()); } else { allInputAttributeNames = Collections.emptySet(); } for (String inputAttributeName : this.inputMapper.values()) { if (!allInputAttributeNames.contains(inputAttributeName)) { errors.add(new ConfigurationException(inputAttributeName + " is not defined in processor '" + this + "'. Check for typos. Options are " + allInputAttributeNames)); } } Set<String> allOutputAttributeNames = ParserUtils.getAllAttributeNames(getOutputType()); for (String outputAttributeName : this.outputMapper.keySet()) { if (!allOutputAttributeNames.contains(outputAttributeName)) { errors.add(new ConfigurationException(outputAttributeName + " is not defined in processor " + "'" + this + "' as an output attribute. Check for typos. Options are " + allOutputAttributeNames)); } } extraValidation(errors, configuration); }

Target:
public final void validate(final List<Throwable> errors, final Configuration configuration) { final In inputParameter = createInputParameter(); final Set<String> allInputAttributeNames; if (inputParameter != null) { allInputAttributeNames = ParserUtils.getAllAttributeNames(inputParameter.getClass()); } else { allInputAttributeNames = Collections.emptySet(); } for (String inputAttributeName : this.inputMapper.values()) { if (!allInputAttributeNames.contains(inputAttributeName)) { errors.add(new ConfigurationException(inputAttributeName + " is not defined in processor '" + this + "'. Check for typos. Options are " + allInputAttributeNames)); } } Set<String> allOutputAttributeNames = ParserUtils.getAllAttributeNames(getOutputType()); for (String outputAttributeName : this.outputMapper.keySet()) { if (!allOutputAttributeNames.contains(outputAttributeName)) { errors.add(new ConfigurationException(outputAttributeName + " is not defined in processor " + "'" + this + "' as an output attribute. Check for typos. Options are " + allOutputAttributeNames)); } } extraValidation(errors, configuration); }