auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testLargeMessage() throws Exception { int beforeLogSize = logViewer.getAllRemoteSystemLogs().length; String symbol2 = FixedSizeSymbolGenerator.generateMessageMB(3); OMElement response; <START> for (int i = 0; i < 1; i++) { <END> response = axis2Client.sendCustomQuoteRequest(getMainSequenceURL(), null, "MSFT" + symbol2); Assert.assertNotNull(response); Assert.assertTrue(response.toString().contains("MSFT"), "Incorrect symbol in response"); response = null; } LogEvent[] logs = logViewer.getAllRemoteSystemLogs(); int afterLogSize = logs.length; int forEachCount = 0; for (int i = (afterLogSize - beforeLogSize - 1); i >= 0; i--) { String message = logs[i].getMessage(); if (message.contains("foreach = in")) { if (!message.contains("MSFT")) { Assert.fail("Incorrect message entered ForEach scope. Could not find symbol MSFT .."); } forEachCount++; } } Assert.assertEquals(forEachCount, 1, "Count of messages entered ForEach scope is incorrect"); }</code><technical_language>iteration ? do need for loop</technical_language>

Target:
public void testLargeMessage() throws Exception { int beforeLogSize = logViewer.getAllRemoteSystemLogs().length; String symbol2 = FixedSizeSymbolGenerator.generateMessageMB(3); OMElement response; response = axis2Client.sendCustomQuoteRequest(getMainSequenceURL(), null, "MSFT" + symbol2); Assert.assertNotNull(response); Assert.assertTrue(response.toString().contains("MSFT"), "Incorrect symbol in response"); LogEvent[] logs = logViewer.getAllRemoteSystemLogs(); int afterLogSize = logs.length; int forEachCount = 0; for (int i = (afterLogSize - beforeLogSize - 1); i >= 0; i--) { String message = logs[i].getMessage(); if (message.contains("foreach = in")) { if (!message.contains("MSFT")) { Assert.fail("Incorrect message entered ForEach scope. Could not find symbol MSFT .."); } forEachCount++; } } Assert.assertEquals(forEachCount, 1, "Count of messages entered ForEach scope is incorrect"); }
Source:
<code><START> public Map getConsumerParams() { <END> return consumerParams; }</code><technical_language>key/value types ? Map<String, String></technical_language>

Target:
public Map<String, String> getConsumerParams() { return consumerParams; }
Source:
<code>public void testListEmptyRootDirectory() throws IOException { skipIfUnsupported(TEST_ROOT_TESTS_ENABLED); FileSystem fs = getFileSystem(); Path root = new Path("/"); FileStatus[] statuses = fs.listStatus(root); for (FileStatus status : statuses) { ContractTestUtils.assertDeleted(fs, status.getPath(), true); } <START> FileStatus[] list1 = fs.listStatus(root); <END> assertEquals("listStatus on empty root-directory returned found: " + join("\n", list1), 0, list1.length); assertNoElements("listFiles(/, false)", fs.listFiles(root, false)); assertNoElements("listFiles(/, true)", fs.listFiles(root, true)); assertNoElements("listLocatedStatus(/)", fs.listLocatedStatus(root)); assertIsDirectory(root); }</code><technical_language>nit: please some name is easier understand eg. rootListStatus</technical_language>

Target:
public void testListEmptyRootDirectory() throws IOException { skipIfUnsupported(TEST_ROOT_TESTS_ENABLED); FileSystem fs = getFileSystem(); Path root = new Path("/"); FileStatus[] statuses = fs.listStatus(root); for (FileStatus status : statuses) { ContractTestUtils.assertDeleted(fs, status.getPath(), true); } FileStatus[] rootListStatus = fs.listStatus(root); assertEquals("listStatus on empty root-directory returned found: " + join("\n", rootListStatus), 0, rootListStatus.length); assertNoElements("listFiles(/, false)", fs.listFiles(root, false)); assertNoElements("listFiles(/, true)", fs.listFiles(root, true)); assertNoElements("listLocatedStatus(/)", fs.listLocatedStatus(root)); assertIsDirectory(root); }
Source:
<code>public static void main(String ... argv) { <START> Dataset ds = createAssembler() ; <END> loadData(ds , "data-es.ttl") ; queryData(ds) ; }</code><technical_language>changed existing JenaTextExample1.java example of jena-text/Lucene. a copy instead, leaving original intact, need example of configure a Lucene index code. new class called JenaTextESExample1 similar</technical_language>

Target:
public static void main(String ... argv) { Dataset ds = createCode() ; loadData(ds , "data.ttl") ; queryData(ds) ; }
Source:
<code>public DatastreamTask getAssignedDatastreamTask(String instance, String taskName) { String content = _zkclient.ensureReadData(KeyBuilder.instanceAssignment(_cluster, instance, taskName)); DatastreamTaskImpl task = DatastreamTaskImpl.fromJson(content); String dsName = task.getDatastreamName(); task.setZkAdapter(this); if (_zkclient.exists(KeyBuilder.datastream(_cluster, dsName))) { String dsContent = _zkclient.ensureReadData(KeyBuilder.datastream(_cluster, dsName)); Datastream stream = DatastreamJSonUtil.getDatastreamFromJsonString(dsContent); <START> task.setDatastream(stream); <END> } return task; }</code><technical_language>I remove this, reading datastream for task. Coordinator central place up-to date knowledge of datastreams . If datastream task needs that, get coordinator</technical_language>

Target:
public DatastreamTask getAssignedDatastreamTask(String instance, String taskName) { String content = _zkclient.ensureReadData(KeyBuilder.instanceAssignment(_cluster, instance, taskName)); DatastreamTaskImpl task = DatastreamTaskImpl.fromJson(content); String dsName = task.getDatastreamName(); task.setZkAdapter(this); String dsPath = KeyBuilder.datastream(_cluster, dsName); if (!_zkclient.exists(dsPath)) { throw new RuntimeException("Missing Datastream in ZooKeeper for task=" + task + " instance=" + instance); } String dsContent = _zkclient.ensureReadData(dsPath); Datastream stream = DatastreamUtils.fromJSON(dsContent); task.setDatastream(stream); return task; }
Source:
<code>protected void canceling() { <START> super.cancel(); <END> }</code><technical_language>call analysisReady(false) here</technical_language>

