auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static Object convertTo(JdbcConnection conn, Value v, Class<?> paramClass) { if (paramClass == Blob.class) { return new JdbcBlob(conn, v, 0); } else if (paramClass == Clob.class) { return new JdbcClob(conn, v, 0); } else if (paramClass == Array.class) { return new JdbcArray(conn, v, 0); } if (v.getType() == Value.JAVA_OBJECT) { Object o = SysProperties.serializeJavaObject ? JdbcUtils.deserialize(v.getBytes(), conn.getSession().getDataHandler()) : v.getObject(); if (paramClass.isAssignableFrom(o.getClass())) { return o; } } <START> if (JdbcUtils.customDataTypesHandler != null) { <END> return JdbcUtils.customDataTypesHandler.getObject(v, paramClass); } throw DbException.getUnsupportedException("converting to class " + paramClass.getName()); }</code><technical_language>check if is a builtin type</technical_language>

Target:
public static Object convertTo(JdbcConnection conn, Value v, Class<?> paramClass) { if (paramClass == Blob.class) { return new JdbcBlob(conn, v, 0); } else if (paramClass == Clob.class) { return new JdbcClob(conn, v, 0); } else if (paramClass == Array.class) { return new JdbcArray(conn, v, 0); } switch (v.getType()) { case Value.JAVA_OBJECT: { Object o = SysProperties.serializeJavaObject ? JdbcUtils.deserialize(v.getBytes(), conn.getSession().getDataHandler()) : v.getObject(); if (paramClass.isAssignableFrom(o.getClass())) { return o; } break; } case Value.BOOLEAN: case Value.BYTE: case Value.SHORT: case Value.INT: case Value.LONG: case Value.DECIMAL: case Value.TIME: case Value.DATE: case Value.TIMESTAMP: case Value.TIMESTAMP_TZ: case Value.BYTES: case Value.UUID: case Value.STRING: case Value.STRING_IGNORECASE: case Value.STRING_FIXED: case Value.BLOB: case Value.CLOB: case Value.DOUBLE: case Value.FLOAT: case Value.NULL: case Value.UNKNOWN: case Value.ARRAY: case Value.RESULT_SET: case Value.GEOMETRY: break; default: if (JdbcUtils.customDataTypesHandler != null) { return JdbcUtils.customDataTypesHandler.getObject(v, paramClass); } } throw DbException.getUnsupportedException("converting to class " + paramClass.getName()); }
Source:
<code>public Result<Void> createStorage(final JSONObject json) { final String type; final String id; final JSONObject configuration; try { id = json.getString("id"); type = json.getString("storage_type"); switch(type) { case "kafka": configuration = json.getJSONObject("kafka_configuration"); break; default: return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, "Type '" + type + "' is not a valid storage type")); } } catch (JSONException e) { return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, e.getMessage())); } <START> try { <END> if (storageDbRepository.getStorage(id).isPresent()) { return Result.conflict("Storage with ID " + id + " already exists."); } } catch (InternalNakadiException e) { return Result.problem(Problem.valueOf(INTERNAL_SERVER_ERROR, e.getMessage())); } final Storage storage = new Storage(); storage.setId(id); storage.setType(Storage.Type.valueOf(type.toUpperCase())); try { storage.parseConfiguration(objectMapper, configuration.toString()); } catch (final IOException e) { return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, e.getMessage())); } try { storageDbRepository.createStorage(storage); } catch (InternalNakadiException e) { return Result.problem(Problem.valueOf(INTERNAL_SERVER_ERROR, e.getMessage())); } return Result.ok(); }</code><technical_language>create a unique key constraint in DB uniqueness check implement in application level. In case, this code is redundant DB validates uniqueness. In worst case (unique constraint is missing) contains a concurrency problem</technical_language>

Target:
public Result<Void> createStorage(final JSONObject json) { final String type; final String id; final JSONObject configuration; try { id = json.getString("id"); type = json.getString("storage_type"); switch(type) { case "kafka": configuration = json.getJSONObject("kafka_configuration"); break; default: return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, "Type '" + type + "' is not a valid storage type")); } } catch (JSONException e) { return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, e.getMessage())); } final Storage storage = new Storage(); storage.setId(id); storage.setType(Storage.Type.valueOf(type.toUpperCase())); try { storage.parseConfiguration(objectMapper, configuration.toString()); } catch (final IOException e) { return Result.problem(Problem.valueOf(UNPROCESSABLE_ENTITY, e.getMessage())); } try { storageDbRepository.createStorage(storage); } catch (DuplicatedStorageIdException | InternalNakadiException e) { return Result.problem(e.asProblem()); } return Result.ok(); }
Source:
<code>public void shouldReturnDefinedMetricsAndTotalMutationCount() { collectedUpdateMetrics.merge(INSERT_NEW_DATA, createSampleUpdateMetrics()); collectedUpdateMetrics.merge(ADD_TIMESTAMPS, createSampleUpdateMetrics()); collectedUpdateMetrics.setMutationCount(10); <START> assertThat(collectedUpdateMetrics.definedMetrics()).isEqualTo(Sets.newHashSet(INSERT_NEW_DATA, <END> ADD_TIMESTAMPS)); assertThat(collectedUpdateMetrics.getMutationCount()).isEqualTo(10); }</code><technical_language>Slightly more readable: assertThat(collectedUpdateMetrics.definedMetrics()) .containsExactly(INSERT_NEW_DATA, ADD_TIMESTAMPS); AssertJ a ton of nice assertions..</technical_language>

