auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected final Exchange matchNotifyResponse(final Response response, final CorrelationContext responseContext) { final Exchange.KeyToken idByToken = Exchange.KeyToken.fromInboundMessage(response); Exchange exchange = null; final Observation obs = observationStore.get(response.getToken()); if (obs != null) { final Request request = obs.getRequest(); request.setDestination(response.getSource()); <START> request.setDestinationPort(response.getSourcePort()); <END> exchange = new Exchange(request, Origin.LOCAL, obs.getContext()); exchange.setRequest(request); LOG.log(Level.FINER, "re-created exchange from original observe request: {0}", request); request.addMessageObserver(new MessageObserverAdapter() { @Override public void onTimeout() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } @Override public void onResponse(Response response) { if (!response.getOptions().hasObserve()) { LOG.log(Level.FINE, "Response to observe request with token {0} does not contain observe option, removing request from observation store", idByToken); observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } else { notificationListener.onNotification(request, response); } } @Override public void onReject() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } @Override public void onCancel() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } }); } return exchange; }</code><technical_language>this is usefull. need exchangeObserver for blockwise</technical_language>

Target:
protected final Exchange matchNotifyResponse(final Response response, final CorrelationContext responseContext) { final Exchange.KeyToken idByToken = Exchange.KeyToken.fromInboundMessage(response); Exchange exchange = null; final Observation obs = observationStore.get(response.getToken()); if (obs != null) { final Request request = obs.getRequest(); request.setDestination(response.getSource()); request.setDestinationPort(response.getSourcePort()); exchange = new Exchange(request, Origin.LOCAL, obs.getContext()); exchange.setRequest(request); LOG.log(Level.FINER, "re-created exchange from original observe request: {0}", request); request.addMessageObserver(new MessageObserverAdapter() { @Override public void onTimeout() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } @Override public void onResponse(Response resp) { if (!resp.getOptions().hasObserve()) { LOG.log(Level.FINE, "Response to observe request with token {0} does not contain observe option, removing request from observation store", idByToken); observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } else { notificationListener.onNotification(request, resp); } } @Override public void onReject() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } @Override public void onCancel() { observationStore.remove(request.getToken()); exchangeStore.releaseToken(idByToken); } }); } return exchange; }
Source:
<code>public String toString() { String className = getClass().getSimpleName(); StringBuilder sb = new StringBuilder(className) .append("{key=").append(toStr(key)) .append(", value=").append(toStr(getValue())); <START> if (className.contains("Metadata")) { <END> sb.append(", metadata=").append(getMetadata()); } return sb.append('}').toString(); }</code><technical_language>1 add a new entry Metadata in class name. if want add null values toString() (IMO is a good idea), add utility method public static StringBuilder toStringNonNullField(StringBuilder builder, String fieldName, Object fieldValue) { if (fieldValue == null) { return builder; } return builder.append(", ").append(fieldName).append("=").append(toStr(fieldValue)); }</technical_language>

Target:
public String toString() { String className = getClass().getSimpleName(); StringBuilder sb = new StringBuilder(className) .append("{key=").append(toStr(key)) .append(", value=").append(toStr(getValue())); if (hasMetadata()) { sb.append(", metadata=").append(getMetadata()); } return sb.append('}').toString(); }
Source:
<code>public JobDetail demoteContent( @PathParam("env_id") @Verify(Environment.class) String envId, @QueryParam("content") String[] contentIds, @QueryParam("lazy_regen") @DefaultValue("true") Boolean lazyRegen) { Environment e = lookupEnvironment(envId); <START> HashMap<String, EnvironmentContent> demotedContent = new HashMap<String, EnvironmentContent>(); <END> for (String contentId : contentIds) { EnvironmentContent envContent = envContentCurator.lookupByEnvironmentAndContent(e, contentId); if (envContent == null) { throw new NotFoundException(i18n.tr("Content does not exist in environment: {0}", contentId)); } demotedContent.put(contentId, envContent); } for (EnvironmentContent envContent : demotedContent.values()) { this.envContentCurator.delete(envContent); } HashSet<String> demotedContentIds = new HashSet<String>(demotedContent.keySet()); JobDataMap map = new JobDataMap(); map.put(RegenEnvEntitlementCertsJob.ENV, e); map.put(RegenEnvEntitlementCertsJob.CONTENT, demotedContentIds); map.put(RegenEnvEntitlementCertsJob.LAZY_REGEN, lazyRegen); JobDetail detail = newJob(RegenEnvEntitlementCertsJob.class) .withIdentity("regen_entitlement_cert_of_env" + Util.generateUUID()) .usingJobData(map) .build(); return detail; }</code><technical_language>demotedContent a Map</technical_language>

Target:
public JobDetail demoteContent( @PathParam("env_id") @Verify(Environment.class) String envId, @QueryParam("content") String[] contentIds, @QueryParam("lazy_regen") @DefaultValue("true") Boolean lazyRegen) { Environment e = lookupEnvironment(envId); Map<String, EnvironmentContent> demotedContent = new HashMap<String, EnvironmentContent>(); for (String contentId : contentIds) { EnvironmentContent envContent = envContentCurator.lookupByEnvironmentAndContent(e, contentId); if (envContent == null) { throw new NotFoundException(i18n.tr("Content does not exist in environment: {0}", contentId)); } demotedContent.put(contentId, envContent); } for (EnvironmentContent envContent : demotedContent.values()) { this.envContentCurator.delete(envContent); } Set<String> demotedContentIds = new HashSet<String>(demotedContent.keySet()); JobDataMap map = new JobDataMap(); map.put(RegenEnvEntitlementCertsJob.ENV, e); map.put(RegenEnvEntitlementCertsJob.CONTENT, demotedContentIds); map.put(RegenEnvEntitlementCertsJob.LAZY_REGEN, lazyRegen); JobDetail detail = newJob(RegenEnvEntitlementCertsJob.class) .withIdentity("regen_entitlement_cert_of_env" + Util.generateUUID()) .usingJobData(map) .build(); return detail; }
Source:
<code>public String readLine(final PositionalBufferedStream stream) { <START> throw new IllegalArgumentException("A BlockCompressedAsciiLineReader class cannot be used to read from a PositionalBufferedStream"); <END> }</code><technical_language>UnsupportedOperationException</technical_language>

