auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public CauseOfBlockage canTake(Queue.BuildableItem item) { Label l = item.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getDisplayName(), l)); if(l==null && getMode() == Mode.EXCLUSIVE) { if (this instanceof Jenkins && item.task instanceof Queue.FlyweightTask) { for (Node node: Jenkins.getInstance().getNodes()) { if (node.getMode() != Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getDisplayName())); } } } else { <START> return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getDisplayName())); END> } Authentication identity = item.authenticate(); if (!getACL().hasPermission(identity,Computer.BUILD)) { return CauseOfBlockage.fromMessage(Messages._Node_LackingBuildPermission(identity.getName(), getDisplayName())); } for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(item); if (c!=null) return c; } if (!isAcceptingTasks()) { return new CauseOfBlockage.BecauseNodeIsNotAcceptingTasks(this); } return null; }</code><technical_language>This else block wrong. AFAIU enter if - task is unlabeled mode is exclusive, - task is labeled matches this tested in a config permutations</technical_language>

Target:
public CauseOfBlockage canTake(Queue.BuildableItem item) { Label l = item.getAssignedLabel(); if(l!=null && !l.contains(this)) return CauseOfBlockage.fromMessage(Messages._Node_LabelMissing(getDisplayName(), l)); if(l==null && getMode()== Mode.EXCLUSIVE) { if (this instanceof Jenkins && item.task instanceof Queue.FlyweightTask) { for (Node node: Jenkins.getInstance().getNodes()) { if (node.getMode() != Mode.EXCLUSIVE) return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getDisplayName())); } } else { return CauseOfBlockage.fromMessage(Messages._Node_BecauseNodeIsReserved(getDisplayName())); } } Authentication identity = item.authenticate(); if (!getACL().hasPermission(identity,Computer.BUILD)) { return CauseOfBlockage.fromMessage(Messages._Node_LackingBuildPermission(identity.getName(), getDisplayName())); } for (NodeProperty prop: getNodeProperties()) { CauseOfBlockage c = prop.canTake(item); if (c!=null) return c; } if (!isAcceptingTasks()) { return new CauseOfBlockage.BecauseNodeIsNotAcceptingTasks(this); } return null; }
Source:
<code>public void testConfigurationProviderDoNotOverwrite() { try { <START> ServerConfiguration configuration = ConfigurationFileLoader.loadConfiguration(); <END> assertEquals(configuration.getBooleanProperty(USE_CROSS_SITE_ORIGIN_FILTER, USE_CROSS_SITE_ORIGIN_FILTER_DEFAULT_VALUE), false); assertEquals(configuration.getProperty(USE_CROSS_SITE_ORIGIN_FILTER, null), "false"); } catch (Exception e) { fail("Error in test", e); } }</code><technical_language>Add final keyword</technical_language>

Target:
public void testConfigurationProviderDoNotOverwrite() { try { final ServerConfiguration configuration = ConfigurationFileLoader.loadConfiguration(); assertEquals(configuration.getBooleanProperty(USE_CROSS_SITE_ORIGIN_FILTER, USE_CROSS_SITE_ORIGIN_FILTER_DEFAULT_VALUE), false); assertEquals(configuration.getProperty(USE_CROSS_SITE_ORIGIN_FILTER, null), "false"); } catch (Exception e) { fail("Error in test", e); } }
Source:
<code>private static Set<Entry<Node, List<Throwable>>> groupByNode( Iterable<Entry<Node, Throwable>> errors) { <START> Map<Node, List<Throwable>> map = new LinkedHashMap<>(); <END> for (Entry<Node, Throwable> entry : errors) { Node node = entry.getKey(); Throwable error = entry.getValue(); map.compute( node, (k, v) -> { if (v == null) { v = new ArrayList<>(); } v.add(error); return v; }); } return map.entrySet(); }</code><technical_language>guaga MultiMap</technical_language>

Target:
private static Map<Node, List<Throwable>> groupByNode(Iterable<Entry<Node, Throwable>> errors) { Map<Node, List<Throwable>> map = new LinkedHashMap<>(); for (Entry<Node, Throwable> entry : errors) { Node node = entry.getKey(); Throwable error = entry.getValue(); map.compute( node, (k, v) -> { if (v == null) { v = new ArrayList<>(); } v.add(error); return v; }); } return map; }
Source:
<code>public AutomatonHitEnum build(String source, HitWeigher queryWeigher, HitWeigher corpusWeigher) { if (reverse == null) { return new AutomatonHitEnum.Forward(forward, source, queryWeigher, corpusWeigher); } else { <START> BitSet startPositions = <END> reverse.runAllReverse(source); return new AutomatonHitEnum.TwoPass(forward, startPositions, source, queryWeigher, corpusWeigher); } }</code><technical_language>store this BitSet this factory instance a signature like: startPositions = reverse.runAllReverse(source, startPositions); this reused bitset is stored in place</technical_language>

Target:
public AutomatonHitEnum build(String source, HitWeigher queryWeigher, HitWeigher corpusWeigher) { if (reverse == null) { return new AutomatonHitEnum.Forward(forward, source, queryWeigher, corpusWeigher); } else { startPositions = reverse.run(source, startPositions); return new AutomatonHitEnum.TwoPass(forward, startPositions, source, queryWeigher, corpusWeigher); } }
Source:
<code>public BodyReadStream handler(@Nullable Handler<Buffer> handler) { if (handler == null) { return this; } this.handler = handler; stream.handler(b -> connection.getContext().runOnContext(v -> { Buffer buffer = streamBuffer.appendBuffer(b); int start = 0; while(start + size < buffer.length()) { final String theLine = Utils.base64(buffer.getBytes(start, start + size)); <START> handler.handle(Buffer.buffer(theLine + "\r\n")); <END> start += size; } streamBuffer = buffer.getBuffer(start, buffer.length()); })); return this; }</code><technical_language>need call handler a single time this stream implementation delegates fetch operation calculate number of fetches. For instance if this stream is fetched 1 provided Buffer is split in 4 handler called 4 times asked for 1 buffer</technical_language>

