auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void handleConnectionChange(final String oldValue, final String v, boolean supportUndo) { try { context.setConnecteeName(comp, connector, v); } catch (IOException iae) { new JOptionPane(iae.getMessage(), JOptionPane.ERROR_MESSAGE).createDialog(null, "Error").setVisible(true); return; } handleConnectionChangeCommon(); if (supportUndo) { AbstractUndoableEdit auEdit = new AbstractUndoableEdit() { @Override public void undo() throws CannotUndoException { super.undo(); setConnectedToNameAndPropagateChange(oldValue, false); } @Override public String getUndoPresentationName() { return "Undo "+connector.getName()+" change"; } @Override public void redo() throws CannotRedoException { super.redo(); setConnectedToNameAndPropagateChange(v, true); } @Override public String getRedoPresentationName() { return "Redo "+connector.getName()+" change"; } }; ExplorerTopComponent.addUndoableEdit(auEdit); } }

Target:
private void handleConnectionChange(final String oldValue, final String v, boolean supportUndo) { try { context.setSocketConnecteeName(connector, v); } catch (IOException iae) { new JOptionPane(iae.getMessage(), JOptionPane.ERROR_MESSAGE).createDialog(null, "Error").setVisible(true); return; } handleConnectionChangeCommon(); if (supportUndo) { AbstractUndoableEdit auEdit = new AbstractUndoableEdit() { @Override public void undo() throws CannotUndoException { super.undo(); setConnectedToNameAndPropagateChange(oldValue, false); } @Override public String getUndoPresentationName() { return "Undo "+connector.getName()+" change"; } @Override public void redo() throws CannotRedoException { super.redo(); setConnectedToNameAndPropagateChange(v, true); } @Override public String getRedoPresentationName() { return "Redo "+connector.getName()+" change"; } }; ExplorerTopComponent.addUndoableEdit(auEdit); } }
Source:
public static <R extends BaseResource> UriBuilder getUriBuilder(UriInfo uriInfo, R model, Class<? extends BaseResource> suggestedParentType) { UriBuilder uriBuilder = builderMap.get(model.getClass()); if (uriBuilder == null) { Collection collection = getCollection(model, suggestedParentType); if (collection == null) { return null; } if (collection.getParentType() != NO_PARENT) { BaseResource parent = getParentModel(model, collection.getParentType()); Collection parentCollection = getCollection(parent, suggestedParentType); String path = getPath(collection.getCollectionType(), parentCollection.getResourceType(), model.getClass()); uriBuilder = getUriBuilder(uriInfo, parent).path(path); } else { String path = getPath(collection.getCollectionType()); uriBuilder = uriInfo != null ? UriBuilder.fromPath(uriInfo.getBaseUri().getPath()).path(path) : UriBuilder.fromPath(path); } builderMap.put(model.getClass(), uriBuilder.clone()); } else { uriBuilder = uriBuilder.clone(); } return uriBuilder.path(model.getId()); }

Target:
public static <R extends BaseResource> UriBuilder getUriBuilder(UriInfo uriInfo, R model, Class<? extends BaseResource> suggestedParentType) { Collection collection = getCollection(model, suggestedParentType); if (collection == null) { return null; } UriBuilder uriBuilder = builderMap.get(collection); if (uriBuilder == null) { if (collection.getParentType() != NO_PARENT) { BaseResource parent = getParentModel(model, collection.getParentType()); Collection parentCollection = getCollection(parent, suggestedParentType); String path = getPath(collection.getCollectionType(), parentCollection.getResourceType(), model.getClass()); uriBuilder = getUriBuilder(uriInfo, parent).path(path); } else { String path = getPath(collection.getCollectionType()); uriBuilder = uriInfo != null ? UriBuilder.fromPath(uriInfo.getBaseUri().getPath()).path(path) : UriBuilder.fromPath(path); } builderMap.put(collection, uriBuilder.clone()); } else { uriBuilder = uriBuilder.clone(); } return uriBuilder.path(model.getId()); }
Source:
public List<Application> getApplications() throws ApplicationException { try(Connection connection = PlatformConnection.getInstance().getConnection()) { if (isSystemAdministrator()) { return applicationBusiness.getApplications(connection); } else if (isGroupAdministrator()) { List<String> classes = classBusiness.getUserClassesName( getSessionUser().getEmail(), true, connection); return applicationBusiness.getApplications(classes, connection); } List<AppClass> classes = classBusiness.getUserClasses( getSessionUser().getEmail(), false, connection); List<String> classNames = new ArrayList<>(); for (AppClass c : classes) { classNames.add(c.getName()); } return applicationBusiness.getApplications(classNames, connection); } catch (BusinessException | CoreException ex) { throw new ApplicationException(ex); } catch (SQLException ex) { logger.error("Error handling a connection", ex); throw new ApplicationException(ex); } }

Target:
public List<Application> getApplications() throws ApplicationException { try(Connection connection = PlatformConnection.getInstance().getConnection()) { if (isSystemAdministrator()) { return applicationBusiness.getApplications(connection); } else if (isGroupAdministrator()) { List<String> classes = classBusiness.getUserClassesName( getSessionUser().getEmail(), true, connection); return applicationBusiness.getApplications(classes, connection); } List<AppClass> classes = classBusiness.getUserClasses( getSessionUser().getEmail(), false, connection); List<String> classNames = classes.stream().map(AppClass::getName).collect(Collectors.toList()); return applicationBusiness.getApplications(classNames, connection); } catch (BusinessException | CoreException ex) { throw new ApplicationException(ex); } catch (SQLException ex) { logger.error("Error handling a connection", ex); throw new ApplicationException(ex); } }
Source:
protected boolean addedValid(IConfigurationElement element) { String rankName = element.getAttribute(ATT_RANK); final int rank; if (rankName == null) { rank = DEFAULT_RANK_VALUE; } else { rank = Integer.valueOf(rankName).intValue(); } String typeAttribute = element.getAttribute(ATT_COMPARISON_TYPE); final ComparisonType type; if (typeAttribute != null) { type = ComparisonType.valueOf(typeAttribute); } else { type = ComparisonType.BOTH; } String label = element.getAttribute(ATT_LABEL); String description = element.getAttribute(ATT_DESCRIPTION); DifferenceDescriptorWrapper itemDescriptor = new DifferenceDescriptorWrapper(label, description, element, rank, type); IItemDescriptor<Descriptor> previous = groupProviderRegistry.add(itemDescriptor); if (previous != null) { log(IStatus.WARNING, element, "The group provider descriptor'" + element.getAttribute(ATT_CLASS) + "' is registered twice."); } return true; }

