auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean matchesValues(Map<String, Object> data) { for (Map.Entry<String, String> entry : includeColumnValues.entrySet()) { String column = entry.getKey(); if (data.containsKey(column)) { String columnValue = entry.getValue(); Object value = data.get(column); if (value == null) return false; String valueString = value.toString(); if (!columnValue.equals(valueString)) return false; } } return true; }

Target:
private boolean matchesValues(Map<String, Object> data) { for (Map.Entry<String, String> entry : includeColumnValues.entrySet()) { String column = entry.getKey(); if (data.containsKey(column)) { String expectedColumnValue = entry.getValue(); Object value = data.get(column); if ("NULL".equals(expectedColumnValue)) { if (value != null && !"null".equals(value) && !"NULL".equals(value)) { return false; } } else { if (value == null || !expectedColumnValue.equals(value.toString())) { return false; } } } } return true; }
Source:
private JButton getBtnOpen() { if (btnOpen == null) { btnOpen = new JButton(); btnOpen.setEnabled(Desktop.getDesktop().isSupported(Desktop.Action.OPEN)); btnOpen.setText(Constant.messages.getString("support.open.button")); btnOpen.setToolTipText(Constant.messages.getString("support.open.button.tooltip")); btnOpen.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { try { Desktop.getDesktop().open(new File(Constant.getZapHome())); } catch (IOException e1) { LOGGER.error("An exception occurred while trying to have the OS open ZAP's Home Directory.", e1); } } }); } return btnOpen; }

Target:
private JButton getBtnOpen() { if (btnOpen == null) { btnOpen = new JButton(); if (Desktop.isDesktopSupported()) { btnOpen.setEnabled(Desktop.getDesktop().isSupported(Desktop.Action.OPEN)); } else { btnOpen.setEnabled(false); } btnOpen.setText(Constant.messages.getString("support.open.button")); btnOpen.setToolTipText(Constant.messages.getString("support.open.button.tooltip")); btnOpen.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { try { Desktop.getDesktop().open(new File(Constant.getZapHome())); } catch (IOException e1) { LOGGER.error("An exception occurred while trying to have the OS open ZAP's Home Directory.", e1); } } }); } return btnOpen; }
Source:
public String volumeSearch(HttpServletRequest request, Model model, @SiteParam Site site, @RequestParam MultiValueMap<String, String> params) throws IOException { CommonParams commonParams = new CommonParams(siteSet, site); commonParams.parseParams(params); commonParams.addToModel(model, request); addOptionsToModel(model); int volume; try { volume = Integer.parseInt(params.getFirst("volume")); } catch (NumberFormatException nfe) { return renderEmptyResults(null, "volume:" + params.getFirst("volume"), model, site); } String volumeFilter = String.format("volume:%d", volume); ArticleSearchQuery.Builder query = ArticleSearchQuery.builder() .setFilterQueries(ImmutableList.of(volumeFilter)); commonParams.fill(query); Map<?, ?> searchResults = solrSearchService.search(query.build()); model.addAttribute("searchResults", solrSearchService.addArticleLinks(searchResults, request, site, siteSet)); model.addAttribute("otherQuery", volumeFilter); model.addAttribute("searchFilters", searchFilterService.getVolumeSearchFilters(volume, commonParams.journalKeys, commonParams.articleTypes, commonParams.dateRange)); return site.getKey() + "/ftl/search/searchResults"; }

Target:
public String volumeSearch(HttpServletRequest request, Model model, @SiteParam Site site, @RequestParam MultiValueMap<String, String> params) throws IOException { CommonParams commonParams = new CommonParams(siteSet, site); commonParams.parseParams(params); commonParams.addToModel(model, request); addOptionsToModel(model); int volume; try { volume = Integer.parseInt(params.getFirst("volume")); } catch (NumberFormatException nfe) { return renderEmptyResults(null, "volume:" + params.getFirst("volume"), model, site); } ArticleSearchQuery query = commonParams.fill(ArticleSearchQuery.builder()).build(); Map<?, ?> searchResults = solrSearchService.searchVolume(query, volume); model.addAttribute("searchResults", solrSearchService.addArticleLinks(searchResults, request, site, siteSet)); model.addAttribute("otherQuery", String.format("volume:%d", volume)); model.addAttribute("searchFilters", searchFilterService.getVolumeSearchFilters(volume, commonParams.journalKeys, commonParams.articleTypes, commonParams.dateRange)); return site.getKey() + "/ftl/search/searchResults"; }
Source:
public DimensionsSpec getDimensionsSpec() { return dimensionsSpec; }

Target:
public DimensionsSpec getDimensionsSpec() { if (dimensionsSpec == null) { dimensionsSpec = computeDimensionsSpec( getTimestampSpec(), Preconditions.checkNotNull(getParser(), "inputRowParser").getParseSpec().getDimensionsSpec(), aggregators ); } return dimensionsSpec; }
Source:
public void triggerNow() { if (updateTimerJob != null) { try { updateTimerJob.cancel(true); } catch (Throwable t) { log.debug("Exception cancelling existing job: {}", ExceptionUtils.getRootCauseMessage(t)); } } updateTimerJob = schedulerService.scheduleWithFixedDelay(this::ovfUpdate, 0, Config.<Integer> getValue(ConfigValues.OvfUpdateIntervalInMinutes), TimeUnit.MINUTES); }

Target:
public void triggerNow() { if (updateTimerJob != null) { try { updateTimerJob.cancel(false); } catch (Throwable t) { log.debug("Exception cancelling existing job: {}", ExceptionUtils.getRootCauseMessage(t)); } } updateTimerJob = schedulerService.scheduleWithFixedDelay(this::ovfUpdate, 0, Config.<Integer> getValue(ConfigValues.OvfUpdateIntervalInMinutes), TimeUnit.MINUTES); }
Source:
public HttpResponse doDisable(StaplerRequest req) throws IOException { LOGGER.finest("Trying to disable all jobs in " + item.getName()); for (Job job : getPossibleJobs()) { try { ((AbstractProject) job).disable(); LOGGER.finest("Set " + job.getName() + " as not buildable"); } catch (ClassCastException e) { LOGGER.info("Cannot disable " + job.getName()); LOGGER.fine(e.getMessage()); } } return HttpResponses.redirectViaContextPath(item.getParent().getUrl() + item.getShortUrl()); }