Target:
public BodyReadStream handler(@Nullable Handler<Buffer> handler) { if (handler == null) { return this; } this.handler = handler; stream.handler(b -> connection.getContext().runOnContext(v -> { Buffer buffer = streamBuffer.appendBuffer(b); Buffer bufferToSent = Buffer.buffer(); int start = 0; while(start + size < buffer.length()) { final String theLine = Utils.base64(buffer.getBytes(start, start + size)); bufferToSent.appendBuffer(Buffer.buffer(theLine + "\r\n")); start += size; } streamBuffer = buffer.getBuffer(start, buffer.length()); handler.handle(bufferToSent); })); return this; }
Source:
<code>public void initialize() { Configuration configuration = getConfig(); super.initialize(); if (getThing().getStatus() == ThingStatus.OFFLINE) { return; } if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO)) { sensors.add(new DS2405(sensorIds.get(0), this)); } else if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO2)) { sensors.add(new DS2406_DS2413(sensorIds.get(0), this)); } else if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO8)) { sensors.add(new DS2408(sensorIds.get(0), this)); } try { sensors.get(0).configureChannels(); } catch (OwException e) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getMessage()); return; } validConfig = true; <START> refreshInterval = 10 * 1000; <END> updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.NONE); }</code><technical_language>this overwrites configuration</technical_language>

Target:
public void initialize() { Configuration configuration = getConfig(); Map<String, String> properties = editProperties(); if (!super.configure()) { return; } if (getThing().getStatus() == ThingStatus.OFFLINE) { return; } if (!properties.containsKey(PROPERTY_MODELID)) { scheduler.execute(() -> { updateSensorProperties(); }); } if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO)) { sensors.add(new DS2405(sensorIds.get(0), this)); } else if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO2)) { sensors.add(new DS2406_DS2413(sensorIds.get(0), this)); } else if (this.thing.getThingTypeUID().equals(THING_TYPE_DIGITALIO8)) { sensors.add(new DS2408(sensorIds.get(0), this)); } try { sensors.get(0).configureChannels(); } catch (OwException e) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getMessage()); return; } validConfig = true; if (configuration.get(CONFIG_REFRESH) == null) { refreshInterval = 10 * 1000; } updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.NONE); }
Source:
<code><START> public static List<PostAggregator> prunePostAggregators(TopNQuery query) <END> { return AggregatorUtil.pruneDependentPostAgg( query.getPostAggregatorSpecs(), query.getTopNMetricSpec().getMetricName(query.getDimensionSpec()) ); }</code><technical_language>This need public, called this file</technical_language>

Target:
private static List<PostAggregator> prunePostAggregators(TopNQuery query) { return AggregatorUtil.pruneDependentPostAgg( query.getPostAggregatorSpecs(), query.getTopNMetricSpec().getMetricName(query.getDimensionSpec()) ); }
Source:
<code>public void testVerticalAlignment() { <START> m_label.setVerticalAlignmentFromScout(0); <END> String text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"middle\"")); m_label.setVerticalAlignmentFromScout(-1); text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"top\"")); m_label.setVerticalAlignmentFromScout(1); text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"bottom\"")); }</code><technical_language>SwingConstants.TOP, etc</technical_language>

Target:
public void testVerticalAlignment() { m_label.setVerticalAlignmentFromScout(LABEL_VERTICAL_ALIGNMENT_MIDDLE); String text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"middle\"")); m_label.setVerticalAlignmentFromScout(LABEL_VERTICAL_ALIGNMENT_TOP); text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"top\"")); m_label.setVerticalAlignmentFromScout(LABEL_VERTICAL_ALIGNMENT_BOTTOM); text = ((JTextPane) m_label.getSwingField()).getText(); assertTrue(text.contains("valign=\"bottom\"")); }
Source:
<code>public Map<String, Object> getAttributes() { synchronized (this) { <START> return new HashMap<>(attributes); <END> } }</code><technical_language>This break calls e.g. getAttributes().put(key, value)</technical_language>

Target:
public Map<String, Object> getAttributes() { return new HashMap<>(attributes); }
Source:
<code>public static DateTime possiblySanitizeSampleTime(final DateTime referenceTime, final DateTime sampleTime, final Integer clockSkewInHours) { <START> final DateTime copySampleTime = new DateTime(sampleTime); <END> final Integer diffInMinutes = Minutes.minutesBetween(referenceTime, copySampleTime.minusMonths(5)).getMinutes(); if(Math.abs(diffInMinutes) < clockSkewInHours * 60) { return sampleTime.minusMonths(5).withMinuteOfHour(sampleTime.getMinuteOfHour()).withHourOfDay(sampleTime.getHourOfDay()); } return sampleTime; }</code><technical_language>do need copy sampleTime? .minusMonths() a copy</technical_language>

Target:
public static DateTime possiblySanitizeSampleTime(final DateTime referenceTime, final DateTime sampleTime, final Integer clockSkewInHours) { final Integer diffInMinutes = Minutes.minutesBetween(referenceTime, sampleTime.minusMonths(5)).getMinutes(); if(Math.abs(diffInMinutes) < clockSkewInHours * 60) { return sampleTime.minusMonths(5).withMinuteOfHour(sampleTime.getMinuteOfHour()).withHourOfDay(sampleTime.getHourOfDay()); } return sampleTime; }
Source:
<code>private void verifyLineByLine(final InputStream stream, final InputStream rStream, final String fileName) throws IOException, CoreException { final LineComparator comparator = new LineComparator(stream, ignoreWhiteSpace); final LineComparator rComparator = new LineComparator(rStream, ignoreWhiteSpace); final RangeDifference[] diffs = RangeDifferencer.findRanges((IRangeComparator) null, comparator, rComparator); boolean haschange = false; <START> boolean skippedLines = true; <END> for (final RangeDifference diff : diffs) { if(diff.kind() != RangeDifference.CHANGE) { continue; } for (int i = 0; i < Math.max(diff.leftLength(), diff.rightLength()); i++) { int left = diff.leftStart() + i; int right = diff.rightStart() + i; if (right < diff.rightEnd()) { final String line = rComparator.getLine(right); if (!isSkippedLine(line)) { skippedLines = false; break; } } if (left < diff.leftEnd()) { final String line = comparator.getLine(left); if (!isSkippedLine(line)) { skippedLines = false; break; } } } if(!skippedLines) { haschange = true; break; } } if (!haschange) { return; } final ArrayList<String> l1 = comparator.listOflines; final ArrayList<String> l2 = rComparator.listOflines; final String patch = String.join("\n", DiffUtils.generateUnifiedDiff(fileName, fileName, l1, DiffUtils.diff(l1, l2), 3)); reportError(patch); }</code><technical_language>I get rid of 'skippedLines'. Replace 'skippedLines = false;' 'haschange = true;' 'if (!skippedLines) { haschange = true; break; }' 'if (haschange) { break; }'</technical_language>