Target:
public String readLine(final PositionalBufferedStream stream) { throw new UnsupportedOperationException("A BlockCompressedAsciiLineReader class cannot be used to read from a PositionalBufferedStream"); }
Source:
<code>private ICPPEvaluation createReferenceValue(ActivationRecord record, ConstexprEvaluationContext context, ICPPEvaluation computedInitializerEval) { ICPPEvaluation initValue = initializerEval; if(!(initValue instanceof EvalBinding)) { <START> initValue = initializerEval.getValue(null).get(0); <END> } if(initValue instanceof EvalBinding) { return createReferenceFromBinding(record, context, (EvalBinding) initValue); } else if(initValue instanceof EvalBinary && computedInitializerEval instanceof EvalCompositeAccess) { return createReferenceFromCompositeAccess(record, context, (EvalCompositeAccess) computedInitializerEval); } else { return EvalFixed.INCOMPLETE; } }</code><technical_language>null -> context.getPoint()</technical_language>

Target:
private ICPPEvaluation createReferenceValue(ActivationRecord record, ConstexprEvaluationContext context, ICPPEvaluation computedInitializerEval) { ICPPEvaluation initValue = initializerEval; if(!(initValue instanceof EvalBinding)) { initValue = initializerEval.getValue(context.getPoint()).get(0); } if(initValue instanceof EvalBinding) { return createReferenceFromBinding(record, context, (EvalBinding) initValue); } else if(initValue instanceof EvalBinary && computedInitializerEval instanceof EvalCompositeAccess) { return createReferenceFromCompositeAccess(record, context, (EvalCompositeAccess) computedInitializerEval); } else { return EvalFixed.INCOMPLETE; } }
Source:
<code>private double linearInterpolate(double a, double b, double f) { <START> return a < MIN_ELEVATION ? b : b < MIN_ELEVATION ? a : (a + (b - a) * f); <END> }</code><technical_language>is this handling MIN_ELEVATION necessary? this is unit? IMO method is guarded if a b smaller MIN_ELEVATION</technical_language>

Target:
private double linearInterpolate(double a, double b, double f) { return !isValidElevation(a) ? b : !isValidElevation(b) ? a : (a + (b - a) * f); }
Source:
<code>private void resizeElements(int width, int height){ <START> for (BoardPanel board : mGameBoards) { <END> board.rescaleBoard(width, height); } for (JailPanel jailPanel : mJails) { jailPanel.rescaleBoard(width, height); } }</code><technical_language>do this in line (and more efficiently) with: Stream.of(mGameBoards).forEach(board -> board.rescaleBoard(width, height));</technical_language>

Target:
private void resizeElements(int width, int height){ Stream.of(mGameBoards).forEach(board -> board.rescaleBoard(width, height)); Stream.of(mJails).forEach(jail -> jail.rescaleBoard(width, height)); }
Source:
<code>protected DefaultDataContainer(int concurrencyLevel, int maxEntries, EvictionStrategy strategy, EvictionThreadPolicy policy, <START> Equivalence<? super K> keyEquivalence) { <END> switch (policy) { case PIGGYBACK: case DEFAULT: evictionListener = new DefaultEvictionListener(); break; default: throw new IllegalArgumentException("No such eviction thread policy " + strategy); } Eviction eviction; switch (strategy) { case FIFO: case UNORDERED: case LRU: eviction = Eviction.LRU; break; case LIRS: eviction = Eviction.LIRS; break; default: throw new IllegalArgumentException("No such eviction strategy " + strategy); } entries = new BoundedConcurrentHashMap<K, InternalCacheEntry<K, V>>( maxEntries, concurrencyLevel, eviction, evictionListener, keyEquivalence, AnyEquivalence.getInstance()); }</code><technical_language>if this is okay, users expect cache.getAdvancedCache().getDataContainer().values().contains(v) configured equivalence. True, that, exposed in public API</technical_language>

Target:
protected DefaultDataContainer(int concurrencyLevel, int maxEntries, EvictionStrategy strategy, EvictionThreadPolicy policy, Equivalence<? super K> keyEquivalence) { switch (policy) { case PIGGYBACK: case DEFAULT: evictionListener = new DefaultEvictionListener(); break; default: throw new IllegalArgumentException("No such eviction thread policy " + strategy); } Eviction eviction; switch (strategy) { case FIFO: case UNORDERED: case LRU: eviction = Eviction.LRU; break; case LIRS: eviction = Eviction.LIRS; break; default: throw new IllegalArgumentException("No such eviction strategy " + strategy); } final BoundedConcurrentHashMap<K, InternalCacheEntry<K, V>> boundedMap = new BoundedConcurrentHashMap<K, InternalCacheEntry<K, V>>(maxEntries, concurrencyLevel, eviction, evictionListener, keyEquivalence, AnyEquivalence.getInstance()); entries = boundedMap; extendedMap = new ExtendedMap<K, V>() { @Override public void evict(K key) { boundedMap.evict(key); } @Override public void compute(K key, final ComputeAction<K, V> action) { boundedMap.lock(key); try { InternalCacheEntry<K, V> oldEntry = boundedMap.get(key); InternalCacheEntry<K, V> newEntry = action.compute(key, oldEntry, entryFactory); if (oldEntry == newEntry) { return; } else if (newEntry == null) { boundedMap.remove(key); return; } if (trace) log.tracef("Store %s in container", newEntry); boundedMap.put(key, newEntry); } finally { boundedMap.unlock(key); } } @Override public void putAndActivate(InternalCacheEntry<K, V> newEntry) { boundedMap.put(newEntry.getKey(), newEntry); } }; }
Source:
<code>public GenericIndexedWriter( IOPeon ioPeon, String filenameBase, ObjectStrategy<T> strategy ) { <START> this(ioPeon, filenameBase, strategy, Integer.MAX_VALUE); <END> }</code><technical_language>question Integer.MAX_VALUE is for limit</technical_language>