Target:
public HttpResponse doDisable(StaplerRequest req) throws IOException { LOGGER.finest("Trying to disable all jobs in " + item.getName()); Collection<Job> missed = Lists.newArrayList(); for (Job job : getPossibleJobs()) { try { ((AbstractProject) job).disable(); LOGGER.finest("Set " + job.getName() + " as not buildable"); missed.add(job); } catch (ClassCastException e) { LOGGER.info("Cannot disable " + job.getName()); LOGGER.info(e.getMessage()); } } if (!missed.isEmpty()) { return HttpResponses.forwardToView(this, "error").with("missed", missed); } return HttpResponses.redirectViaContextPath(item.getParent().getUrl() + item.getShortUrl()); }
Source:
public void checkForHashes (HttpMessage msg, int id, String haystacks) { String hashType = null; Iterator<Pattern> patternIterator = hashPatterns.keySet().iterator(); int minimumConfidence = Alert.CONFIDENCE_LOW; switch (this.getAlertThreshold()) { case HIGH: minimumConfidence = Alert.CONFIDENCE_HIGH; break; case MEDIUM: minimumConfidence = Alert.CONFIDENCE_MEDIUM; break; } while (patternIterator.hasNext()) { Pattern hashPattern = patternIterator.next(); HashAlert hashalert = hashPatterns.get(hashPattern); if (hashalert.getReliability() < minimumConfidence) continue; hashType = hashalert.getDescription(); if (log.isDebugEnabled()) log.debug("Trying Hash Pattern: " + hashPattern + " for hash type " + hashType); for (String haystack: haystacks) { Matcher matcher = hashPattern.matcher(haystack); while (matcher.find()) { String evidence = matcher.group(); if (log.isDebugEnabled()) log.debug("Found a match for hash type " + hashType + ":" + evidence); if (evidence != null && evidence.length() > 0) { Alert alert = new Alert(getPluginId(), hashalert.getRisk(), hashalert.getReliability(), getName() + " - "+ hashType ); alert.setDetail( getDescription() + " - " + hashType, msg.getRequestHeader().getURI().toString(), "", "", getExtraInfo(msg, evidence), getSolution(), getReference(), evidence, 200, 13, msg); parent.raiseAlert(id, alert); } } } } }

Target:
public void checkForHashes(HttpMessage msg, int id, String haystacks) { String hashType = null; Iterator<Pattern> patternIterator = hashPatterns.keySet().iterator(); int minimumConfidence = Alert.CONFIDENCE_LOW; switch (this.getAlertThreshold()) { case HIGH: minimumConfidence = Alert.CONFIDENCE_HIGH; break; case MEDIUM: minimumConfidence = Alert.CONFIDENCE_MEDIUM; break; } while (patternIterator.hasNext()) { Pattern hashPattern = patternIterator.next(); HashAlert hashalert = hashPatterns.get(hashPattern); if (hashalert.getReliability() < minimumConfidence) { continue; } hashType = hashalert.getDescription(); if (log.isDebugEnabled()) log.debug("Trying Hash Pattern: " + hashPattern + " for hash type " + hashType); for (String haystack: haystacks) { Matcher matcher = hashPattern.matcher(haystack); while (matcher.find()) { String evidence = matcher.group(); if (log.isDebugEnabled()) log.debug("Found a match for hash type " + hashType + ":" + evidence); if (evidence != null && evidence.length() > 0) { Alert alert = new Alert(getPluginId(), hashalert.getRisk(), hashalert.getReliability(), getName() + " - " + hashType); alert.setDetail( getDescription() + " - " + hashType, msg.getRequestHeader().getURI().toString(), "", "", getExtraInfo(msg, evidence), getSolution(), getReference(), evidence, 200, 13, msg); parent.raiseAlert(id, alert); } } } } }
Source:
public long getToDate() { if (this.q == null || !this.q.isToDateInQuery) { return TimeHelper.now(0.0).getTimeInMillis(); } else { return this.q.toDateValue; } }

Target:
public long getToDate() { if (this.q == null || !this.q.isToDateInQuery) { return TimeHelper.now(0.0).getTimeInMillis(); } return this.q.toDateValue; }
Source:
private static void appendToFile(String fileName, String fileContent) { try { File file = new File(fileName); if (!file.exists()) { file.createNewFile(); } FileWriter fw = new FileWriter(file.getAbsoluteFile(), true); try (BufferedWriter bw = new BufferedWriter(fw)) { bw.write(fileContent); } } catch (IOException e) { e.printStackTrace(); } }

Target:
private static void appendToFile(String fileName, String fileContent) { try { File file = new File(fileName); if (!file.exists()) { file.createNewFile(); } try (BufferedWriter bw = new BufferedWriter(new FileWriter(file.getAbsoluteFile(), true))) { bw.write(fileContent); } } catch (IOException e) { e.printStackTrace(); } }
Source:
public void onStart() { super.onStart(); if (handled || connection == null) { return; } handled = true; Intent intent = getActivity().getIntent(); String pluginUrl; switch (intent.getAction()) { case Intent.ACTION_SEND: String extraText = intent.getStringExtra(Intent.EXTRA_TEXT); pluginUrl = YOUTUBE_APP.urlFrom(extraText); pluginUrl = pluginUrl != null ? pluginUrl : TWITCH_APP.urlFrom(extraText); break; case Intent.ACTION_VIEW: pluginUrl = GENERIC.urlFrom(intent.getDataString()); break; default: return; } if (pluginUrl == null) { say(R.string.error_share_video); return; } final Handler h = new Handler(); final String file = pluginUrl; isPlayingVideo(h).start(new OnFinish<Boolean>() { @Override public void got(Boolean isPlaying) { if (isPlaying) { new Seq<>(enqueue(h, file)) .then(hostNotify(h, getString(R.string.shared_video_added))) .start(refreshPlaylist()); } else { new Seq<>(clearPlaylist(h)) .then(enqueue(h, file)) .then(play(h)) .start(refreshPlaylist()); } } }); }