Target:
protected boolean addedValid(IConfigurationElement element) { String rankValue = element.getAttribute(ATT_RANK); final int rank; if (rankValue == null) { rank = DEFAULT_RANK_VALUE; } else { rank = Integer.valueOf(rankValue).intValue(); } String typeAttribute = element.getAttribute(ATT_COMPARISON_TYPE); final ComparisonType type; if (typeAttribute != null) { type = ComparisonType.valueOf(typeAttribute); } else { type = ComparisonType.BOTH; } String label = element.getAttribute(ATT_LABEL); String description = element.getAttribute(ATT_DESCRIPTION); DifferenceDescriptorWrapper itemDescriptor = new DifferenceDescriptorWrapper(label, description, element, rank, type); IItemDescriptor<Descriptor> previous = groupProviderRegistry.add(itemDescriptor); if (previous != null) { log(IStatus.WARNING, element, "The group provider descriptor'" + element.getAttribute(ATT_CLASS) + "' is registered twice."); } return true; }
Source:
public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException { Class<?> targetClass = AopUtils.isAopProxy(bean) ? AopUtils.getTargetClass(bean) : bean.getClass(); ReflectionUtils.doWithMethods(targetClass, method -> { StreamEmitter streamEmitter = AnnotatedElementUtils.findMergedAnnotation(method, StreamEmitter.class); if (streamEmitter != null && !method.isBridge()) { mappedStreamEmitterMethods.add(bean, method); } }); return bean; }

Target:
public Object postProcessAfterInitialization(final Object bean, final String beanName) throws BeansException { ReflectionUtils.doWithMethods(bean.getClass(), method -> { StreamEmitter streamEmitter = AnnotatedElementUtils.findMergedAnnotation(method, StreamEmitter.class); if (streamEmitter != null) { mappedStreamEmitterMethods.add(bean, method); } }, ReflectionUtils.USER_DECLARED_METHODS); return bean; }
Source:
public void stopListening() { log.debug("Stop listening event seen."); commError = false; if (this.autoListen && !this.speaking) { if (System.currentTimeMillis() - lastAutoListenEvent > 300) { startListening(); } else { if (listening) { error("Please close zombie tabs and check Internet connection"); commError = true; } } lastAutoListenEvent = System.currentTimeMillis(); } else { log.debug("micNotListening"); listening = false; } if (!commError) { broadcastState(); } }

Target:
public void stopListening() { log.debug("Stop listening event seen."); boolean commError = false; if (this.autoListen && !this.speaking) { if (System.currentTimeMillis() - lastAutoListenEvent > 300) { startListening(); } else { if (listening) { error("Please close zombie tabs and check Internet connection"); commError = true; } } lastAutoListenEvent = System.currentTimeMillis(); } else { log.debug("micNotListening"); listening = false; } if (!commError) { broadcastState(); } }
Source:
public JSONObject getSnapshot() { JSONObject snapshot = new JSONObject(); snapshot.put(PARTITION_ID, toPathString()); snapshot.put(PARTITION_WRITE_STATE, getPartitionState().name()); snapshot.put(PARTITION_CLASS, getPartitionClass()); snapshot.put(PARTITION_RESOURCE_ID, getResourceName()); JSONArray replicas = new JSONArray(); getReplicaIds().forEach(replica -> replicas.put(replica.getSnapshot())); snapshot.put(PARTITION_REPLICAS, replicas); return snapshot; }

Target:
public JSONObject getSnapshot() { JSONObject snapshot = new JSONObject(); snapshot.put(PARTITION_ID, toPathString()); snapshot.put(PARTITION_WRITE_STATE, getPartitionState().name()); snapshot.put(PARTITION_CLASS, getPartitionClass()); snapshot.put(PARTITION_RESOURCE_NAME, getResourceName()); JSONArray replicas = new JSONArray(); getReplicaIds().forEach(replica -> replicas.put(replica.getSnapshot())); snapshot.put(PARTITION_REPLICAS, replicas); return snapshot; }
Source:
public static Date castToDate(Object x, int targetSqlType) throws SQLException { if (x instanceof Date) { return (Date) x; } if (x instanceof java.util.Date) { return new Date(((java.util.Date) x).getTime()); } if (x instanceof String) { throw new SQLException("Conversion from String to Date not yet supported"); } throw invalidConversion(x, targetSqlType); }

Target:
public static Date castToDate(Object x, int targetSqlType) throws SQLException { if (x instanceof Date) { return (Date) x; } if (x instanceof java.util.Date) { return new Date(((java.util.Date) x).getTime()); } if (x instanceof LocalDate) { return Date.valueOf((LocalDate) x); } if (x instanceof LocalDateTime) { return Date.valueOf(((LocalDateTime) x).toLocalDate()); } try { if (x instanceof String) { return Date.valueOf((String) x); } } catch (RuntimeException e) { throw invalidConversion(x, targetSqlType, e); } throw invalidConversion(x, targetSqlType); }
Source:
public Matrix power(int n, Factory factory) { return exponentBySqaring(this, n, factory); }

Target:
public Matrix power(int n, Factory factory) { if (n < 0) throw new IllegalArgumentException( "The exponent has to be larger than 0."); else if (n == 0) return factory.createIdentityMatrix(rows); else if (n > 0) { Matrix result = factory.createIdentityMatrix(rows); Matrix x = this; while (n > 0) { if (n % 2 == 1) { result = result.multiply(x); } n /= 2; x = x.multiply(x); } return result; } throw new IllegalArgumentException( "You used illegal arguments for the power()-function."); }
Source:
protected FileSplit makeSplit(Path file, long start, long length, String[] hosts, String[] inMemoryHosts) { long cachedStart = getCachedStartIndex(file); long cachedEnd = getCachedEndIndex(file); if (cachedStart > start + length) { return new NullRowsInputFormat.DummyInputSplit(file); } else if (cachedStart > start) { length = length - (cachedStart - start); start = cachedStart; } if (cachedEnd > - 1 && cachedEnd < start) { return new NullRowsInputFormat.DummyInputSplit(file); } else if (cachedEnd < start + length) { length = cachedEnd - start; } return super.makeSplit(file, start, length, hosts, inMemoryHosts); }