Target:
public GenericIndexedWriter( IOPeon ioPeon, String filenameBase, ObjectStrategy<T> strategy ) { this(ioPeon, filenameBase, strategy, Integer.MAX_VALUE & ~PAGE_SIZE); }
Source:
<code>private VectorizedParquetColumnReader buildVectorizedParquetReader( TypeInfo typeInfo, Type type, PageReadStore pages, List<ColumnDescriptor> columnDescriptors, boolean skipTimestampConversion, int depth) throws IOException { List<ColumnDescriptor> descriptors = getAllColumnDescriptorByType(depth, type, columnDescriptors); switch (typeInfo.getCategory()) { case PRIMITIVE: if (columnDescriptors == null || columnDescriptors.isEmpty()) { return null; } else { return new VectorizedPrimitiveColumnReader(descriptors.get(0), pages.getPageReader(descriptors.get(0)), skipTimestampConversion, type); } case STRUCT: StructTypeInfo structTypeInfo = (StructTypeInfo) typeInfo; List<VectorizedParquetColumnReader> fieldReaders = new ArrayList<>(); List<TypeInfo> fieldTypes = structTypeInfo.getAllStructFieldTypeInfos(); List<Type> types = type.asGroupType().getFields(); for (int i = 0; i < fieldTypes.size(); i++) { VectorizedParquetColumnReader r = buildVectorizedParquetReader(fieldTypes.get(i), types.get(i), pages, descriptors, skipTimestampConversion, depth + 1); if (r != null) { fieldReaders.add(r); } } <START> if (fieldReaders.size() > 0) { <END> return new VectorizedStructReader(fieldReaders); } else { return null; } case LIST: case MAP: case UNION: default: throw new RuntimeException("Unsupported category " + typeInfo.getCategory().name()); } }</code><technical_language>if fieldReaders.size() is equal fieldTypes.size(). this handled</technical_language>

Target:
private VectorizedColumnReader buildVectorizedParquetReader( TypeInfo typeInfo, Type type, PageReadStore pages, List<ColumnDescriptor> columnDescriptors, boolean skipTimestampConversion, int depth) throws IOException { List<ColumnDescriptor> descriptors = getAllColumnDescriptorByType(depth, type, columnDescriptors); switch (typeInfo.getCategory()) { case PRIMITIVE: if (columnDescriptors == null || columnDescriptors.isEmpty()) { throw new RuntimeException( "Failed to find related Parquet column descriptor with type " + type); } else { return new VectorizedPrimitiveColumnReader(descriptors.get(0), pages.getPageReader(descriptors.get(0)), skipTimestampConversion, type); } case STRUCT: StructTypeInfo structTypeInfo = (StructTypeInfo) typeInfo; List<VectorizedColumnReader> fieldReaders = new ArrayList<>(); List<TypeInfo> fieldTypes = structTypeInfo.getAllStructFieldTypeInfos(); List<Type> types = type.asGroupType().getFields(); for (int i = 0; i < fieldTypes.size(); i++) { VectorizedColumnReader r = buildVectorizedParquetReader(fieldTypes.get(i), types.get(i), pages, descriptors, skipTimestampConversion, depth + 1); if (r != null) { fieldReaders.add(r); } else { throw new RuntimeException( "Fail to build Parquet vectorized reader based on Hive type " + fieldTypes.get(i) .getTypeName() + " and Parquet type" + types.get(i).toString()); } } return new VectorizedStructColumnReader(fieldReaders); case LIST: case MAP: case UNION: default: throw new RuntimeException("Unsupported category " + typeInfo.getCategory().name()); } }
Source:
<code>public Map<String, String> createUnmaterializedReference (String resourceName, Resource resource){ Assert.notNull(resource, "Resource argument cannot be null."); Assert.isNull(resource.getHref(), "Resource "+ resourceName +" must be unmaterialized and not have an 'href' property."); <START> Map<String, String> reference = ResourceUtil.filterNonStringvalues(((AbstractResource) resource).dirtyProperties); <END> return reference; }</code><technical_language>ReferenceFactory is in charge of creating maps returning caller. put href of map it. adding a new method that: 1. Casts a Resource AbstractResource 2. Reads dirtyProperties 3. Filter Non-string values 4. Put String values in map return This method is more "creating a reference" (as name of class states: ReferenceFactory). This logic removed this class</technical_language>

Target:
public Map<String, String> createUnmaterializedReference (String resourceName, Resource resource){ Assert.notNull(resource, "Resource argument cannot be null."); Assert.isNull(resource.getHref(), "Resource "+ resourceName +" must be unmaterialized and not have an 'href' property."); Map<String, String> reference = ResourceUtil.filterNonStringvaluesWithiResourceDirtyProperties(resource); return reference; }
Source:
<code><START> public String getStatus() { <END> if (StringUtils.isBlank(status)) { status = STATUS_OK; } if (StringUtils.isNotBlank(error)) { status = STATUS_ERROR; } if (StringUtils.isNotBlank(failure)) { status = STATUS_FAILURE; } return status; }</code><technical_language>@inverno I suggest custom enum instead of String</technical_language>

Target:
public Status getStatus() { if (StringUtils.isNotBlank(error)) { return Status.ERROR; } if (StringUtils.isNotBlank(failure)) { return Status.FAILURE; } if (skipped != null) { return Status.SKIPPED; } return Status.OK; }
Source:
<code><START> public Iterator<String> getCodecs() { <END> return codecs; }</code><technical_language>array instead of iterator</technical_language>

Target:
public String[] getCodecs() { return codecs; }
Source:
<code>private int removePrefixes(char[] s, int len) { if (len > 5 && <START> StemmerUtil.startsWith(s, <END> len, "naj")) return StemmerUtil.deleteN(s, 0, len, 3); return len; }</code><technical_language>want "import static" for static methods</technical_language>