Target:
public void onStart() { super.onStart(); Intent intent = getActivity().getIntent(); String action = intent.getAction(); if (handled || connection == null || action == null) { return; } handled = true; String pluginUrl; switch (action) { case Intent.ACTION_SEND: pluginUrl = urlFrom(intent.getStringExtra(Intent.EXTRA_TEXT)); break; case Intent.ACTION_VIEW: pluginUrl = urlFrom(intent.getDataString()); break; default: return; } if (pluginUrl == null) { say(R.string.error_share_video); return; } final Handler handler = new Handler(); final String file = pluginUrl; isPlayingVideo(handler).start(new Task.OnFinish<Boolean>() { @Override public void got(Boolean isPlaying) { if (isPlaying) { new Task.Sequence<>(enqueue(handler, file)) .then(hostNotify(handler, getString(R.string.shared_video_added))) .start(refreshPlaylist()); } else { new Task.Sequence<>(clearPlaylist(handler)) .then(enqueue(handler, file)) .then(play(handler)) .start(refreshPlaylist()); } } }); }
Source:
private void getStreams(ReceiveResponse receiveResponse, Writer out, Writer err) { List<StreamType> streams = receiveResponse.getStream(); for (StreamType s : streams) { byte[] value = s.getValue(); if (value == null) continue; if (out != null && "stdout".equals(s.getName())) { try { if (value.length > 0) { out.write(new String(value)); } if (Boolean.TRUE.equals(s.isEnd())) { out.close(); } } catch (IOException e) { throw new IllegalStateException(e); } } if (err != null && "stderr".equals(s.getName())) { try { if (value.length > 0) { err.write(new String(value)); } if (Boolean.TRUE.equals(s.isEnd())) { err.close(); } } catch (IOException e) { throw new IllegalStateException(e); } } } }

Target:
private void getStreams(ReceiveResponse receiveResponse, Writer out, Writer err) { List<StreamType> streams = receiveResponse.getStream(); for (StreamType s : streams) { byte[] value = s.getValue(); if (value == null) continue; if (out != null && "stdout".equals(s.getName())) { try { if (value.length > 0) { out.write(new String(value)); } if (Boolean.TRUE.equals(s.isEnd())) { out.close(); } } catch (IOException e) { throw new IllegalStateException(e); } } if (err != null && "stderr".equals(s.getName())) { try { if (value.length > 0) { err.write(new String(value)); } if (Boolean.TRUE.equals(s.isEnd())) { err.close(); } } catch (IOException e) { throw new IllegalStateException(e); } } } try { out.close(); err.close(); } catch (IOException e) { throw new IllegalStateException(e); } }
Source:
protected HttpAction redirectToOriginallyRequestedUrl(final C context, final String defaultUrl) { final String requestedUrl = (String) context.getSessionStore().get(context, Pac4jConstants.REQUESTED_URL).get(); String redirectUrl = defaultUrl; if (isNotBlank(requestedUrl)) { context.getSessionStore().set(context, Pac4jConstants.REQUESTED_URL, null); redirectUrl = requestedUrl; } logger.debug("redirectUrl: {}", redirectUrl); return HttpAction.redirect(context, redirectUrl); }

Target:
protected HttpAction redirectToOriginallyRequestedUrl(final C context, final String defaultUrl) { final Optional<String> requestedUrlOpt = context.getSessionStore().get(context, Pac4jConstants.REQUESTED_URL); String redirectUrl = requestedUrlOpt.filter(url -> isNotBlank(url)).orElse(defaultUrl); if (!defaultUrl.equals(redirectUrl)) { context.getSessionStore().set(context, Pac4jConstants.REQUESTED_URL, null); } logger.debug("redirectUrl: {}", redirectUrl); return HttpAction.redirect(context, redirectUrl); }
Source:
public ConfigDiff buildConfigDiff(PluginTask task, Schema schema, int taskCount, List<TaskReport> taskReports) { ConfigDiff configDiff = super.buildConfigDiff(task, schema, taskCount, taskReports); if (task.getQueryBy().isPresent() && task.getQueryBy().get() == QueryBy.DATE_RANGE && task.getIncremental()) { DateTime earliest = new DateTime(task.getEarliestUpdatedAt().get()); DateTime latest = new DateTime(task.getLatestUpdatedAt().get()); Duration d = new Duration(earliest, latest); DateTime nextEarliestUpdatedAt = latest.plusSeconds(1); configDiff.set("earliest_updated_at", nextEarliestUpdatedAt.toString(DATE_FORMATER)); if (task.getReportDuration().isPresent()) { configDiff.set("report_duration", task.getReportDuration()); } else { configDiff.set("report_duration", Optional.of(d.getMillis())); } } return configDiff; }

Target:
public ConfigDiff buildConfigDiff(PluginTask task, Schema schema, int taskCount, List<TaskReport> taskReports) { ConfigDiff configDiff = super.buildConfigDiff(task, schema, taskCount, taskReports); if (task.getQueryBy().isPresent() && task.getQueryBy().get() == QueryBy.DATE_RANGE && task.getIncremental()) { DateTime earliest = new DateTime(task.getEarliestUpdatedAt().get()); DateTime latest = new DateTime(task.getLatestUpdatedAt().get()); Duration d = new Duration(earliest, latest); DateTime nextEarliestUpdatedAt = latest.plusSeconds(1); configDiff.set("earliest_updated_at", nextEarliestUpdatedAt.toString(DATE_FORMATTER)); configDiff.set("report_duration", task.getReportDuration().or(d.getMillis())); } return configDiff; }
Source:
private static Collection<String> getErrorParserContexts(String id) { Set<String> contexts = fErrorParserContexts.get(id); if (contexts == null) { return Collections.singleton(ErrorParserManager.BUILD_CONTEXT); } return contexts; }

Target:
private static Collection<String> getErrorParserContexts(String id) { Set<String> contexts = fErrorParserContexts.get(id); if (contexts == null) { return Collections.singletonList(ErrorParserManager.BUILD_CONTEXT); } return contexts; }
Source:
public void close() { if (_closed) { LOG.debug("Iterator was already closed. Ignoring current close command."); return; } try { _rs.close(); _stmt.executeUpdate(new SqlStringBuilder().append("HANDLER ") .appendIdent(_source.getTableName(), "Iterator") .append(" CLOSE") .toString()); _stmt.close(); _conn.close(); } catch (SQLException e) { } _closed = true; }