Target:
protected FileSplit makeSplit(Path file, long start, long length, String[] hosts, String[] inMemoryHosts) { return makeSplitInternal(file, start, length, hosts, inMemoryHosts); }
Source:
public void testNestedNonTerminals2() throws Exception { Grammar.NonTerminalId ntistart = new Grammar.NonTerminalId("StartNT"); Grammar.StateId stistart = new Grammar.StateId("StartState"); Grammar.StateId stiend = new Grammar.StateId("EndState"); Grammar.NonTerminal nt1 = new Grammar.NonTerminal(ntistart, stistart, new Grammar.State.OrderingInfo(0), stiend, new Grammar.State.OrderingInfo(100)); Grammar.RegExState resy = new Grammar.RegExState(new Grammar.StateId("RegExStidy"), nt1, new Grammar.State.OrderingInfo(3), Pattern.compile("y")); Grammar.NonTerminalState nts = new Grammar.NonTerminalState(new Grammar.StateId("NT"), nt1, new Grammar.State.OrderingInfo(2), nt1, false); nt1.entryState.next.add(nts); nt1.entryState.next.add(nt1.exitState); nts.next.add(resy); resy.next.add(nt1.exitState); { Term result = new Parser(new ParseState("")).parse(nt1, 0); Term expected = amb(klist(amb(KList.EMPTY))); assertEquals("EmtpyString check: ", expected, result); } { Term result = new Parser(new ParseState("yy")).parse(nt1, 0); Term expected = amb(klist(amb(klist(amb(klist(amb(KList.EMPTY), Token.kAppOf("K", "y"))), Token.kAppOf("K", "y"))))); assertEquals("y^n check: ", expected, result); } assertEquals("Expected Nullable NTs", 1, NullabilityCheck.getReachableNullableNT(nt1).size()); }

Target:
public void testNestedNonTerminals2() throws Exception { Grammar.NonTerminalId ntistart = new Grammar.NonTerminalId("StartNT"); Grammar.StateId stistart = new Grammar.StateId("StartState"); Grammar.StateId stiend = new Grammar.StateId("EndState"); Grammar.NonTerminal nt1 = new Grammar.NonTerminal(ntistart, stistart, new Grammar.State.OrderingInfo(0), stiend, new Grammar.State.OrderingInfo(100)); Grammar.RegExState resy = new Grammar.RegExState(new Grammar.StateId("RegExStidy"), nt1, new Grammar.State.OrderingInfo(3), Pattern.compile("y")); Grammar.NonTerminalState nts = new Grammar.NonTerminalState(new Grammar.StateId("NT"), nt1, new Grammar.State.OrderingInfo(2), nt1, false); nt1.entryState.next.add(nts); nt1.entryState.next.add(nt1.exitState); nts.next.add(resy); resy.next.add(nt1.exitState); { Term result = new Parser(new ParseState("")).parse(nt1, 0); Term expected = amb(klist(amb(KList.EMPTY))); Assert.assertEquals("EmtpyString check: ", expected, result); } { Term result = new Parser(new ParseState("yy")).parse(nt1, 0); Term expected = amb(klist(amb(klist(amb(klist(amb(KList.EMPTY), Token.kAppOf("K", "y"))), Token.kAppOf("K", "y"))))); Assert.assertEquals("y^n check: ", expected, result); } Assert.assertEquals("Expected Nullable NTs", nt1, NullabilityCheck.getReachableNullableNT(nt1).iterator().next()); }
Source:
public Tuple exec(final Tuple inputTuple) throws IOException { final Object objA = extractFieldAtIndex(inputTuple, 0); Sketch sketchA = null; if (objA != null) { final DataByteArray dbaA = (DataByteArray)objA; final Memory srcMem = Memory.wrap(dbaA.get()); sketchA = Sketch.wrap(srcMem, DEFAULT_UPDATE_SEED); } final Object objB = extractFieldAtIndex(inputTuple, 1); Sketch sketchB = null; if (objB != null) { final DataByteArray dbaB = (DataByteArray)objB; final Memory srcMem = Memory.wrap(dbaB.get()); sketchB = Sketch.wrap(srcMem, DEFAULT_UPDATE_SEED); } final double[] jaccardTupple = com.yahoo.sketches.theta.JaccardSimilarity.jaccard(sketchA, sketchB); return doubleArrayToTuple(jaccardTupple); }

Target:
public Tuple exec(final Tuple inputTuple) throws IOException { final Object objA = extractFieldAtIndex(inputTuple, 0); Sketch sketchA = null; if (objA != null) { final DataByteArray dbaA = (DataByteArray)objA; final Memory srcMem = Memory.wrap(dbaA.get()); sketchA = Sketch.wrap(srcMem, seed); } final Object objB = extractFieldAtIndex(inputTuple, 1); Sketch sketchB = null; if (objB != null) { final DataByteArray dbaB = (DataByteArray)objB; final Memory srcMem = Memory.wrap(dbaB.get()); sketchB = Sketch.wrap(srcMem, seed); } final double[] jaccardTupple = com.yahoo.sketches.theta.JaccardSimilarity.jaccard(sketchA, sketchB); return doubleArrayToTuple(jaccardTupple); }
Source:
public void setup() throws Exception { scheduledExecutorService = Executors.newScheduledThreadPool(0); cache = StandaloneCacheBuilder.newCacheBuilder(Number.class, String.class, LoggerFactory.getLogger(Ehcache.class+"StatisticsTest")) .withStatisticsExecutor(scheduledExecutorService) .withCapacity(capacity).build(); cache.init(); }