Target:
protected void canceling() { super.cancel(); segmentStoreReady(false); }
Source:
<code>public void size(final int... size) { this.size = asList(toObject(size)); <START> } <END></code><technical_language>singular</technical_language>

Target:
public Paging size(final int... size) { this.size = asList(toObject(size)); return this; }
Source:
<code>private boolean getJsonConfigs() { HttpClient.HttpResponse response; boolean update = false; if (this.client == null) { return update; } try { String uripath = "agent/jmx/configs?timestamp=" + lastJsonConfigTs; response = client.request("GET", "", uripath); if (!response.isResponse2xx()) { log.warn( "Failed collecting JSON configs: [" + response.getResponseCode() + "] " + response.getResponseBody()); return update; } else if (response.getResponseCode() == 204) { log.debug("No configuration changes..."); return update; } InputStream jsonInputStream = IOUtils.toInputStream(response.getResponseBody(), UTF_8); JsonParser parser = new JsonParser(jsonInputStream); int timestamp = ((Integer) parser.getJsonTimestamp()).intValue(); if (timestamp > lastJsonConfigTs) { adJsonConfigs = (HashMap<String, Object>) parser.getJsonConfigs(); lastJsonConfigTs = timestamp; update = true; log.info("update is in order - updating timestamp: " + lastJsonConfigTs); for (String checkName : adJsonConfigs.keySet()) { <START> log.debug("check " + checkName + " will be run"); <END> } } } catch (JsonProcessingException e) { log.error("error processing JSON response: " + e); } catch (IOException e) { log.error("unable to collect remote JMX configs: " + e); } return update; }</code><technical_language>message a bit more explicit, do of: suggestion log.debug("received config for check '" + checkName + "'");</technical_language>

Target:
private boolean getJsonConfigs() { HttpClient.HttpResponse response; boolean update = false; if (this.client == null) { return update; } try { String uripath = "agent/jmx/configs?timestamp=" + lastJsonConfigTs; response = client.request("GET", "", uripath); if (!response.isResponse2xx()) { log.warn( "Failed collecting JSON configs: [" + response.getResponseCode() + "] " + response.getResponseBody()); return update; } else if (response.getResponseCode() == 204) { log.debug("No configuration changes..."); return update; } InputStream jsonInputStream = IOUtils.toInputStream(response.getResponseBody(), UTF_8); JsonParser parser = new JsonParser(jsonInputStream); int timestamp = ((Integer) parser.getJsonTimestamp()).intValue(); if (timestamp > lastJsonConfigTs) { adJsonConfigs = (HashMap<String, Object>) parser.getJsonConfigs(); lastJsonConfigTs = timestamp; update = true; log.info("update is in order - updating timestamp: " + lastJsonConfigTs); for (String checkName : adJsonConfigs.keySet()) { log.debug("received config for check '" + checkName + "'"); } } } catch (JsonProcessingException e) { log.error("error processing JSON response: " + e); } catch (IOException e) { log.error("unable to collect remote JMX configs: " + e); } return update; }
Source:
<code>private void display() throws Failure { final PrintWriter stdout = toPrintWriter(out); try { for (final Project p : db.projects().all()) { if (p.getNameKey().equals(wildProject)) { continue; } final ProjectState e = projectCache.get(p.getNameKey()); final ProjectControl pctl = e.controlFor(currentUser); <START> if (e != null && pctl.isVisible()) { <END> if (showBranch != null) { if (pctl.controlForRef(showBranch).isVisible()) { ObjectId id = getObjectIdForBranch(p.getNameKey(), showBranch); if (id != null) { stdout.print(id.name() + " "); stdout.print(p.getName()); stdout.println(); } } } else { stdout.print(p.getName()); stdout.println(); } } } } catch (OrmException e) { throw new Failure(1, "fatal: database error", e); } finally { stdout.flush(); } }</code><technical_language>e != null test is pointless now, hoisted e.controlFor call test. if projectCache.get returns null crash NPE. Please fix this correctly handle a null return projectCache.get()</technical_language>

Target:
private void display() throws Failure { final PrintWriter stdout = toPrintWriter(out); try { for (final Project p : db.projects().all()) { if (p.getNameKey().equals(wildProject)) { continue; } final ProjectState e = projectCache.get(p.getNameKey()); if (e != null && e.controlFor(currentUser).isVisible()) { final ProjectControl pctl = e.controlFor(currentUser); if (showBranch != null) { if (pctl.controlForRef(showBranch).isVisible()) { ObjectId id = getObjectIdForBranch(p.getNameKey(), showBranch); if (id != null) { stdout.print(id.name() + " "); stdout.print(p.getName()); stdout.println(); } } } else { stdout.print(p.getName()); stdout.println(); } } } } catch (OrmException e) { throw new Failure(1, "fatal: database error", e); } finally { stdout.flush(); } }
Source:
<code>public void cleanUp() { this.client.stop(); this.processor.cleanUp(); <START> this.running.set(true); <END> }</code><technical_language>this set false</technical_language>

Target:
public void cleanUp() { this.client.stop(); this.processor.cleanUp(); this.running.set(false); }
Source:
<code>protected PathRef getExistingUserWorkspaceRoot(CoreSession session, String username, DocumentModel context) { PathRef rootref = new PathRef(computePathUserWorkspaceRoot(session, username, context)); if (session.exists(rootref)) { return rootref; } DocumentModel uwsRootModel = doCreateUserWorkspacesRoot(session, rootref); ACP acp = initUserWorkspaceRootACL(); DocumentModel uwsRootDoc = CoreInstance.doPrivileged(session, s -> { DocumentModel docModel; try { docModel = s.getOrCreateDocument(uwsRootModel, doc -> { s.setACP(doc.getRef(), acp, true); return doc; }); } catch (DocumentNotFoundException e) { targetDomainName = null; PathRef ref = new PathRef(computePathUserWorkspaceRoot(session, username, null)); <START> DocumentModel rootModel = doCreateUserWorkspacesRoot(session, ref); <END> docModel = s.getOrCreateDocument(rootModel, doc -> { s.setACP(doc.getRef(), acp, true); return doc; }); } docModel.detach(true); return docModel; }); return new PathRef(uwsRootDoc.getPathAsString()); }</code><technical_language>session -> s lines</technical_language>