Target:
private int removePrefixes(char[] s, int len) { if (len > 5 && startsWith(s, len, "naj")) { return deleteN(s, 0, len, 3); } return len; }
Source:
<code>protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(RedisQueueOutboundGateway.class); builder.addConstructorArgValue(element.getAttribute("control-queue")); String connectionFactory = element.getAttribute("connection-factory"); if (!StringUtils.hasText(connectionFactory)) { connectionFactory = "redisConnectionFactory"; } builder.addConstructorArgReference(connectionFactory); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "reply-channel","outputChannel"); <START> IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "expect-message"); <END> IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "serializer"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "reply-timeout", "timeout"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "requires-reply"); return builder; }</code><technical_language>hell? I change property inbound part</technical_language>

Target:
protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(RedisQueueOutboundGateway.class); builder.addConstructorArgValue(element.getAttribute("queue")); String connectionFactory = element.getAttribute("connection-factory"); if (!StringUtils.hasText(connectionFactory)) { connectionFactory = "redisConnectionFactory"; } builder.addConstructorArgReference(connectionFactory); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "reply-channel","outputChannel"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "extract-payload"); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "serializer"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "reply-timeout", "receiveTimeout"); IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "requires-reply"); return builder; }
Source:
<code><START> public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork) { <END> return executeReadWriteTransaction(sessionWork, true); }</code><technical_language>I understand read-only transaction changes behavior of commit/rollback semantics, I understand changes retry mechanism. want if is a database failure (could database server network disconnection), try recover automatically impacting scheduler ? In read write operations</technical_language>

Target:
public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork) { return tryExecuteTransactionLoop(sessionWork, true, true); }
Source:
<code>public static ParcelFileDescriptor[] createPipe() throws IOException { Path path = TempDirectory.create(); File file = new File(path.toFile(), "pipe-" + System.nanoTime()); <START> if (file.exists() && !file.delete()) { <END> throw new IOException("Cannot delete pipe file: " + file.getAbsolutePath()); } if (!file.createNewFile()) { throw new IOException("Cannot create pipe file: " + file.getAbsolutePath()); } ParcelFileDescriptor readSide = open(file, ParcelFileDescriptor.MODE_READ_ONLY); ParcelFileDescriptor writeSide = open(file, ParcelFileDescriptor.MODE_READ_WRITE); file.deleteOnExit(); return new ParcelFileDescriptor[]{readSide, writeSide}; }</code><technical_language>Is deleting necessary? TempDirectory guaranteed unique</technical_language>

Target:
public static ParcelFileDescriptor[] createPipe() throws IOException { File file = new File(RuntimeEnvironment.getTempDirectory().create(PIPE_TMP_DIR).toFile(), PIPE_FILE_NAME); if (!file.createNewFile()) { throw new IOException("Cannot create pipe file: " + file.getAbsolutePath()); } ParcelFileDescriptor readSide = open(file, ParcelFileDescriptor.MODE_READ_ONLY); ParcelFileDescriptor writeSide = open(file, ParcelFileDescriptor.MODE_READ_WRITE); file.deleteOnExit(); return new ParcelFileDescriptor[]{readSide, writeSide}; }
Source:
<code>public int insertNewTaskResult(TaskResult taskResult) throws InternalErrorException { int newTaskResultId = Utils.getNewId(jdbc, "tasks_results_id_seq"); byte[] standardMessage = null; byte[] errorMessage = null; if(taskResult.getStandardMessage() != null) standardMessage = taskResult.getStandardMessage().getBytes(StandardCharsets.UTF_8); if(taskResult.getErrorMessage() != null) errorMessage = taskResult.getErrorMessage().getBytes(StandardCharsets.UTF_8); standardMessage = clearZeroBytesFromString(standardMessage, 4000); errorMessage = clearZeroBytesFromString(errorMessage, 4000); jdbc.update( "insert into tasks_results(" + "id, " + "task_id, " + "engine_id, " + "destination_id, " + "status, " + "err_message, " + "std_message, " + "return_code, " + "timestamp) values (?,?,?,?,?,?,?, " + Compatibility.toDate("?","'DD-MM-YYYY HH24:MI:SS'") + ")", newTaskResultId, taskResult.getTaskId(), <START> 0, <END> taskResult.getDestinationId(), taskResult.getStatus().toString(), errorMessage == null ? null : new String(errorMessage, StandardCharsets.UTF_8), standardMessage == null ? null : new String(standardMessage, StandardCharsets.UTF_8), taskResult.getReturnCode(), getDateFormatter().format(taskResult.getTimestamp())); return newTaskResultId; }</code><technical_language>default 1 engine_id, changing DB schema constraint existing engine entry ID=1 instance</technical_language>

Target:
public int insertNewTaskResult(TaskResult taskResult) throws InternalErrorException { int newTaskResultId = Utils.getNewId(jdbc, "tasks_results_id_seq"); byte[] standardMessage = null; byte[] errorMessage = null; if(taskResult.getStandardMessage() != null) standardMessage = taskResult.getStandardMessage().getBytes(StandardCharsets.UTF_8); if(taskResult.getErrorMessage() != null) errorMessage = taskResult.getErrorMessage().getBytes(StandardCharsets.UTF_8); standardMessage = clearZeroBytesFromString(standardMessage, 4000); errorMessage = clearZeroBytesFromString(errorMessage, 4000); jdbc.update( "insert into tasks_results(" + "id, " + "task_id, " + "engine_id, " + "destination_id, " + "status, " + "err_message, " + "std_message, " + "return_code, " + "timestamp) values (?,?,?,?,?,?,?, " + Compatibility.toDate("?","'DD-MM-YYYY HH24:MI:SS'") + ")", newTaskResultId, taskResult.getTaskId(), 1, taskResult.getDestinationId(), taskResult.getStatus().toString(), errorMessage == null ? null : new String(errorMessage, StandardCharsets.UTF_8), standardMessage == null ? null : new String(standardMessage, StandardCharsets.UTF_8), taskResult.getReturnCode(), getDateFormatter().format(taskResult.getTimestamp())); return newTaskResultId; }
Source:
<code>public void setup() { rateLimiter = mock(RateLimiter.class); rateLimiterFilter = new RateLimiterFilter(rateLimiter, new ObjectMapper()); Account account = new Account(ACCOUNT_ID, TokenPaymentType.CARD, "some-token-link"); SecurityContext mockSecurityContext = mock(SecurityContext.class); <START> lenient().when(mockSecurityContext.getUserPrincipal()).thenReturn(account); <END> lenient().when(mockContainerRequestContext.getSecurityContext()).thenReturn(mockSecurityContext); lenient().when(mockContainerRequestContext.getMethod()).thenReturn("GET"); when(mockContainerRequestContext.getUriInfo()).thenReturn(mockUriInfo); when(mockUriInfo.getPath()).thenReturn(""); }</code><technical_language>prefer moved in methods used</technical_language>