Target:
public void close() { if (_closed) { LOG.debug("Iterator was already closed. Ignoring current close command."); return; } try { _rs.close(); _stmt.executeUpdate(new SqlStringBuilder().append("HANDLER ") .appendIdent(_source.getTableName(), "Iterator") .append(" CLOSE") .toString()); } catch (SQLException e) { LOG.warn("Closing the handler threw an exception", e); } finally { try { _stmt.close(); _conn.close(); } catch (SQLException e) { LOG.warn("Closing the Mysql connnection threw an exception", e); } _closed = true; } }
Source:
public OsExecutionGraphProvider(ITmfTrace trace) { super(trace, "LTTng Kernel"); fSystem = new OsSystemModel(); IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(TMF_GRAPH_HANDLER_ID); for (IConfigurationElement ce : config) { String elementName = ce.getName(); if (elementName.equals(HANDLER)) { IOsExecutionGraphHandlerBuilder builder; try { builder = (IOsExecutionGraphHandlerBuilder) ce.createExecutableExtension(ATTRIBUTE_CLASS); } catch (CoreException e1) { Activator.getDefault().logWarning("Error create execution graph handler builder", e1); continue; } String priorityStr = ce.getAttribute(ATTRIBUTE_PRIORITY); int priority = DEFAULT_PRIORITY; try { priority = Integer.valueOf(priorityStr); } catch (NumberFormatException e) { } ITraceEventHandler handler = builder.createHandler(this, priority); registerHandler(handler); } } }

Target:
public OsExecutionGraphProvider(ITmfTrace trace) { super(trace, "LTTng Kernel"); fSystem = new OsSystemModel(); IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(TMF_GRAPH_HANDLER_ID); for (IConfigurationElement ce : config) { String elementName = ce.getName(); if (HANDLER.equals(elementName)) { IOsExecutionGraphHandlerBuilder builder; try { builder = (IOsExecutionGraphHandlerBuilder) ce.createExecutableExtension(ATTRIBUTE_CLASS); } catch (CoreException e1) { Activator.getDefault().logWarning("Error create execution graph handler builder", e1); continue; } String priorityStr = ce.getAttribute(ATTRIBUTE_PRIORITY); int priority = DEFAULT_PRIORITY; try { priority = Integer.valueOf(priorityStr); } catch (NumberFormatException e) { } ITraceEventHandler handler = builder.createHandler(this, priority); registerHandler(handler); } } }
Source:
public String[] getHiveArgs(String... args) throws IOException { List<String> newArgs = new LinkedList<>(); newArgs.addAll(Arrays.asList(args)); addHiveConfigs(hiveConf, conf); if (conf.getBoolean(HIVE_SASL_ENABLED, false)) { newArgs.add("--hiveconf"); newArgs.add("hive.metastore.sasl.enabled=true"); } return newArgs.toArray(new String[newArgs.size()]); }

Target:
private String[] getHiveArgs(String... args) throws IOException { List<String> newArgs = new LinkedList<>(); newArgs.addAll(Arrays.asList(args)); if (hiveConf.getBoolean(HIVE_SASL_ENABLED, false)) { newArgs.add("--hiveconf"); newArgs.add("hive.metastore.sasl.enabled=true"); } return newArgs.toArray(new String[newArgs.size()]); }
Source:
public void writeTo(ObjectOutput output) throws IOException { output.writeObject(key); output.writeObject(f); Params.writeObject(output, params); output.writeObject(encodingClasses); }

Target:
public void writeTo(ObjectOutput output) throws IOException { output.writeObject(key); output.writeObject(f); Params.writeObject(output, params); EncodingClasses.writeTo(output, encodingClasses); }
Source:
public IsWidget getWidget() { return (getView() == null) ? null : getView().asWidget(); }

Target:
public Widget getWidget() { return asWidget(); }
Source:
private Boolean areTransparencyAttestationsEqual(TransparencyAttestationDTO a, TransparencyAttestationDTO b) { if (a == null || b == null) { return true; } else { return StringUtils.equals(a.getTransparencyAttestation(), b.getTransparencyAttestation()); } }

Target:
private Boolean areTransparencyAttestationsEqual(TransparencyAttestationDTO a, TransparencyAttestationDTO b) { if (a == null && b == null) { return true; } else if (a == null || b == null) { return false; } else { return StringUtils.equals(a.getTransparencyAttestation(), b.getTransparencyAttestation()); } }
Source:
public void addPartitionToFactStorage(GrillSessionHandle sessionid, String fact, String storageName, XPartition partition) throws GrillException { acquire(sessionid); try { CubeFactTable factTable = checkFactStorage(sessionid, fact, storageName); getClient(sessionid).addPartition( JAXBUtils.storagePartSpecFromXPartition(partition), storageName); LOG.info("Added partition for fact " + fact + " on storage:" + storageName + " dates: " + partition.getTimePartitionSpec() + " spec:" + partition.getNonTimePartitionSpec() + " update period: " + partition.getUpdatePeriod()); } catch (HiveException exc) { throw new GrillException(exc); } finally { release(sessionid); } }

Target:
public void addPartitionToFactStorage(GrillSessionHandle sessionid, String fact, String storageName, XPartition partition) throws GrillException { try { acquire(sessionid); CubeFactTable factTable = checkFactStorage(sessionid, fact, storageName); getClient(sessionid).addPartition( JAXBUtils.storagePartSpecFromXPartition(partition), storageName); LOG.info("Added partition for fact " + fact + " on storage:" + storageName + " dates: " + partition.getTimePartitionSpec() + " spec:" + partition.getNonTimePartitionSpec() + " update period: " + partition.getUpdatePeriod()); } catch (HiveException exc) { throw new GrillException(exc); } finally { release(sessionid); } }
Source:
public Object apply(ProjectResource rsrc, Input input) throws UnprocessableEntityException, ResourceConflictException, OrmException, IOException { Project project = rsrc.getControl().getProject(); if (project.getName().endsWith(AllProjectsNameProvider.DEFAULT)) { throw new UnprocessableEntityException(AllProjectsNameProvider.DEFAULT); } try { databaseDeleteHandler.assertCanDelete(project); } catch (CannotDeleteProjectException e) { throw new UnprocessableEntityException(e.getMessage()); } if (input == null || !input.force) { Collection<String> warnings = databaseDeleteHandler.getWarnings(project); if (warnings != null && !warnings.isEmpty()) { throw new ResourceConflictException(String .format("Project %s has open changes", project.getName())); } } databaseDeleteHandler.delete(project); filesystemDeleteHandler.delete(project, input == null ? false : input.preserve); cacheDeleteHandler.delete(project); return Response.none(); }