Target:
public void setup() throws Exception { scheduledExecutorService = Executors.newScheduledThreadPool(0); cache = StandaloneCacheBuilder.newCacheBuilder(Number.class, String.class, LoggerFactory.getLogger(Ehcache.class + "-" + "StatisticsTest")) .withStatisticsExecutor(scheduledExecutorService) .withCapacity(capacity).build(); cache.init(); }
Source:
public void inflatedisbusmentDate() { mfDatePicker = MFDatePicker.newInsance(this); tvDisbursementOnDate.setText(MFDatePicker.getDatePickedAsString()); tvDisbursementOnDate.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mfDatePicker.show(getActivity().getSupportFragmentManager(), FragmentConstants .DFRAG_DATE_PICKER); } }); }

Target:
public void inflatedisbusmentDate() { mfDatePicker = MFDatePicker.newInsance(this); tvDisbursementOnDate.setText(MFDatePicker.getDatePickedAsString()); }
Source:
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; final String token = tokenExtractor.getToken(request); if (shouldSkipAuthentication(request, token)) { chain.doFilter(req, res); return; } final String requestURI = request.getRequestURI(); if (token == null) { LOG.debug("No 'Authorization' header for {}", requestURI); send403(res); return; } Jws<Claims> jwt; try { jwt = Jwts.parser().setSigningKey(getJwtPublicKey(false)).parseClaimsJws(token); LOG.debug("JWT = " + jwt.toString()); } catch (SignatureException | NoSuchAlgorithmException | InvalidKeySpecException | IllegalArgumentException e) { LOG.error("Failed verifying the JWT token", e); try { LOG.info("Retrying after updating the public key", e); jwt = Jwts.parser().setSigningKey(getJwtPublicKey(true)).parseClaimsJws(token); LOG.debug("JWT = " + jwt.toString()); } catch (SignatureException | NoSuchAlgorithmException | InvalidKeySpecException | IllegalArgumentException ee) { LOG.error("Failed verifying the JWT token after public key update", e); send403(res); return; } } request.setAttribute("token", jwt); chain.doFilter(req, res); }

Target:
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; final String token = tokenExtractor.getToken(request); if (shouldSkipAuthentication(request, token)) { chain.doFilter(req, res); return; } final String requestURI = request.getRequestURI(); if (token == null) { LOG.debug("No 'Authorization' header for {}", requestURI); send403(res); return; } Jws<Claims> jwt; try { jwt = Jwts.parser().setSigningKey(getJwtPublicKey(false)).parseClaimsJws(token); LOG.debug("JWT = ", jwt); } catch (SignatureException | NoSuchAlgorithmException | InvalidKeySpecException | IllegalArgumentException e) { LOG.error("Failed verifying the JWT token", e); try { LOG.info("Retrying after updating the public key", e); jwt = Jwts.parser().setSigningKey(getJwtPublicKey(true)).parseClaimsJws(token); LOG.debug("JWT = ", jwt); } catch (SignatureException | NoSuchAlgorithmException | InvalidKeySpecException | IllegalArgumentException ee) { LOG.error("Failed verifying the JWT token after public key update", e); send403(res); return; } } request.setAttribute("token", jwt); chain.doFilter(req, res); }
Source:
public static TokenState fromString(final String state) { try { return TokenState.valueOf(state.toUpperCase()); } catch (Exception e) { return ACTIVE; } }

Target:
public static TokenState fromString(final String state) { try { return TokenState.valueOf(state.toUpperCase()); } catch (Exception e) { LOGGER.error("Unknown token state: " + state); return ACTIVE; } }
Source:
public void execute() { if (!basePanel.getSelectedEntries().isEmpty()) { basePanel.output(Localization.lang("Looking for full text document...")); } else { LOGGER.debug("No entry selected for fulltext download."); } if (basePanel.getSelectedEntries().size() >= WARNING_LIMIT) { boolean confirmDownload = dialogService.showConfirmationDialogAndWait( Localization.lang("Look up full text documents"), Localization.lang( "You are about to look up full text documents for %0 entries.", String.valueOf(basePanel.getSelectedEntries().size())) + "\n" + Localization.lang("JabRef will send at least one request per entry to a publisher.") + "\n" + Localization.lang("Do you still want to continue?"), Localization.lang("Look up full text documents"), Localization.lang("Cancel")); if (!confirmDownload) { basePanel.output(Localization.lang("Operation canceled.")); return; } } Task<Map<BibEntry, Optional<URL>>> findFullTextsTask = new Task<Map<BibEntry, Optional<URL>>>() { @Override protected Map<BibEntry, Optional<URL>> call() { Map<BibEntry, Optional<URL>> downloads = new ConcurrentHashMap<>(); int count = 0; AutoSetFileLinksUtil util = new AutoSetFileLinksUtil(basePanel.getBibDatabaseContext(), Globals.prefs.getFilePreferences(), Globals.prefs.getAutoLinkPreferences(), ExternalFileTypes.getInstance()); List<BibEntry> changed = util.linkAssociatedFiles(basePanel.getSelectedEntries(), new NamedCompound("")); for (BibEntry entry : changed) { if (entry.getFiles().isEmpty()) { downloads.put(entry, fetchers.findFullTextPDF(entry)); } else { downloads.put(entry, Optional.empty()); } updateProgress(++count, basePanel.getSelectedEntries().size()); } return downloads; } }; findFullTextsTask.setOnSucceeded(value -> downloadFullTexts(findFullTextsTask.getValue())); dialogService.showProgressDialogAndWait( Localization.lang("Look up full text documents"), Localization.lang("Looking for full text document..."), findFullTextsTask); Globals.TASK_EXECUTOR.execute(findFullTextsTask); }