Target:
private void verifyLineByLine(final InputStream stream, final InputStream rStream, final String fileName) throws IOException, CoreException { final LineComparator comparator = new LineComparator(stream, ignoreWhiteSpace); final LineComparator rComparator = new LineComparator(rStream, ignoreWhiteSpace); final RangeDifference[] diffs = RangeDifferencer.findRanges((IRangeComparator) null, comparator, rComparator); boolean hasDifferences = false; for (final RangeDifference diff : diffs) { if(diff.kind() != RangeDifference.CHANGE) { continue; } for (int i = 0; i < Math.max(diff.leftLength(), diff.rightLength()); i++) { int left = diff.leftStart() + i; int right = diff.rightStart() + i; if (right < diff.rightEnd()) { final String line = rComparator.getLine(right); if (!isSkippedLine(line)) { hasDifferences = true; break; } } if (left < diff.leftEnd()) { final String line = comparator.getLine(left); if (!isSkippedLine(line)) { hasDifferences = true; break; } } } if(hasDifferences) { break; } } if (!hasDifferences) { return; } final List<String> l1 = comparator.getLines(); final List<String> l2 = rComparator.getLines(); final String patch = String.join("\n", DiffUtils.generateUnifiedDiff(fileName, fileName, l1, DiffUtils.diff(l1, l2), 3)); reportError(patch); }
Source:
<code>private ExpressionResult evaluateUserChecks(Path path) { PermissionExecutor executor = resource.getRequestScope().getPermissionExecutor(); ExpressionResult result = ExpressionResult.PASS; for (Path.PathElement element : path.getPathElements()) { try { result = executor.checkUserPermissions( element.getType(), ReadPermission.class, element.getFieldName()); } catch (ForbiddenAccessException e) { return ExpressionResult.FAIL; } <START> if (result == ExpressionResult.DEFERRED) { <END> return result; } } return result; }</code><technical_language>If this is FAIL return FAIL too</technical_language>

Target:
private ExpressionResult evaluateUserChecks(Path path) { PermissionExecutor executor = resource.getRequestScope().getPermissionExecutor(); ExpressionResult result = ExpressionResult.PASS; for (Path.PathElement element : path.getPathElements()) { try { result = executor.checkUserPermissions( element.getType(), ReadPermission.class, element.getFieldName()); } catch (ForbiddenAccessException e) { return ExpressionResult.FAIL; } if (result != ExpressionResult.PASS) { return result; } } return result; }
Source:
<code>public void dispose() { getSite().getPage().removePartListener(partListener); IWorkingSetManager workingSetManager = getPlugin().getWorkbench() .getWorkingSetManager(); workingSetManager.removePropertyChangeListener(propertyChangeListener); if (collapseAllHandler != null) { collapseAllHandler.dispose(); } if (getActionGroup() != null) { getActionGroup().dispose(); } Control control = viewer.getControl(); if (dragDetectListener != null && control != null && control.isDisposed() == false) { control.removeListener(SWT.DragDetect, dragDetectListener); } <START> emptyWorkspaceHelper.dispose(); <END> super.dispose(); }</code><technical_language>needed</technical_language>

Target:
public void dispose() { getSite().getPage().removePartListener(partListener); IWorkingSetManager workingSetManager = getPlugin().getWorkbench() .getWorkingSetManager(); workingSetManager.removePropertyChangeListener(propertyChangeListener); if (collapseAllHandler != null) { collapseAllHandler.dispose(); } if (getActionGroup() != null) { getActionGroup().dispose(); } Control control = viewer.getControl(); if (dragDetectListener != null && control != null && control.isDisposed() == false) { control.removeListener(SWT.DragDetect, dragDetectListener); } super.dispose(); }
Source:
<code><START> private String checksum(Object o1, Object o2) { <END> String algorithmKey = FunctionUtils.toString(o1); String input = FunctionUtils.toString(o2); switch (algorithmKey) { case ALGORITHM_KEY_VERHOEFF: return verhoeffChecksum(input); default: throw new XPathUnsupportedException("Algorithm key " + algorithmKey + " is not supported for checksum"); } }</code><technical_language>static</technical_language>