Target:
public void setup() { rateLimiter = mock(RateLimiter.class); rateLimiterFilter = new RateLimiterFilter(rateLimiter, new ObjectMapper()); when(mockContainerRequestContext.getUriInfo()).thenReturn(mockUriInfo); when(mockUriInfo.getPath()).thenReturn(""); }
Source:
<code>public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); app = (WikipediaApp)getActivity().getApplicationContext(); for (int i = 0; i < ACTION_ITEMS_ALL.length; i++) { actionViews[i] = getView().findViewById(ACTION_ITEMS_ALL[i]); actionViews[i].setOnClickListener(this); } for (int i = 0; i < ACTION_ITEMS_LOGGED_IN_ONLY.length; i++) { loggedInOnyActionViews[i] = getView().findViewById(ACTION_ITEMS_LOGGED_IN_ONLY[i]); } wikipediaZeroText = (TextView) getView().findViewById(R.id.nav_item_zero); randomHandler = new RandomHandler(getView().findViewById(R.id.nav_item_random), getView().findViewById(R.id.nav_item_random_icon), getView().findViewById(R.id.nav_item_random_progressbar), new RandomHandler.RandomListener() { @Override <START> public void onRandomPageReceived(PageTitle title) { <END> if (!isAdded()) { return; } if (title == null) { ((PageActivity) getActivity()).showNetworkError(); } else { HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_RANDOM); ((PageActivity) getActivity()).displayNewPage(title, historyEntry, true); } } }); }</code><technical_language>add error callback? If not, mind adding @Nullable annotation RandomListener interface's onRandomPageReceived method</technical_language>

Target:
public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); app = (WikipediaApp)getActivity().getApplicationContext(); for (int i = 0; i < ACTION_ITEMS_ALL.length; i++) { actionViews[i] = getView().findViewById(ACTION_ITEMS_ALL[i]); actionViews[i].setOnClickListener(this); } for (int i = 0; i < ACTION_ITEMS_LOGGED_IN_ONLY.length; i++) { loggedInOnyActionViews[i] = getView().findViewById(ACTION_ITEMS_LOGGED_IN_ONLY[i]); } wikipediaZeroText = (TextView) getView().findViewById(R.id.nav_item_zero); randomHandler = new RandomHandler(getView().findViewById(R.id.nav_item_random), getView().findViewById(R.id.nav_item_random_icon), getView().findViewById(R.id.nav_item_random_progressbar), new RandomHandler.RandomListener() { @Override public void onRandomPageReceived(@Nullable PageTitle title) { if (!isAdded()) { return; } if (title == null) { ((PageActivity) getActivity()).showNetworkError(); } else { HistoryEntry historyEntry = new HistoryEntry(title, HistoryEntry.SOURCE_RANDOM); ((PageActivity) getActivity()).displayNewPage(title, historyEntry, true); } } }); }
Source:
<code>public Function1D<Double, Double> getVolatilityFunction(final double forward, final double[] strikes, final double expiry, final double[] impliedVols) { final List<SABRFormulaData> modelParams; final int n; if (getModel() instanceof SABRHaganVolatilityFunction) { modelParams = getFittedModelParameters(forward, strikes, expiry, impliedVols); n = strikes.length; } else { modelParams = getFittedModelParametersGlobal(forward, strikes, expiry, impliedVols); n = 1; } return new Function1D<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double evaluate(final Double strike) { final EuropeanVanillaOption option = new EuropeanVanillaOption(strike, expiry, true); final Function1D<SABRFormulaData, Double> volFunc = getModel().getVolatilityFunction(option, forward); if (n == 1) { return volFunc.evaluate(modelParams.get(0)); } <START> final int index = SurfaceArrayUtils.getLowerBoundIndex(strikes, strike); <END> if (index == 0) { return volFunc.evaluate(modelParams.get(0)); } if (index >= n - 2) { return volFunc.evaluate(modelParams.get(n - 3)); } final double w = getWeightingFunction().getWeight(strikes, index, strike); if (w == 1) { return volFunc.evaluate(modelParams.get(index - 1)); } else if (w == 0) { return volFunc.evaluate(modelParams.get(index)); } else { return w * volFunc.evaluate(modelParams.get(index - 1)) + (1 - w) * volFunc.evaluate(modelParams.get(index)); } } }; }</code><technical_language>This code is copied super class - call super class method</technical_language>

Target:
public Function1D<Double, Double> getVolatilityFunction(final double forward, final double[] strikes, final double expiry, final double[] impliedVols) { final List<SABRFormulaData> modelParams; final int n; List<SABRFormulaData> modelParamsTmp; int nTmp; try { modelParamsTmp = getFittedModelParameters(forward, strikes, expiry, impliedVols); nTmp = strikes.length; } catch (final Exception e) { nTmp = 1; modelParamsTmp = getFittedModelParametersGlobal(forward, strikes, expiry, impliedVols); } modelParams = modelParamsTmp; n = nTmp; if (n == 1) { return new Function1D<Double, Double>() { @SuppressWarnings("synthetic-access") @Override public Double evaluate(final Double strike) { final EuropeanVanillaOption option = new EuropeanVanillaOption(strike, expiry, true); final Function1D<SABRFormulaData, Double> volFunc = getModel().getVolatilityFunction(option, forward); return volFunc.evaluate(modelParams.get(0)); } }; } return getVolatilityFunctionFromModelParameters(forward, strikes, expiry, modelParams); }
Source:
<code>public String createUrl(String details) { details = details == null ? "" : details; String encodedUrl; try { URI uri = new URI(WEB_PROTOCOL, domainName, API_ENDPOINT + details, null); encodedUrl = uri.toString(); } catch (URISyntaxException e) { <START> encodedUrl = WEB_PROTOCOL + "://" + domainName + API_ENDPOINT + details; <END> } return encodedUrl; }</code><technical_language>is this fall needed details variable URL encoded well</technical_language>