Target:
public void execute() { if (!basePanel.getSelectedEntries().isEmpty()) { basePanel.output(Localization.lang("Looking for full text document...")); } else { LOGGER.debug("No entry selected for fulltext download."); } if (basePanel.getSelectedEntries().size() >= WARNING_LIMIT) { boolean confirmDownload = dialogService.showConfirmationDialogAndWait( Localization.lang("Look up full text documents"), Localization.lang("You are about to look up full text documents for %0 entries.", String.valueOf(basePanel.getSelectedEntries().size())) + "\n" + Localization.lang("JabRef will send at least one request per entry to a publisher.") + "\n" + Localization.lang("Do you still want to continue?"), Localization.lang("Look up full text documents"), Localization.lang("Cancel")); if (!confirmDownload) { basePanel.output(Localization.lang("Operation canceled.")); return; } } lookupFullText(); }
Source:
public void onHideCompletedJobs() { boolean newValue = !uiPrefs_.hideCompletedJobs().getValue(); uiPrefs_.hideCompletedJobs().setGlobalValue(newValue); commands_.hideCompletedJobs().setChecked(newValue); uiPrefs_.writeUIPrefs(); }

Target:
public void onHideCompletedJobs() { boolean newValue = !uiPrefs_.hideCompletedJobs().getValue(); uiPrefs_.hideCompletedJobs().setGlobalValue(newValue); uiPrefs_.writeUIPrefs(); }
Source:
public JexlEvaluateFunctions(JexlContext context, JexlEngine jexl){ Preconditions.checkNotNull(context, "JexlContext context"); Preconditions.checkNotNull(jexl, "JexlEngine jexl"); m_context= context; m_jexl = jexl; }

Target:
public JexlEvaluateFunctions(JexlContext context, JexlEngine jexl){ m_context = Preconditions.checkNotNull(context, "JexlContext context"); m_jexl = Preconditions.checkNotNull(jexl, "JexlEngine jexl"); }
Source:
public void testHeadings() { builder.beginDocument(); builder.beginHeading(1, new Attributes()); builder.characters("This is an H1"); builder.endHeading(); builder.beginHeading(2, new Attributes()); builder.characters("This is an H2"); builder.endHeading(); builder.beginHeading(6, new Attributes()); builder.characters("This is an H6"); builder.endHeading(); builder.endDocument(); String markup = out.toString(); TestUtil.println(markup); assertEquals("# This is an H1\n\n## This is an H2\n\n###### This is an H6\n\n", markup); }

Target:
public void testHeadings() { builder.beginDocument(); builder.beginHeading(1, new Attributes()); builder.characters("This is an H1"); builder.endHeading(); builder.beginHeading(2, new Attributes()); builder.characters("This is an H2"); builder.endHeading(); builder.beginHeading(6, new Attributes()); builder.characters("This is an H6"); builder.endHeading(); builder.endDocument(); assertMarkup("# This is an H1\n\n## This is an H2\n\n###### This is an H6\n\n"); }
Source:
protected void buildClientsForServer(ServerTemplate serverTemplate) { KieServicesClient kieServicesClient = createClientForTemplate(serverTemplate, null, getCredentialsProvider()); if (kieServicesClient != null) { serverTemplatesClients.computeIfAbsent(serverTemplate.getId(), (k) -> new ConcurrentHashMap<String, KieServicesClient>()); serverTemplatesClients.get(serverTemplate.getId()).put("", kieServicesClient); } if (serverTemplate.getContainersSpec() != null) { for (ContainerSpec containerSpec : serverTemplate.getContainersSpec()) { try { if (serverTemplatesClients.get(serverTemplate.getId()).containsKey(containerSpec.getId())) { logger.debug("KieServerClient for is already created", containerSpec.getId()); continue; } KieContainer kieContainer = kieServices.newKieContainer(containerSpec.getReleasedId()); KieServicesClient kieServicesClientForContainer = createClientForTemplate(serverTemplate, kieContainer.getClassLoader(), getCredentialsProvider()); if (kieServicesClient != null) { serverTemplatesClients.get(serverTemplate.getId()).put(containerSpec.getId(), kieServicesClientForContainer); } } catch (Exception e) { e.printStackTrace(); logger.warn("Failed ot create kie server client for container due to {}", containerSpec.getId(), e.getMessage()); } } } KieServicesClient adminKieServicesClient = createClientForTemplate(serverTemplate, null, getAdminCredentialsProvider()); if (adminKieServicesClient != null) { adminClients.put(serverTemplate.getId(), adminKieServicesClient); } }

Target:
protected void buildClientsForServer(ServerTemplate serverTemplate) { KieServicesClient kieServicesClient = createClientForTemplate(serverTemplate, null, getCredentialsProvider()); if (kieServicesClient != null) { serverTemplatesClients.computeIfAbsent(serverTemplate.getId(), (k) -> new ConcurrentHashMap<String, KieServicesClient>()); serverTemplatesClients.get(serverTemplate.getId()).put(SERVER_TEMPLATE_KEY, kieServicesClient); } if (serverTemplate.getContainersSpec() != null) { for (ContainerSpec containerSpec : serverTemplate.getContainersSpec()) { try { if (serverTemplatesClients.get(serverTemplate.getId()).containsKey(containerSpec.getId())) { logger.debug("KieServerClient for is already created", containerSpec.getId()); continue; } KieContainer kieContainer = kieServices.newKieContainer(containerSpec.getReleasedId()); KieServicesClient kieServicesClientForContainer = createClientForTemplate(serverTemplate, kieContainer.getClassLoader(), getCredentialsProvider()); if (kieServicesClient != null) { serverTemplatesClients.get(serverTemplate.getId()).put(containerSpec.getId(), kieServicesClientForContainer); } } catch (Exception e) { logger.warn("Failed ot create kie server client for container due to {}", containerSpec.getId(), e.getMessage()); } } } KieServicesClient adminKieServicesClient = createClientForTemplate(serverTemplate, null, getAdminCredentialsProvider()); if (adminKieServicesClient != null) { adminClients.put(serverTemplate.getId(), adminKieServicesClient); } }
Source:
public Response<String> apply(IdentifiedUser user, Input input) throws MethodNotAllowedException, ResourceNotFoundException, OrmException { if (input == null) { input = new Input(); } ReviewDb db = dbProvider.get(); Account a = db.accounts().get(user.getAccountId()); if (a == null) { throw new ResourceNotFoundException("account not found"); } if (!realm.allowsEdit(FieldName.FULL_NAME)) { if (realm instanceof LdapRealm && db.accountExternalIds().get( new AccountExternalId.Key(SCHEME_GERRIT, a.getUserName())) == null) { } else { throw new MethodNotAllowedException("realm does not allow editing name"); } } a.setFullName(input.name); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Strings.isNullOrEmpty(a.getFullName()) ? Response.<String> none() : Response.ok(a.getFullName()); }