Target:
private static String checksum(Object o1, Object o2) { String algorithmKey = FunctionUtils.toString(o1); String input = FunctionUtils.toString(o2); switch (algorithmKey) { case ALGORITHM_KEY_VERHOEFF: return verhoeffChecksum(input); default: throw new XPathUnsupportedException("Bad algorithm key " + algorithmKey + ". We only support 'verhoeff' as algorithm key right now."); } }
Source:
<code>private PlanRoot doAnalyzeQuery() { stateMachine.beginAnalysis(); PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator(); LogicalPlanner logicalPlanner = new LogicalPlanner(stateMachine.getSession(), planOptimizers, idAllocator, metadata, sqlParser, statsCalculator, costCalculator, stateMachine.getWarningCollector()); Plan plan = logicalPlanner.plan(analysis); queryPlan.set(plan); List<Input> inputs = new InputExtractor(metadata, stateMachine.getSession()).extractInputs(plan.getRoot()); stateMachine.setInputs(inputs); Optional<Output> output = new OutputExtractor().extractOutput(plan.getRoot()); stateMachine.setOutput(output); <START> SubPlan fragmentedPlan = planFragmenter.createSubPlans(stateMachine.getSession(), plan, false, WarningCollector.NOOP); <END> stateMachine.endAnalysis(); boolean explainAnalyze = analysis.getStatement() instanceof Explain && ((Explain) analysis.getStatement()).isAnalyze(); return new PlanRoot(fragmentedPlan, !explainAnalyze, extractConnectors(analysis)); }</code><technical_language>This wrong? do want a functioning collector, right</technical_language>

Target:
private PlanRoot doAnalyzeQuery() { stateMachine.beginAnalysis(); PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator(); LogicalPlanner logicalPlanner = new LogicalPlanner(stateMachine.getSession(), planOptimizers, idAllocator, metadata, sqlParser, statsCalculator, costCalculator, stateMachine.getWarningCollector()); Plan plan = logicalPlanner.plan(analysis); queryPlan.set(plan); List<Input> inputs = new InputExtractor(metadata, stateMachine.getSession()).extractInputs(plan.getRoot()); stateMachine.setInputs(inputs); Optional<Output> output = new OutputExtractor().extractOutput(plan.getRoot()); stateMachine.setOutput(output); SubPlan fragmentedPlan = planFragmenter.createSubPlans(stateMachine.getSession(), plan, false, stateMachine.getWarningCollector()); stateMachine.endAnalysis(); boolean explainAnalyze = analysis.getStatement() instanceof Explain && ((Explain) analysis.getStatement()).isAnalyze(); return new PlanRoot(fragmentedPlan, !explainAnalyze, extractConnectors(analysis)); }
Source:
<code>public Object evaluate(String expression, Map<String, Object> inputVariables) { CompilerContext ctx = newCompilerContext(); if ( inputVariables != null ) { inputVariables.entrySet().stream().forEach( e -> ctx.addInputVariable( e.getKey(), e.getValue() ) ); } CompiledExpression expr = compile( expression, ctx ); if ( inputVariables == null ) { <START> return evaluate( expr, Collections.emptyMap() ); <END> } else { return evaluate( expr, inputVariables ); } }</code><technical_language>Minor, put FEELImpl.EMPTY_INPUT for consistency line 66, do think</technical_language>

Target:
public Object evaluate(String expression, Map<String, Object> inputVariables) { CompilerContext ctx = newCompilerContext(); if ( inputVariables != null ) { inputVariables.entrySet().stream().forEach( e -> ctx.addInputVariable( e.getKey(), e.getValue() ) ); } CompiledExpression expr = compile( expression, ctx ); if ( inputVariables == null ) { return evaluate( expr, EMPTY_INPUT ); } else { return evaluate( expr, inputVariables ); } }
Source:
<code>public List<Map<String, Object>> anyMultiQuery(QueryBuilder query, Field<?>... fields) { try (Connection c = ds.getConnection()) { LOGGER.log(Level.FINEST, query.toString()); <START> PreparedStatement stmt = query.toStatement(c); <END> try { ResultSet rs = stmt.executeQuery(); try { ArrayList<Map<String, Object>> results = new ArrayList<Map<String, Object>>(); while(rs.next()) { Map<String, Object> result = new HashMap<String, Object>(); for(int i = 0; i< fields.length; i++) { result.put(fields[i].getFieldName(), fields[i].getValue(rs)); } results.add(result); } return results; } finally { rs.close(); } } finally { stmt.close(); } } catch (SQLException ex) { throw new IllegalStateException("MultiSelectQuery Failed",ex); } }</code><technical_language>put this a single try-with resources? If length</technical_language>

Target:
public List<Map<String, Object>> anyMultiQuery(QueryBuilder query, Field<?>... fields) { LOGGER.log(Level.FINEST, query.toString()); try (Connection c = ds.getConnection()) { try (PreparedStatement stmt = query.toStatement(c)) { try (ResultSet rs = stmt.executeQuery()) { ArrayList<Map<String, Object>> results = new ArrayList<Map<String, Object>>(); while (rs.next()) { Map<String, Object> result = new HashMap<String, Object>(); for (int i = 0; i < fields.length; i++) { result.put(fields[i].getFieldName(), fields[i].getValue(rs)); } results.add(result); } return results; } } } catch (SQLException ex) { throw new IllegalStateException("MultiSelectQuery Failed",ex); } }
Source:
<code><START> protected GoogleCredentials(AccessToken accessToken) { <END> super(accessToken); }</code><technical_language>For classes a constructor takes a single parameter, want consider adding of(x) function</technical_language>

Target:
public GoogleCredentials(AccessToken accessToken) { super(accessToken); }
Source:
<code>public DefaultStatisticsServiceConfiguration withLatencyHistoryWindow(long duration, TimeUnit unit) { if (duration <= 0) { <START> throw new IllegalArgumentException("Window must be a positive integer."); <END> } this.latencyHistoryWindow = duration; this.latencyHistoryWindowUnit = unit; return this; }</code><technical_language>need a dot end of message</technical_language>

Target:
public DefaultStatisticsServiceConfiguration withLatencyHistoryWindow(long duration, TimeUnit unit) { if (duration <= 0) { throw new IllegalArgumentException("Window must be a positive integer"); } this.latencyHistoryWindow = duration; this.latencyHistoryWindowUnit = unit; return this; }
Source:
<code>public AccessControlPolicyExtension( AccessControlSecurityConfiguration config, SubjectIdentity subjectIdentity) { <START> this.config = config; <END> isOwner = predicate(subjectIdentity.getIdentityAttribute(), Core.METACARD_OWNER); isSystem = (s) -> { Set<String> subject = s.getOrDefault(config.getSystemUserAttribute(), Collections.emptySet()); return subject.contains(config.getSystemUserAttributeValue()); }; hasAccessAdministrators = predicate(subjectIdentity.getIdentityAttribute(), Security.ACCESS_ADMINISTRATORS); hasAccessGroups = predicate(Constants.ROLES_CLAIM_URI, SecurityAttributes.ACCESS_GROUPS); hasAccessIndividuals = predicate(subjectIdentity.getIdentityAttribute(), SecurityAttributes.ACCESS_INDIVIDUALS); }</code><technical_language>Is this config constructor</technical_language>