Target:
public void shouldReturnDefinedMetricsAndTotalMutationCount() { collectedUpdateMetrics.merge(INSERT_NEW_DATA, createSampleUpdateMetrics()); collectedUpdateMetrics.merge(ADD_TIMESTAMPS, createSampleUpdateMetrics()); collectedUpdateMetrics.setMutationCount(10); assertThat(collectedUpdateMetrics.definedMetrics()).containsExactly(INSERT_NEW_DATA, ADD_TIMESTAMPS); assertThat(collectedUpdateMetrics.getMutationCount()).isEqualTo(10); }
Source:
<code>PooledFileRandomAccessBuffer(File file, boolean readOnly, long forceLength, Random seedRandom, long persistentTempID, boolean deleteOnFree, FDTracker fds) throws IOException { this.file = file; this.readOnly = readOnly; this.persistentTempID = persistentTempID; this.deleteOnFree = deleteOnFree; this.fds = fds; lockLevel = 0; RAFLock lock = lockOpen(); try { long currentLength = raf.length(); if(forceLength >= 0 && forceLength != currentLength) { if(readOnly) throw new IOException("Read only but wrong length"); if (Fallocate.isSupported()) { <START> Fallocate.forDescriptor(raf.getFD(), forceLength).execute(); <END> } else { Logger.normal(this, "fallocate() not supported; using legacy method"); raf.seek(0); MersenneTwister mt = null; if(seedRandom != null) mt = new MersenneTwister(seedRandom.nextLong()); byte[] buf = new byte[4096]; for(long l = 0; l < forceLength; l+=4096) { if(mt != null) mt.nextBytes(buf); int maxWrite = (int)Math.min(4096, forceLength - l); raf.write(buf, 0, maxWrite); } assert(raf.getFilePointer() == forceLength); assert(raf.length() == forceLength); } raf.setLength(forceLength); currentLength = forceLength; } this.length = currentLength; lock.unlock(); } catch (IOException e) { synchronized(this) { raf.close(); raf = null; } throw e; } }</code><technical_language>This is equivalent: original code writes random data, zeroes</technical_language>

Target:
PooledFileRandomAccessBuffer(File file, boolean readOnly, long forceLength, Random seedRandom, long persistentTempID, boolean deleteOnFree, FDTracker fds) throws IOException { this.file = file; this.readOnly = readOnly; this.persistentTempID = persistentTempID; this.deleteOnFree = deleteOnFree; this.fds = fds; lockLevel = 0; RAFLock lock = lockOpen(); try { long currentLength = raf.length(); if(forceLength >= 0 && forceLength != currentLength) { if(readOnly) throw new IOException("Read only but wrong length"); if (Fallocate.isSupported()) { Fallocate.forDescriptor(raf.getFD(), forceLength).execute(); } else { Logger.normal(this, "fallocate() not supported; using legacy method"); Fallocate.legacyFill(raf.getChannel(), forceLength, 0, false); } raf.setLength(forceLength); currentLength = forceLength; } this.length = currentLength; lock.unlock(); } catch (IOException e) { synchronized(this) { raf.close(); raf = null; } throw e; } }
Source:
<code>public synchronized PublisherSession newSession() { <START> Window it = pushStream.newWindow(sessionRollbackCount); <END> PublisherSession session = new PublisherSession(it, generator .generate()); sessions.put(session.getKey(), session); return session; }</code><technical_language>-> window</technical_language>