Target:
protected PathRef getExistingUserWorkspaceRoot(CoreSession session, String username, DocumentModel context) { PathRef rootref = new PathRef(computePathUserWorkspaceRoot(session, username, context)); if (session.exists(rootref)) { return rootref; } String path = CoreInstance.doPrivileged(session, s -> { DocumentModel docModel; try { DocumentModel uwsRootModel = doCreateUserWorkspacesRoot(session, rootref); docModel = s.getOrCreateDocument(uwsRootModel, doc -> initCreateUserWorkspacesRoot(s, doc)); } catch (DocumentNotFoundException e) { targetDomainName = null; PathRef ref = new PathRef(computePathUserWorkspaceRoot(s, username, null)); DocumentModel rootModel = doCreateUserWorkspacesRoot(s, ref); docModel = s.getOrCreateDocument(rootModel, doc -> initCreateUserWorkspacesRoot(s, doc)); } return docModel.getPathAsString(); }); return new PathRef(path); }
Source:
<code>private boolean processAttributeElement(HttpMessage message, int depth, String baseURL, Element element, String attributeName) { String localURL = element.getAttributeValue(attributeName); if (localURL == null) { return false; } if (!attributeName.equalsIgnoreCase("ping")) { processURL(message, depth, localURL, baseURL); } else { for (String pingURL : localURL.split(" ")) { <START> if (!pingURL.equals(" ")) { <END> processURL(message, depth, pingURL, baseURL); } } } return true; }</code><technical_language>do (same page)</technical_language>

Target:
private boolean processAttributeElement(HttpMessage message, int depth, String baseURL, Element element, String attributeName) { String localURL = element.getAttributeValue(attributeName); if (localURL == null) { return false; } if (!attributeName.equalsIgnoreCase("ping")) { processURL(message, depth, localURL, baseURL); } else { for (String pingURL : localURL.split("\\s")) { if (!pingURL.isEmpty()) { processURL(message, depth, pingURL, baseURL); } } } return true; }
Source:
<code>public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { try { HttpServletRequest req = (HttpServletRequest)request; HttpSession session = req.getSession(); boolean persistentAuth = Collections.list(req.getHeaders(FiltersHelper.Constants.HEADER_PREFER)).contains("persistent-auth"); if (persistentAuth) { try { int ttlValue = Integer.parseInt(req.getHeader("Session-TTL")) * SECONDS_IN_MINUTE; if (ttlValue >= MINIMAL_SESSION_TTL) { session.setMaxInactiveInterval(ttlValue); } session.setAttribute( SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY ) ); } catch (NumberFormatException ex) { log.error("Session-TTL header was not passed. Not setting TTL value"); } } <START> chain.doFilter(request, response); <END> if (!persistentAuth && FiltersHelper.isAuthenticated(req)) { InitialContext ctx = new InitialContext(); try { FiltersHelper.getBackend(ctx).runAction( VdcActionType.LogoutBySession, new VdcActionParametersBase( (String) req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY) ) ); req.getSession().invalidate(); } finally { ctx.close(); } } } catch (Exception ex) { log.error("Error in REST-API session management. ", ex); } }</code><technical_language>this of try/catch scope</technical_language>

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; boolean persistentAuth = Collections.list(req.getHeaders(FiltersHelper.Constants.HEADER_PREFER)).contains("persistent-auth"); HttpSession session = req.getSession(); if (persistentAuth) { try { int ttlValue = Integer.parseInt(req.getHeader("Session-TTL")) * SECONDS_IN_MINUTE; if (ttlValue >= MINIMAL_SESSION_TTL) { session.setMaxInactiveInterval(ttlValue); } session.setAttribute( SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY ) ); } catch (NumberFormatException ex) { log.error("Session-TTL header was not passed. Not setting TTL value"); } } chain.doFilter(request, response); try { if (!persistentAuth && FiltersHelper.isAuthenticated(req)) { InitialContext ctx = new InitialContext(); try { FiltersHelper.getBackend(ctx).runAction( VdcActionType.LogoutBySession, new VdcActionParametersBase( (String) req.getAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY) ) ); req.getSession().invalidate(); } finally { ctx.close(); } } } catch (Exception ex) { log.error("Error in REST-API session management. ", ex); } }
Source:
<code><START> public HomeView( <END> Binder uiBinder) { initWidget(uiBinder.createAndBindUi(this)); }</code><technical_language>Remove public</technical_language>

Target:
HomeView(Binder uiBinder) { initWidget(uiBinder.createAndBindUi(this)); }
Source:
<code><START> public MachineReadableReport(ValidationInfo info, String creationDate, String processingTime, FeaturesReport featuresReport) { <END> this.info = info; this.creationDate = creationDate; this.processingTime = processingTime; this.pdfFeatures = featuresReport; }</code><technical_language>remove public</technical_language>

Target:
private MachineReadableReport(ValidationInfo info, String creationDate, String processingTime, FeaturesReport featuresReport) { this.info = info; this.creationDate = creationDate; this.processingTime = processingTime; this.pdfFeatures = featuresReport; }
Source:
<code>public DefaultProxyAuthenticator(Credentials credentials) throws MalformedChallengeException { this.proxyCredentials = credentials; basicScheme = new BasicScheme(); <START> basicScheme.processChallenge(new BasicHeader(AUTH.PROXY_AUTH, "BASIC realm=\"proxy\"")); <END> }</code><technical_language>constants</technical_language>

