auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public LuceneQueryParsingResult<TypeMetadata> transform(FilterParsingResult<TypeMetadata> parsingResult, Map<String, Object> namedParameters, Class<?> targetedType) { this.namedParameters = namedParameters; queryBuilder = queryContextBuilder.forEntity(targetedType).get(); entityType = parsingResult.getTargetEntityMetadata(); AnalyzerReference analyzerReference = ((ExtendedSearchIntegrator) searchFactory).getAnalyzerReference(targetedType); if(analyzerReference.is(LuceneAnalyzerReference.class)) { entityAnalyzer = analyzerReference.unwrap(LuceneAnalyzerReference.class).getAnalyzer(); } else { isAnalyzerRemote = true; } Query query = makeQuery(parsingResult.getWhereClause()); if (query instanceof BooleanQuery) { BooleanQuery booleanQuery = (BooleanQuery) query; boolean allClausesAreMustNot = true; for (BooleanClause clause : booleanQuery.clauses()) { <START> if (clause.getOccur() != BooleanClause.Occur.MUST_NOT) { <END> allClausesAreMustNot = false; break; } } if (allClausesAreMustNot) { BooleanQuery.Builder builder = new BooleanQuery.Builder(); for (BooleanClause clause : booleanQuery.clauses()) { builder.add(clause.getQuery(), BooleanClause.Occur.MUST_NOT); } builder.add(new MatchAllDocsQuery(), BooleanClause.Occur.FILTER); query = builder.build(); } } Sort sort = makeSort(parsingResult.getSortFields()); return new LuceneQueryParsingResult<>(query, parsingResult.getTargetEntityName(), parsingResult.getTargetEntityMetadata(), parsingResult.getProjections(), sort); }</code><technical_language>illegal</technical_language>

Target:
public LuceneQueryParsingResult<TypeMetadata> transform(FilterParsingResult<TypeMetadata> parsingResult, Map<String, Object> namedParameters, Class<?> targetedType) { this.namedParameters = namedParameters; queryBuilder = queryContextBuilder.forEntity(targetedType).get(); entityType = parsingResult.getTargetEntityMetadata(); AnalyzerReference analyzerReference = ((ExtendedSearchIntegrator) searchFactory).getAnalyzerReference(targetedType); if(analyzerReference.is(LuceneAnalyzerReference.class)) { entityAnalyzer = analyzerReference.unwrap(LuceneAnalyzerReference.class).getAnalyzer(); } else { isAnalyzerRemote = true; } Query query = makeQuery(parsingResult.getWhereClause()); if (query instanceof BooleanQuery) { BooleanQuery booleanQuery = (BooleanQuery) query; boolean allClausesAreMustNot = booleanQuery.clauses().stream().allMatch(c -> c.getOccur() == BooleanClause.Occur.MUST_NOT); if (allClausesAreMustNot) { BooleanQuery.Builder builder = new BooleanQuery.Builder(); for (BooleanClause clause : booleanQuery.clauses()) { builder.add(clause.getQuery(), BooleanClause.Occur.MUST_NOT); } builder.add(new MatchAllDocsQuery(), BooleanClause.Occur.FILTER); query = builder.build(); } } Sort sort = makeSort(parsingResult.getSortFields()); return new LuceneQueryParsingResult<>(query, parsingResult.getTargetEntityName(), parsingResult.getTargetEntityMetadata(), parsingResult.getProjections(), sort); }
Source:
<code>public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException { context.getHeaders().putSingle("BookWriter", "TheBook"); final Object property = context.getProperty("x-book"); if (property != null) { <START> context.getHeaders().putSingle("X-Book-Header", property); <END> } context.proceed(); }</code><technical_language>suggestion context.getHeaders().putSingle("X-Book-Response-Header", property); a suggestion, IIUC, intent is show property set request filter is propagated writer interceptor (in response flow). a header in response, clear test is propagating headers request response</technical_language>

Target:
public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException { context.getHeaders().putSingle("BookWriter", "TheBook"); final Object property = context.getProperty("property"); if (property != null) { context.getHeaders().putSingle("X-Property-WriterInterceptor", property); } context.proceed(); }
Source:
<code>public Response get(@PathParam("userId") String userId, @QueryParam("howMany") int howMany, @QueryParam("offset") int offset, @QueryParam("considerKnownItems") boolean considerKnownItems, @QueryParam("rescorerParams") List<String> rescorerParams) { <START> return Response.status(Response.Status.OK.getStatusCode()).entity("").build(); <END> }</code><technical_language>Change return Response.ok().build();</technical_language>

Target:
public Response get(@PathParam("userId") String userId, @QueryParam("howMany") int howMany, @QueryParam("offset") int offset, @QueryParam("considerKnownItems") boolean considerKnownItems, @QueryParam("rescorerParams") List<String> rescorerParams) { return Response.ok().entity("").build(); }
Source:
<code>public O compute(final Iterable<I> input, final O output) { if (sumFunc == null) { sumFunc = (Sum<Iterable<I>, DoubleType>) ops.op(Sum.class, output, input); } if (sizeFunc == null) { sizeFunc = (Size<Iterable<I>>) ops.op(Size.class, output, input); } final LongType size = sizeFunc.compute(input, new LongType()); final DoubleType sum = sumFunc.compute(input, new DoubleType()); <START> output.setReal( sum.get()/size.get()); <END> return output; }</code><technical_language>mind adjust whitespace style surrounding code</technical_language>

Target:
public O compute(final Iterable<I> input, final O output) { if (sumFunc == null) { sumFunc = (Sum<Iterable<I>, O>) ops.op(Sum.class, output, input); } if (sizeFunc == null) { sizeFunc = (Size<Iterable<I>>) ops.op(Size.class, output, input); } final O result; if (output == null) { final Object o = new DoubleType(); @SuppressWarnings("unchecked") final O newOutput = (O) o; result = newOutput; } else result = output; final LongType size = sizeFunc.compute(input, new LongType()); final O sum = sumFunc.compute(input, result.createVariable()); double mean = sum.getRealDouble() / size.getRealDouble(); result.setReal(mean); return result; }
Source:
<code>public void clearSelection() { List<Integer> selection = getSelectedItems(); selectedItems.clear(); for (Integer i : selection) { <START> notifyItemChanged(i); <END> } }</code><technical_language>I notifyItemRemoved(i) here</technical_language>