Target:
public String createUrl(String details) { details = details == null ? "" : details; String encodedUrl; try { URI uri = new URI(WEB_PROTOCOL, domainName, API_ENDPOINT + details, null); encodedUrl = uri.toString(); return encodedUrl; } catch (URISyntaxException e) { LOGGER.severe("Exception message=" + e.getMessage() + " Failed to create URI for Domain Name=" + domainName + " with url details=" + details); return ""; } }
Source:
<code>public AnimalInWater(final Animal anim, final EventDispatcher eventDispatcher) { super(eventDispatcher); this.animal = anim; Timer tmr = new Timer(); tmr.scheduleAtFixedRate(new TimerTask() { @Override public void run() { <START> AnimalInWater.this.animal.returnToBoat(); <END> tmr.cancel(); } }, RESPAWN_DELAY, RESPAWN_DELAY); }</code><technical_language>syntax easier</technical_language>

Target:
public AnimalInWater(final Animal anim, final EventDispatcher eventDispatcher) { super(eventDispatcher); this.animal = anim; Timer tmr = new Timer(); tmr.scheduleAtFixedRate(new TimerTask() { @Override public void run() { animal.returnToBoat(); tmr.cancel(); } }, RESPAWN_DELAY, RESPAWN_DELAY); }
Source:
<code>private void downloadData(EntityType entityType, ExcelWriter writer) throws IOException { List<Object> headers = <START> StreamSupport.stream(entityType.getAttributes().spliterator(), false) <END> .filter(attr -> attr.getDataType() != AttributeType.COMPOUND) .map(Attribute::getName) .collect(Collectors.toList()); if (!writer.hasSheet(entityType.getId())) { writer.createSheet(entityType.getId(), headers); } writer.writeRows( dataService.findAll(entityType.getId()).map(DataRowMapper::mapDataRow), entityType.getId()); }</code><technical_language>Guava Streams.stream(myStream) instead of StreamSupport.stream(myStream.spliterator(), false) suggestion com.google.common.collect.Streams.stream(entityType.getAttributes())</technical_language>

Target:
private void downloadData(EntityType entityType, ExcelWriter writer) { List<Object> headers = Streams.stream(entityType.getAttributes()) .filter(attr -> attr.getDataType() != AttributeType.COMPOUND) .map(Attribute::getName) .collect(toList()); if (!writer.hasSheet(entityType.getId())) { writer.createSheet(entityType.getId(), headers); } dataService .getRepository(entityType.getId()) .forEachBatched(entities -> writeRows(entities, entityType, writer), BATCH_SIZE); }
Source:
<code>public static void addFogColor(EntityViewRenderEvent.FogColors event) <START> { <END> BlockState state = event.getInfo().getFluidState().getBlockState(); IWorldReader world = event.getInfo().getRenderViewEntity().world; BlockPos pos = event.getInfo().getBlockPos(); Entity entity = event.getInfo().getRenderViewEntity(); Vec3d originalColor = new Vec3d(event.getRed(), event.getGreen(), event.getBlue()); float partialTick = (float) (event.getRenderPartialTicks()); Vec3d fogColor = event.getInfo().getFluidState().getBlockState().getBlock().getFogColor(state, world, pos, entity, originalColor, partialTick); if(event.getInfo().getFluidState().getBlockState().getBlock().getFogColor(state, world, pos, entity, originalColor, partialTick) != null) { event.setRed((float) fogColor.getX()); event.setGreen((float) fogColor.getY()); event.setBlue((float) fogColor.getZ()); } }</code><technical_language>changing fog color based blocks based block.getColor(). However, changing influencing fog color for blocks other fluids. simple solution check if fluid is in acollection of fluids, I more sense create interface a fog color getter parameters is relevant, similarly AlchemizedColored, GristWildcardHolder, IColored IOwnable. way, modify fog color for _just any_ fluid block end returning non-null</technical_language>

Target:
public static void addFogColor(EntityViewRenderEvent.FogColors event) { BlockState state = event.getInfo().getFluidState().getBlockState(); IWorldReader world = event.getInfo().getRenderViewEntity().world; BlockPos pos = event.getInfo().getBlockPos(); Entity entity = event.getInfo().getRenderViewEntity(); Vec3d originalColor = new Vec3d(event.getRed(), event.getGreen(), event.getBlue()); float partialTick = (float) (event.getRenderPartialTicks()); if(state.getBlock() instanceof IMSFog) { IMSFog fog = (IMSFog) (state.getBlock()); Vec3d fogColor = fog.getMSFogColor(state, world, pos, entity, originalColor, partialTick); event.setRed((float) fogColor.getX()); event.setGreen((float) fogColor.getY()); event.setBlue((float) fogColor.getZ()); } }
Source:
<code>protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.IN_TIMEOUT) { Timeout t = scoreBoard.getCurrentTimeout(); return t.isRunning() && this == t.getOwner() && !t.isReview(); } if (prop == Value.IN_OFFICIAL_REVIEW) { Timeout t = scoreBoard.getCurrentTimeout(); return t.isRunning() && this == t.getOwner() && t.isReview(); } if (prop == Value.TRIP_SCORE && flag != Flag.COPY && scoreBoard.isInJam() && (Integer)value > 0) { if (getCurrentTrip().getNumber() == 1 && !getScoreBoard().isInOvertime()) { set(Value.TRIP_SCORE,0); <START> getRunningOrEndedTeamJam().addScoringTrip(); <END> set(Value.TRIP_SCORE,value); } tripScoreTimerTask.cancel(); tripScoreTimer.purge(); tripScoreTimerTask = new TimerTask() { @Override public void run() { execute(Command.ADD_TRIP); } }; tripScoreTimer.schedule(tripScoreTimerTask, 4000); } if (prop == Value.NO_INITIAL && flag != Flag.COPY) { if (!(Boolean)value && (Boolean)last) { execute(Command.ADD_TRIP); } else if ((Boolean)value && !(Boolean)last && getCurrentTrip().getNumber() == 2 && (Integer)get(Value.JAM_SCORE) == 0) { execute(Command.REMOVE_TRIP); } } if (prop == Value.INJURY && flag != Flag.COPY && (Boolean)value) { set(Value.CALLOFF, false); } if (prop == Value.CALLOFF && flag != Flag.COPY && (Boolean)value) { set(Value.INJURY, false); } return value; }</code><technical_language>This execute(ADD_TRIP) in order care of setting lost if appropriate. I calls set noops</technical_language>