Target:
public DefaultProxyAuthenticator(Credentials credentials) throws MalformedChallengeException { this.proxyCredentials = credentials; basicScheme = new BasicScheme(); basicScheme.processChallenge(new BasicHeader(AUTH.PROXY_AUTH, PassThroughConstants.PROXY_BASIC_REALM)); }
Source:
<code>public List<DataSegment> getUnusedSegmentsForInterval(final String dataSource, final Interval interval) { List<DataSegment> matchingSegments = connector.getDBI().withHandle( new HandleCallback<List<DataSegment>>() { @Override public List<DataSegment> withHandle(Handle handle) throws IOException, SQLException { return handle.createQuery( String.format( "SELECT payload FROM %s WHERE dataSource = :dataSource and start >= :start and \"end\" <= :end and used = false", dbTables.getSegmentsTable() ) ) .bind("dataSource", dataSource) .bind("start", interval.getStart().toString()) .bind("end", interval.getEnd().toString()) .fold( Lists.<DataSegment>newArrayList(), new Folder3<List<DataSegment>, Map<String, Object>>() { @Override public List<DataSegment> fold( List<DataSegment> accumulator, Map<String, Object> stringObjectMap, FoldController foldController, StatementContext statementContext ) throws SQLException { try { DataSegment segment = jsonMapper.readValue( <START> (byte[])stringObjectMap.get("payload"), <END> DataSegment.class ); accumulator.add(segment); return accumulator; } catch (Exception e) { throw Throwables.propagate(e); } } } ); } } ); log.info("Found %,d segments for %s for interval %s.", matchingSegments.size(), dataSource, interval); return matchingSegments; }</code><technical_language>hmm, cast new metadata storage mapping, fix that</technical_language>

Target:
public List<DataSegment> getUnusedSegmentsForInterval(final String dataSource, final Interval interval) { List<DataSegment> matchingSegments = connector.getDBI().withHandle( new HandleCallback<List<DataSegment>>() { @Override public List<DataSegment> withHandle(Handle handle) throws IOException, SQLException { return handle .createQuery( String.format( "SELECT payload FROM %s WHERE dataSource = :dataSource and start >= :start and \"end\" <= :end and used = false", dbTables.getSegmentsTable() ) ) .bind("dataSource", dataSource) .bind("start", interval.getStart().toString()) .bind("end", interval.getEnd().toString()) .map(ByteArrayMapper.FIRST) .fold( Lists.<DataSegment>newArrayList(), new Folder3<List<DataSegment>, byte[]>() { @Override public List<DataSegment> fold( List<DataSegment> accumulator, byte[] payload, FoldController foldController, StatementContext statementContext ) throws SQLException { try { accumulator.add(jsonMapper.readValue(payload, DataSegment.class)); return accumulator; } catch (Exception e) { throw Throwables.propagate(e); } } } ); } } ); log.info("Found %,d segments for %s for interval %s.", matchingSegments.size(), dataSource, interval); return matchingSegments; }
Source:
<code>private Registry<ConnectionSocketFactory> getSchemeRegistry(final URI originalUri) { <START> UnixConnectionSocketFactory unix = new UnixConnectionSocketFactory(originalUri); <END> return RegistryBuilder .<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.getSocketFactory()) .register("https", SSLConnectionSocketFactory.getSocketFactory()) .register("unix", unix) .build(); }</code><technical_language>final inline</technical_language>

Target:
private Registry<ConnectionSocketFactory> getSchemeRegistry(final URI originalUri) { return RegistryBuilder .<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.getSocketFactory()) .register("https", SSLConnectionSocketFactory.getSocketFactory()) .register("unix", new UnixConnectionSocketFactory(originalUri)) .build(); }
Source:
<code>public HashConfigurationBuilder capacityFactor(float capacityFactor) { <START> if (numSegments < 0) throw new IllegalArgumentException("capacityFactor must be positive"); <END> this.capacityFactor = capacityFactor; return this; }</code><technical_language>typo: capacityFactor instead of numSegments</technical_language>

Target:
public HashConfigurationBuilder capacityFactor(float capacityFactor) { if (capacityFactor < 0) throw new IllegalArgumentException("capacityFactor must be positive"); this.capacityFactor = capacityFactor; return this; }
Source:
<code><START> public RepositoryGroups() { <END> List<String> groups = split( preferences.get(PREFS_GROUPS, EMPTY_STRING)); for (String groupIdString : groups) { UUID groupId = UUID.fromString(groupIdString); String name = preferences .get(PREFS_GROUP_NAME_PREFIX + groupIdString, EMPTY_STRING); List<String> repos = split(preferences .get(PREFS_GROUP_PREFIX + groupIdString, EMPTY_STRING)); RepositoryGroup group = new RepositoryGroup(groupId, name, repos); groupMap.put(groupId, group); } }</code><technical_language>This a singleton</technical_language>

Target:
private RepositoryGroups() { List<String> groups = split( preferences.get(PREFS_GROUPS, EMPTY_STRING)); for (String groupIdString : groups) { UUID groupId = UUID.fromString(groupIdString); String name = preferences .get(PREFS_GROUP_NAME_PREFIX + groupIdString, EMPTY_STRING); List<File> repos = split(preferences .get(PREFS_GROUP_PREFIX + groupIdString, EMPTY_STRING)) .stream().map(File::new) .collect(Collectors.toList()); RepositoryGroup group = new RepositoryGroup(groupId, name, repos); groupMap.put(groupId, group); } }
Source:
<code>static PatchListEntry readFrom(final InputStream in) throws IOException { final ChangeType changeType = readEnum(in, ChangeType.values()); final PatchType patchType = readEnum(in, PatchType.values()); final String oldName = readString(in); final String newName = readString(in); final byte[] hdr = readBytes(in); final int editCount = readVarInt32(in); final LineEdit[] editArray = new LineEdit[editCount]; for (int i = 0; i < editCount; i++) { editArray[i] = readEdit(in); int innerCount = readVarInt32(in); if (0 < innerCount) { <START> LineEdit[] inner = new LineEdit[innerCount]; <END> for (int innerIdx = 0; innerIdx < innerCount; innerIdx++) { inner[innerIdx] = readEdit(in); } editArray[i] = new LineEdit(editArray[i], toList(inner)); } } return new PatchListEntry(changeType, patchType, oldName, newName, hdr, toList(editArray)); }</code><technical_language>edits BaseEdits LineEdits</technical_language>