Target:
public void clearSelection() { List<Integer> selection = getSelectedItems(); selectedItems.clear(); for (Integer i : selection) { notifyItemRemoved(i); } }
Source:
<code>public BPELSituationAwareBuildProcessBuilder() { try { this.planHandler = new BPELPlanHandler(); this.serviceInstanceInitializer = new SimplePlanBuilderServiceInstanceHandler(); this.nodeRelationInstanceHandler = new NodeRelationInstanceVariablesHandler(this.planHandler); this.sitRegistrationPlugin = new SituationTriggerRegistration(); this.correlationHandler = new CorrelationIDInitializer(); this.fragments = new BPELProcessFragments(); } catch (final ParserConfigurationException e) { <START> BPELSituationAwareBuildProcessBuilder.LOG.error("Error while initializing BuildPlanHandler", e); <END> } this.propertyInitializer = new PropertyVariableHandler(this.planHandler); this.propertyOutputInitializer = new ServiceTemplateBoundaryPropertyMappingsToOutputHandler(); this.finalizer = new BPELFinalizer(); }</code><technical_language>log message is misleading, IMO</technical_language>

Target:
public BPELSituationAwareBuildProcessBuilder() { try { this.planHandler = new BPELPlanHandler(); this.serviceInstanceInitializer = new SimplePlanBuilderServiceInstanceHandler(); this.nodeRelationInstanceHandler = new NodeRelationInstanceVariablesHandler(this.planHandler); this.sitRegistrationPlugin = new SituationTriggerRegistration(); this.correlationHandler = new CorrelationIDInitializer(); this.fragments = new BPELProcessFragments(); this.propertyInitializer = new PropertyVariableHandler(this.planHandler); } catch (final ParserConfigurationException e) { BPELSituationAwareBuildProcessBuilder.LOG.error("Error while initializing BuildPlanHandler, couldn't initialize internal parser", e); } this.propertyOutputInitializer = new ServiceTemplateBoundaryPropertyMappingsToOutputHandler(); this.finalizer = new BPELFinalizer(); }
Source:
<code>protected void writeEntityToNBT(NBTTagCompound tags) { if(type == null) setDead(); else { <START> tags.setString("Type", type.shortName); <END> if(player != null) tags.setString("Player", player.get().getName()); tags.setFloat("RotationYaw", axes.getYaw()); tags.setFloat("RotationPitch", axes.getPitch()); } }</code><technical_language>player null set Optional above</technical_language>

Target:
protected void writeEntityToNBT(NBTTagCompound tags) { if(type == null) setDead(); else { tags.setString("Type", type.shortName); if(player.isPresent()) tags.setString("Player", player.get().getName()); tags.setFloat("RotationYaw", axes.getYaw()); tags.setFloat("RotationPitch", axes.getPitch()); } }
Source:
<code>private void finishDownloading() { DownloadManager.Query downloadQuery = new DownloadManager.Query() .setFilterById(downloadId); Cursor downloadInformation = getDownloadManager(context).query(downloadQuery); downloadInformation.moveToFirst(); int downloadStatus = downloadInformation.getInt( downloadInformation.getColumnIndex(DownloadManager.COLUMN_STATUS)); if (downloadStatus == DownloadManager.STATUS_SUCCESSFUL) { String downloadUri = downloadInformation.getString( downloadInformation.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)); try { URI uri = new URI(downloadUri); downloadUri = uri.getPath(); } catch (URISyntaxException e) { <START> e.printStackTrace(); <END> } File file = new File(downloadUri); Uri contentUri = FileProvider.getUriForFile(context, "org.amahi.anywhere.fileprovider", file); BusProvider.getBus().post(new FileDownloadedEvent(contentUri)); } else { BusProvider.getBus().post(new FileDownloadFailedEvent()); } downloadInformation.close(); }</code><technical_language>minor niggle. want print URI, tho, stack trace</technical_language>

Target:
private void finishDownloading() { DownloadManager.Query downloadQuery = new DownloadManager.Query() .setFilterById(downloadId); Cursor downloadInformation = getDownloadManager(context).query(downloadQuery); downloadInformation.moveToFirst(); int downloadStatus = downloadInformation.getInt( downloadInformation.getColumnIndex(DownloadManager.COLUMN_STATUS)); if (downloadStatus == DownloadManager.STATUS_SUCCESSFUL) { String downloadUri = downloadInformation.getString( downloadInformation.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)); if (downloadUri.substring(0, 7).matches("file://")) { downloadUri = downloadUri.substring(7); } try { URI uri = new URI(downloadUri); downloadUri = uri.getPath(); } catch (URISyntaxException e) { Log.e("Downloader", "Invalid Uri: " + downloadUri); } File file = new File(downloadUri); Uri contentUri = FileProvider.getUriForFile(context, "org.amahi.anywhere.fileprovider", file); BusProvider.getBus().post(new FileDownloadedEvent(contentUri)); } else { BusProvider.getBus().post(new FileDownloadFailedEvent()); } downloadInformation.close(); }
Source:
<code><START> public void updateLoads() { <END> if (m_cpuContextsCache == null || m_coreContextsCache == null) { return; } if (!m_loadMetersEnabled) { return; } VisualizerModel myModel = fDataModel; DsfExecutor exe = DsfSession.getSession(m_sessionState.getSessionID()).getExecutor(); CountingRequestMonitor crm = new CountingRequestMonitor(exe, null) { @Override protected void handleCompleted() { super.handleCompleted(); if (m_canvas != null) { m_canvas.refreshLoadMeters(); m_canvas.requestUpdate(); } if (m_updateLoadMeterTimer != null) { m_updateLoadMeterTimer.start(); } } }; int count = 0; for (ICPUDMContext cpuCtx : m_cpuContextsCache) { DSFDebugModel.getLoad(m_sessionState, cpuCtx, this, myModel, crm); count++; } for (ICoreDMContext coreCtx : m_coreContextsCache) { DSFDebugModel.getLoad(m_sessionState, coreCtx, this, myModel, crm); count ++; } crm.setDoneCount(count); }</code><technical_language>missing @Override</technical_language>