Target:
public Response<String> apply(IdentifiedUser user, Input input) throws MethodNotAllowedException, ResourceNotFoundException, OrmException { if (input == null) { input = new Input(); } ReviewDb db = dbProvider.get(); Account a = db.accounts().get(user.getAccountId()); if (a == null) { throw new ResourceNotFoundException("account not found"); } if (realm instanceof LdapRealm && db.accountExternalIds().get( new AccountExternalId.Key(SCHEME_GERRIT, a.getUserName())) == null) { } else if (!realm.allowsEdit(FieldName.FULL_NAME)) { throw new MethodNotAllowedException("realm does not allow editing name"); } a.setFullName(input.name); dbProvider.get().accounts().update(Collections.singleton(a)); byIdCache.evict(a.getId()); return Strings.isNullOrEmpty(a.getFullName()) ? Response.<String> none() : Response.ok(a.getFullName()); }
Source:
public ScriptEngineShellTable(ScriptEngineManager scriptEngineManager, String engine) { this.scriptEngine = scriptEngineManager.getEngineByName(engine); }

Target:
public ScriptEngineShellTable(ScriptEngineManager scriptEngineManager, String engine) { this.scriptEngine = scriptEngineManager.getEngineByName(engine); if (scriptEngine == null) { throw new IllegalStateException("Unable to load script engine " + engine); } }
Source:
public RSocketException(String message, @Nullable Throwable cause) { super(0x00000201, message, cause); }

Target:
public RSocketException(String message, @Nullable Throwable cause) { super(ErrorFrameFlyweight.APPLICATION_ERROR, message, cause); }
Source:
public void onStart(){ if(!DashboardActivity.dashboardActivity.isPreLoadSurveyOpenning()) { SurveyDB.removeInProgress(); } }

Target:
public void onStart(){ SurveyDB.removeInProgress(); }
Source:
public Value deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { JsonNode node = jsonParser.getCodec().readTree(jsonParser); if (node.get("distributionValue") != null) { byte[] bytes = node.get("distributionValue").binaryValue(); ByteString byteString = ByteString.copyFrom(bytes); return Value.DistributionValue.create(byteString); } if (node.get("doubleValue") != null) { double val = node.get("doubleValue").asDouble(); return Value.DoubleValue.create(val); } throw new RuntimeException("Unrecognized value type"); }

Target:
public Value deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException { JsonNode node = jsonParser.getCodec().readTree(jsonParser); if (node.get("distributionValue") != null) { byte[] bytes = node.get("distributionValue").binaryValue(); return Value.DistributionValue.create(ByteString.copyFrom(bytes)); } if (node.get("doubleValue") != null) { double val = node.get("doubleValue").asDouble(); return Value.DoubleValue.create(val); } throw new RuntimeException("Unrecognized value type"); }
Source:
public int deleteScheduledExecutions(int maxRetainSecs) { if (maxRetainSecs < 0) { LOG.debug("scheduled executions retention is disabled"); return 0; } boolean committed = false; try (Query q = pm.newQuery(MScheduledExecution.class)) { openTransaction(); int maxCreateTime = (int) (System.currentTimeMillis() / 1000) - maxRetainSecs; q.setFilter("startTime <= maxCreateTime"); q.declareParameters("int maxCreateTime"); long deleted = q.deletePersistentAll(maxCreateTime); committed = commitTransaction(); return (int) deleted; } catch (Exception e) { throw new RuntimeException(e); } finally { if (!committed) { rollbackTransaction(); } } }

Target:
public int deleteScheduledExecutions(int maxRetainSecs) { if (maxRetainSecs < 0) { LOG.debug("scheduled executions retention is disabled"); return 0; } boolean committed = false; Query q = null; try { openTransaction(); int maxCreateTime = (int) (System.currentTimeMillis() / 1000) - maxRetainSecs; q = pm.newQuery(MScheduledExecution.class); q.setFilter("startTime <= maxCreateTime"); q.declareParameters("int maxCreateTime"); long deleted = q.deletePersistentAll(maxCreateTime); committed = commitTransaction(); return (int) deleted; } finally { rollbackAndCleanup(committed, q); } }
Source:
public String getContinuationToken() { return nextLink; }

Target:
public String getContinuationToken() { return continuationToken; }
Source:
void performCustomMigrationForMultiple() { ProjectId id1 = createId(1); ProjectId id2 = createId(2); ProjectId id3 = createId(3); TestProcessManagerRepository repository = repository(); TestProcessManager pm1 = new TestProcessManager(id1); TestProcessManager pm2 = new TestProcessManager(id2); TestProcessManager pm3 = new TestProcessManager(id3); repository.store(pm1); repository.store(pm2); repository.store(pm3); TargetFilters filters = targetFilters(Project.Column.name(), SetTestProcessName.NEW_NAME); Iterator<TestProcessManager> found = repository.find(filters, ResponseFormat.getDefaultInstance()); assertThat(found.hasNext()).isFalse(); repository.applyMigration(ImmutableSet.of(id1, id2), new SetTestProcessName()); Iterator<TestProcessManager> foundAfterMigration = repository.find(filters, ResponseFormat.getDefaultInstance()); ImmutableList<TestProcessManager> results = ImmutableList.copyOf(foundAfterMigration); assertThat(results).hasSize(2); assertThat(results) .comparingElementsUsing(stateWithPropagatedName()) .containsExactly(pm1, pm2); }