Target:
public Object apply(ProjectResource rsrc, Input input) throws ResourceConflictException, OrmException, IOException, MethodNotAllowedException { Project project = rsrc.getControl().getProject(); if (project.getNameKey().equals(allProjectsName)) { throw new MethodNotAllowedException(); } try { databaseDeleteHandler.assertCanDelete(project); } catch (CannotDeleteProjectException e) { throw new ResourceConflictException(e.getMessage()); } if (input == null || !input.force) { Collection<String> warnings = databaseDeleteHandler.getWarnings(project); if (warnings != null && !warnings.isEmpty()) { throw new ResourceConflictException(String.format( "Project %s has open changes", project.getName())); } } databaseDeleteHandler.delete(project); filesystemDeleteHandler.delete(project, input == null ? false : input.preserve); cacheDeleteHandler.delete(project); return Response.none(); }
Source:
private void writePowerEvents() { if (volatileRun) { writer.writeStartElement("on_reboot"); writer.writeRaw("destroy"); writer.writeEndElement(); } }

Target:
private void writePowerEvents() { if (volatileRun) { writer.writeElement("on_reboot", "destroy"); } }
Source:
public int[] getDeleteDbOrds(int ord) { dumpChanges(); Timber.d("getDeleteDbOrds()"); int[] deletedDbOrds = new int[0]; for (int i = 0; i <= mTemplateChanges.size(); i++) { int ordinalAdjustment = 0; Object[] currentChange = { ord, ChangeType.DELETE }; if (i < mTemplateChanges.size()) { currentChange = mTemplateChanges.get(i); } if (currentChange[1] != ChangeType.DELETE) { continue; } for (int j = 0; j < i; j++) { Object[] previousChange = mTemplateChanges.get(j); if ((previousChange[1] == ChangeType.DELETE) && ((int)previousChange[0] <= (int)currentChange[0])) { ordinalAdjustment++; } } deletedDbOrds = Arrays.copyOf(deletedDbOrds, deletedDbOrds.length + 1); deletedDbOrds[deletedDbOrds.length-1] = (int)currentChange[0] + ordinalAdjustment; } return deletedDbOrds; }

Target:
public int[] getDeleteDbOrds(int ord) { dumpChanges(); Timber.d("getDeleteDbOrds()"); ArrayList<Integer> deletedDbOrds = new ArrayList<>(); for (int i = 0; i <= mTemplateChanges.size(); i++) { int ordinalAdjustment = 0; Object[] currentChange = { ord, ChangeType.DELETE }; if (i < mTemplateChanges.size()) { currentChange = mTemplateChanges.get(i); } if (currentChange[1] != ChangeType.DELETE) { continue; } for (int j = 0; j < i; j++) { Object[] previousChange = mTemplateChanges.get(j); if ((previousChange[1] == ChangeType.DELETE) && ((int)previousChange[0] <= (int)currentChange[0])) { ordinalAdjustment++; } } deletedDbOrds.add((int)currentChange[0] + ordinalAdjustment); } int[] deletedDbOrdInts = new int[deletedDbOrds.size()]; for (int i = 0; i < deletedDbOrdInts.length; i++) { deletedDbOrdInts[i] = (deletedDbOrds.get(i)); } return deletedDbOrdInts; }
Source:
private void fetchRelatedEntities(GlusterVolumeEntity volume) { if (volume != null) { volume.setOptions(dbFacade.getGlusterOptionDao().getOptionsOfVolume(volume.getId())); volume.setAccessProtocols(new HashSet<AccessProtocol>(getAccessProtocolsOfVolume(volume.getId()))); volume.setTransportTypes(new HashSet<TransportType>(getTransportTypesOfVolume(volume.getId()))); volume.setAsyncTask(getAsyncTaskOfVolume(volume.getId())); List<GlusterBrickEntity> bricks = dbFacade.getGlusterBrickDao().getBricksOfVolume(volume.getId()); if (volume.getAsyncTask()!=null && volume.getAsyncTask().getTaskId() != null) { for (GlusterBrickEntity brick: bricks) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getTaskId().equals(volume.getAsyncTask().getTaskId())) { brick.setAsyncTask(volume.getAsyncTask()); } } } volume.setBricks(bricks); } }

Target:
private void fetchRelatedEntities(GlusterVolumeEntity volume) { if (volume != null) { volume.setOptions(dbFacade.getGlusterOptionDao().getOptionsOfVolume(volume.getId())); volume.setAccessProtocols(new HashSet<AccessProtocol>(getAccessProtocolsOfVolume(volume.getId()))); volume.setTransportTypes(new HashSet<TransportType>(getTransportTypesOfVolume(volume.getId()))); volume.setAsyncTask(getAsyncTaskOfVolume(volume.getId())); List<GlusterBrickEntity> bricks = dbFacade.getGlusterBrickDao().getBricksOfVolume(volume.getId()); if (volume.getAsyncTask()!=null && volume.getAsyncTask().getTaskId() != null) { for (GlusterBrickEntity brick: bricks) { if (brick.getAsyncTask() != null && brick.getAsyncTask().getTaskId() != null && brick.getAsyncTask().getTaskId().equals(volume.getAsyncTask().getTaskId())) { brick.setAsyncTask(volume.getAsyncTask()); } } } volume.setBricks(bricks); } }
Source:
protected void checkAdditionalConstraints() { InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); int numOfQuestionsToGet = data.bundle.questionResponseBundle.size(); for (int questionIndx = 1; questionIndx <= numOfQuestionsToGet; questionIndx++) { String questionId = HttpRequestHelper.getValueFromParamMap( requestParameters, Const.ParamsNames.FEEDBACK_QUESTION_ID + "-" + questionIndx); if (questionId == null) { continue; } FeedbackQuestionAttributes questionAttributes = data.bundle.getQuestionAttributes(questionId); if (questionAttributes == null) { statusToUser.add(new StatusMessage("The feedback session or questions may have changed while you were submitting. " + "Please check your responses to make sure they are saved correctly.", StatusMessageColor.WARNING)); isError = true; log.warning("Question not found. (deleted or invalid id passed?) id: "+ questionId + " index: " + questionIndx); continue; } boolean isGiverVisibleToInstructors = questionAttributes.showGiverNameTo.contains(FeedbackParticipantType.INSTRUCTORS); boolean isRecipientVisibleToInstructors = questionAttributes.showRecipientNameTo.contains(FeedbackParticipantType.INSTRUCTORS); boolean isResponseVisibleToInstructors = questionAttributes.showResponsesTo.contains(FeedbackParticipantType.INSTRUCTORS); if (!isResponseVisibleToInstructors || !isGiverVisibleToInstructors || !isRecipientVisibleToInstructors) { isError = true; throw new UnauthorizedAccessException( "Feedback session [" + feedbackSessionName + "] question [" + questionAttributes.getId() + "] is not accessible to instructor ["+ instructor.email + "]"); } } }