Target:
public void updateLoads() { if (m_cpuContextsCache == null || m_coreContextsCache == null) { return; } if (!m_loadMetersEnabled) { return; } DsfExecutor exe = DsfSession.getSession(m_sessionState.getSessionID()).getExecutor(); CountingRequestMonitor crm = new CountingRequestMonitor(exe, null) { @Override protected void handleCompleted() { super.handleCompleted(); if (m_canvas != null) { m_canvas.refreshLoadMeters(); m_canvas.requestUpdate(); } if (m_updateLoadMeterTimer != null) { m_updateLoadMeterTimer.start(); } } }; int count = 0; for (ICPUDMContext cpuCtx : m_cpuContextsCache) { DSFDebugModel.getLoad(m_sessionState, cpuCtx, this, fDataModel, crm); count++; } for (ICoreDMContext coreCtx : m_coreContextsCache) { DSFDebugModel.getLoad(m_sessionState, coreCtx, this, fDataModel, crm); count ++; } crm.setDoneCount(count); }
Source:
<code>public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { SchedulerContext schedulerContext = null; try { schedulerContext = jobExecutionContext.getScheduler().getContext(); } catch (SchedulerException e1) { <START> log.debug("Exception occurred while getting scheduler context"); <END> } if (schedulerContext == null) { log.error("Scheduler context is null"); return; } PollingServerConnector connector = (PollingServerConnector) schedulerContext.get("connector"); log.debug("Executing the polling task for server connector ID: " + connector.getId()); try { connector.poll(); } catch (Exception e) { log.error("Error executing the polling cycle for " + "server connector ID: " + connector.getId(), e); } log.debug("Exit the polling task running loop for server connector ID: " + connector.getId()); }</code><technical_language>out of curiosity, logging out exception e1 is intentional</technical_language>

Target:
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { SchedulerContext schedulerContext = null; try { schedulerContext = jobExecutionContext.getScheduler().getContext(); } catch (SchedulerException e1) { log.debug("Exception occurred while getting scheduler context", e1); } if (schedulerContext == null) { log.error("Scheduler context is null"); return; } PollingServerConnector connector = (PollingServerConnector) schedulerContext.get("connector"); log.debug("Executing the polling task for server connector ID: " + connector.getId()); try { connector.poll(); } catch (Exception e) { log.error("Error executing the polling cycle for server connector ID: " + connector.getId(), e); } log.debug("Exit the polling task running loop for server connector ID: " + connector.getId()); }
Source:
<code>public static void tearDown() throws InterruptedException, TimeoutException, IOException, CommandFailedException { client.apply(snapshotBackup.restore()); <START> administration.reloadIfRequired(); <END> }</code><technical_language>Please close client end</technical_language>

Target:
public static void tearDown() throws InterruptedException, TimeoutException, IOException, CommandFailedException { client.apply(snapshotBackup.restore()); administration.reloadIfRequired(); client.close(); }
Source:
<code>public String view() { try { String frontEndCaseDataIn = extractWidgetConfig("frontEndCaseData"); this.setFrontEndCaseData(frontEndCaseDataIn); String channelIn = extractWidgetConfig("channel"); this.setChannel(channelIn); KieBpmConfig config = formManager.getKieServerConfigurations().get(this.getKnowledgeSourceId()); <START> if (null == config) { <END> logger.warn("Null configuration"); this.setErrorCode(ERROR_NULL_CONFIG); return SUCCESS; } this.setMilestones(this.getCaseManager().getMilestonesList(config, this.getContainerid(), this.getCasePath()).toString()); } catch (ApsSystemException t) { logger.error("Error getting the configuration parameter", t); return FAILURE; } return SUCCESS; }</code><technical_language>Move BaseAction</technical_language>

Target:
public String view() { try { if (!isKieServerConfigurationValid()) { return SUCCESS; } String frontEndCaseDataIn = extractWidgetConfig("frontEndCaseData"); this.setFrontEndCaseData(frontEndCaseDataIn); String channelIn = extractWidgetConfig("channel"); this.setChannel(channelIn); KieBpmConfig config = formManager.getKieServerConfigurations().get(this.getKnowledgeSourceId()); this.setMilestones(this.getCaseManager().getMilestonesList(config, this.getContainerid(), this.getCasePath()).toString()); } catch (ApsSystemException t) { logger.error("Error getting the configuration parameter", t); return FAILURE; } return SUCCESS; }
Source:
<code><START> public TransportHints() { <END> this.options = Maps.newConcurrentMap(); }</code><technical_language>nitpick: please indent functions code spaces (same applies for next line)</technical_language>

Target:
public TransportHints() { this(false); }
Source:
<code>public void setUp() throws Exception { homeDir = testDirectory.directory( "home-dir" ).toPath(); configDir = testDirectory.directory( "config-dir" ).toPath(); configFile = configDir.resolve( "neo4j.conf" ); Files.createFile( configFile ); <START> System.setProperty( "user.dir", testDirectory.absolutePath().getAbsolutePath() ); <END> }</code><technical_language>need restore previous property in tear</technical_language>

Target:
public void setUp() throws Exception { homeDir = testDirectory.directory( "home-dir" ).toPath(); configDir = testDirectory.directory( "config-dir" ).toPath(); configFile = configDir.resolve( "neo4j.conf" ); Files.createFile( configFile ); originalUserDir = System.setProperty( "user.dir", testDirectory.absolutePath().getAbsolutePath() ); }
Source:
<code>public void shouldNotAcceptNullMedianLocalDateTime(){ <START> final Arbitrary<LocalDateTime> dates = Arbitrary.localDateTime(null, ChronoUnit.DAYS); <END> }</code><technical_language>test exceptional cases (like here) please perform a call - variable is needed, i.e. java @Test(expected = NullPointerException.class) public void shouldNotAcceptNullMedianLocalDateTime(){ Arbitrary.localDateTime(null, ChronoUnit.DAYS); }</technical_language>