Target:
void performCustomMigrationForMultiple() { ProjectId id1 = createId(1); ProjectId id2 = createId(2); ProjectId id3 = createId(3); TestProcessManagerRepository repository = repository(); TestProcessManager pm1 = new TestProcessManager(id1); TestProcessManager pm2 = new TestProcessManager(id2); TestProcessManager pm3 = new TestProcessManager(id3); repository.store(pm1); repository.store(pm2); repository.store(pm3); TargetFilters filters = targetFilters(Project.Column.name(), SetTestProcessName.NEW_NAME); Iterator<TestProcessManager> found = repository.find(filters, ResponseFormat.getDefaultInstance()); assertThat(found.hasNext()).isFalse(); repository.applyMigration(ImmutableSet.of(id1, id2), new SetTestProcessName()); Iterator<TestProcessManager> foundAfterMigration = repository.find(filters, ResponseFormat.getDefaultInstance()); ImmutableList<TestProcessManager> results = ImmutableList.copyOf(foundAfterMigration); Project expectedState1 = pm1 .state() .toBuilder() .setName(SetTestProcessName.NEW_NAME) .setIdString(pm1.getIdString()) .build(); Project expectedState2 = pm2 .state() .toBuilder() .setName(SetTestProcessName.NEW_NAME) .setIdString(pm2.getIdString()) .build(); assertThat(results).hasSize(2); assertThat(results) .comparingElementsUsing(entityState()) .containsExactly(expectedState1, expectedState2); }
Source:
protected Map<String, Object> getStats(Protocol protocol){ return stack.dumpStats(); }

Target:
protected Map<String, Object> getStats(Protocol protocol){ return stack.dumpStats(protocol.getName(), null); }
Source:
protected boolean authenticate(ContainerRequestContext requestContext, C credentials, String scheme) { try { if (credentials == null) { return false; } final Optional<P> principal = authenticator.authenticate(credentials); if (!principal.isPresent()) { return false; } boolean secure = requestContext.getSecurityContext().isSecure(); requestContext.setSecurityContext(new SecurityContext() { @Override public Principal getUserPrincipal() { return principal.get(); } @Override public boolean isUserInRole(String role) { return authorizer.authorize(principal.get(), role); } @Override public boolean isSecure() { return secure; } @Override public String getAuthenticationScheme() { return scheme; } }); return true; } catch (AuthenticationException e) { logger.warn("Error authenticating credentials", e); throw new InternalServerErrorException(); } }

Target:
protected boolean authenticate(ContainerRequestContext requestContext, C credentials, String scheme) { try { if (credentials == null) { return false; } final Optional<P> principal = authenticator.authenticate(credentials); if (!principal.isPresent()) { return false; } final SecurityContext securityContext = requestContext.getSecurityContext(); final boolean secure = securityContext != null && securityContext.isSecure(); requestContext.setSecurityContext(new SecurityContext() { @Override public Principal getUserPrincipal() { return principal.get(); } @Override public boolean isUserInRole(String role) { return authorizer.authorize(principal.get(), role); } @Override public boolean isSecure() { return secure; } @Override public String getAuthenticationScheme() { return scheme; } }); return true; } catch (AuthenticationException e) { logger.warn("Error authenticating credentials", e); throw new InternalServerErrorException(); } }
Source:
int getNumHiddenSelected() { int numHidden = 0; for (Integer i: mSelectedPositions) { if (i < mSites.size() && mSites.get(i).isHidden) { numHidden++; } } return numHidden; }

Target:
int getNumHiddenSelected() { int numHidden = 0; for (Integer i: mSelectedPositions) { if (isValidPosition(i) && mSites.get(i).isHidden) { numHidden++; } } return numHidden; }
Source:
public void setUp() { manager = SerializableTransactionManager.create( mockKvs, mockTimelockService, null, null, () -> null, null, null, mockCleaner, mockInitializer, false, () -> 1L, 8, 2, true); when(mockKvs.isInitialized()).thenReturn(true); when(mockTimelockService.isInitialized()).thenReturn(true); when(mockCleaner.isInitialized()).thenReturn(true); when(mockInitializer.isInitialized()).thenReturn(true); }

Target:
public void setUp() { manager = SerializableTransactionManager.create( mockKvs, mockTimelockService, null, null, () -> null, null, null, mockCleaner, mockInitializer, false, () -> 1L, TransactionTestConstants.GET_RANGES_THREAD_POOL_SIZE, TransactionTestConstants.DEFAULT_GET_RANGES_CONCURRENCY, true); when(mockKvs.isInitialized()).thenReturn(true); when(mockTimelockService.isInitialized()).thenReturn(true); when(mockCleaner.isInitialized()).thenReturn(true); when(mockInitializer.isInitialized()).thenReturn(true); }
Source:
private PreambleHandler(Context context, FlowParameters parameters, @StringRes int buttonText) { mContext = context; mFlowParameters = parameters; mButtonText = buttonText; mLinkSpan = new ForegroundColorSpan(ContextCompat.getColor(mContext, R.color.fui_linkColor)); setupCreateAccountPreamble(); }