Target:
protected void checkAdditionalConstraints() { InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); int numOfQuestionsToGet = data.bundle.questionResponseBundle.size(); for (int questionIndx = 1; questionIndx <= numOfQuestionsToGet; questionIndx++) { String paramMapKey = Const.ParamsNames.FEEDBACK_QUESTION_ID + "-" + questionIndx; String questionId = HttpRequestHelper.getValueFromParamMap(requestParameters, paramMapKey); if (questionId == null) { continue; } FeedbackQuestionAttributes questionAttributes = data.bundle.getQuestionAttributes(questionId); if (questionAttributes == null) { statusToUser.add(new StatusMessage("The feedback session or questions may have changed while you were submitting. " + "Please check your responses to make sure they are saved correctly.", StatusMessageColor.WARNING)); isError = true; log.warning("Question not found in Feedback Session [" + feedbackSessionName + "] of Course ID [" + courseId + "]." + "(deleted or invalid id passed?) id: "+ questionId + " index: " + questionIndx); continue; } checkSessionQuestionAccessPermission(instructor, questionAttributes); } }
Source:
public @Nullable ClassSymbol findClassInPackage(String name, PackageSymbol pck, TreePath path) { Log.DiagnosticHandler discardDiagnosticHandler = new Log.DiscardDiagnosticHandler(log); try { Env<AttrContext> env = getEnvForPath(path); Element res = wrapInvocationOnResolveInstance( FIND_IDENT_IN_PACKAGE, env, pck, names.fromString(name), Kinds.KindSelector.TYP); if (res.getKind().isClass() || res.getKind().isInterface()) { return (ClassSymbol) res; } else { return null; } } finally { log.popDiagnosticHandler(discardDiagnosticHandler); } }

Target:
public @Nullable ClassSymbol findClassInPackage(String name, PackageSymbol pck, TreePath path) { Log.DiagnosticHandler discardDiagnosticHandler = new Log.DiscardDiagnosticHandler(log); try { Env<AttrContext> env = getEnvForPath(path); Element res = wrapInvocationOnResolveInstance( FIND_IDENT_IN_PACKAGE, env, pck, names.fromString(name), Kinds.KindSelector.TYP); if (ElementUtils.isClassElement(res)) { return (ClassSymbol) res; } else { return null; } } finally { log.popDiagnosticHandler(discardDiagnosticHandler); } }
Source:
private Warning<RangeHighlighterEx> createWarningFromRangeHighlighter(@NotNull RangeHighlighterEx rangeHighlighterEx, DateTime creationTime) { final DateTime now = DateTime.now(); return new Warning<>( rangeHighlighterEx, getLineNumberForHighlighter(rangeHighlighterEx), now.toDate(), creationTime == null ? -1 : Seconds.secondsBetween(creationTime, now).getSeconds() ); }

Target:
private Warning<RangeHighlighterEx> createWarningFromRangeHighlighter(@NotNull RangeHighlighterEx rangeHighlighterEx, DateTime creationTime) { final DateTime now = DateTime.now(); int seconds; if (creationTime == null) { seconds = -1; } else { seconds = Seconds.secondsBetween(creationTime, now).getSeconds(); } return new Warning<>( rangeHighlighterEx, getLineNumberForHighlighter(rangeHighlighterEx), now.toDate(), seconds ); }
Source:
public static String visibilityName(int visibility) { switch (visibility) { case ICPPClassType.v_private: return "private"; case ICPPClassType.v_protected: return "protected"; case ICPPClassType.v_public: return "public"; default: throw new IllegalArgumentException("illegal visibility: " + visibility); } }

Target:
public static String visibilityName(int visibility) { switch (visibility) { case ICPPClassType.v_private: return "private"; case ICPPClassType.v_protected: return "protected"; case ICPPClassType.v_public: return "public"; default: throw new IllegalArgumentException("Illegal visibility: " + visibility); } }
Source:
public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOG.warn("Ignite does not support scan semantics"); return Status.OK; }