Target:
public void shouldNotAcceptNullMedianLocalDateTime(){ Arbitrary.localDateTime(null, ChronoUnit.DAYS); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BuildCGroupResources that = (BuildCGroupResources) o; <START> return Double.compare(that.cpus, cpus) == 0 && <END> Double.compare(that.memoryMb, memoryMb) == 0; }</code><technical_language>Objects.equals for fields call a day</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BuildCGroupResources that = (BuildCGroupResources) o; return Objects.equals(that.cpus, cpus) && Objects.equals(that.memoryMb, memoryMb); }
Source:
<code>private SymbolicValue createIdentifierSymbolicValue(IdentifierTree identifier) { <START> if (BOOLEAN_CLASS_VALUES.contains(identifier.name()) && identifier.symbolType() != null && identifier.symbolType().is(BOOLEAN_CLASS)) { <END> return new SymbolicValue.BooleanObjectSymbolicValue(counter, identifier.name()); } return createDefaultSymbolicValue(identifier); }</code><technical_language>do need null test identifierTree.symbolType ? happen. Moreover, for identifier "TRUE" "FALSE" meaning is a type get type of symbol this identifier refers to. somethingy identifier.symbol().type().is("java.lang.Boolean") (no need for a constant if is here</technical_language>

Target:
private SymbolicValue createIdentifierSymbolicValue(IdentifierTree identifier) { final Type type = identifier.symbol().type(); if (type != null && type.is("java.lang.Boolean")) { return "TRUE".equals(identifier.name()) ? SymbolicValue.TRUE_LITERAL : SymbolicValue.FALSE_LITERAL; } return createDefaultSymbolicValue(identifier); }
Source:
<code>private void initializeCommandLineSuitesParams() { if(null == m_cmdlineSuites) { return; } for (XmlSuite s : m_cmdlineSuites) { if(m_useThreadCount) { <START> s.setThreadCount(m_threadCount); <END> } s.setParallel(m_parallelMode); if(m_configFailurePolicy != null) { s.setConfigFailurePolicy(m_configFailurePolicy.toString()); } } }</code><technical_language>FYI for future pull requests, remove this kind of syntactic changes send pull request distracting add noise. pull requests 100% semantic changes reviewers review more easily move refactoring other changes modify meaning of code separate pull requests</technical_language>

Target:
private void initializeCommandLineSuitesParams() { if(null == m_cmdlineSuites) { return; } for (XmlSuite s : m_cmdlineSuites) { if (m_threadCount != -1) { s.setThreadCount(m_threadCount); } if (m_parallelMode != null) { s.setParallel(m_parallelMode); } if(m_configFailurePolicy != null) { s.setConfigFailurePolicy(m_configFailurePolicy.toString()); } } }
Source:
<code>protected void runInContext() { List<DataCenterVO> dcList = serviceImpl.dataCenterDao.listEnabledZones(); for (DataCenterVO vo: dcList) { List<DataStore> storeList = serviceImpl.storeMgr.getImageStoresByScope(new ZoneScope(vo.getId())); for (DataStore store : storeList) { String mountPoint = null; try { <START> mountPoint = serviceImpl.mountManager.getMountPoint(store.getUri(), null); if (StringUtils.isNotBlank(mountPoint)) { File directory = new File(mountPoint + "/" + DIAGNOSTICS_DIRECTORY); if (directory.isDirectory()) { deleteOldDiagnosticsFiles(directory, store.getName()); } } <END> } finally { umountSecondaryStorage(mountPoint); } } } }</code><technical_language>high level of nesting/cyclic complexity. extract this bit, leave try { something(); } finally { do_something(); }</technical_language>

Target:
protected void runInContext() { List<DataCenterVO> dcList = serviceImpl.dataCenterDao.listEnabledZones(); for (DataCenterVO vo: dcList) { List<DataStore> storeList = serviceImpl.storeMgr.getImageStoresByScope(new ZoneScope(vo.getId())); for (DataStore store : storeList) { cleanupOldDiagnosticFiles(store); } } }
Source:
<code>protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { setClampHeight(1.0f); if (!Elevator.atBottom.get()) { Elevator.setBottom.event(); waitUntil(Elevator.atBottom); <START> } <END> float currentClampHeight = Clamp.height.get(); boolean running = Rollers.running.get(); boolean direction = Rollers.direction.get(); boolean closed = Rollers.closed.get(); try { Rollers.closed.set(true); Rollers.direction.set(Rollers.FORWARD); Rollers.running.set(true); waitUntil(BooleanMixing.invert(AutoLoader.crateInPosition)); waitForTime(timeout); } finally { Rollers.running.set(running); Rollers.direction.set(direction); Rollers.closed.set(closed); setClampHeight(currentClampHeight); } } finally { running.set(false); } }</code><technical_language>Is a reason do this bottom</technical_language>

Target:
protected void autonomousMain() throws AutonomousModeOverException, InterruptedException { try { float currentClampHeight = Clamp.heightReadout.get(); Clamp.mode.set(Clamp.MODE_HEIGHT); Clamp.height.set(clampHeight.get()); if (!Elevator.atBottom.get()) { Elevator.setBottom.event(); waitUntil(BooleanMixing.andBooleans(Clamp.atDesiredHeight, Elevator.atBottom)); } else { waitUntil(Elevator.atBottom); } boolean running = Rollers.running.get(); boolean direction = Rollers.direction.get(); boolean closed = Rollers.closed.get(); try { Rollers.closed.set(true); Rollers.direction.set(Rollers.FORWARD); Rollers.running.set(true); waitUntil(BooleanMixing.invert(AutoLoader.crateInPosition)); waitForTime(timeout); } finally { Rollers.running.set(running); Rollers.direction.set(direction); Rollers.closed.set(closed); Clamp.mode.set(Clamp.MODE_HEIGHT); Clamp.height.set(currentClampHeight); waitUntil(Clamp.atDesiredHeight); } } finally { running.set(false); } }
Source:
<code>private String doCreatePDFFile( final String spec, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) throws IOException, ServletException, InterruptedException, NoSuchAppException, NoSuchReferenceException { <START> LOGGER.info("\nOLD-API:\n{}", spec); <END> PJsonObject specJson = MapPrinterServlet.parseJson(spec, httpServletResponse); String appId; if (specJson.has("app")) { appId = specJson.getString("app"); } else { appId = DEFAULT_CONFIGURATION_FILE_KEY; } MapPrinter mapPrinter = this.printerFactory.create(appId); PJsonObject updatedSpecJson = null; try { updatedSpecJson = OldAPIRequestConverter.convert(specJson, mapPrinter.getConfiguration()); String format = updatedSpecJson.optString(MapPrinterServlet.JSON_OUTPUT_FORMAT, "pdf"); final String jobReferenceId = this.primaryApiServlet.createAndSubmitPrintJob(appId, format, updatedSpecJson.getInternalObj().toString(), httpServletRequest, httpServletResponse); boolean isDone = false; while (!isDone) { Thread.sleep(HALF_SECOND); isDone = this.jobManager.getStatus(jobReferenceId).isDone(); } return jobReferenceId; } catch (JSONException e) { throw ExceptionUtils.getRuntimeException(e); } }</code><technical_language>In debug, please</technical_language>