Target:
static PatchListEntry readFrom(final InputStream in) throws IOException { final ChangeType changeType = readEnum(in, ChangeType.values()); final PatchType patchType = readEnum(in, PatchType.values()); final String oldName = readString(in); final String newName = readString(in); final byte[] hdr = readBytes(in); final int editCount = readVarInt32(in); final LineEdit[] editArray = new LineEdit[editCount]; for (int i = 0; i < editCount; i++) { editArray[i] = readEdit(in); int innerCount = readVarInt32(in); if (0 < innerCount) { BaseEdit[] inner = new BaseEdit[innerCount]; for (int innerIdx = 0; innerIdx < innerCount; innerIdx++) { inner[innerIdx] = readEdit(in); } editArray[i] = new LineEdit(editArray[i], Collections.unmodifiableList(Arrays .asList((inner)))); } } return new PatchListEntry(changeType, patchType, oldName, newName, hdr, Collections.unmodifiableList(Arrays.asList(editArray))); }
Source:
<code>private static XmlSuite extractTestNames(XmlSuite s, List<String> testNames) { List<XmlSuite> childSuites = s.getChildSuites(); for (int i = 0; i < childSuites.size(); i++) { <START> XmlSuite child = childSuites.get(0); <END> XmlSuite extracted = extractTestNames(child, testNames); if (extracted != child) { childSuites.set(i, extracted); } } List<XmlTest> tests = Lists.newArrayList(); for (XmlTest xt : s.getTests()) { for (String tn : testNames) { if (xt.getName().equals(tn)) { tests.add(xt); } } } if (tests.size() == 0) { return s; } else { XmlSuite result = (XmlSuite) s.clone(); result.getTests().clear(); result.getTests().addAll(tests); return result; } }</code><technical_language>get(i) here</technical_language>

Target:
private static XmlSuite extractTestNames(XmlSuite s, List<String> testNames) { extractTestNamesFromChildSuites(s, testNames); List<XmlTest> tests = Lists.newArrayList(); for (XmlTest xt : s.getTests()) { for (String tn : testNames) { if (xt.getName().equals(tn)) { tests.add(xt); } } } if (tests.size() == 0) { return s; } else { XmlSuite result = (XmlSuite) s.clone(); result.getTests().clear(); result.getTests().addAll(tests); return result; } }
Source:
<code>public AbstractContainerRequestValueFactory<?> createValueFactory(Parameter parameter) { <START> final boolean isOptionalPrincipal = parameter.getRawType().equals(Optional.class) <END> && ParameterizedType.class.isAssignableFrom(parameter.getType().getClass()) && principalClassSet.contains(((ParameterizedType) parameter.getType()).getActualTypeArguments()[0]); if (!parameter.isAnnotationPresent(Auth.class) || !(principalClassSet.contains(parameter.getRawType()) || isOptionalPrincipal)) { return null; } else if (isOptionalPrincipal) { return new OptionalPrincipalContainerRequestValueFactory(); } else { return new PrincipalContainerRequestValueFactory(); } }</code><technical_language>I implement this in a more concise form well: java if (!parameter.isAnnotationPresent(Auth.class)) { return null; } else if (principalClassSet.contains(parameter.getRawType())) { return new PrincipalContainerRequestValueFactory(); } else { final boolean isOptionalPrincipal = parameter.getRawType() == Optional.class && ParameterizedType.class.isAssignableFrom(parameter.getType().getClass()) && principalClassSet.contains(((ParameterizedType) parameter.getType()).getActualTypeArguments()[0]); return isOptionalPrincipal ? new OptionalPrincipalContainerRequestValueFactory() : null; }</technical_language>

Target:
public AbstractContainerRequestValueFactory<?> createValueFactory(Parameter parameter) { if (!parameter.isAnnotationPresent(Auth.class)) { return null; } else if (principalClassSet.contains(parameter.getRawType())) { return new PrincipalContainerRequestValueFactory(); } else { final boolean isOptionalPrincipal = parameter.getRawType() == Optional.class && ParameterizedType.class.isAssignableFrom(parameter.getType().getClass()) && principalClassSet.contains(((ParameterizedType) parameter.getType()).getActualTypeArguments()[0]); return isOptionalPrincipal ? new OptionalPrincipalContainerRequestValueFactory() : null; } }
Source:
<code><START> public void givenAChargeCapturedNotification_chargeNotificationProcessorInvokedWithNotificationAndCharge() throws EpdqNotification.EpdqParseException { <END> final String payload = notificationPayloadForTransaction( payId, EPDQ_PAYMENT_REQUESTED); notificationService.handleNotificationFor(payload); verify(mockRefundNotificationProcessor, never()).invoke(any(), any(), any(), any()); verify(mockChargeNotificationProcessor).invoke(payId, mockCharge, CAPTURED, null); }</code><technical_language>EpdqNotification.EpdqParseException need thrown</technical_language>

Target:
public void givenAChargeCapturedNotification_chargeNotificationProcessorInvokedWithNotificationAndCharge() { final String payload = notificationPayloadForTransaction( payId, EPDQ_PAYMENT_REQUESTED); notificationService.handleNotificationFor(payload); verify(mockRefundNotificationProcessor, never()).invoke(any(), any(), any(), any()); verify(mockChargeNotificationProcessor).invoke(payId, mockCharge, CAPTURED, null); }
Source:
<code>protected void DetachVmFromUser() { VM vm = DbFacade.getInstance().getVmDao().get(getVmId()); <START> if (getVmPoolId().equals(vm.getVmPoolId())) { <END> permissions perm = DbFacade .getInstance() .getPermissionDao() .getForRoleAndAdElementAndObject( PredefinedRoles.ENGINE_USER.getId(), getAdUserId(), vm.getId()); if (perm != null) { DbFacade.getInstance().getPermissionDao().remove(perm.getId()); RestoreVmFromBaseSnapshot(vm); } } }</code><technical_language>please verify vm is null</technical_language>

Target:
protected void DetachVmFromUser() { VM vm = DbFacade.getInstance().getVmDao().get(getParameters().getVmId()); if (vm != null && getVmPoolId().equals(vm.getVmPoolId())) { permissions perm = DbFacade .getInstance() .getPermissionDao() .getForRoleAndAdElementAndObject( PredefinedRoles.ENGINE_USER.getId(), getAdUserId(), vm.getId()); if (perm != null) { DbFacade.getInstance().getPermissionDao().remove(perm.getId()); RestoreVmFromBaseSnapshot(vm); } } }
Source:
<code>protected URI getCreateAccountURI(final boolean getKeys, final String service) throws UnsupportedEncodingException, URISyntaxException { final StringBuilder sb = new StringBuilder(serverURI); sb.append("account/create"); if (getKeys || service != null) { sb.append("?"); if (getKeys) { sb.append("keys=true"); } <START> if (service != null) { <END> if (getKeys) { sb.append("&"); } sb.append("service=" + URLEncoder.encode(service, "UTF-8")); } } return new URI(sb.toString()); }</code><technical_language>mandate service is null, simplify this? allowing empty string fine, no</technical_language>