Target:
public AccessControlPolicyExtension( AccessControlSecurityConfiguration config, SubjectIdentity subjectIdentity) { isOwner = predicate(subjectIdentity.getIdentityAttribute(), Core.METACARD_OWNER); isSystem = (s) -> { Set<String> subject = s.getOrDefault(config.getSystemUserAttribute(), Collections.emptySet()); return subject.contains(config.getSystemUserAttributeValue()); }; hasAccessAdministrators = predicate(subjectIdentity.getIdentityAttribute(), Security.ACCESS_ADMINISTRATORS); hasAccessGroups = predicate(Constants.ROLES_CLAIM_URI, SecurityAttributes.ACCESS_GROUPS); hasAccessIndividuals = predicate(subjectIdentity.getIdentityAttribute(), SecurityAttributes.ACCESS_INDIVIDUALS); }
Source:
<code>private void processNodeImpl(EntityNode node) { if (node != null) { for (EntityNode childNode : (Collection<EntityNode>) node.getChildrenNodes()) { <START> this.processNodeImpl(childNode); <END> } NodeVisitor visitor = this.visitors.get(node.getEntityClass()); if (visitor == null) { throw new IllegalStateException("No visitor configured for nodes of type: " + node.getEntityClass()); } visitor.processNode(this, this.mapper, node); } }</code><technical_language>+1: Recursing NodeProcessor is clearer visitors</technical_language>

Target:
private void processNodeImpl(EntityNode node) { if (node != null && !node.visited()) { for (EntityNode childNode : (Collection<EntityNode>) node.getChildrenNodes()) { this.processNodeImpl(childNode); } NodeVisitor visitor = this.visitors.get(node.getEntityClass()); if (visitor == null) { throw new IllegalStateException("No visitor configured for nodes of type: " + node.getEntityClass()); } visitor.processNode(this, this.mapper, node); node.markVisited(); } }
Source:
<code>public void run() { Iterable<HTInterval> currentIntervals; try { while (true) { currentIntervals = intervalQueue.take(); for (HTInterval currentInterval : currentIntervals) { if (currentInterval.getAttribute() == -1) { getSHT().closeTree(currentInterval.getEndTime()); <START> return; <END> } getSHT().insertInterval(currentInterval); } } } catch (InterruptedException e) { Activator.getDefault().logError("State History Tree interrupted!", e); } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }</code><technical_language>so, do loop: while() { ... break loop; } ? is more representative of want do here, is breaking out of while loop, necessarily end thread (going out of run())</technical_language>

Target:
public void run() { try { loop: while (true) { Iterable<HTInterval> currentIntervals = intervalQueue.take(); for (HTInterval currentInterval : currentIntervals) { if (currentInterval.getAttribute() == -1) { getSHT().closeTree(currentInterval.getEndTime()); break loop; } getSHT().insertInterval(currentInterval); } } } catch (InterruptedException e) { Activator.getDefault().logError("State History Tree interrupted!", e); } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }
Source:
<code>protected ToolSection findParentSection(Collection<EObject> selection) { <START> for (EObject tool : selection) { <END> if (tool.eContainer() instanceof ToolSection) { return (ToolSection) tool.eContainer(); } } return null; }</code><technical_language>EObjectQuery getFirstAncestorOfType() ancestors of tool eContainer</technical_language>

Target:
protected ToolSection findParentSection(Collection<EObject> selection) { Option<EObject> toolsection; for (EObject tool : selection) { toolsection = new EObjectQuery(tool).getFirstAncestorOfType(ToolPackage.eINSTANCE.getToolSection()); if (toolsection.get() instanceof ToolSection) { return (ToolSection) toolsection.get(); } } return null; }
Source:
<code>public static String toJsonObject(String contactId, String linkedWithId) { JSONObject jsonObject = new JSONObject(); if (contactId != null && !contactId.isEmpty()) { addJsonStringValue(contactId, jsonObject, CONTACT_ID_TAG); } <START> if (linkedWithId != null && !linkedWithId.isEmpty()) { <END> addJsonStringValue(linkedWithId, jsonObject, LINKED_WITH_TAG); } return jsonObject.toString(); }</code><technical_language>@lorobode need for this check check above. BaseSerializer.addJson<Object>Value checks for null, in Strings case empty values also</technical_language>

Target:
public static String toJsonObject(String contactId, String linkedWithId) { JSONObject jsonObject = new JSONObject(); addJsonStringValue(contactId, jsonObject, CONTACT_ID_TAG); addJsonStringValue(linkedWithId, jsonObject, LINKED_WITH_TAG); return jsonObject.toString(); }
Source:
<code>public boolean replaceAtHead(K key, Chain expected, Chain replacement) { final Lock lock = heads.writeLock(); lock.lock(); try { InternalChain chain = heads.get(key); if (chain == null) { if (expected.iterator().hasNext()) { return false; <START> } else { <END> for (Element element : replacement) { append(key, element.getPayload()); } return true; } } else { try { return chain.replace(expected, replacement); } finally { chain.close(); } } } finally { lock.unlock(); } }</code><technical_language>Fail case for this. is simpler throw IllegalArgumentException receiving empty expected</technical_language>