Target:
private String doCreatePDFFile( final String spec, final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) throws IOException, ServletException, InterruptedException, NoSuchAppException, NoSuchReferenceException { LOGGER.debug("\nOLD-API:\n{}", spec); PJsonObject specJson = MapPrinterServlet.parseJson(spec, httpServletResponse); String appId; if (specJson.has("app")) { appId = specJson.getString("app"); } else { appId = DEFAULT_CONFIGURATION_FILE_KEY; } MapPrinter mapPrinter = this.printerFactory.create(appId); PJsonObject updatedSpecJson = null; try { updatedSpecJson = OldAPIRequestConverter.convert(specJson, mapPrinter.getConfiguration()); String format = updatedSpecJson.optString(MapPrinterServlet.JSON_OUTPUT_FORMAT, "pdf"); final String jobReferenceId = this.primaryApiServlet.createAndSubmitPrintJob(appId, format, updatedSpecJson.getInternalObj().toString(), httpServletRequest, httpServletResponse); boolean isDone = false; while (!isDone) { Thread.sleep(HALF_SECOND); isDone = this.jobManager.getStatus(jobReferenceId).isDone(); } return jobReferenceId; } catch (JSONException e) { throw ExceptionUtils.getRuntimeException(e); } }
Source:
<code>public MetadataResource(SessionFactory sessionFactory, DockstoreWebserviceConfiguration config) { this.toolDAO = new ToolDAO(sessionFactory); this.workflowDAO = new WorkflowDAO(sessionFactory); this.organizationDAO = new OrganizationDAO(sessionFactory); this.collectionDAO = new CollectionDAO(sessionFactory); this.config = config; this.bioWorkflowDAO = new BioWorkflowDAO(sessionFactory); this.serviceDAO = new ServiceDAO(sessionFactory); <START> Optional<StateListenerInterface> first = PublicStateManager.getInstance().getListeners().stream() <END> .filter(l -> l instanceof SitemapListener).findFirst(); sitemapListener = (SitemapListener)first.orElse(null); }</code><technical_language>This slightly fragile in relies listener added PublicStateManager MetadataResource is instantiated in DockstoreWebserviceApplication. is now, change, still... 1. create add listener instead of in DockstoreWebserviceApplication. downside is in theory deal concurrency, skip. 2. create a static instance of listener in this class add DockstoreWebserviceApplication 3. leave is. additional optional throwing of exception if null brings web service. 4. leave is I lean 3, OK 4</technical_language>

Target:
public MetadataResource(SessionFactory sessionFactory, DockstoreWebserviceConfiguration config) { this.toolDAO = new ToolDAO(sessionFactory); this.workflowDAO = new WorkflowDAO(sessionFactory); this.organizationDAO = new OrganizationDAO(sessionFactory); this.collectionDAO = new CollectionDAO(sessionFactory); this.config = config; this.bioWorkflowDAO = new BioWorkflowDAO(sessionFactory); this.serviceDAO = new ServiceDAO(sessionFactory); this.sitemapListener = PublicStateManager.getInstance().getSitemapListener(); }
Source:
<code>public void testListAddresses() throws Exception { final AddressResponseList addresses = client.getAddresses().get(); <START> assertEquals(200, addresses.getStatusCode()); <END> assertNotNull(addresses.getHeaders()); final AddressResponse response = addresses.get(0); assertTrue(response instanceof AddressResponse); assertThat(addresses.getObject(), is("list")); assertFalse(addresses.isEmpty()); assertFalse(addresses.getData().isEmpty()); assertTrue(addresses.getCount() > 0); assertNotNull(addresses.toString()); assertNotNull(response.toString()); }</code><technical_language>nit: for of these, do assertEquals(addresses.getStatusCode(), 200); avoid [yoda conditions](<LINK_0></technical_language>

Target:
public void testListAddresses() throws Exception { final AddressResponseList addresses = client.getAddresses().get(); assertEquals(200, addresses.getStatusCode()); assertNotNull(addresses.getHeaders()); assertEquals("application/json; charset=utf-8", addresses.getHeaders().getFirstValue("content-type")); final AddressResponse response = addresses.get(0); assertTrue(response instanceof AddressResponse); assertThat(addresses.getObject(), is("list")); assertFalse(addresses.isEmpty()); assertFalse(addresses.getData().isEmpty()); assertTrue(addresses.getCount() > 0); assertNotNull(addresses.toString()); assertNotNull(response.toString()); }
Source:
<code>private static boolean anyMatch(Tree tree) { <START> if (!arguments(tree).findAny().isPresent()) { <END> return false; } if (tree.is(Tree.Kind.NEW_CLASS)) { return SQL_INJECTION_SUSPECTS.anyMatch((NewClassTree) tree); } if (tree.is(Tree.Kind.METHOD_INVOCATION)) { return SQL_INJECTION_SUSPECTS.anyMatch((MethodInvocationTree) tree); } return false; }</code><technical_language>a dedicated method hasParameter(tree)</technical_language>

Target:
private static boolean anyMatch(Tree tree) { if (!hasArguments(tree)) { return false; } if (tree.is(Tree.Kind.NEW_CLASS)) { return SQL_INJECTION_SUSPECTS.anyMatch((NewClassTree) tree); } if (tree.is(Tree.Kind.METHOD_INVOCATION)) { return SQL_INJECTION_SUSPECTS.anyMatch((MethodInvocationTree) tree); } return false; }
Source:
<code>public boolean equals(Object obj) { <START> return toString().equals(obj.toString()); <END> }</code><technical_language>I check class type of obj here. Feel supposed check follows: if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } RemoteReplicaInfo info = (RemoteReplicaInfo) obj; return compareTo(info) == 0;</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } RemoteReplicaInfo info = (RemoteReplicaInfo) obj; if (Objects.equals(port, info.getPort()) && info.getReplicaId().getReplicaPath().equals(replicaId.getMountPath()) && info.getLocalReplicaId().getReplicaPath().equals(localReplicaId.getMountPath())) { return true; } return false; }
Source:
<code>protected boolean doValidate() { String currentValue = getCurrentValue(); <START> currentValue = currentValue.trim(); <END> boolean hasContent = !StringUtil.isNullOrEmpty(currentValue); if (hasContent) { return stringValidation.validate(currentValue); } return !isRequired(); }</code><technical_language>current null here? If calling this method initializeValidation. missing is null</technical_language>