Target:
protected URI getCreateAccountURI(final boolean getKeys, final String service) throws UnsupportedEncodingException, URISyntaxException { if (service == null) { throw new IllegalArgumentException("service must not be null"); } final StringBuilder sb = new StringBuilder(serverURI); sb.append("account/create?service="); sb.append(URLEncoder.encode(service, "UTF-8")); if (getKeys) { sb.append("&keys=true"); } return new URI(sb.toString()); }
Source:
<code>public List<Connection> addInternalLinks(EObject investigatedElement, List<String> selectedRelationshipTypes) { List<Connection> connections = new ArrayList<Connection>(); if (investigatedElement instanceof INamed) { INamed named = (INamed) investigatedElement; if (!named.eCrossReferences().isEmpty()) { List<EObject> refs = named.eCrossReferences(); for (EObject ref : refs) { <START> if (selectedRelationshipTypes.size() == 0 <END> || selectedRelationshipTypes.contains(ref.eClass().getName())) { connections.add(new Connection(investigatedElement, Arrays.asList(ref), ref)); } } } } return connections; }</code><technical_language>selectedRelationshipTypes null? If yes, get a NullPointerException well</technical_language>

Target:
public List<Connection> addInternalLinks(EObject investigatedElement, List<String> selectedRelationshipTypes) { List<Connection> connections = new ArrayList<Connection>(); if (investigatedElement instanceof INamed) { INamed named = (INamed) investigatedElement; if (named.eCrossReferences() != null) { List<EObject> refs = named.eCrossReferences(); for (EObject ref : refs) { if (selectedRelationshipTypes != null) { if (selectedRelationshipTypes.size() == 0 || selectedRelationshipTypes.contains(ref.eClass().getName())) { connections.add(new Connection(investigatedElement, Arrays.asList(ref), ref)); } } else { connections.add(new Connection(investigatedElement, Arrays.asList(ref), ref)); } } } } return connections; }
Source:
<code>private String getHypervisor(String folder) { String[] validHypervisors = CDK3Server.getHypervisors(); String hyperV = validHypervisors[0]; File config = new File(folder, "config"); <START> File configJson = new File(config, "config.json"); <END> if (!configJson.exists() || !configJson.isFile()) { return hyperV; } String path = configJson.getAbsolutePath(); try { String content = new String(Files.readAllBytes(Paths.get(path))); ModelNode mn = ModelNode.fromJSONString(content); ModelNode o = mn.get("vm-driver"); String val = (o == null ? null : o.asString()); if (val != null && Arrays.asList(validHypervisors).contains(val)) { return val; } } catch (IOException e) { CDKCoreActivator.pluginLog().logError("Error parsing " + path, e); } return hyperV; }</code><technical_language>re-occurence of a candicate for a constant mentioned</technical_language>

Target:
private String getHypervisor(String folder) { String[] validHypervisors = CDK3Server.getHypervisors(); String hyperV = validHypervisors[0]; File config = new File(folder, CONFIG); File configJson = new File(config, CONFIG_JSON); if (!configJson.exists() || !configJson.isFile()) { return hyperV; } String path = configJson.getAbsolutePath(); try { String content = new String(Files.readAllBytes(Paths.get(path))); ModelNode mn = ModelNode.fromJSONString(content); ModelNode o = mn.get(VM_DRIVER); String val = (o == null ? null : o.asString()); if (val != null && Arrays.asList(validHypervisors).contains(val)) { return val; } } catch (IOException e) { CDKCoreActivator.pluginLog().logError("Error parsing " + path, e); } return hyperV; }
Source:
<code>protected void postStop() { super.postStop(); ConfigBag stopParameters = BrooklynTaskTags.getCurrentEffectorParameters(); if (stopParameters == null || (StopMode.NEVER != stopParameters.get(StopSoftwareParameters.STOP_MACHINE_MODE) <START> && Boolean.TRUE.equals(stopParameters.get(StopSoftwareParameters.STOP_MACHINE)))) { <END> Task<?> stopEffectorTask = BrooklynTaskTags.getClosestEffectorTask(Tasks.current(), Startable.STOP); getManagementContext().getExecutionManager().submit(new UnmanageTask(stopEffectorTask, this)); } }</code><technical_language>combination of STOP_MACHINE STOP_MACHINE_MODE is confusing! If this specific permutation checked in multiple places, worth providing a convenience method</technical_language>

Target:
protected void postStop() { super.postStop(); if (isMachineStopped()) { Task<?> stopEffectorTask = BrooklynTaskTags.getClosestEffectorTask(Tasks.current(), Startable.STOP); getManagementContext().getExecutionManager().submit(new UnmanageTask(stopEffectorTask, this)); } }
Source:
<code>public static void merge(Extensible<?> from, Extensible<?> to, boolean override) { if (from == null) { return; } if (to.getExtensions() == null) { to.setExtensions(createMap()); } <START> if (!from.getExtensions().isEmpty()) { <END> for (String extensionName : from.getExtensions().keySet()) { Object value = mergeProperty( to.getExtensions().get(extensionName), from.getExtensions().get(extensionName), override ); to.addExtension(extensionName, value); } } }</code><technical_language>remove negation put if of method return. Easier read, cyclomatic complexity</technical_language>

Target:
public static void merge(Extensible<?> from, Extensible<?> to, boolean override) { if (from == null) { return; } if (to.getExtensions() == null) { to.setExtensions(createMap()); } if (from.getExtensions().isEmpty()) { return; } for (String extensionName : from.getExtensions().keySet()) { Object value = mergeProperty( to.getExtensions().get(extensionName), from.getExtensions().get(extensionName), override ); to.addExtension(extensionName, value); } }
Source:
<code>default Iterator<T> dropWhile(Predicate<? super T> predicate) { <START> if (!hasNext()) { <END> return empty(); } else { final Iterator<T> that = this; return new Iterator<T>() { private T next = null; @Override public boolean hasNext() { while (next == null && that.hasNext()) { final T value = that.next(); if(!predicate.test(value)) { next = value; } } return next != null; } @Override public T next() { if (!hasNext()) { EMPTY.next(); } final T result = next; next = null; return result; } }; } }</code><technical_language>do Objects.requireNonNull(predicate, "predicate is null"). forgotten in in places add later..</technical_language>