Target:
private PreambleHandler(Context context, FlowParameters parameters, @StringRes int buttonText) { mContext = context; mFlowParameters = parameters; mButtonText = buttonText; mLinkSpan = new ForegroundColorSpan(ContextCompat.getColor(mContext, R.color.fui_linkColor)); }
Source:
public static BingTile fromQuadKey(String quadKey) { int zoomLevel = quadKey.length(); int tileX = 0; int tileY = 0; for (int i = zoomLevel; i > 0; i--) { int mask = 1 << (i - 1); switch (quadKey.charAt(zoomLevel - i)) { case '0': break; case '1': tileX |= mask; break; case '2': tileY |= mask; break; case '3': tileX |= mask; tileY |= mask; break; default: throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Invalid QuadKey digit sequence."); } } return new BingTile(tileX, tileY, zoomLevel); }

Target:
public static BingTile fromQuadKey(String quadKey) { int zoomLevel = quadKey.length(); checkArgument(zoomLevel <= MAX_ZOOM_LEVEL); int tileX = 0; int tileY = 0; for (int i = zoomLevel; i > 0; i--) { int mask = 1 << (i - 1); switch (quadKey.charAt(zoomLevel - i)) { case '0': break; case '1': tileX |= mask; break; case '2': tileY |= mask; break; case '3': tileX |= mask; tileY |= mask; break; default: throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Invalid QuadKey digit sequence: " + quadKey); } } return new BingTile(tileX, tileY, zoomLevel); }
Source:
public Response<Integer> breakLease() { return this.breakLease(null, null, null); }

Target:
public Response<Duration> breakLease() { return this.breakLease(null, null, null); }
Source:
public Class<?> createFactory(Class<?> cls) { String newClassName = cls.getName() + "Factory"; try { return ClassLoaderUtils.loadClass(newClassName, FactoryClassLoader.class); } catch (ClassNotFoundException e) { } return null; }

Target:
public Class<?> createFactory(Class<?> cls) { String newClassName = cls.getName() + "Factory"; return findClass(newClassName, cls); }
Source:
public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTier = cachingTier; this.authoritativeTier = authoritativeTier; this.cachingTier.addInvalidationListener(new CachingTier.InvalidationListener<K, V>() { @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder, CacheStore.this.cachingTier); } }); }

Target:
public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTier = cachingTier; this.authoritativeTier = authoritativeTier; this.cachingTier.setInvalidationListener(new CachingTier.InvalidationListener<K, V>() { @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder, CacheStore.this.cachingTier); } }); }
Source:
protected void delete(Context context, Integer id) throws AuthorizeException { try { MetadataField metadataField = metadataFieldService.find(context, id); if (metadataField == null) { throw new ResourceNotFoundException("metadata field with id: " + id + " not found"); } metadataFieldService.delete(context, metadataField); } catch (SQLException e) { throw new RuntimeException(e.getMessage(), e); } }

Target:
protected void delete(Context context, Integer id) throws AuthorizeException { try { MetadataField metadataField = metadataFieldService.find(context, id); if (metadataField == null) { throw new ResourceNotFoundException("metadata field with id: " + id + " not found"); } metadataFieldService.delete(context, metadataField); } catch (SQLException e) { throw new RuntimeException("error while trying to delete " + MetadataFieldRest.NAME + " with id: " + id, e); } }
Source:
public void start(BundleContext context) throws Exception { fgBundleContext = context; super.start(context); plugin = this; DEBUG = "true".equals(Platform.getDebugOption("org.eclipse.cdt.dsf.gdb/debug")); fDebugOptions = new GdbDebugOptions(context); }

Target:
public void start(BundleContext context) throws Exception { fgBundleContext = context; super.start(context); plugin = this; new GdbDebugOptions(context); }
Source:
private static AsyncTimelockService createRawAsyncTimelockService( String client, Supplier<ManagedTimestampService> timestampServiceSupplier) { ScheduledExecutorService reaperExecutor = (ScheduledExecutorService) new InstrumentedExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-reaper-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-reaper"); ScheduledExecutorService timeoutExecutor = (ScheduledExecutorService) new InstrumentedExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-timeouts-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-timeouts"); return new AsyncTimelockServiceImpl( AsyncLockService.createDefault(reaperExecutor, timeoutExecutor), timestampServiceSupplier.get()); }

Target:
private static AsyncTimelockService createRawAsyncTimelockService( String client, Supplier<ManagedTimestampService> timestampServiceSupplier) { ScheduledExecutorService reaperExecutor = new InstrumentedScheduledExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-reaper-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-reaper"); ScheduledExecutorService timeoutExecutor = new InstrumentedScheduledExecutorService( Executors.newSingleThreadScheduledExecutor(new ThreadFactoryBuilder() .setNameFormat("async-lock-timeouts-" + client + "-%d") .setDaemon(true) .build()), AtlasDbMetrics.getMetricRegistry(), "async-lock-timeouts"); return new AsyncTimelockServiceImpl( AsyncLockService.createDefault(reaperExecutor, timeoutExecutor), timestampServiceSupplier.get()); }
Source:
public void setOutputChannelName(String outputChannelName) { this.outputChannelName = outputChannelName; }

Target:
public void setOutputChannelName(String outputChannelName) { Assert.hasText(outputChannelName, "'outputChannelName' must not be null or empty"); this.outputChannelName = outputChannelName; }
Source:
public Collection<String> getProductSearchName() { if (aias != null) { return ActionableItems.getNames(aias); } return Collections.emptyList(); }

Target:
public Collection<String> getProductSearchName() { return ActionableItems.getNames(aias); }
Source:
public static FormatStep hostnameFormatStep(final boolean leftJustify, final int minimumWidth, final boolean truncateBeginning, final int maximumWidth, final boolean qualified) { return new SegmentedFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) { public String getSegmentedSubject(final ExtLogRecord record) { final String hostName = record.getHostName(); final int idx = hostName.indexOf('.'); return idx == -1 ? hostName :hostName.substring(0, idx); } }; }

Target:
public static FormatStep hostnameFormatStep(final boolean leftJustify, final int minimumWidth, final boolean truncateBeginning, final int maximumWidth, final boolean qualified) { return qualified ? hostnameFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) : new SegmentedFormatStep(leftJustify, minimumWidth, truncateBeginning, maximumWidth, null) { public String getSegmentedSubject(final ExtLogRecord record) { final String hostName = record.getHostName(); final int idx = hostName.indexOf('.'); return idx == -1 ? hostName :hostName.substring(0, idx); } }; }
Source:
public MethodOutcome createFHIRPatient(@ResourceParam Patient patient) { patient = patientResource.createFHIRPatient(patient); MethodOutcome retVal = new MethodOutcome(); retVal.setId(new IdType(FHIRConstants.PATIENT, patient.getId())); OperationOutcome outcome = new OperationOutcome(); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); coding.setDisplay("Patient is successfully created with"); outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }

Target:
public MethodOutcome createFHIRPatient(@ResourceParam Patient patient) { patient = patientResource.createFHIRPatient(patient); MethodOutcome retVal = new MethodOutcome(); retVal.setId(new IdType(FHIRConstants.PATIENT, patient.getId())); OperationOutcome outcome = new OperationOutcome(); CodeableConcept concept = new CodeableConcept(); Coding coding = concept.addCoding(); coding.setDisplay("Patient is successfully created with id" + patient.getId()); outcome.addIssue().setDetails(concept); retVal.setOperationOutcome(outcome); return retVal; }