Target:
protected boolean doValidate() { String currentValue = getCurrentValue(); if (currentValue != null) { currentValue = currentValue.trim(); if (!currentValue.isEmpty()) { return checkLocalValidation(currentValue); } } return checkIsValid(); }
Source:
<code>public void setUp() throws Exception { assumeFalse("Skipping test: TV does not support provider android.settings.slices", isTv()); assumeFalse("Skipping test: Automotive does not support provider android.settings.slices", <START> isCar()); <END> mWifiSlice = mSliceManager.bindSlice(WIFI_SLICE_URI, Collections.emptySet()); }</code><technical_language>long</technical_language>

Target:
public void setUp() throws Exception { assumeFalse("Skipping test: TV does not support provider android.settings.slices", isTv()); assumeFalse("Skipping test: Auto does not support provider android.settings.slices", isCar()); mWifiSlice = mSliceManager.bindSlice(WIFI_SLICE_URI, Collections.emptySet()); }
Source:
<code>public java.sql.Date getDate(int i, java.util.Calendar cal) throws SQLException { checkResultSet(i); if (wasNullFlag) return null; if (isBinary(i)) { int col = i - 1; int oid = fields[col].getOID(); TimeZone tz = cal == null ? null : cal.getTimeZone(); if (oid == Oid.DATE) { return connection.getTimestampUtils().toDateBin(tz, this_row[col]); } else if (oid == Oid.TIMESTAMP || oid == Oid.TIMESTAMPTZ) { <START> return connection.getTimestampUtils().convertToDate(getTimestamp(i, Calendar.getInstance(TimeZone.getTimeZone("UTC"))), tz); <END> } else { throw new PSQLException (GT.tr("Cannot convert the column of type {0} to requested type {1}.", new Object[]{Oid.toString(oid), "date"}), PSQLState.DATA_TYPE_MISMATCH); } } if (cal != null) cal = (Calendar)cal.clone(); return connection.getTimestampUtils().toDate(cal, getString(i)); }</code><technical_language>I do calendar.getinstance in hot code path call is expensive. If "UTC" calendar is required, cached TimestampUtils</technical_language>