Target:
public boolean replaceAtHead(K key, Chain expected, Chain replacement) { final Lock lock = heads.writeLock(); lock.lock(); try { InternalChain chain = heads.get(key); if (chain == null) { if (expected.iterator().hasNext()) { return false; } else { throw new IllegalArgumentException("Empty expected sequence"); } } else { try { return chain.replace(expected, replacement); } finally { chain.close(); } } } finally { lock.unlock(); } }
Source:
<code>private void addShutdownListeners() { workbench.addWorkbenchListener(new IWorkbenchListener() { @Override public boolean preShutdown(final IWorkbench workbench, final boolean forced) { <START> shutDown(); <END> return true; } @Override public void postShutdown(final IWorkbench workbench) { InitializationManager.getInstance().shutdown(); } }); }</code><technical_language>possibly revert</technical_language>

Target:
private void addShutdownListeners() { workbench.addWorkbenchListener(new IWorkbenchListener() { @Override public boolean preShutdown(final IWorkbench workbench, final boolean forced) { IWorkspace workspace = ResourcesPlugin.getWorkspace(); workspace.removeResourceChangeListener(getMarkupModelListener()); WatchDogEventType.END_IDE.process(workbench); InitializationManager.getInstance().getIntervalManager().closeAllIntervals(); transferManager.sendItemsImmediately(); return true; } @Override public void postShutdown(final IWorkbench workbench) { InitializationManager.getInstance().shutdown(); } }); }
Source:
<code>public void clusterInstallationFinished(StackView stackView) { try { transactionService.required(() -> { clusterService.updateClusterStatusByStackId(stackView.getId(), AVAILABLE); <START> stackUpdater.updateStackStatus(stackView.getId(), DetailedStackStatus.AVAILABLE, "Cluster creation finished."); <END> flowMessageService.fireEventAndLog(stackView.getId(), AVAILABLE.name(), CLUSTER_BUILT); }); } catch (TransactionExecutionException e) { throw new TransactionRuntimeExecutionException(e); } }</code><technical_language>Duplication ClusterCreationService</technical_language>

Target:
public void clusterInstallationFinished(StackView stackView) { try { transactionService.required(() -> { clusterService.updateClusterStatusByStackId(stackView.getId(), AVAILABLE); stackUpdater.updateStackStatus(stackView.getId(), DetailedStackStatus.AVAILABLE, "Salt update finished."); flowMessageService.fireEventAndLog(stackView.getId(), AVAILABLE.name(), CLUSTER_SALT_UPDATE_FINISHED); }); } catch (TransactionExecutionException e) { throw new TransactionRuntimeExecutionException(e); } }
Source:
<code>public static Timer getTimer(FluoConfiguration config, MetricRegistry registry, String name) { Timer timer = registry.getTimers().get(name); if (timer == null) { timer = new Timer(getConfiguredReservoir(config)); <START> registry.register(name, timer); <END> } return timer; }</code><technical_language>is a concurrency issue here... threads call this try register... I looked register code, throw exception if name is registered</technical_language>

Target:
public static Timer getTimer(FluoConfiguration config, MetricRegistry registry, String name) { Timer timer = registry.getTimers().get(name); if (timer == null) { return addTimer(config, registry, name); } return timer; }
Source:
<code>public DesiredCapabilities getDefaultCapabilities() { logger.entering(); DesiredCapabilities capability = new DesiredCapabilities(); capability.setCapability("name", Grid.getTestSession().getTestName()); capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); if (!Grid.getWebTestSession().getBrowser().contains("firefox") && getLocalConfigProperty(ConfigProperty.SELENIUM_USE_GECKODRIVER).equals("true")) { capability.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, "ignore"); } <START> <END> capability.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true); if (!Boolean.parseBoolean(getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_SUPPORT_JAVASCRIPT))) { capability.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, false); } String browserVersion = getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_VERSION); if (getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_VERSION) != null) { capability.setVersion(browserVersion); } String platform = getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_PLATFORM); if (!platform.equalsIgnoreCase("ANY")) { capability.setCapability(CapabilityType.PLATFORM, platform); } logger.exiting(capability); return capability; }</code><technical_language>FireFoxCapabilitiesBuilder do this</technical_language>

Target:
public DesiredCapabilities getDefaultCapabilities() { logger.entering(); DesiredCapabilities capability = new DesiredCapabilities(); capability.setCapability("name", Grid.getTestSession().getTestName()); capability.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); if (!Config.getBoolConfigProperty(ConfigProperty.SELENIUM_USE_GECKODRIVER) && Grid.getWebTestSession() != null && !Grid.getWebTestSession().getBrowser().contains("firefox")) { capability.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE); } capability.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, true); if (!Boolean.parseBoolean(getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_SUPPORT_JAVASCRIPT))) { capability.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT, false); } String browserVersion = getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_VERSION); if (getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_VERSION) != null) { capability.setVersion(browserVersion); } String platform = getLocalConfigProperty(ConfigProperty.BROWSER_CAPABILITY_PLATFORM); if (!platform.equalsIgnoreCase("ANY")) { capability.setCapability(CapabilityType.PLATFORM, platform); } logger.exiting(capability); return capability; }
Source:
<code>public StopGlusterVolumeCommand(GlusterVolumeActionParameters params) { super(params); <START> setGlusterVolumeId(getParameters().getVolumeId()); <END> }</code><technical_language>i gluster volume id is set in super constructor</technical_language>

Target:
public StopGlusterVolumeCommand(GlusterVolumeActionParameters params) { super(params); }
Source:
<code>public Image getImage(VirtualGuest guest) { ProductOrder order; if (guest.getStartCpus() < 1) return null; try { order = client.getVirtualGuestClient().getOrderTemplate(guest.getId()); } catch (RuntimeException e) { logger.warn("Cannot getOrderTemplate " + guest.getId(), e); return null; } <START> if (order == null) <END> return null; Iterable<ProductItem> items = Iterables.transform(order.getPrices(), ProductItems.item()); ProductItem os = Iterables.find(items, ProductItemPredicates.categoryCode("os")); if (os.getPrices().isEmpty()) return null; return new ProductItemToImage().apply(os); }</code><technical_language>indentation is this line</technical_language>