Target:
public Status scan(String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { LOG.warn("Ignite does not support scan semantics"); return Status.NOT_IMPLEMENTED; }
Source:
private boolean isSAM(ClassTree classBody) { if(hasOnlyOneMethod(classBody.members()) && classBody.symbol().isTypeSymbol()) { JavaSymbol.TypeJavaSymbol symbol = (JavaSymbol.TypeJavaSymbol) classBody.symbol(); return symbol.getInterfaces().size() == 1 && symbol.getSuperclass().is("java.lang.Object"); } return false; }

Target:
private static boolean isSAM(ClassTree classBody) { if(hasOnlyOneMethod(classBody.members()) && classBody.symbol().isTypeSymbol()) { JavaSymbol.TypeJavaSymbol symbol = (JavaSymbol.TypeJavaSymbol) classBody.symbol(); return symbol.getInterfaces().size() == 1 && symbol.getSuperclass().is("java.lang.Object"); } return false; }
Source:
public void configure(Map<String, ?> configs) { this.name = (String) configs.get(NAME_CONFIG_KEY); }

Target:
public void configure(Map<String, ?> configs) { this.name = new SimpleConfig(config(), configs).getString(NAME_CONFIG); }
Source:
public static long parseTimestampWithoutTimeZone(String value) { LocalDateTime localDateTime = TIMESTAMP_WITH_OR_WITHOUT_TIME_ZONE_FORMATTER.parseLocalDateTime(value); try { return (Long) getLocalMillis.invoke(localDateTime); } catch (Throwable e) { throw new RuntimeException(e); } }

Target:
public static long parseTimestampWithoutTimeZone(String value) { LocalDateTime localDateTime = TIMESTAMP_WITH_OR_WITHOUT_TIME_ZONE_FORMATTER.parseLocalDateTime(value); try { return (long) getLocalMillis.invokeExact(localDateTime); } catch (Throwable e) { throw new RuntimeException(e); } }
Source:
public void unBanUser(String userName, WebDriver driver) { WebElement unbanLink = driver.findElement(By.xpath( String.format(userUnbanLink, userName) )); waitForElementByElement(unbanLink); unbanLink.click(); verifyChatUnbanMessage(userName); PageObjectLogging.log("unBanUser", userName+" is no longer banned", true, driver); }

Target:
public void unBanUser(String userName, WebDriver driver) { WebElement unbanLink = driver.findElement(By.xpath( String.format(userUnbanLink, userName) )); waitForElementByElement(unbanLink); unbanLink.click(); verifyChatUnbanMessage(userName); PageObjectLogging.log("unBanUser", userName+" is no longer banned", true); }
Source:
protected void executeCommand() { final VDS vds = getVds(); try (EngineLock monitoringLock = acquireMonitorLock("Activate host")) { executionHandler.updateSpecificActionJobCompleted(vds.getId(), ActionType.MaintenanceVds, false); setSucceeded(setVdsStatus(VDSStatus.Unassigned).getSucceeded()); if (getSucceeded()) { TransactionSupport.executeInNewTransaction(() -> { List<Network> networks = networkDao.getAllForCluster(vds.getClusterId()); networkClusterHelper.setStatus(vds.getClusterId(), networks); return null; }); if (vds.getClusterSupportsGlusterService()) { runVdsCommand(VDSCommandType.ManageGlusterService, new GlusterServiceVDSParameters(vds.getId(), Arrays.asList("glusterd"), "restart")); GlusterStatus isRunning = glusterUtil.isVDORunning(vds.getId()); switch (isRunning) { case DOWN: log.info("VDO service is down in host : '{}' , starting VDO service", vds.getId()); startVDOService(vds); break; case UP: log.info("VDO service is up in host : '{}' , skipping starting of VDO service", vds.getId()); break; case UNKNOWN: log.info("VDO service is not installed host : '{}' , ignoring to start VDO service", vds.getId()); break; } } } } }

Target:
protected void executeCommand() { final VDS vds = getVds(); try (EngineLock monitoringLock = acquireMonitorLock("Activate host")) { executionHandler.updateSpecificActionJobCompleted(vds.getId(), ActionType.MaintenanceVds, false); setSucceeded(setVdsStatus(VDSStatus.Unassigned).getSucceeded()); if (getSucceeded()) { TransactionSupport.executeInNewTransaction(() -> { List<Network> networks = networkDao.getAllForCluster(vds.getClusterId()); networkClusterHelper.setStatus(vds.getClusterId(), networks); return null; }); if (vds.getClusterSupportsGlusterService()) { runVdsCommand(VDSCommandType.ManageGlusterService, new GlusterServiceVDSParameters(vds.getId(), Arrays.asList("glusterd"), "restart")); GlusterStatus isRunning = glusterUtil.isVDORunning(vds.getId()); switch (isRunning) { case DOWN: log.info("VDO service is down in host : '{}' with id '{}', starting VDO service", vds.getHostName(), vds.getId()); startVDOService(vds); break; case UP: log.info("VDO service is up in host : '{}' with id '{}', skipping starting of VDO service", vds.getHostName(), vds.getId()); break; case UNKNOWN: log.info("VDO service is not installed host : '{}' with id '{}', ignoring to start VDO service", vds.getHostName(), vds.getId()); break; } } } } }
Source:
public Vector<Resource> getLazyResources() { return storage.getRecordsForValues(new String[]{Resource.META_INDEX_LAZY}, new Boolean[]{true}); }

Target:
public Vector<Resource> getLazyResources() { return storage.getRecordsForValues(new String[]{Resource.META_INDEX_LAZY}, new String[]{LAZY_VAL_TRUE}); }
Source:
public void setup() { nextProbeId = 0; method = new MethodNode(InstrSupport.ASM_API_VERSION) { private final Set<Label> visitedLabels = new HashSet<Label>(); @Override public void visitLabel(final Label label) { visitedLabels.add(label); super.visitLabel(label); } @Override public void visitLineNumber(final int line, final Label start) { assertTrue(visitedLabels.contains(start)); super.visitLineNumber(line, start); } }; method.tryCatchBlocks = new ArrayList<TryCatchBlockNode>(); probes = new boolean[32]; }

Target:
public void setup() { nextProbeId = 0; method = new MethodNode(); method.tryCatchBlocks = new ArrayList<TryCatchBlockNode>(); probes = new boolean[32]; }
Source:
public void shouldThrowExceptionIfNoTypeMappingWasFoundWithoutAffectingContentProviderBlocking() { final StorIOContentResolver storIOContentResolver = mock(StorIOContentResolver.class); final StorIOContentResolver.Internal internal = mock(StorIOContentResolver.Internal.class); when(storIOContentResolver.internal()).thenReturn(internal); when(storIOContentResolver.delete()).thenReturn(new PreparedDelete.Builder(storIOContentResolver)); final PreparedDelete<DeleteResult> preparedDelete = storIOContentResolver .delete() .object(TestItem.newInstance()) .prepare(); try { preparedDelete.executeAsBlocking(); fail(); } catch (StorIOException expected) { } verify(storIOContentResolver).delete(); verify(storIOContentResolver).internal(); verify(internal).typeMapping(TestItem.class); verify(internal, never()).delete(any(DeleteQuery.class)); verifyNoMoreInteractions(storIOContentResolver, internal); }

Target:
public void shouldThrowExceptionIfNoTypeMappingWasFoundWithoutAffectingContentProviderBlocking() { final StorIOContentResolver storIOContentResolver = mock(StorIOContentResolver.class); final StorIOContentResolver.Internal internal = mock(StorIOContentResolver.Internal.class); when(storIOContentResolver.internal()).thenReturn(internal); when(storIOContentResolver.delete()).thenReturn(new PreparedDelete.Builder(storIOContentResolver)); final PreparedDelete<DeleteResult> preparedDelete = storIOContentResolver .delete() .object(TestItem.newInstance()) .prepare(); try { preparedDelete.executeAsBlocking(); fail(); } catch (StorIOException expected) { TestUtils.checkException(expected, IllegalStateException.class); } verify(storIOContentResolver).delete(); verify(storIOContentResolver).internal(); verify(internal).typeMapping(TestItem.class); verify(internal, never()).delete(any(DeleteQuery.class)); verifyNoMoreInteractions(storIOContentResolver, internal); }
Source:
public void testDateRangeWithMonthNoLeap() throws MalformedURLException, URISyntaxException, FileNotFoundException, IOException, ParseException, DAP2Exception { URI dataSetURI = this.getClass().getResource("modis_monthly_ET_3.ncml").toURI(); String gridSelection = "T2MAX"; List<String> result = OpendapServerHelper.getOPeNDAPTimeRange(dataSetURI.toASCIIString(), gridSelection); assertNotNull(result); assertEquals(2, result.size()); assertEquals(result.get(0), "2000-10-01T00:00:00Z"); assertEquals(result.get(1), "2051-01-01T00:00:00Z"); }

Target:
public void testDateRangeWithMonthNoLeap() throws MalformedURLException, URISyntaxException, FileNotFoundException, IOException, ParseException, DAP2Exception { URI dataSetURI = this.getClass().getResource("d01_T2_monthly_NOHALO.ncml").toURI(); String gridSelection = "T2MAX"; List<String> result = OpendapServerHelper.getOPeNDAPTimeRange(dataSetURI.toASCIIString(), gridSelection); assertNotNull(result); assertEquals(2, result.size()); assertEquals(result.get(0), "2000-10-01T00:00:00Z"); assertEquals(result.get(1), "2051-01-01T00:00:00Z"); }
Source:
private Properties buildProperties() { Properties props = new Properties(); props.setProperty("resource.loader", "class"); props.setProperty("class.resource.loader.class", ClasspathResourceLoader.class.getCanonicalName()); props.setProperty("runtime.log", new File(configuration.getReportDirectory(), "velocity.log").getPath()); props.setProperty("eventhandler.referenceinsertion.class", "org.apache.velocity.app.event.implement.EscapeHtmlReference"); return props; }

Target:
private Properties buildProperties() { Properties props = new Properties(); props.setProperty("resource.loader", "class"); props.setProperty("class.resource.loader.class", ClasspathResourceLoader.class.getCanonicalName()); props.setProperty("runtime.log", new File(configuration.getReportDirectory(), "velocity.log").getPath()); return props; }
Source:
public DeferredStatusHolderSV(int id, Status deferredStatus) { super(id); this.deferedStatus = deferredStatus; }

Target:
public DeferredStatusHolderSV(int id, Status deferredStatus) { super(id); this.deferredStatus = deferredStatus; }
Source:
public RsWithCookie(final Response res, final CharSequence name, final CharSequence value, final CharSequence... attrs) { super( new Response() { @Override public Iterable<String> head() throws IOException { return RsWithCookie.extend( res, name, value, attrs ); } @Override public InputStream body() throws IOException { return res.body(); } } ); RsWithCookie.checkName(name); RsWithCookie.checkValue(value); }

Target:
public RsWithCookie(final Response res, final CharSequence name, final CharSequence value, final CharSequence... attrs) { super( new Response() { @Override public Iterable<String> head() throws IOException { Response resp = res; resp = new RsWithHeader( new RsWithoutHeader(res, RsWithCookie.SET_COOKIE), RsWithCookie.SET_COOKIE, RsWithCookie.make( RsWithCookie.previousValue(res), name, value, attrs ) ); return resp.head(); } @Override public InputStream body() throws IOException { return res.body(); } } ); RsWithCookie.checkName(name); RsWithCookie.checkValue(value); }
Source:
public void biScan(CtRole role, CtElement element, CtElement other) { if (isNotEqual) { return; } if (element == null) { if (other != null) { fail(role, element, other); return; } return; } else if (other == null) { fail(role, element, other); return; } if (element == other) { return; } try { lastRole = role; if (haveDifferentDeclaringInnerClasses(element, other)) { fail(role, element, other); return; } super.biScan(element, other); } catch (java.lang.ClassCastException e) { fail(role, element, other); } finally { lastRole = null; } }

Target:
public void biScan(CtRole role, CtElement element, CtElement other) { if (isNotEqual) { return; } if (element == null) { if (other != null) { fail(role, element, other); return; } return; } else if (other == null) { fail(role, element, other); return; } if (element == other) { return; } try { lastRole = role; super.biScan(element, other); } catch (java.lang.ClassCastException e) { fail(role, element, other); } finally { lastRole = null; } }
Source:
protected void setWindowSize() { if (!Configuration.getBrowser().contains("ANDROID")) { if (Configuration.getBrowserSize() != null) { driver.manage().window().setSize(Configuration.getBrowserSize()); } else { driver.manage().window().maximize(); } } }

Target:
protected void setWindowSize() { if (!Configuration.getBrowser().contains("ANDROID") && Configuration.getBrowserSize() != null) { driver.manage().window().setSize(Configuration.getBrowserSize()); } else { driver.manage().window().maximize(); } }
Source:
public void onStop() { if (mPendingConfig) { if (mSyncthingService != null && mApi != null && mSyncthingService.getCurrentState() != SyncthingService.State.DISABLED) { mApi.saveConfigAndRestart(); mPendingConfig = false; } } if (mPendingRunConditions) { if (mSyncthingService != null) { mSyncthingService.reEvaluateRunConditions(); } } super.onStop(); }

Target:
public void onStop() { if (mPendingConfig) { if (mSyncthingService != null && mApi != null && mSyncthingService.getCurrentState() != SyncthingService.State.DISABLED) { mApi.saveConfigAndRestart(); mPendingConfig = false; } } if (mPendingRunConditions) { if (mSyncthingService != null) { mSyncthingService.evaluateRunConditions(); } } super.onStop(); }
Source:
public String getDockerImageName() { try { return nameResolverProvider.getResolver().get(); } catch (Exception e) { throw new ContainerFetchException("Can't get Docker image: " + nameResolverProvider.getResolver(), e); } }

Target:
public String getDockerImageName() { try { return getImage().get(); } catch (Exception e) { throw new ContainerFetchException("Can't get Docker image: " + nameResolverProvider.getResolver(), e); } }