Target:
public java.sql.Date getDate(int i, java.util.Calendar cal) throws SQLException { checkResultSet(i); if (wasNullFlag) return null; if (isBinary(i)) { int col = i - 1; int oid = fields[col].getOID(); TimeZone tz = cal == null ? null : cal.getTimeZone(); if (oid == Oid.DATE) { return connection.getTimestampUtils().toDateBin(tz, this_row[col]); } else if (oid == Oid.TIMESTAMP || oid == Oid.TIMESTAMPTZ) { return connection.getTimestampUtils().convertToDate(getTimestamp(i, UTC), tz); } else { throw new PSQLException (GT.tr("Cannot convert the column of type {0} to requested type {1}.", new Object[]{Oid.toString(oid), "date"}), PSQLState.DATA_TYPE_MISMATCH); } } if (cal != null) cal = (Calendar)cal.clone(); return connection.getTimestampUtils().toDate(cal, getString(i)); }
Source:
<code>protected void sharedPeriodic() { xScheduler.run(); this.updatePeriodicDataSources(); brownoutLatch.setValue(DriverStation.getInstance().isBrownedOut()); loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; if(lastFreqCounterResetTime <= 0) { lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Total Current:" + pdp.getTotalCurrent()); } else if(timeSinceLastLog >= frequencyReportInterval.get()) { double loopsPerSecond = loopCycleCounter / timeSinceLastLog; <START> double loopDuration = pdp.getTotalCurrent() / loopCycleCounter; <END> loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); log.info("Loop Duration:" + loopDuration); } }</code><technical_language>I this means means</technical_language>

Target:
protected void sharedPeriodic() { double loopBegin = Timer.getFPGATimestamp(); xScheduler.run(); this.updatePeriodicDataSources(); brownoutLatch.setValue(DriverStation.getInstance().isBrownedOut()); loopDuration += Timer.getFPGATimestamp() - loopBegin; loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; if(lastFreqCounterResetTime <= 0) { lastFreqCounterResetTime = Timer.getFPGATimestamp(); } else if(timeSinceLastLog >= frequencyReportInterval.get()) { double loopsPerSecond = loopCycleCounter / timeSinceLastLog; double averageLoopDuration = 0; if(loopCycleCounter != 0){ averageLoopDuration = loopDuration / loopCycleCounter; } else{ log.info("Cannot have loopCycleCounter as 0"); } loopDuration = 0; loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); log.info("Total Current: " + pdp.getTotalCurrent()); log.info("Average Loop Duration:" + averageLoopDuration); } }
Source:
<code><START> public ConnectivityProvider providesConnectivityProvider() { <END> return new ConnectivityProvider(); }</code><technical_language>expect Dagger provide interface (NetworkStateProvider) implementation. For goal of is objects need care implementation object - interface</technical_language>

Target:
public NetworkStateProvider providesConnectivityProvider() { return new ConnectivityProvider(); }
Source:
<code>public Object combine(@Nullable Object lhs, @Nullable Object rhs) { if (lhs instanceof DoubleMeanHolder && rhs instanceof DoubleMeanHolder) { return ((DoubleMeanHolder) lhs).update((DoubleMeanHolder) rhs); } else { throw new IAE( "lhs[%s] or rhs[%s] not of type [%s]", lhs.getClass().getName(), <START> rhs.getClass().getName(), <END> DoubleMeanHolder.class.getName() ); } }</code><technical_language>case of null considered</technical_language>

Target:
public Object combine(@Nullable Object lhs, @Nullable Object rhs) { if (lhs instanceof DoubleMeanHolder && rhs instanceof DoubleMeanHolder) { return ((DoubleMeanHolder) lhs).update((DoubleMeanHolder) rhs); } else { throw new IAE( "lhs[%s] or rhs[%s] not of type [%s]", Utils.safeObjectClassGetName(lhs), Utils.safeObjectClassGetName(rhs), DoubleMeanHolder.class.getName() ); } }
Source:
<code>protected void executeCommand() { int replicaCount = (getGlusterVolume().getVolumeType() == GlusterVolumeType.REPLICATE <START> || getGlusterVolume().getVolumeType() == GlusterVolumeType.DISTRIBUTED_REPLICATE) <END> ? getParameters().getReplicaCount() : 0; startSubStep(); VDSReturnValue returnValue = runVdsCommand( VDSCommandType.StartRemoveGlusterVolumeBricks, new GlusterVolumeRemoveBricksVDSParameters(upServer.getId(), getGlusterVolumeName(), bricks, replicaCount, false)); setSucceeded(returnValue.getSucceeded()); if (!getSucceeded()) { handleVdsError(AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED, returnValue.getVdsError() .getMessage()); return; } GlusterAsyncTask glusterTask = (GlusterAsyncTask) returnValue.getReturnValue(); handleTaskReturn(glusterTask); updateBricksWithTaskID(glusterTask); getReturnValue().setActionReturnValue(returnValue.getReturnValue()); }</code><technical_language>above. GlusterVolumeType's isReplicate method</technical_language>

Target:
protected void executeCommand() { int replicaCount = getGlusterVolume().getVolumeType().isReplicatedType() ? getParameters().getReplicaCount() : 0; startSubStep(); VDSReturnValue returnValue = runVdsCommand( VDSCommandType.StartRemoveGlusterVolumeBricks, new GlusterVolumeRemoveBricksVDSParameters(upServer.getId(), getGlusterVolumeName(), bricks, replicaCount, false)); setSucceeded(returnValue.getSucceeded()); if (!getSucceeded()) { handleVdsError(AuditLogType.START_REMOVING_GLUSTER_VOLUME_BRICKS_FAILED, returnValue.getVdsError() .getMessage()); return; } GlusterAsyncTask glusterTask = (GlusterAsyncTask) returnValue.getReturnValue(); handleTaskReturn(glusterTask); updateBricksWithTaskID(glusterTask); getReturnValue().setActionReturnValue(returnValue.getReturnValue()); }
Source:
<code>private static Optional<MethodDeclaration> addNumericPredictor(final NumericPredictor numericPredictor, final ClassOrInterfaceDeclaration tableTemplate, int predictorArity) { try { templateEvaluate = StaticJavaParser.parseResource(KIE_PMML_EVALUATE_METHOD_TEMPLATE_JAVA); cloneEvaluate = templateEvaluate.clone(); ClassOrInterfaceDeclaration evaluateTemplateClass = cloneEvaluate.getClassByName(KIE_PMML_EVALUATE_METHOD_TEMPLATE) .orElseThrow(() -> new RuntimeException(MAIN_CLASS_NOT_FOUND)); MethodDeclaration methodTemplate; if (Objects.equals(1, numericPredictor.getExponent())) { methodTemplate = getNumericPredictorWithoutExponentTemplate(numericPredictor, evaluateTemplateClass); } else { methodTemplate = getNumericPredictorWithExponentTemplate(numericPredictor, evaluateTemplateClass); } return addMethod(methodTemplate, tableTemplate, "evaluateNumericPredictor" + predictorArity); } catch (Exception e) { <START> return Optional.empty(); <END> } }</code><technical_language>this happen? working a template created</technical_language>

Target:
private static MethodDeclaration addNumericPredictor(final NumericPredictor numericPredictor, final ClassOrInterfaceDeclaration tableTemplate, int predictorArity) { try { templateEvaluate = StaticJavaParser.parseResource(KIE_PMML_EVALUATE_METHOD_TEMPLATE_JAVA); cloneEvaluate = templateEvaluate.clone(); ClassOrInterfaceDeclaration evaluateTemplateClass = cloneEvaluate.getClassByName(KIE_PMML_EVALUATE_METHOD_TEMPLATE) .orElseThrow(() -> new RuntimeException(MAIN_CLASS_NOT_FOUND)); MethodDeclaration methodTemplate; if (Objects.equals(1, numericPredictor.getExponent())) { methodTemplate = getNumericPredictorWithoutExponentTemplate(numericPredictor, evaluateTemplateClass); } else { methodTemplate = getNumericPredictorWithExponentTemplate(numericPredictor, evaluateTemplateClass); } return addMethod(methodTemplate, tableTemplate, "evaluateNumericPredictor" + predictorArity); } catch (Exception e) { throw new KiePMMLInternalException(String.format("Failed to add NumericPredictor %s", numericPredictor.getName()), e); } }
Source:
<code><START> public void testDataProviderswithDP(@NoInjection final Method method, final Class clazz) throws IllegalAccessException, InstantiationException, InvocationTargetException { <END> System.err.println("Method: " + method + " Class: " + clazz.getName()); Object instance = clazz.newInstance(); for (final Method otherMethod : clazz.getMethods()) { if (otherMethod.isAnnotationPresent(BeforeSuite.class)) { otherMethod.invoke(instance); } } method.invoke(instance); }</code><technical_language>I figured out weird issue having..</technical_language>

Target:
public void testDataProviderswithDP(@NoInjection final Method method, final Class clazz) throws IllegalAccessException, InstantiationException { Object instance = clazz.newInstance(); Assert.assertTrue(HtsjdkTest.class.isAssignableFrom(clazz), "Test Classes must extend HtsJdkTest: " + clazz.getName()); Set<Method> methodSet = Sets.newHashSet(); methodSet.addAll(Arrays.asList(clazz.getDeclaredMethods())); methodSet.addAll(Arrays.asList(clazz.getMethods())); for (final Method otherMethod : methodSet) { if (otherMethod.isAnnotationPresent(BeforeSuite.class)) { try { otherMethod.setAccessible(true); otherMethod.invoke(instance); } catch (IllegalAccessException | InvocationTargetException e) { throw new IllegalStateException(String.format("@BeforeClass threw an exception (%s::%s). Dependent tests will be skipped. Please fix.", clazz.getName(), method.getName()), e); } } if (otherMethod.isAnnotationPresent(BeforeClass.class)) { try { otherMethod.setAccessible(true); otherMethod.invoke(instance); } catch (IllegalAccessException | InvocationTargetException e) { throw new IllegalStateException(String.format("@BeforeSuite threw an exception (%s::%s). Dependent tests will be skipped. Please fix.", clazz.getName(), method.getName()), e); } } } try { method.setAccessible(true); method.invoke(instance); } catch (IllegalAccessException | InvocationTargetException e) { throw new IllegalStateException(String.format("@DataProvider threw an exception (%s::%s). Dependent tests will be skipped. Please fix.", clazz.getName(), method.getName()), e); } }
Source:
<code>public void vuapCheckTopAreasMercury(Page page, String slot) { AdsBaseObject ads = new AdsBaseObject(driver, page.getUrl()); final AutoplayVuap vuap = new AutoplayVuap(driver, slot, ads.findFirstIframeWithAd(slot), true ); ads.scrollToSlot(slot); vuap.clickOnArea(1); vuap.clickOnArea(2); List<String> tabs = new ArrayList<String>(driver.getWindowHandles()); Assert.assertTrue( tabs.size() == 3, "There should be three tabs opened after two clicks." <START> ); <END> final String actual = ads.switchToNewBrowserTab(); Assert.assertTrue( actual.equals("<LINK_0>"), "Top part of creative should point to FANDOM page but it points to " + actual ); }</code><technical_language>discussed recently, assertion Assertion.assertEquals(tabs.size(), 3, "There tabs opened clicks."); is more readable easier debug wrong</technical_language>

Target:
public void vuapCheckTopAreasMercury(Page page, String slot) { AdsBaseObject ads = new AdsBaseObject(driver, page.getUrl()); final AutoplayVuap vuap = new AutoplayVuap(driver, slot, ads.findFirstIframeWithAd(slot), true ); ads.scrollToSlot(slot); vuap.clickOnArea(1); vuap.clickOnArea(2); List<String> tabs = new ArrayList<String>(driver.getWindowHandles()); Assert.assertEquals( tabs.size(), 3, "There should be three tabs opened after two clicks." ); final String actual = ads.switchToNewBrowserTab(); Assert.assertEquals( actual, AD_REDIRECT_URL, "Top part of creative should point to FANDOM page but it points to " + actual ); }
Source:
<code>public static SequencerDto asDto(SequencerReference from) { SequencerDto dto = new SequencerDto(); dto.setId(from.getId()); dto.setDateCommissioned(getDateString(from.getDateCommissioned())); dto.setDateDecommissioned(getDateString(from.getDateDecommissioned())); dto.setName(from.getName()); dto.setPlatform(asDto(from.getPlatform())); dto.setSerialNumber(from.getSerialNumber()); <START> return dto; <END> }</code><technical_language>ipAddress set</technical_language>

Target:
public static SequencerDto asDto(SequencerReference from) { SequencerDto dto = new SequencerDto(); dto.setId(from.getId()); dto.setDateCommissioned(getDateString(from.getDateCommissioned())); dto.setDateDecommissioned(getDateString(from.getDateDecommissioned())); dto.setIp(from.getIpAddress()); dto.setName(from.getName()); dto.setPlatform(asDto(from.getPlatform())); dto.setSerialNumber(from.getSerialNumber()); return dto; }
Source:
<code>@Override public void write(JsonWriter out, Date value) throws IOException { <START> if (value == null) <END> out.nullValue(); else { String formatted = ISO8601Utils.format(value); out.value(formatted.replace('T', ' ').substring(0, formatted.length() - 1)); } }</code><technical_language>Do mind adding { } here? more robust refactoring</technical_language>

Target:
@Override public void write(JsonWriter out, Date value) throws IOException { if (value == null) { out.nullValue(); } else { String formatted = ISO8601Utils.format(value); out.value(formatted.replace('T', ' ').substring(0, formatted.length() - 1)); } }
Source:
<code>private static void asyncRemoveFromBatchlog(Collection<InetAddressAndPort> endpoints, UUID uuid) { MessageOut<UUID> message = new MessageOut<>(MessagingService.Verb.BATCH_REMOVE, uuid, UUIDSerializer.serializer); for (InetAddressAndPort target : endpoints) { if (logger.isTraceEnabled()) logger.trace("Sending batchlog remove request to {}", uuid, target); if (canDoLocalRequest(target)) <START> performLocally(Stage.MUTATION, Replica.fullStandin(target), () -> BatchlogManager.remove(uuid)); <END> else MessagingService.instance().sendOneWay(message, target); } }</code><technical_language>Full stand in! a replica is necessary downstream isn't. I checked necessary this decide hint decision of hint is based transient state</technical_language>

Target:
private static void asyncRemoveFromBatchlog(Collection<InetAddressAndPort> endpoints, UUID uuid) { MessageOut<UUID> message = new MessageOut<>(MessagingService.Verb.BATCH_REMOVE, uuid, UUIDSerializer.serializer); for (InetAddressAndPort target : endpoints) { if (logger.isTraceEnabled()) logger.trace("Sending batchlog remove request to {}", uuid, target); if (canDoLocalRequest(target)) performLocally(Stage.MUTATION, SystemReplicas.getSystemReplica(target), () -> BatchlogManager.remove(uuid)); else MessagingService.instance().sendOneWay(message, target); } }
Source:
<code>public Object invoke(Object target, Object[] args, HandleSupplier handle) { try { return methodHandle.bindTo(target).invokeWithArguments(args); } catch (Throwable t) { <START> throw Throwables.uncheck(t); <END> } }</code><technical_language>catch Exception Error passes uncaught</technical_language>

Target:
public Object invoke(Object target, Object[] args, HandleSupplier handle) { try { return methodHandle.bindTo(target).invokeWithArguments(args); } catch (Throwable t) { throw Throwables.sneakyThrow(t); } }
Source:
<code>String getPathOfBatchDir(String prefix) { assert(m_batched); String hostId = ""; if(m_uniquenames) { hostId = "-("+VoltDB.instance().getHostMessenger().getHostId()+")"; } <START> return m_outDir.getPath() + File.separator + prefix + m_nonce + "-" + m_dateformat.get().format(start) + hostId; <END> }</code><technical_language>This is changing batch directory name. This changed. filenames need changed</technical_language>

Target:
String getPathOfBatchDir(String prefix) { assert(m_batched); return m_outDir.getPath() + File.separator + prefix + m_nonce + "-" + m_dateformat.get().format(start); }