Target:
protected Object computeValue(PermanentProperty prop, Object value, Object last, Flag flag) { if (prop == Value.IN_TIMEOUT) { Timeout t = scoreBoard.getCurrentTimeout(); return t.isRunning() && this == t.getOwner() && !t.isReview(); } if (prop == Value.IN_OFFICIAL_REVIEW) { Timeout t = scoreBoard.getCurrentTimeout(); return t.isRunning() && this == t.getOwner() && t.isReview(); } if (prop == Value.TRIP_SCORE && flag != Flag.COPY && (Integer)value > 0) { if (getCurrentTrip().getNumber() == 1 && !getScoreBoard().isInOvertime()) { getCurrentTrip().set(ScoringTrip.Value.ANNOTATION,"Points were added without Trip +1\n" + get(ScoringTrip.Value.ANNOTATION)); execute(Command.ADD_TRIP); } if (scoreBoard.isInJam()) { tripScoreTimerTask.cancel(); tripScoreTimer.purge(); tripScoreTimerTask = new TimerTask() { @Override public void run() { execute(Command.ADD_TRIP); } }; tripScoreTimer.schedule(tripScoreTimerTask, 4000); } } if (prop == Value.NO_INITIAL && flag != Flag.COPY) { if (!(Boolean)value && (Boolean)last) { execute(Command.ADD_TRIP); } else if ((Boolean)value && !(Boolean)last && getCurrentTrip().getNumber() == 2 && (Integer)get(Value.JAM_SCORE) == 0) { execute(Command.REMOVE_TRIP); } } if (prop == Value.INJURY && flag != Flag.COPY && (Boolean)value) { set(Value.CALLOFF, false); } if (prop == Value.CALLOFF && flag != Flag.COPY && (Boolean)value) { set(Value.INJURY, false); } return value; }
Source:
<code>private void throwOrDelay(Throwable e, String actionName, int attempts) throws CloudStorageException { if (e instanceof CloudStorageException) { CloudStorageException cse = (CloudStorageException) e; if (cse.isRetryable() && attempts < maxAttempts) { long delay = (cse.getRetryDelayMs() > 0) ? cse.getRetryDelayMs() : defaultRetryDelay; <START> logger.error(String.format("%s failed attempt %d, retrying after %d ms.", actionName, attempts, delay)); <END> try { Thread.sleep(delay); } catch (InterruptedException iex) { } vcrMetrics.retryCount.inc(); vcrMetrics.retryWaitTime.update(delay, TimeUnit.MILLISECONDS); } else { throw cse; } } else { throw new CloudStorageException(actionName + " failed", e); } }</code><technical_language>built in logger formatting? logger.error("{} failed attempt {}, retrying ms.", actionName, attempts, delay);</technical_language>

Target:
private void throwOrDelay(Throwable e, String actionName, int attempts) throws CloudStorageException { if (e instanceof CloudStorageException) { CloudStorageException cse = (CloudStorageException) e; if (cse.isRetryable() && attempts < maxAttempts) { long delay = (cse.getRetryDelayMs() > 0) ? cse.getRetryDelayMs() : defaultRetryDelay; logger.error("{} failed attempt {}, retrying after ms.", actionName, attempts, delay); try { Thread.sleep(delay); } catch (InterruptedException iex) { } vcrMetrics.retryCount.inc(); vcrMetrics.retryWaitTimeMsec.inc(delay); } else { throw cse; } } else { throw new CloudStorageException(actionName + " failed", e); } }
Source:
<code>private TreeNode findNode(TreeNode node, SystemTreeItemModel model) { TreeNode result = null; if(node == null) { return null; } <START> int i = 0; <END> while(result == null && i < node.getChildCount()) { if(null != model && model.equals(node.getChildValue(i))) { result = node.setChildOpen(i, true); break; } if(node.isChildOpen(i)) { result = findNode(node.setChildOpen(i, true), model); } i++; } return result; }</code><technical_language>iterating children, getChildCount(), return result (instead of external counter)</technical_language>

Target:
private TreeNode findNode(TreeNode node, SystemTreeItemModel model) { TreeNode result = null; if (node == null) { return null; } int i = 0; while (result == null && i < node.getChildCount()) { if (model != null && model.equals(node.getChildValue(i))) { result = node.setChildOpen(i, true); break; } if (node.isChildOpen(i)) { result = findNode(node.setChildOpen(i, true), model); } i++; } return result; }
Source:
<code>protected void doWork(IProgressMonitor monitor) throws Exception { long start = System.currentTimeMillis(); <START> StringBuffer response = new StringBuffer(); <END> ByteArrayInputStream inputStream = null; try { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("sessionId", ClientSessionManager.getSessionId()); if (DbUtil.isDbInit()) { parameters.put("wait", "true"); } StringBuilder payload = new StringBuilder(XML_START); for (int data : gammaIds) { payload.append(PREFIX); payload.append(data); payload.append(POSTFIX); } payload.append(XML_FINISH); inputStream = new ByteArrayInputStream(payload.toString().getBytes("UTF-8")); String url = HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(OseeServerContext.SEARCH_TAGGING_CONTEXT, parameters); response.append(HttpProcessor.put(new URL(url), inputStream, "application/xml", "UTF-8")); OseeLog.logf(Activator.class, Level.FINEST, "Transmitted to Tagger in [%d ms]", System.currentTimeMillis() - start); } catch (Exception ex) { if (response.length() > 0) { response.append("\n"); } response.append(ex.getLocalizedMessage()); OseeLog.log(Activator.class, Level.SEVERE, response.toString(), ex); } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } } } }</code><technical_language>StringBuilder is preferred StringBuffer</technical_language>