Target:
default Iterator<T> dropWhile(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); if (!hasNext()) { return empty(); } else { final Iterator<T> that = this; return new Iterator<T>() { private T next = null; @Override public boolean hasNext() { while (next == null && that.hasNext()) { final T value = that.next(); if(!predicate.test(value)) { next = value; } } return next != null; } @Override public T next() { if (!hasNext()) { EMPTY.next(); } final T result = next; next = null; return result; } }; } }
Source:
<code>public Object evaluate(Object feature) { Object arg0; try { arg0 = getExpression(0).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( <START> "Filter Function problem for function equalTo argument #0 - expected type Object"); <END> } return arg0.getClass().toString(); }</code><technical_language>This references equalTo, mbTypeOf</technical_language>

Target:
public Object evaluate(Object feature) { Object arg0; try { arg0 = getExpression(0).evaluate(feature); } catch (Exception e) { throw new IllegalArgumentException( "Filter Function problem for function \"mbTypeOf\" argument #0 - expected type Object"); } return arg0.getClass().toString(); }
Source:
<code>public synchronized void close() { try { switch (state.type) { case ZERO: break; case NORMAL: if (log.isDebugEnabled()) { log.debug( "Closing connection pool: {}", <START> UnsafeArg.of("connConfig", connConfig), <END> new SafeRuntimeException("Closing connection pool")); } state.dataSourcePool.close(); break; case CLOSED: break; } } finally { state = new State(StateType.CLOSED, null, null, new Throwable("Hikari pool closed here")); } }</code><technical_language>I unsafe anyway, good hygiene</technical_language>

Target:
public synchronized void close() { try { switch (state.type) { case ZERO: break; case NORMAL: if (log.isDebugEnabled()) { log.debug( "Closing connection pool", UnsafeArg.of("connConfig", connConfig), new SafeRuntimeException("Closing connection pool")); } state.dataSourcePool.close(); break; case CLOSED: break; } } finally { state = new State(StateType.CLOSED, null, null, new Throwable("Hikari pool closed here")); } }
Source:
<code>public void compactBuffer() { <START> if (this.readPos >= BUFFER_COMPACT_THRESHOLD_KB * 1024) <END> { try { this.bufferWriteMutex.acquire(); } catch(Exception e){} int remainingBytesInBuffer = this.readBufferLen.get() - this.readPos; this.readBufferLen.set(remainingBytesInBuffer); System.arraycopy(this.readBuffer,this.readPos,this.readBuffer,0,remainingBytesInBuffer); if (this.markPos >= 0) { this.markPos -= this.readPos; } this.readPos = 0; this.bufferWriteMutex.release(); } }</code><technical_language>feels read write access this.readPos, this.markPos, others protected</technical_language>

Target:
private void compactBuffer() { if (this.readPos >= this.bufferCompactThresholdKB * 1024) { try { this.bufferWriteMutex.acquire(); } catch(Exception e){} int remainingBytesInBuffer = this.readBufferLen.get() - this.readPos; this.readBufferLen.set(remainingBytesInBuffer); System.arraycopy(this.readBuffer,this.readPos,this.readBuffer,0,remainingBytesInBuffer); if (this.markPos >= 0) { this.markPos -= this.readPos; } this.readPos = 0; this.bufferWriteMutex.release(); } }
Source:
<code>protected void setupChatRoom(ChatRoom mucRoom) { if (mucRoom instanceof ChatRoomJabberImpl) { if (this.displayName != null) { ((ChatRoomJabberImpl)mucRoom).addPresencePacketExtensions( new Nick(this.displayName)); } else { logger.error(this.callContext + " No display name to use..."); } String region = JigasiBundleActivator.getConfigurationService() .getString(LOCAL_REGION_PNAME); <START> if(!StringUtils.isNullOrEmpty(region)) <END> { RegionPacketExtension rpe = new RegionPacketExtension(); rpe.setRegionId(region); ((ChatRoomJabberImpl)mucRoom) .addPresencePacketExtensions(rpe); } ((ChatRoomJabberImpl)mucRoom) .addPresencePacketExtensions( new ColibriStatsExtension.Stat( ColibriStatsExtension.VERSION, CurrentVersionImpl.VERSION.getApplicationName() + " " + CurrentVersionImpl.VERSION)); AbstractPacketExtension initiator = new AbstractPacketExtension( SIP_GATEWAY_FEATURE_NAME, "initiator"){}; callContext.getExtraHeaders().forEach( (key, value) -> { HeaderExtension he = new HeaderExtension(); he.setName(key); he.setValue(value); initiator.addChildExtension(he); }); if (initiator.getChildExtensions().size() > 0) { ((ChatRoomJabberImpl)mucRoom) .addPresencePacketExtensions(initiator); } } }</code><technical_language>do need this. This is for main room inform jicofo for region select jvb. do media for lobby room need</technical_language>

Target:
void setupChatRoom(ChatRoom mucRoom) { if (mucRoom instanceof ChatRoomJabberImpl) { String displayName = this.sipGatewaySession.getMucDisplayName(); if (displayName != null) { ((ChatRoomJabberImpl)mucRoom).addPresencePacketExtensions( new Nick(displayName)); } else { logger.error(this.callContext + " No display name to use..."); } } }
Source:
<code>private void testDeleteCommentsActionAfterEditingComments() throws IOException { ______TS("delete comments on responses and verify edited comments action"); submitPage = loginToInstructorEditStudentFeedbackPage( "IESFPTCourseinstr", "student1InIESFPTCourse@gmail.tmt", "session1InIESFPTCourse"); submitPage.waitForPageToLoad(); <START> submitPage.deleteFeedbackResponseComment("-3-0"); <END> submitPage.verifyRowDeletedSuccess("-0-3-0"); }</code><technical_language>this</technical_language>