Target:
public synchronized PublisherSession newSession() { Window window = pushStream.newWindow(sessionRollbackCount); PublisherSession session = new PublisherSession( window, generator .generate()); sessions.put(session.getKey(), session); return session; }
Source:
<code>public void onTakeDeleted() { <START> ProjectProgress pp = new ProjectProgress(mProject, db, chunkPlugin.getChapters()); <END> pp.updateProjectProgress(); }</code><technical_language>this moved top; name projectProgress pp declaration. (you're in unit list, is in project, this cut a lot of work done repeatedly)</technical_language>

Target:
public void onTakeDeleted() { if(projectProgress != null) { projectProgress.updateProjectProgress(); } }
Source:
<code><START> public RequestTemplate resolve(Map<String, ?> unencoded, Map<String, Boolean> alreadyEncoded) { <END> replaceQueryValues(unencoded, alreadyEncoded); Map<String, String> encoded = new LinkedHashMap<String, String>(); for (Entry<String, ?> entry : unencoded.entrySet()) { final String key = entry.getKey(); final Object objectValue = entry.getValue(); String encodedValue = encodeValueIfNotEncoded(key, objectValue, alreadyEncoded); encoded.put(key, encodedValue); } String resolvedUrl = expand(url.toString(), encoded).replace("+", "%20"); if (decodeSlash) { resolvedUrl = resolvedUrl.replace("%2F", "/"); } url = new StringBuilder(resolvedUrl); Map<String, Collection<String>> resolvedHeaders = new LinkedHashMap<String, Collection<String>>(); for (String field : headers.keySet()) { Collection<String> resolvedValues = new ArrayList<String>(); for (String value : valuesOrEmpty(headers, field)) { String resolved = expand(value, unencoded); resolvedValues.add(resolved); } resolvedHeaders.put(field, resolvedValues); } headers.clear(); headers.putAll(resolvedHeaders); if (bodyTemplate != null) { body(urlDecode(expand(bodyTemplate, encoded))); } return this; }</code><technical_language>for this below, package private is fine (as opposed private). new methods, hide asks. package private is tested (plus bytecode is smaller)</technical_language>

Target:
RequestTemplate resolve(Map<String, ?> unencoded, Map<String, Boolean> alreadyEncoded) { replaceQueryValues(unencoded, alreadyEncoded); Map<String, String> encoded = new LinkedHashMap<String, String>(); for (Entry<String, ?> entry : unencoded.entrySet()) { final String key = entry.getKey(); final Object objectValue = entry.getValue(); String encodedValue = encodeValueIfNotEncoded(key, objectValue, alreadyEncoded); encoded.put(key, encodedValue); } String resolvedUrl = expand(url.toString(), encoded).replace("+", "%20"); if (decodeSlash) { resolvedUrl = resolvedUrl.replace("%2F", "/"); } url = new StringBuilder(resolvedUrl); Map<String, Collection<String>> resolvedHeaders = new LinkedHashMap<String, Collection<String>>(); for (String field : headers.keySet()) { Collection<String> resolvedValues = new ArrayList<String>(); for (String value : valuesOrEmpty(headers, field)) { String resolved = expand(value, unencoded); resolvedValues.add(resolved); } resolvedHeaders.put(field, resolvedValues); } headers.clear(); headers.putAll(resolvedHeaders); if (bodyTemplate != null) { body(urlDecode(expand(bodyTemplate, encoded))); } return this; }
Source:
<code>public PinotResultSet(org.apache.pinot.client.ResultSet resultSet) { _resultSet = resultSet; _totalRows = _resultSet.getRowCount(); _currentRow = -1; for (int i = 0; i < _resultSet.getColumnCount(); i++) { <START> _columns.put(_resultSet.getColumnName(i), i); <END> } }</code><technical_language>reason this pinot.client.ResultSet (which a class). ResultTable for returning responses is a more code, want check out</technical_language>

Target:
public PinotResultSet(org.apache.pinot.client.ResultSet resultSet) { _resultSet = resultSet; _totalRows = _resultSet.getRowCount(); _totalColumns = _resultSet.getColumnCount(); _currentRow = -1; _closed = false; for (int i = 0; i < _totalColumns; i++) { _columns.put(_resultSet.getColumnName(i), i + 1); } }
Source:
<code>public PlanResultImpl() { <START> this.summary = null; <END> }</code><technical_language>put a more informative msg for representing plan is empty? e.g. plan result is empty</technical_language>

Target:
public PlanResultImpl() { this.summary = "The plan result is not specified"; this.numExecutedOps = -1; }
Source:
<code>public void accumulateRowSizes(int[] rowSizes) { <START> int averageElementSize = Long.BYTES + Byte.BYTES; <END> for (int i = 0; i < positionCount; i++) { rowSizes[i] += averageElementSize; } }</code><technical_language>accumulateRowSizes method is supposed for variable-width types; assuming this is a fixed-width BIGINT, change implementation throw new UnsupportedOperationException("accumulateRowSizes is supported for fixed width types");</technical_language>

Target:
public void accumulateRowSizes(int[] rowSizes) { throw new UnsupportedOperationException("accumulateRowSizes is not supported for fixed width types"); }
Source:
<code>protected void executeVdsBrokerCommand() { GlusterVolumeSnapshotConfig cfgParam = getParameters() .getConfgParam(); String paramValue = cfgParam.getParamValue().endsWith("%") ? cfgParam.getParamValue().substring(0, <START> cfgParam.getParamValue().length() - 1) : cfgParam.getParamValue(); <END> if (cfgParam.getVolumeId() != null) { GlusterVolumeEntity volume = DbFacade.getInstance().getGlusterVolumeDao().getById(cfgParam.getVolumeId()); status = getBroker().glusterVolumeSnapshotConfigSet(volume.getName(), cfgParam.getParamName(), paramValue); } else { status = getBroker().glusterSnapshotConfigSet(cfgParam.getParamName(), paramValue); } proceedProxyReturnValue(); }</code><technical_language>StringUtils.removeEnd do</technical_language>

Target:
protected void executeVdsBrokerCommand() { GlusterVolumeSnapshotConfig cfgParam = getParameters() .getConfgParam(); String paramValue = cfgParam.getParamValue().endsWith("%") ? StringUtils.removeEnd(cfgParam.getParamValue(), "%") : cfgParam.getParamValue(); if (cfgParam.getVolumeId() != null) { GlusterVolumeEntity volume = DbFacade.getInstance().getGlusterVolumeDao().getById(cfgParam.getVolumeId()); status = getBroker().glusterVolumeSnapshotConfigSet(volume.getName(), cfgParam.getParamName(), paramValue); } else { status = getBroker().glusterSnapshotConfigSet(cfgParam.getParamName(), paramValue); } proceedProxyReturnValue(); }
Source:
<code>public void resetError(int rowIndex, int columnIndex) { Scenario scenarioByIndex = simulation.getScenarioByIndex(rowIndex); FactMapping factMapping = simulation.getSimulationDescriptor().getFactMappingByIndex(columnIndex); Optional<FactMappingValue> factMappingValue = scenarioByIndex.getFactMappingValue(factMapping); <START> if (factMappingValue.isPresent()) { <END> factMappingValue.get().resetStatus(); } refreshErrors(); }</code><technical_language>Please update factMappingValue.ifPresent(fmv -> fmv.resetStatus());</technical_language>

Target:
public void resetError(int rowIndex, int columnIndex) { Scenario scenarioByIndex = simulation.getScenarioByIndex(rowIndex); FactMapping factMapping = simulation.getSimulationDescriptor().getFactMappingByIndex(columnIndex); Optional<FactMappingValue> factMappingValue = scenarioByIndex.getFactMappingValue(factMapping); factMappingValue.ifPresent(fmv -> fmv.resetStatus()); refreshErrors(); }
Source:
<code>public void dropView(StatePrimaryView view) { <START> if (subscription!=null && !subscription.isUnsubscribed()) { <END> subscription.unsubscribe(); } super.dropView(view); ButterKnife.unbind(this); }</code><technical_language>I dont need un-sub</technical_language>

Target:
public void dropView(StatePrimaryView view) { super.dropView(view); ButterKnife.unbind(this); }
Source:
<code>private void loadDir() { if (getDialogSettings() != null) { String cachedDir = <START> getDialogSettings().get("currentDir"); <END> if (cachedDir != null) { setDirectory(cachedDir); } } }</code><technical_language>this a constant is well</technical_language>

Target:
private void loadDir() { if (getDialogSettings() != null) { String cachedDir = getDialogSettings().get(CURRENT_DIR_SETTING_ID); if (cachedDir != null) { setDirectory(cachedDir); } } }
Source:
<code>private void readInput() { BufferedReader br = new BufferedReader(new InputStreamReader(is)); while (true) { String s; String[] getCommands; try { s = br.readLine(); if (s == null || s.trim().length() == 0) { break; } if (s.contains("GET") && s.contains("?")) { <START> logger.debug(this.s.getInetAddress().getHostAddress() + " " + s); <END> String[] CommandParse = s.split("[/ ]"); String command = CommandParse[2]; getCommands = command.split("[?&>=]"); if (s.contains("m=1")) { MegaDeviceBinding.updateValues(this.s.getInetAddress().getHostAddress(), getCommands, OnOffType.OFF); } else if (s.contains("m=2")) { logger.debug("m=2"); } else { MegaDeviceBinding.updateValues(this.s.getInetAddress().getHostAddress(), getCommands, OnOffType.ON); for (int i = 0; getCommands.length > i; i++) { logger.debug(i + " value " + getCommands[i]); } } break; } else { break; } } catch (IOException e) { logger.debug("ERROR: " + e.getMessage()); } } }</code><technical_language>parameterized logging instead of string concatenation</technical_language>

Target:
private void readInput() { BufferedReader br = new BufferedReader(new InputStreamReader(is)); while (true) { String s; String[] getCommands; try { s = br.readLine(); if (s == null || s.trim().length() == 0) { break; } if (s.contains("GET") && s.contains("?")) { logger.debug("{} ", this.s.getInetAddress().getHostAddress(), s); String[] CommandParse = s.split("[/ ]"); String command = CommandParse[2]; getCommands = command.split("[?&>=]"); if (s.contains("m=1")) { MegaDeviceBinding.updateValues(this.s.getInetAddress().getHostAddress(), getCommands, OnOffType.OFF); } else if (s.contains("m=2")) { } else { MegaDeviceBinding.updateValues(this.s.getInetAddress().getHostAddress(), getCommands, OnOffType.ON); } break; } else break; } catch (IOException e) { logger.error("ERROR: MegaDevice input server error. Restart http socket"); logger.error(e.getLocalizedMessage()); MegadeviceHttpServer.setRunningState(false); } } }
Source:
<code>public PreDestroyMonitor(Map<Class<? extends Annotation>, Scope> scopeBindings) { this.scopeBindings = new HashMap<>(scopeBindings); reqQueueExecutor.submit(new Runnable() { public void run() { while (true) { try { Reference<? extends ScopeCleanupMarker> ref = markerReferenceQueue.remove(500); if (ref != null && ref instanceof ScopeCleanupAction) { Integer markerKey = ((ScopeCleanupAction)ref).getId(); ScopeCleanupAction cleanupAction; synchronized(scopedCleanupActions) { cleanupAction = scopedCleanupActions.remove(markerKey); } if (cleanupAction != null) { cleanupAction.call(); } } } <START> catch (InterruptedException e) { <END> } } } }); }</code><technical_language>terminate this thread if interrupted? reset interrupted state</technical_language>

Target:
public PreDestroyMonitor(Map<Class<? extends Annotation>, Scope> scopeBindings) { this.scopeBindings = new HashMap<>(scopeBindings); this.reqQueueExecutor.submit(new ScopedCleanupWorker()); }
Source:
<code>public void submitStackTraces(String server) { try { File dir = FileUtil.getFilesDir(FileType.STACKTRACE); String[] list = getTraceFiles(dir); if (list != null && list.length > 0) { for (int i = 0; i < list.length; i++) { File f = new File(dir, list[i]); String trace = FileUtil.readFileAsString(f); <START> Map<String, String> params = new HashMap<String, String>(); <END> params.put(ACTION_PARAM, ACTION_VALUE); params.put(PHONE_PARAM, phoneNumber); params.put(IMEI_PARAM, imei); params.put(VER_PARAM, version); params.put(DATE_PARAM, DATE_FMT.get().format(new Date(f.lastModified()))); params.put(DEV_ID_PARAM, deviceId); params.put(TRACE_PARAM, trace); String response = HttpUtil.httpPost(server + EXCEPTION_SERVICE_PATH, params); if (response == null || response.trim().length() == 0 || "ok".equalsIgnoreCase(response)) { f.delete(); } } } } catch (Exception e) { Log.e(TAG, "Could not send exception", e); } }</code><technical_language>introduce ANDROID_ID of convention needed</technical_language>

Target:
public void submitStackTraces(String server) { try { File dir = FileUtil.getFilesDir(FileType.STACKTRACE); String[] list = getTraceFiles(dir); if (list != null && list.length > 0) { for (int i = 0; i < list.length; i++) { File f = new File(dir, list[i]); String trace = FileUtil.readFileAsString(f); Map<String, String> params = new HashMap<String, String>(); params.put(ACTION_PARAM, ACTION_VALUE); params.put(PHONE_PARAM, phoneNumber); params.put(IMEI_PARAM, imei); params.put(VER_PARAM, version); params.put(DATE_PARAM, DATE_FMT.get().format(new Date(f.lastModified()))); params.put(DEV_ID_PARAM, deviceId); params.put(TRACE_PARAM, trace); params.put(ANDROID_ID_PARAM, PlatformUtil.getAndroidID(this)); String response = HttpUtil.httpPost(server + EXCEPTION_SERVICE_PATH, params); if (response == null || response.trim().length() == 0 || "ok".equalsIgnoreCase(response)) { f.delete(); } } } } catch (Exception e) { Log.e(TAG, "Could not send exception", e); } }
Source:
<code>public JupiterActivity generateJupiterActivity(Operation op, User source, SPath editor) { JupiterActivity jupiterActivity = new JupiterActivity(this.vectorTime, op, source, editor); <START> if (!(op instanceof TimestampOperation)) { <END> this.ackJupiterActivityList.add( new OperationWrapper(op, this.vectorTime.getLocalOperationCount())); } this.vectorTime = this.vectorTime.incrementLocalOperationCount(); return jupiterActivity; }</code><technical_language>pointed this line is problem ? problem is discardAcknowledgedOperations is called. This done in this method anyway</technical_language>

Target:
public JupiterActivity generateJupiterActivity(Operation op, User source, SPath editor) { JupiterActivity jupiterActivity = new JupiterActivity(this.vectorTime, op, source, editor); this.ackJupiterActivityList.add( new OperationWrapper(op, this.vectorTime.getLocalOperationCount())); this.vectorTime = this.vectorTime.incrementLocalOperationCount(); return jupiterActivity; }
Source:
<code><START> public long calculateAverageDynamicConfigRefreshInterval() { <END> long total = 0; for (GerritServer server : PluginImpl.getServers_()) { total += server.getConfig().getDynamicConfigRefreshInterval(); } long average = total / Math.max(1, PluginImpl.getServers_().size()); return Math.max(GerritDefaultValues.MINIMUM_DYNAMIC_CONFIG_REFRESH_INTERVAL, average); }</code><technical_language>@Restricted(NoExternalUse.class)</technical_language>

Target:
long calculateAverageDynamicConfigRefreshInterval() { long total = 0; for (GerritServer server : PluginImpl.getServers_()) { total += server.getConfig().getDynamicConfigRefreshInterval(); } long average = total / Math.max(1, PluginImpl.getServers_().size()); return Math.max(GerritDefaultValues.MINIMUM_DYNAMIC_CONFIG_REFRESH_INTERVAL, average); }
Source:
<code>protected static void nullInstance(Object instance) { if (instance == null) { return; } Field[] fields = instance.getClass().getDeclaredFields(); for (Field field : fields) { int mods = field.getModifiers(); if (field.getType().isPrimitive() || (field.getName().contains("$"))) { continue; } try { field.setAccessible(true); if (Modifier.isStatic(mods) && Modifier.isFinal(mods)) { <START> } else { <END> Object value = field.get(instance); if (null != value) { Class<?> valueClass = value.getClass(); if (!loadedByThisOrChild(valueClass)) { if (log.isDebugEnabled()) { log.debug("Not setting field " + field.getName() + " to null in object of class " + instance.getClass().getName() + " because the referenced object was of type " + valueClass.getName() + " which was not loaded by this WebappClassLoader."); } } else { field.set(instance, null); if (log.isDebugEnabled()) { log.debug("Set field " + field.getName() + " to null in class " + instance.getClass().getName()); } } } } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Could not set field " + field.getName() + " to null in object instance of class " + instance.getClass().getName(), e); } } } }</code><technical_language>simplify this if statement else</technical_language>

Target:
protected static void nullInstance(Object instance) { if (instance == null) { return; } Field[] fields = instance.getClass().getDeclaredFields(); for (Field field : fields) { int mods = field.getModifiers(); if (field.getType().isPrimitive() || (field.getName().contains("$"))) { continue; } try { field.setAccessible(true); if (!Modifier.isStatic(mods) || !Modifier.isFinal(mods)) { Object value = field.get(instance); if (null != value) { Class<?> valueClass = value.getClass(); if (!loadedByThisOrChild(valueClass)) { if (log.isDebugEnabled()) { log.debug("Not setting field " + field.getName() + " to null in object of class " + instance.getClass().getName() + " because the referenced object was of type " + valueClass.getName() + " which was not loaded by this WebappClassLoader."); } } else { field.set(instance, null); if (log.isDebugEnabled()) { log.debug("Set field " + field.getName() + " to null in class " + instance.getClass().getName()); } } } } } catch (Exception e) { if (log.isDebugEnabled()) { log.debug("Could not set field " + field.getName() + " to null in object instance of class " + instance.getClass().getName(), e); } } } }
Source:
<code>public void dispose() { super.dispose(); getSite().getPage().removePostSelectionListener(this); RegistryFactory.getRegistry().removeListener(this); SaveablesList saveables = <START> (SaveablesList) getSite().getService(ISaveablesLifecycleListener.class); <END> if (saveables != null) { saveables.removeModelLifecycleListener(saveablesTracker); } currentPart = null; currentSelection = null; pinPropertySheetAction = null; }</code><technical_language>cast operation? asking for a service interface cast a concrete implementation instanceof check. perform check in tracker is added a SaveablesList</technical_language>

Target:
public void dispose() { super.dispose(); getSite().getPage().removePostSelectionListener(this); RegistryFactory.getRegistry().removeListener(this); ISaveablesLifecycleListener saveables = getSite().getService(ISaveablesLifecycleListener.class); if (saveables instanceof SaveablesList) { ((SaveablesList) saveables).removeModelLifecycleListener(saveablesTracker); } currentPart = null; currentSelection = null; pinPropertySheetAction = null; }
Source:
<code>AbstractTableManager(ConnectionFactory connectionFactory, TableManipulationConfiguration config, DbMetaData metaData, String cacheName, String identifierQuoteString, Log log) { if (cacheName == null || cacheName.trim().length() == 0) throw new PersistenceException("cacheName needed in order to create table"); this.connectionFactory = connectionFactory; this.config = config; this.metaData = metaData; this.tableName = new TableName(identifierQuoteString, config.tableNamePrefix(), cacheName); this.identifierQuoteString = identifierQuoteString; this.log = log; this.insertRowSql = getInsertRowSql(); this.updateRowSql = getUpdateRowSql(); this.upsertRowSql = getUpsertRowSql(); this.selectRowSql = getSelectRowSql(); this.selectIdRowSql = getSelectIdRowSql(); this.deleteRowSql = getDeleteRowSql(); this.loadAllRowsSql = getLoadAllRowsSql(); this.countRowsSql = getCountNonExpiredRowsSql(); this.loadAllNonExpiredRowsSql = getLoadNonExpiredAllRowsSql(); this.selectExpiredRowsSql = getSelectExpiredBucketsSql(); <START> this.deleteExpiredRowsSql = getSelectOnlyExpiredRowsSql(); <END> }</code><technical_language>of fields initialised them, store calls getter methods moment creates a String invocation. This is null check in previous implementation avoid, basically purpose init variable in a lazy manner. I populating variables, e.g. insertRowSql, upfront making final is desirable ... change approach. I suggest getInsertRowSQL returns insertRowSql variable in constructor call a protected method initInsertRowSQL init variable. way, concrete implementations of AbstractTableManager overload init method required allow holding variables private final</technical_language>

Target:
AbstractTableManager(ConnectionFactory connectionFactory, TableManipulationConfiguration config, DbMetaData metaData, String cacheName, String identifierQuoteString, Log log) { if (cacheName == null || cacheName.trim().length() == 0) throw new PersistenceException("cacheName needed in order to create table"); this.connectionFactory = connectionFactory; this.config = config; this.metaData = metaData; this.tableName = new TableName(identifierQuoteString, config.tableNamePrefix(), cacheName); this.identifierQuoteString = identifierQuoteString; this.log = log; this.insertRowSql = initInsertRowSql(); this.updateRowSql = initUpdateRowSql(); this.upsertRowSql = initUpsertRowSql(); this.selectRowSql = initSelectRowSql(); this.selectIdRowSql = initSelectIdRowSql(); this.deleteRowSql = initDeleteRowSql(); this.loadAllRowsSql = initLoadAllRowsSql(); this.countRowsSql = initCountNonExpiredRowsSql(); this.loadAllNonExpiredRowsSql = initLoadNonExpiredAllRowsSql(); this.deleteAllRows = initDeleteAllRowsSql(); this.selectExpiredRowsSql = initSelectExpiredBucketsSql(); this.deleteExpiredRowsSql = initSelectOnlyExpiredRowsSql(); }
Source:
<code>OAuth2TokenIntrospectionClient getIntrospectionClient() { if (this.introspectionClient != null) { return this.introspectionClient; } <START> if (this.introspectionUri != null || this.restOperations != null) { <END> return new NimbusOAuth2TokenIntrospectionClient(this.introspectionUri, this.restOperations); } return this.context.getBean(OAuth2TokenIntrospectionClient.class); }</code><technical_language>operator && ||</technical_language>

Target:
OAuth2TokenIntrospectionClient getIntrospectionClient() { if (this.introspectionClient != null) { return this.introspectionClient.get(); } return this.context.getBean(OAuth2TokenIntrospectionClient.class); }
Source:
<code>public long estimatedInMemorySize() { return INSTANCE_SIZE + SizeOf.SIZE_OF_INT + SizeOf.SIZE_OF_INT + <START> 2 * SizeOf.SIZE_OF_DOUBLE * Math.min(count, samples.length); END> }</code><technical_language>this sizeOf(samples)</technical_language>

Target:
public long estimatedInMemorySize() { return INSTANCE_SIZE + SizeOf.sizeOf(samples); }
Source:
<code>private MethodExpression removePrefix(MethodExpression expression) { return expression.getMethod().getWords().get(0).equals(MANDATORY) || <START> expression.getMethod().getWords().get(0).equals(OPTIONAL) ? <END> (MethodExpression)expression.getParameters().get(0) : expression; }</code><technical_language>before, consider making "OPTINAL" a "Name"</technical_language>

Target:
private MethodExpression removePrefix(MethodExpression expression) { return expression.getMethod().equals(MANDATORY) || expression.getMethod().equals(OPTIONAL) ? (MethodExpression)expression.getParameters().get(0) : expression; }
Source:
<code>public DefaultDockerClientConfig build() { SSLContext sslContext = null; if (customSslContext == null) { <START> if (dockerTlsVerify) { <END> dockerCertPath = checkDockerCertPath(dockerCertPath); sslContext = new LocalDirectorySSLConfig(dockerCertPath).getSSLContext(); } } else { sslContext = customSslContext; } return new DefaultDockerClientConfig(dockerHost, dockerConfig, apiVersion, registryUrl, registryUsername, registryPassword, registryEmail, sslContext); }</code><technical_language>merge ifs</technical_language>

Target:
public DefaultDockerClientConfig build() { SSLConfig sslConfig = null; if (customSslConfig == null) { if (dockerTlsVerify) { dockerCertPath = checkDockerCertPath(dockerCertPath); sslConfig = new LocalDirectorySSLConfig(dockerCertPath); } } else { sslConfig = customSslConfig; } return new DefaultDockerClientConfig(dockerHost, dockerConfig, apiVersion, registryUrl, registryUsername, registryPassword, registryEmail, sslConfig); }
Source:
<code>public OpenTxnMessage getOpenTxnMessage(String messageBody) { try { return mapper.readValue(messageBody, JSONOpenTxnMessage.class); } catch (Exception e) { <START> throw new IllegalArgumentException("Could not construct DropConstraintMessage", e); <END> } }</code><technical_language>Incorrect error message</technical_language>

Target:
public OpenTxnMessage getOpenTxnMessage(String messageBody) { try { return mapper.readValue(messageBody, JSONOpenTxnMessage.class); } catch (Exception e) { throw new IllegalArgumentException("Could not construct OpenTxnMessage", e); } }
Source:
<code>private void putImpl(final String bucket, final String key, final byte[] csum, final TemporaryBuffer buf, ProgressMonitor monitor, String monitorTask) throws IOException { if (monitor == null) monitor = NullProgressMonitor.INSTANCE; if (monitorTask == null) monitorTask = MessageFormat.format(JGitText.get().progressMonUploading, key); final String md5str = Base64.encodeBytes(csum); final long len = buf.length(); for (int curAttempt = 0; curAttempt < maxAttempts; curAttempt++) { final HttpURLConnection c = open("PUT", bucket, key); c.setFixedLengthStreamingMode(len); c.setRequestProperty("Content-MD5", md5str); c.setRequestProperty(X_AMZ_ACL, acl); encryption.request(c, X_AMZ_META); authorize(c); c.setDoOutput(true); <START> c.setFixedLengthStreamingMode((int) len); <END> monitor.beginTask(monitorTask, (int) (len / 1024)); final OutputStream os = c.getOutputStream(); try { buf.writeTo(os, monitor); } finally { monitor.endTask(); os.close(); } switch (HttpSupport.response(c)) { case HttpURLConnection.HTTP_OK: return; case HttpURLConnection.HTTP_INTERNAL_ERROR: continue; default: throw error("Writing", key, c); } } throw maxAttempts("Writing", key); }</code><technical_language>Delete this line</technical_language>

Target:
private void putImpl(final String bucket, final String key, final byte[] csum, final TemporaryBuffer buf, ProgressMonitor monitor, String monitorTask) throws IOException { if (monitor == null) monitor = NullProgressMonitor.INSTANCE; if (monitorTask == null) monitorTask = MessageFormat.format(JGitText.get().progressMonUploading, key); final String md5str = Base64.encodeBytes(csum); final long len = buf.length(); for (int curAttempt = 0; curAttempt < maxAttempts; curAttempt++) { final HttpURLConnection c = open("PUT", bucket, key); c.setFixedLengthStreamingMode(len); c.setRequestProperty("Content-MD5", md5str); c.setRequestProperty(X_AMZ_ACL, acl); encryption.request(c, X_AMZ_META); authorize(c); c.setDoOutput(true); monitor.beginTask(monitorTask, (int) (len / 1024)); final OutputStream os = c.getOutputStream(); try { buf.writeTo(os, monitor); } finally { monitor.endTask(); os.close(); } switch (HttpSupport.response(c)) { case HttpURLConnection.HTTP_OK: return; case HttpURLConnection.HTTP_INTERNAL_ERROR: continue; default: throw error("Writing", key, c); } } throw maxAttempts("Writing", key); }
Source:
<code>public synchronized Collection<PendingConfirm> expire(Listener listener, long cutoffTime) { SortedMap<Long, PendingConfirm> pendingConfirmsForListener = this.pendingConfirms.get(listener); if (pendingConfirmsForListener == null) { return Collections.<PendingConfirm>emptyList(); } else { List<PendingConfirm> expired = new ArrayList<PendingConfirm>(); Iterator<Entry<Long, PendingConfirm>> iterator = pendingConfirmsForListener.entrySet().iterator(); while (iterator.hasNext()) { PendingConfirm pendingConfirm = iterator.next().getValue(); if (pendingConfirm.getTimestamp() < cutoffTime) { expired.add(pendingConfirm); iterator.remove(); CorrelationData correlationData = pendingConfirm.getCorrelationData(); if (correlationData != null && StringUtils.hasText(correlationData.getReturnCorrelation())) { <START> this.pendingReturns.remove(correlationData.getReturnCorrelation()); <END> } } else { break; } } return expired; } }</code><technical_language>existing CorrelationData.id for this return purpose well</technical_language>

Target:
public synchronized Collection<PendingConfirm> expire(Listener listener, long cutoffTime) { SortedMap<Long, PendingConfirm> pendingConfirmsForListener = this.pendingConfirms.get(listener); if (pendingConfirmsForListener == null) { return Collections.<PendingConfirm>emptyList(); } else { List<PendingConfirm> expired = new ArrayList<PendingConfirm>(); Iterator<Entry<Long, PendingConfirm>> iterator = pendingConfirmsForListener.entrySet().iterator(); while (iterator.hasNext()) { PendingConfirm pendingConfirm = iterator.next().getValue(); if (pendingConfirm.getTimestamp() < cutoffTime) { expired.add(pendingConfirm); iterator.remove(); CorrelationData correlationData = pendingConfirm.getCorrelationData(); if (correlationData != null && StringUtils.hasText(correlationData.getId())) { this.pendingReturns.remove(correlationData.getId()); } } else { break; } } return expired; } }
Source:
<code>private QueryPlan getFetchPlan(boolean isNext, int fetchSize) throws SQLException { if (!isOpen) throw new SQLException("Fetch call on closed cursor '" + this.cursorName + "'!"); ((CursorResultIterator)fetchPlan.iterator()).setFetchSize(fetchSize); if (!queryPlan.getStatement().isAggregate() || !queryPlan.getStatement().isDistinct()) { if (islastCallNext != isNext) { if (islastCallNext && !isReversed){ ScanUtil.setReversed(scan); } else { ScanUtil.unsetReversed(scan); <START> } <END> isReversed = !isReversed; } if (!isReversed) { if (row!=null){ scan.setStartRow(row.get()); } } else { if(previousRow!=null){ scan.setStopRow(previousRow.get()); } } islastCallNext = isNext; } return this.fetchPlan; }</code><technical_language>this code for reverse/prior belongs another JIRA. remove this if affect functionality</technical_language>

Target:
private QueryPlan getFetchPlan(boolean isNext, int fetchSize) throws SQLException { if (!isOpen) throw new SQLException("Fetch call on closed cursor '" + this.cursorName + "'!"); ((CursorResultIterator)fetchPlan.iterator()).setFetchSize(fetchSize); if (!isAggregate) { if (row!=null){ scan.setStartRow(row.get()); } } return this.fetchPlan; }
Source:
<code>public StructType getExternalFileSchema(String storedAs, String location){ StructType schema = null; if (storedAs!=null) { if (storedAs.toLowerCase().equals("p")) { schema = SpliceSpark.getSession().read().parquet(location).schema(); } <START> if (storedAs.toLowerCase().equals("a")) { <END> schema = SparkSession.builder().master("local").getOrCreate().read().format("com.databricks.spark.avro").load(location).schema(); } if (storedAs.toLowerCase().equals("o")) { schema = SpliceSpark.getSession().read().orc(location).schema(); } if (storedAs.toLowerCase().equals("t")) { schema = SpliceSpark.getSession().read().csv(location).schema(); } } return schema; }</code><technical_language>else-if case nice, add</technical_language>

Target:
public StructType getExternalFileSchema(String storedAs, String location){ StructType schema = null; if (storedAs!=null) { if (storedAs.toLowerCase().equals("p")) { schema = SpliceSpark.getSession().read().parquet(location).schema(); } else if (storedAs.toLowerCase().equals("a")) { schema = SpliceSpark.getSession().read().format("com.databricks.spark.avro").load(location).schema(); } else if (storedAs.toLowerCase().equals("o")) { schema = SpliceSpark.getSession().read().orc(location).schema(); } else if (storedAs.toLowerCase().equals("t")) { schema = SpliceSpark.getSession().read().csv(location).schema(); } } return schema; }
Source:
<code>private CachedCuratorFrameworkImpl( final ReferenceCountedCache<K, CuratorFramework> cache, final K key, final CuratorFrameworkImpl delegate ) { super(delegate); mCache = cache; mCacheKey = key; <START> DebugResourceTracker <END> .get() .registerResource(this, ExceptionUtils.getStackTrace(new Exception())); }</code><technical_language>This result of a bad merge</technical_language>

Target:
private CachedCuratorFrameworkImpl( final ReferenceCountedCache<K, CuratorFramework> cache, final K key, final CuratorFrameworkImpl delegate ) { super(delegate); mCache = cache; mCacheKey = key; DebugResourceTracker.get().registerResource(this); }
Source:
<code>public Object createVisit(UiUtils ui, Session session, @BindParams("visit") @Validate Visit visit) { <START> if (visit.getLocation() == null) <END> visit.setLocation(Context.getService(KenyaEmrService.class).getDefaultLocation()); visit = Context.getVisitService().endVisit(visit, visit.getStopDatetime()); Visit saved = Context.getVisitService().saveVisit(visit); return simpleVisit(ui, saved); }</code><technical_language>For consistency braces conditionals loops, if line</technical_language>

Target:
public SimpleObject createVisit(UiUtils ui, Session session, @BindParams("visit") @Validate Visit visit) { if (visit.getLocation() == null) { visit.setLocation(Context.getService(KenyaEmrService.class).getDefaultLocation()); } visit = Context.getVisitService().endVisit(visit, visit.getStopDatetime()); Visit saved = Context.getVisitService().saveVisit(visit); return simpleVisit(ui, saved); }
Source:
<code>public String getQueryId() { <START> return queryId.getId(); <END> }</code><technical_language>return queryId</technical_language>

Target:
public QueryId getQueryId() { return queryId; }
Source:
<code>protected KeyValueService getKeyValueService() { return CassandraKeyValueServiceImpl.createForTesting( <START> container.getConfig(), <END> CassandraContainer.LEADER_CONFIG); }</code><technical_language>this code snippet is in of tests. thought making a new CassandraContainers rule wraps Containers rule contains a CassandraKeyValueServiceImpl</technical_language>

Target:
protected KeyValueService getKeyValueService() { return CASSANDRA.getDefaultKvs(); }
Source:
<code>protected InputStream readContent(BinaryKey key, Connection connection) throws SQLException { PreparedStatement readContentStatement = readContentSQLStatement(key, true, connection); ResultSet rs = executeQuery(readContentStatement); if (!rs.next()) { tryToClose(readContentStatement); <START> tryToClose(connection); <END> return null; } return new DatabaseBinaryStream(connection, readContentStatement, rs.getBinaryStream(1)); }</code><technical_language>tryToClose methods more robust in order call sequentially this; _any_ exception through. alternative (and approach) is call in a try block in a finally block. stands now, this is a potential connection leak point</technical_language>

Target:
protected InputStream readContent(BinaryKey key, Connection connection) throws SQLException { PreparedStatement readContentStatement = prepareStatement(USED_CONTENT_STMT_KEY, connection); try { readContentStatement.setString(1, key.toString()); ResultSet rs = executeQuery(readContentStatement); if (!rs.next()) { tryToClose(readContentStatement); tryToClose(connection); return null; } else { return new DatabaseBinaryStream(connection, readContentStatement, rs.getBinaryStream(1)); } } catch (SQLException e) { tryToClose(readContentStatement); tryToClose(connection); throw e; } catch (Throwable t) { tryToClose(readContentStatement); tryToClose(connection); throw new RuntimeException(t); } }
Source:
<code>public RenameResourceWizard(IResource resource, String newName) { this(resource); RenameResourceProcessor fRenameResourceProcessor= (RenameResourceProcessor) ((RenameRefactoring) super.getRefactoring()).getProcessor(); fRenameResourceProcessor.setNewResourceName(newName); setDefaultPageTitle(RefactoringUIMessages.RenameResourceWizard_page_title); <START> setWindowTitle(RefactoringUIMessages.RenameResourceWizard_window_title); <END> }</code><technical_language>need repeat lines 67, 69 70 this invoked this(resource) : this(...) invokes other constructor need repeat content</technical_language>

Target:
public RenameResourceWizard(IResource resource, String newName) { this(resource); RenameResourceProcessor fRenameResourceProcessor= (RenameResourceProcessor) ((RenameRefactoring) super.getRefactoring()).getProcessor(); fRenameResourceProcessor.setNewResourceName(newName); }
Source:
<code>public static <R> R runInTransaction(TraversalContext<?, ?> context, boolean readOnly, PotentiallyCommittingPayload<R> payload) { int failures = 0; Exception lastException = null; int maxFailures = context.getTransactionRetriesCount(); int waitTime = 100; while (failures < maxFailures) { try { InventoryBackend.Transaction t = context.backend.startTransaction(!readOnly); try { R ret = payload.run(t); if (readOnly) { context.backend.commit(t); } return ret; } catch (Throwable e) { <START> Log.LOGGER.error("\n\n\nTRANSACTION failed: " + e.getMessage()); <END> context.backend.rollback(t); throw e; } } catch (CommitFailureException e) { failures++; Log.LOGGER.debugf(e, "Commit attempt %d/%d failed. Will wait for %d ms before retrying." + " The failure message was: %s", failures, maxFailures, waitTime, e.getMessage()); lastException = e; if (failures < maxFailures) { try { Thread.sleep(waitTime); } catch (InterruptedException ie) { Log.LOGGER.wInterruptedWhileWaitingForTransactionRetry(); Thread.currentThread().interrupt(); break; } waitTime = waitTime * 2 + rand.nextInt(waitTime / 10); } } } throw new TransactionFailureException(lastException, failures); }</code><technical_language>this a method Log interface i18n'ed</technical_language>

Target:
public static <R> R runInTransaction(TraversalContext<?, ?> context, boolean readOnly, PotentiallyCommittingPayload<R> payload) { int failures = 0; Exception lastException = null; int maxFailures = context.getTransactionRetriesCount(); int waitTime = 100; while (failures < maxFailures) { try { InventoryBackend.Transaction t = context.backend.startTransaction(!readOnly); try { R ret = payload.run(t); if (readOnly) { context.backend.commit(t); } return ret; } catch (Throwable e) { Log.LOGGER.dTransactionFailed(e.getMessage()); context.backend.rollback(t); throw e; } } catch (CommitFailureException e) { failures++; Log.LOGGER.debugf(e, "Commit attempt %d/%d failed. Will wait for %d ms before retrying." + " The failure message was: %s", failures, maxFailures, waitTime, e.getMessage()); lastException = e; if (failures < maxFailures) { try { Thread.sleep(waitTime); } catch (InterruptedException ie) { Log.LOGGER.wInterruptedWhileWaitingForTransactionRetry(); Thread.currentThread().interrupt(); break; } waitTime = waitTime * 2 + rand.nextInt(waitTime / 10); } } } throw new TransactionFailureException(lastException, failures); }
Source:
<code>public Map<String, ValueResolver<? extends Object>> getParameters() { if (builder instanceof ParameterValueResolver) { return ((ParameterValueResolver) builder).getParameters(); } else { return new HashMap<>(); <START> } <END> }</code><technical_language>return Collections.emptyMap()</technical_language>

Target:
public Map<String, ValueResolver<? extends Object>> getParameters() throws ValueResolvingException { if (builder instanceof ParameterValueResolver) { return unmodifiableMap(((ParameterValueResolver) builder).getParameters()); } else { return emptyMap(); } }
Source:
<code>protected int hashLine(final byte[] raw, int ptr, final int end) { int hash = 5381; for (; ptr < end; ptr++) { <START> if (!RawCharUtil.isWhitespace(raw[ptr])) { <END> hash = (hash << 5) ^ (raw[ptr] & 0xff); } } return hash; }</code><technical_language>Performance-nit: above, pull raw[ptr] a local variable evaluated twice</technical_language>

Target:
protected int hashLine(final byte[] raw, int ptr, final int end) { int hash = 5381; for (; ptr < end; ptr++) { byte c = raw[ptr]; if (!isWhitespace(c)) hash = (hash << 5) ^ (c & 0xff); } return hash; }
Source:
<code>public static IoOperationType getType(int rwbs) { <START> if (rwbs % 2 == 0) { <END> return READ; } return WRITE; }</code><technical_language>return ((rwbs & 1) == 0) ? READ:WRITE;</technical_language>

Target:
public static IoOperationType getType(int rwbs) { return (rwbs % 2 == 0) ? READ : WRITE; }
Source:
<code>public Void visit(SqlCall call) { if (call.getKind() == SqlKind.OVER) { <START> throw new FoundOne(call); <END> } return super.visit(call); }</code><technical_language>please static exception instance</technical_language>

Target:
public Void visit(SqlCall call) { if (call.getKind() == SqlKind.OVER) { throw FoundOne.NULL; } return super.visit(call); }