Target:
protected void doWork(IProgressMonitor monitor) throws Exception { long start = System.currentTimeMillis(); StringBuilder response = new StringBuilder(); ByteArrayInputStream inputStream = null; try { Map<String, String> parameters = new HashMap<String, String>(); parameters.put("sessionId", ClientSessionManager.getSessionId()); if (DbUtil.isDbInit()) { parameters.put("wait", "true"); } StringBuilder payload = new StringBuilder(XML_START); for (int data : gammaIds) { payload.append(PREFIX); payload.append(data); payload.append(POSTFIX); } payload.append(XML_FINISH); inputStream = new ByteArrayInputStream(payload.toString().getBytes("UTF-8")); String url = HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(OseeServerContext.SEARCH_TAGGING_CONTEXT, parameters); response.append(HttpProcessor.put(new URL(url), inputStream, "application/xml", "UTF-8")); OseeLog.logf(Activator.class, Level.FINEST, "Transmitted to Tagger in [%d ms]", System.currentTimeMillis() - start); } catch (Exception ex) { if (response.length() > 0) { response.append("\n"); } response.append(ex.getLocalizedMessage()); OseeLog.log(Activator.class, Level.SEVERE, response.toString(), ex); } finally { if (inputStream != null) { try { inputStream.close(); } catch (IOException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } } } }
Source:
<code>public boolean process( File paramFile1, File paramFile2, File[] paramArayOfFile ) throws MojoExecutionException { try { <START> return (Boolean) processMethod.invoke( merger, paramFile1, paramFile2, paramArayOfFile ); <END> } catch ( IllegalArgumentException e ) { log.error( "Cannot merge the manifests", e ); throw new MojoExecutionException( "Cannot merge the manifests", e ); } catch ( IllegalAccessException e ) { log.error( "Cannot merge the manifests", e ); throw new MojoExecutionException( "Cannot merge the manifests", e ); } catch ( InvocationTargetException e ) { log.error( "Cannot merge the manifests", e ); throw new MojoExecutionException( "Cannot merge the manifests", e ); } }</code><technical_language>painful this class is 242 LOC for 1 LOC useful</technical_language>

Target:
public boolean process( File paramFile1, File paramFile2, File[] paramArayOfFile ) throws MojoExecutionException { try { return (Boolean) processMethod.invoke( merger, paramFile1, paramFile2, paramArayOfFile ); } catch ( Exception e ) { log.error( "Cannot merge the manifests", e ); throw new MojoExecutionException( "Cannot merge the manifests", e ); } }
Source:
<code>private static ExpressionRewriter createRewrite() { <START> return (expression, context) -> ExpressionTreeRewriter.rewriteWith(new com.facebook.presto.sql.tree.ExpressionRewriter<Void>() <END> { @Override public Expression rewriteCurrentPath(CurrentPath node, Void context, ExpressionTreeRewriter<Void> treeRewriter) { return DesugarCurrentPath.getCall(node); } }, expression); }</code><technical_language>need fully qualified name import this class already</technical_language>

Target:
private static ExpressionRewriter createRewrite() { return (expression, context) -> rewriteWith(new com.facebook.presto.sql.tree.ExpressionRewriter<Void>() { @Override public Expression rewriteCurrentPath(CurrentPath node, Void context, ExpressionTreeRewriter<Void> treeRewriter) { return DesugarCurrentPath.getCall(node); } }, expression); }
Source:
<code>public void focusOnPatchSet(int patchSetNumber) { if (patchSetNumber > 0 && patchSetNumber <= patchSetSections.size()) { int index = patchSetNumber - 1; SubSectionManager section = patchSetSections.get(index); <START> if (section != null) { <END> section.assignFocus(); } } }</code><technical_language>nan</technical_language>

Target:
public void focusOnPatchSet(int patchSetNumber) { if (patchSetNumber > 0 && patchSetNumber <= patchSetSections.size()) { int index = patchSetNumber - 1; SubSectionManager section = patchSetSections.get(index); section.reveal(); } }
Source:
<code>public static void getObject_test8() throws Exception { if (!mintEnv) { <START> System.out.println("Test: getObject(String bucketName, String objectName)"); <END> } long startTime = System.currentTimeMillis(); try { String objectName = getRandomName(); InputStream is = new ContentInputStream(0); client.putObject(bucketName, objectName, is, 0, nullContentType); is.close(); is = client.getObject(bucketName, objectName); is.close(); client.removeObject(bucketName, objectName); mintSuccessLog("getObject(String bucketName, String objectName)", null, startTime); } catch (Exception e) { mintFailedLog("getObject(String bucketName, String objectName)", null, startTime, null, e.toString() + " >>> " + Arrays.toString(e.getStackTrace())); throw e; } }</code><technical_language>please add "zero size object" end of string</technical_language>

Target:
public static void getObject_test8() throws Exception { if (!mintEnv) { System.out.println("Test: getObject(String bucketName, String objectName) zero size object"); } long startTime = System.currentTimeMillis(); try { String objectName = getRandomName(); InputStream is = new ContentInputStream(0); client.putObject(bucketName, objectName, is, 0, nullContentType); is.close(); is = client.getObject(bucketName, objectName); is.close(); client.removeObject(bucketName, objectName); mintSuccessLog("getObject(String bucketName, String objectName)", null, startTime); } catch (Exception e) { mintFailedLog("getObject(String bucketName, String objectName)", null, startTime, null, e.toString() + " >>> " + Arrays.toString(e.getStackTrace())); throw e; } }