Target:
private void testDeleteCommentsActionAfterEditingComments() { submitPage = loginToInstructorEditStudentFeedbackPage( "IESFPTCourseinstr", "student1InIESFPTCourse@gmail.tmt", "session1InIESFPTCourse"); submitPage.waitForPageToLoad(); submitPage.deleteFeedbackResponseComment("-3-0"); submitPage.verifyCommentRowMissing("-0-3-0"); }
Source:
<code>private Single<JsonObject> getDepictions(String filename) { return mediaClient.getCaptionAndDepictions(filename) .map(mediaResponse -> { return mediaResponse; }).doOnError(throwable -> { <START> Timber.e(throwable+"eror while fetching captions"); <END> }); }</code><technical_language>eror -> error captions -> depictions</technical_language>

Target:
private Single<JsonObject> getDepictions(String filename) { return mediaClient.getCaptionAndDepictions(filename) .map(mediaResponse -> { return mediaResponse; }).doOnError(throwable -> { Timber.e(throwable+ "error while fetching depictions"); }); }
Source:
<code>public void non_looper_thread_commit_realmobject_async() { final Realm realm = looperThread.realm; realm.beginTransaction(); realm.createObject(Dog.class).setAge(0); realm.commitTransaction(); Dog dog = realm.where(Dog.class).findFirstAsync(); looperThread.keepStrongReference.add(dog); dog.addChangeListener(new RealmChangeListener<Dog>() { @Override public void onChange(Dog object) { typebasedCommitInvocations.incrementAndGet(); <START> switch (typebasedCommitInvocations.get()) { <END> case 1: assertEquals(0, object.getAge()); realm.executeTransactionAsync(new Realm.Transaction() { @Override public void execute(Realm realm) { realm.where(Dog.class).findFirst().setAge(17); } }); break; case 2: assertEquals(17, object.getAge()); looperThread.testComplete(); break; default: fail(); } } }); }</code><technical_language>typebasedCommitInvocations is incremented removing line & java switch (typebasedCommitInvocations.incrementAndGet()){}</technical_language>

Target:
public void non_looper_thread_commit_realmobject_async() { final Realm realm = looperThread.realm; realm.beginTransaction(); realm.createObject(Dog.class).setAge(1); realm.commitTransaction(); Dog dog = realm.where(Dog.class).findFirstAsync(); looperThread.keepStrongReference.add(dog); dog.addChangeListener(new RealmChangeListener<Dog>() { @Override public void onChange(Dog object) { switch (typebasedCommitInvocations.incrementAndGet()) { case 1: assertEquals(1, object.getAge()); realm.executeTransactionAsync(new Realm.Transaction() { @Override public void execute(Realm realm) { realm.where(Dog.class).findFirst().setAge(17); } }); break; case 2: assertEquals(17, object.getAge()); looperThread.testComplete(); break; default: fail(); } } }); }
Source:
<code>public Mono<AccessToken> getToken(TokenRequestContext request) { return Mono.fromSupplier(() -> { if (configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_ID) && configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_SECRET) && configuration.contains(Configuration.PROPERTY_AZURE_TENANT_ID)) { return new ClientSecretCredential(configuration.get(Configuration.PROPERTY_AZURE_TENANT_ID), configuration.get(Configuration.PROPERTY_AZURE_CLIENT_ID), configuration.get(Configuration.PROPERTY_AZURE_CLIENT_SECRET), identityClientOptions); <START> } else if (configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_ID) <END> && configuration.contains(Configuration.PROPERTY_AZURE_TENANT_ID) && configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_CERTIFICATE_PATH)) { return new ClientCertificateCredential(configuration.get(Configuration.PROPERTY_AZURE_TENANT_ID), configuration.get(Configuration.PROPERTY_AZURE_CLIENT_ID), configuration.get(Configuration.PROPERTY_AZURE_CLIENT_CERTIFICATE_PATH), null, identityClientOptions); } else if (configuration.contains(Configuration.PROPERTY_AZURE_USERNAME) && configuration.contains(Configuration.PROPERTY_AZURE_CLIENT_ID) && configuration.contains(Configuration.PROPERTY_AZURE_PASSWORD)) { return new UsernamePasswordCredential(configuration.get(Configuration.PROPERTY_AZURE_CLIENT_ID), configuration.get(Configuration.PROPERTY_AZURE_TENANT_ID), configuration.get(Configuration.PROPERTY_AZURE_USERNAME), configuration.get(Configuration.PROPERTY_AZURE_PASSWORD), identityClientOptions); } throw logger.logExceptionAsError(new ClientAuthenticationException( "Cannot create any credentials with the current environment variables", null)); }).flatMap(cred -> cred.getToken(request)); }</code><technical_language>introduce a method envContains(params string var) returns true if env contains of 'var's</technical_language>

Target:
public Mono<AccessToken> getToken(TokenRequestContext request) { String clientId = configuration.get(Configuration.PROPERTY_AZURE_CLIENT_ID); String tenantId = configuration.get(Configuration.PROPERTY_AZURE_TENANT_ID); String clientSecret = configuration.get(Configuration.PROPERTY_AZURE_CLIENT_SECRET); String certPath = configuration.get(Configuration.PROPERTY_AZURE_CLIENT_CERTIFICATE_PATH); String username = configuration.get(Configuration.PROPERTY_AZURE_USERNAME); String password = configuration.get(Configuration.PROPERTY_AZURE_PASSWORD); return Mono.fromSupplier(() -> { if (verifyNotNull(clientId)) { if (verifyNotNull(tenantId, clientSecret)) { return new ClientSecretCredential(tenantId, clientId, clientSecret, identityClientOptions); } else if (verifyNotNull(tenantId, certPath)) { return new ClientCertificateCredential(tenantId, clientId, certPath, null, identityClientOptions); } else if (verifyNotNull(username, password)) { return new UsernamePasswordCredential(clientId, tenantId, username, password, identityClientOptions); } } throw logger.logExceptionAsError(new ClientAuthenticationException( "Cannot create any credentials with the current environment variables", null)); }).flatMap(cred -> cred.getToken(request)); }
Source:
<code>public Change munge(String entityId, Collection<Statement> statements) { <START> munge(entityId, <END> statements, emptySet(), emptySet(), null, null); }</code><technical_language>missing return</technical_language>

Target:
public Change munge(String entityId, Collection<Statement> statements) { return munge(entityId, statements, emptySet(), emptySet(), null, null); }