Target:
public Image getImage(VirtualGuest guest) { ProductOrder order = null; if (guest.getStartCpus() < 1) return null; try { order = client.getVirtualGuestClient().getOrderTemplate(guest.getId()); } catch (SoftLayerOrderItemDuplicateException e) { logger.warn(e, "Cannot get order template for virtualGuestId(%s)", guest.getId()); } if (order == null) return null; Iterable<ProductItem> items = Iterables.transform(order.getPrices(), ProductItems.item()); ProductItem os = Iterables.find(items, ProductItemPredicates.categoryCode("os")); if (os.getPrices().isEmpty()) return null; return new ProductItemToImage().apply(os); }
Source:
<code><START> public AbstractConnectionBuilder<CredentialsConnectionBuilder> credentials(String username, String password) { <END> return new CredentialsConnectionBuilder(username, password, this.serverUrl); }</code><technical_language>If end some config attributes express.conf overload this set username public AbstractConnectionBuilder<CredentialsConnectionBuilder> credentials(String password) { return new CredentialsConnectionBuilder(config.getRhLogin(), password, this.serverUrl); }</technical_language>

Target:
public CredentialsConnectionBuilder credentials(String username, String password) { return new CredentialsConnectionBuilder(username, password, serverUrl, configuration); }
Source:
<code>public List<QueueMessage> receiveMessages(String queueUrl, String messageAttributeName) throws QueueException { try { <START> Integer MAX_MESSAGES = 10; <END> ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl); receiveMessageRequest.setMaxNumberOfMessages(MAX_MESSAGES); ReceiveMessageResult receiveMessageResult = sqsClient.receiveMessage(receiveMessageRequest.withMessageAttributeNames(messageAttributeName)); return QueueMessage.of(receiveMessageResult); } catch (AmazonSQSException | UnsupportedOperationException e) { logger.error("Failed to receive messages from SQS queue - {}", e.getMessage()); throw new QueueException(e.getMessage()); } }</code><technical_language>I this in config, inline in method call (it is clear is name of method)</technical_language>

Target:
public List<QueueMessage> receiveMessages(String queueUrl, String messageAttributeName) throws QueueException { try { ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl); receiveMessageRequest .withMessageAttributeNames(messageAttributeName) .withMaxNumberOfMessages(10); ReceiveMessageResult receiveMessageResult = sqsClient.receiveMessage(receiveMessageRequest); return QueueMessage.of(receiveMessageResult); } catch (AmazonSQSException | UnsupportedOperationException e) { logger.error("Failed to receive messages from SQS queue - {}", e.getMessage()); throw new QueueException(e.getMessage()); } }
Source:
<code>private String writeArrayFieldComparisonJS(String field,String array,String op) { <START> return String.format("for(var i=0;i<this.%s.length;i++) { if(this.%s %s this.%s[i]) return true;}",array,field,op,array); <END> }</code><technical_language>I this needs some testing. Is intent if element in array satisfies "field op array[i]" a match</technical_language>

Target:
private String writeArrayFieldComparisonJS(String field,String array,String op) { return String.format("for(var i=0;i<this.%s.length;i++) { if(!(this.%s %s this.%s[i])) return false; } return true;",array,field,op,array); }
Source:
<code>private boolean createProcessHierarchy() { processProcessHierarchy(); Process mainProcess = getMainProcess(); if (!ProcessValidator.isContentValid(mainProcess.getTitle(), processMetadataTab.getProcessDetailsElements(), true)) { return false; } addProperties(mainProcess, processMetadataTab.getProcessDetailsElements(), processDataTab.getDocType(), processDataTab.getTiffHeaderImageDescription()); updateTasks(mainProcess); try { mainProcess.setSortHelperImages(processDataTab.getGuessedImages()); ServiceManager.getProcessService().save(mainProcess); } catch (DataException e) { Helper.setErrorMessage("errorCreating", new Object[] {ObjectType.PROCESS.getTranslationSingular() }, logger, e); return false; } if (!createProcessesLocation()) { return false; } if (ensureNonEmptyTitles()) { try { ServiceManager.getProcessService().save(getMainProcess()); } catch (DataException e) { <START> Helper.setErrorMessage("errorSaving", new Object[] {ObjectType.PROCESS.getTranslationSingular()}, <END> logger, e); return false; } } preserveProcessHierarchyMetadata(); if (Objects.nonNull(titleRecordLinkTab.getTitleRecordProcess())) { getMainProcess().setParent(titleRecordLinkTab.getTitleRecordProcess()); titleRecordLinkTab.getTitleRecordProcess().getChildren().add(getMainProcess()); } try { ServiceManager.getProcessService().save(mainProcess); } catch (DataException e) { Helper.setErrorMessage("errorCreating", new Object[] {ObjectType.PROCESS.getTranslationSingular() }, logger, e); return false; } return true; }</code><technical_language>create a private method for saving a process</technical_language>

Target:
private void createProcessHierarchy() throws DataException, ProcessGenerationException, IOException { processProcessHierarchy(); ServiceManager.getProcessService().save(getMainProcess()); if (!createProcessesLocation()) { throw new IOException("Unable to create directories for process hierarchy!"); } if (ensureNonEmptyTitles()) { ServiceManager.getProcessService().save(getMainProcess()); } saveProcessHierarchyMetadata(); if (Objects.nonNull(titleRecordLinkTab.getTitleRecordProcess())) { getMainProcess().setParent(titleRecordLinkTab.getTitleRecordProcess()); titleRecordLinkTab.getTitleRecordProcess().getChildren().add(getMainProcess()); } for (int i = 0; i < this.processes.size() - 1; i++) { TempProcess tempProcess = this.processes.get(i); MetadataEditor.addLink(this.processes.get(i + 1).getProcess(), "0", tempProcess.getProcess().getId()); } ServiceManager.getProcessService().save(getMainProcess()); }
Source:
<code>protected Object executeWithSubject() throws Exception { if (!force) { String answer = session.readLine("Are you sure you want to continue?(y/n)", ' ').toLowerCase(); <START> if (!("y".equals(answer) || "yes".equals(answer))) { <END> console.println("Aborting."); return null; } } try (SolrClient solrClient = clientFactory.newClient(COLLECTION_NAME)) { Callable<Boolean> booleanCallable = solrClient::isAvailable; boolean response = Failsafe.with( new RetryPolicy() .retryWhen(false) .withMaxDuration(5, TimeUnit.SECONDS) .withBackoff(25, 1_000, TimeUnit.MILLISECONDS)) .get(booleanCallable); if (!response) { LOGGER.error("Could not contact solr"); printErrorMessage("Could not contact solr, exiting."); return null; } executeWithSolrClient(solrClient); } catch (SolrServerException | IOException e) { LOGGER.info("Error while executing", e); printErrorMessage("Error while executing."); throw e; } printSuccessMessage("Success"); return null; }</code><technical_language>Nitpick: equalsIgnoreCase instead</technical_language>

Target:
protected Object executeWithSubject() throws Exception { if (!force) { String answer = session.readLine("Are you sure you want to continue? (y/n): ", null).toLowerCase(); if (!("y".equalsIgnoreCase(answer) || "yes".equalsIgnoreCase(answer))) { console.println("Aborting."); return null; } } try (SolrClient solrClient = clientFactory.newClient(COLLECTION_NAME)) { Callable<Boolean> booleanCallable = solrClient::isAvailable; boolean response = Failsafe.with( new RetryPolicy() .retryWhen(false) .withMaxDuration(5, TimeUnit.SECONDS) .withBackoff(25, 1_000, TimeUnit.MILLISECONDS)) .get(booleanCallable); if (!response) { LOGGER.error("Could not contact solr"); printErrorMessage("Could not contact solr, exiting."); return null; } executeWithSolrClient(solrClient); } catch (SolrServerException | IOException e) { LOGGER.info("Error while executing", e); printErrorMessage("Error while executing."); throw e; } printSuccessMessage("Success"); return null; }
Source:
<code><START> String encode(String segment) { <END> return URL.encodeQueryString(type.replacePathSeparator(segment)); }</code><technical_language>[optional] this method static moved end of class</technical_language>

Target:
private String encode(String segment) { return URL.encodeQueryString(type.replacePathSeparator(segment)); }
Source:
<code><START> public FetchCommand setTimeout(int timeout) { <END> this.timeout = timeout; return this; }</code><technical_language>Missing checkCallable()</technical_language>

Target:
public FetchCommand setTimeout(int timeout) { checkCallable(); this.timeout = timeout; return this; }
Source:
<code><START> private AuditLogType(int value, AuditLogSeverity severity, int eventFloodRate) { <END> intValue = value; this.eventFloodRate = eventFloodRate; this.severity = severity; }</code><technical_language>Some call this directly, no? pass nullable do here. I pass null in this() calls here, default is defined - important</technical_language>

Target:
private AuditLogType(int value, AuditLogSeverity severity, int eventFloodRate) { intValue = value; this.eventFloodRate = eventFloodRate; this.severity = getDefaultSeverity(severity); }
Source:
<code>PicassoDrawable(Context context, Bitmap bitmap, Drawable placeholder, Picasso.LoadedFrom loadedFrom, boolean noFade, boolean debugging) { super(context.getResources(), bitmap); this.debugging = debugging; this.density = context.getResources().getDisplayMetrics().density; this.loadedFrom = loadedFrom; <START> this.colorMatrix = new ColorMatrix(); <END> boolean fade = loadedFrom != MEMORY && !noFade; if (fade) { this.placeholder = placeholder; animating = true; startTimeMillis = SystemClock.uptimeMillis(); } }</code><technical_language>This is a minor get lazy instantiating this if need it</technical_language>

Target:
PicassoDrawable(Context context, Bitmap bitmap, Drawable placeholder, Picasso.LoadedFrom loadedFrom, boolean noFade, boolean debugging) { super(context.getResources(), bitmap); this.debugging = debugging; this.density = context.getResources().getDisplayMetrics().density; this.loadedFrom = loadedFrom; boolean fade = loadedFrom != MEMORY && !noFade; if (fade) { this.placeholder = placeholder; animating = true; startTimeMillis = SystemClock.uptimeMillis(); } }
Source:
<code>private Optional<String> remoteBranch() { try { <START> String remoteRef = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "symbolic-ref -q HEAD"); <END> String remoteBranch = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "for-each-ref --format=%(upstream:short) " + remoteRef); return Optional.ofNullable(remoteBranch.isEmpty() ? null : remoteBranch); } catch (Exception e) { return Optional.empty(); } }</code><technical_language>I instead of HEAD need property <evaluateOnCommit>HEAD</evaluateOnCommit> account. property currently allows plugin get properties arbitrary commit/branch. if change for jGit implementation required (doesn't so, need double check)</technical_language>

Target:
private Optional<String> remoteBranch() { try { String remoteRef = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "symbolic-ref -q " + evaluateOnCommit); if(remoteRef == null || remoteRef.isEmpty()) { log.debug("Could not find ref for: " + evaluateOnCommit);; return Optional.empty(); } String remoteBranch = runQuietGitCommand(canonical, nativeGitTimeoutInMs, "for-each-ref --format=%(upstream:short) " + remoteRef); return Optional.ofNullable(remoteBranch.isEmpty() ? null : remoteBranch); } catch (Exception e) { return Optional.empty(); } }
Source:
<code>public CompletableFuture<Void> restoreSnapshot( String snapshotName, boolean takeFailSafeSnapshot) { <START> throw new UnsupportedOperationException("restoreSnapshot"); <END> }</code><technical_language>why</technical_language>

Target:
public CompletableFuture<Void> restoreSnapshot( String snapshotName, boolean takeFailSafeSnapshot) { throw new UnsupportedOperationException( "In place table restorations are not supported. Please use cloneSnapshot"); }