auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void updateDominantLocks( String path, UnlockStatus unlockStatus ) throws PartylineException { if ( !unlockStatus.dominanceChanged ) { return; } TransactionManager transactionManager = metadataCache.getAdvancedCache().getTransactionManager(); try { transactionManager.begin(); FileMeta meta = metadataCache.get( path ); if ( unlockStatus.dominantLockLevel == null ) { meta.removeLock( this.nodeKey ); } else { meta.addLock( this.nodeKey, unlockStatus.dominantLockLevel ); } metadataCache.put( path, meta ); } catch ( NotSupportedException | SystemException e ) { try { transactionManager.rollback(); } catch ( SystemException ex ) { <START> throw new PartylineException( "There was a problem with a transaction rollback involving " + path ); <END> } throw new PartylineException( "There was a problem with a transaction begin involving " + path ); } finally { try { transactionManager.commit(); } catch ( RollbackException | HeuristicMixedException | HeuristicRollbackException | SystemException e ) { throw new PartylineException( "There was a problem with a transaction commit involving " + path ); } } }</code><technical_language>This turn a log statement, original exception lost</technical_language>

Target:
public void updateDominantLocks( String path, UnlockStatus unlockStatus ) throws PartylineException { if ( !unlockStatus.isDominanceChanged() ) { return; } TransactionManager transactionManager = metadataCache.getAdvancedCache().getTransactionManager(); try { transactionManager.begin(); FileMeta meta = metadataCache.get( path ); if ( unlockStatus.getDominantLockLevel() == null ) { meta.removeLock( this.nodeKey ); } else { meta.setLock( this.nodeKey, unlockStatus.getDominantLockLevel() ); } metadataCache.put( path, meta ); } catch ( NotSupportedException | SystemException e ) { try { transactionManager.rollback(); throw new PartylineException( "Failed to begin transaction. Rolling back. Path: " + path, e ); } catch ( SystemException e1 ) { LoggerFactory.getLogger( getClass().getName() ) .error( "System Exception during transaction rollback involving path: " + path, e1 ); } } finally { try { transactionManager.commit(); } catch ( RollbackException | HeuristicMixedException | HeuristicRollbackException | SystemException e ) { LoggerFactory.getLogger( getClass().getName() ) .error( "Exception during transaction commit involving path: " + path, e ); } } }
Source:
<code>public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { <START> LOG.trace("Exception caught in channel processing.", e.getCause()); <END> if (!exceptionRaised.get()) { exceptionRaised.set(true); if (methodInfo != null) { methodInfo.sendError(HttpResponseStatus.INTERNAL_SERVER_ERROR, e.getCause()); methodInfo = null; } else { ChannelFuture future = Channels.future(ctx.getChannel()); future.addListener(ChannelFutureListener.CLOSE); Throwable cause = e.getCause(); if (cause instanceof HandlerException) { Channels.write(ctx, future, ((HandlerException) cause).createFailureResponse()); } else { HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.INTERNAL_SERVER_ERROR); Channels.write(ctx, future, response); } } } }</code><technical_language>this applies exceptions? Including OOM other serious internal errors. Do want disable logging for of those? I right fix is change method interprets URL (getDestinationMethod) throw exceptions in cases. for 400 bad requests, malformed URLs, for requests routed (404 found), for internal errors (500). In case, log error return 500, in other cases, log Trace</technical_language>

Target:
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) { String exceptionMessage = "Exception caught in channel processing."; Throwable cause = e.getCause(); if (!exceptionRaised.get()) { exceptionRaised.set(true); if (methodInfo != null) { LOG.error(exceptionMessage, cause); methodInfo.sendError(HttpResponseStatus.INTERNAL_SERVER_ERROR, cause); methodInfo = null; } else { ChannelFuture future = Channels.future(ctx.getChannel()); future.addListener(ChannelFutureListener.CLOSE); if (cause instanceof HandlerException) { HttpResponse response = ((HandlerException) cause).createFailureResponse(); if (isUserError(response)) { LOG.trace(exceptionMessage, cause); } else { LOG.error(exceptionMessage, cause); } Channels.write(ctx, future, response); } else { LOG.error(exceptionMessage, cause); HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.INTERNAL_SERVER_ERROR); Channels.write(ctx, future, response); } } } else { LOG.trace(exceptionMessage, cause); } }
Source:
<code>public Http2Client(HttpClient client) { <START> this.client = Util.checkNotNull(client, "HttpClient must be not null"); <END> }</code><technical_language>FYI, proper English grammar is "must null" "must null" (I'm if grammar requires a hyphen in "non-null")</technical_language>

Target:
public Http2Client(HttpClient client) { this.client = Util.checkNotNull(client, "HttpClient must not be null"); }
Source:
<code>public boolean testAndSetValue(Integer position, Object value) { if <START> (frame[position] == <END> null) { frame[position] = value; return true; } else { return frame[position].equals(value); } }</code><technical_language>I Preconditions.checkElementIndex called here, similarly setValue/getValue. Also, frame is accessed lot of places dedicated accessor methods. is that</technical_language>

Target:
public boolean testAndSetValue(Integer position, Object value) { Preconditions.checkElementIndex(position, frame.length); if (frame[position] == null) { frame[position] = value; return true; } else { return frame[position].equals(value); } }
Source:
<code>private List<SatelMessage> getRefreshCommands() { <START> logger.debug("Gathering refresh commands from all items"); <END> List<SatelMessage> commands = new ArrayList<SatelMessage>(); for (SatelBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { logger.trace("Getting refresh command from item: {}", itemName); SatelBindingConfig itemConfig = provider.getItemConfig(itemName); SatelMessage message = itemConfig.buildRefreshMessage(this.satelModule.getIntegraType()); if (message != null && !commands.contains(message)) { commands.add(message); } } } return commands; }</code><technical_language>please decrease TRACE</technical_language>

Target:
private List<SatelMessage> getRefreshCommands() { logger.trace("Gathering refresh commands from all items"); List<SatelMessage> commands = new ArrayList<SatelMessage>(); for (SatelBindingProvider provider : providers) { for (String itemName : provider.getItemNames()) { logger.trace("Getting refresh command from item: {}", itemName); SatelBindingConfig itemConfig = provider.getItemConfig(itemName); SatelMessage message = itemConfig.buildRefreshMessage(this.satelModule.getIntegraType()); if (message != null && !commands.contains(message)) { commands.add(message); } } } return commands; }
Source:
<code>private String interpolateString(String value) { <START> Pattern pattern = Pattern.compile(PATTERN); <END> Matcher matcher = pattern.matcher(value); while (matcher.find()) { String name = matcher.group(1); String replace = System.getenv(name); if (replace == null) { replace = System.getProperty(name, ""); } Pattern subPattern = Pattern.compile(Pattern.quote(matcher.group(0))); value = subPattern.matcher(value).replaceAll(replace); } return value; }</code><technical_language>compile in field</technical_language>

Target:
private String interpolateString(String value) { value = interpolate(value, sysPattern, name -> System.getProperty(name, "")); value = interpolate(value, envPattern, name -> System.getenv(name)); return value; }
Source:
<code>public void run() { Process.setThreadPriority(THREAD_PRIORITY_BACKGROUND); while (true) { try { IdWeakReference<?> remove = (IdWeakReference<?>) referenceQueue.remove(); handler.sendMessage(handler.obtainMessage(REQUEST_CANCEL_GC, remove.requestId, 0)); } catch (InterruptedException e) { <START> break; <END> } catch (final Exception e) { handler.post(new Runnable() { @Override public void run() { new RuntimeException(e); } }); } } }</code><technical_language>Unexpected? log error looping. Code expect interrupted behave extremely strangely interrupted</technical_language>

Target:
public void run() { Process.setThreadPriority(THREAD_PRIORITY_BACKGROUND); while (true) { try { RequestWeakReference<?> remove = (RequestWeakReference<?>) referenceQueue.remove(); handler.sendMessage(handler.obtainMessage(REQUEST_CANCEL_GC, remove.request)); } catch (final Exception e) { handler.post(new Runnable() { @Override public void run() { throw new RuntimeException(e); } }); break; } } }
Source:
<code>public void test() throws Exception { String rawInput = getResource(TEST_DOC); String expected = getResource(CONVERTED_HTML); String input = NormalizeHtml.convertToNormalizedHTML(rawInput); input = bodyOnly(input); expected = bodyOnly(expected); <START> input = input.replaceAll("br /", "br"); <END> input = input.replaceAll("\r", ""); expected = expected.replaceAll("\r", ""); Assert.assertEquals("Converted HTML does not equal expected", expected, input); input = rawInput.replaceAll("BODY", "body"); input = bodyOnly(input); input = NormalizeHtml.wrapAndNormalizeHTML(input, false, false, false); input = bodyOnly(input); input = input.replaceAll("\r", ""); input = input.replaceAll("br /", "br"); Assert.assertEquals("Converted body only HTML does not equal expected", expected, input); }</code><technical_language>expected is updated, is replace needed</technical_language>

Target:
public void test() throws Exception { String rawInput = getResource(TEST_DOC); String expected = getResource(CONVERTED_HTML); String input = NormalizeHtml.convertToNormalizedHTML(rawInput); input = bodyOnly(input); expected = bodyOnly(expected); expected = expected.replaceAll("\r", ""); Assert.assertEquals("Converted HTML does not equal expected", expected, input); input = rawInput.replaceAll("BODY", "body"); input = bodyOnly(input); input = NormalizeHtml.wrapAndNormalizeHTML(input, false, false, false); input = bodyOnly(input); input = input.replaceAll("\r", ""); Assert.assertEquals("Converted body only HTML does not equal expected", expected, input); }
Source:
<code>public int getNumThreads() { int numThreadsConfigured = getNumThreadsConfigured(); if (numThreadsConfigured != DEFAULT_NUM_THREADS) { return numThreadsConfigured; } else { <START> return Runtime.getRuntime().availableProcessors() - 1; <END> } }</code><technical_language>I suspect this code is unused (or lightly used) else complained work processor. max(1, Runtime.getRuntime().availableProcessors() - 1)</technical_language>

Target:
public int getNumThreads() { int numThreadsConfigured = getNumThreadsConfigured(); if (numThreadsConfigured != DEFAULT_NUM_THREADS) { return numThreadsConfigured; } else { return Math.max(Runtime.getRuntime().availableProcessors() - 1, 1); } }
Source:
<code>public void runAtDriver(RuntimeContainer container) { try { connect(container); } catch (IOException e) { <START> LOGGER.error("Coudln't connect to MarkLogic", e); <END> } }</code><technical_language>i18n</technical_language>

Target:
public void runAtDriver(RuntimeContainer container) { try { connect(container); } catch (IOException e) { ErrorCode errorCode; String message; if (e.getCause() instanceof FailedRequestException) { errorCode = new DefaultErrorCode(403, ERROR_KEY); message = "Invalid credentials."; } else { errorCode = new DefaultErrorCode(400,ERROR_KEY); message = "Cannot connect to MarkLogic database. Check your database connectivity."; } throw new ComponentException(errorCode, e, new ExceptionContextBuilder().put(ERROR_KEY, message).build()); } }
Source:
<code>public List<String> getStringList(String name) { if (!containsKey(name)) { <START> return Collections.emptyList(); <END> } String v = getString(name); return Arrays.stream(StringUtils.split(v, ',')).map(String::trim).collect(Collectors.toList()); }</code><technical_language>nit: wondering if IllegalArgumentException if property is missing getString. encode a default.. I terribly is a model, this closer existing behavior least</technical_language>

Target:
public List<String> getStringList(String name) { String v = getString(name); return Arrays.stream(StringUtils.split(v, ',')).map(String::trim).collect(Collectors.toList()); }
Source:
<code><START> public static boolean useNewBottomContent(WikipediaApp app) { <END> final int hexBase = 16; return Integer.parseInt(app.getAppInstallID().substring(app.getAppInstallID().length() - 1), hexBase) % 2 == 0; }</code><technical_language>consider moving feature toggle is place</technical_language>

Target:
public static boolean useNewBottomContent(WikipediaApp app) { if (app.getReleaseType() == WikipediaApp.RELEASE_PROD) { return false; } final int hexBase = 16; return Integer.parseInt(app.getAppInstallID().substring(app.getAppInstallID().length() - 1), hexBase) % 2 == 0; }
Source:
<code>public void addResourceRole(PerunSession sess, Group group, Role role, Resource resource) throws InternalErrorException, AlreadyAdminException { if (!role.equals(Role.RESOURCESELFSERVICE)) { throw new IllegalArgumentException("Role "+role+" cannot be set on VO"); } try { jdbc.update("insert into authz (role_id, resource_id, authorized_group_id) values ((select id from roles where name=?), ?, ?)", role.getRoleName(), resource.getId(), group.getId()); } catch (DataIntegrityViolationException e) { <START> throw new AlreadyAdminException("Group id=" + group.getId() + " is already "+role+" of resource " + resource, e, group, resource, role); <END> } catch (RuntimeException e) { throw new InternalErrorException(e); } }</code><technical_language>"in resource" instead of "of resource"</technical_language>

Target:
public void addResourceRole(PerunSession sess, Group group, Role role, Resource resource) throws InternalErrorException, AlreadyAdminException { if (!role.equals(Role.RESOURCESELFSERVICE)) { throw new IllegalArgumentException("Role "+role+" cannot be set on resource."); } try { jdbc.update("insert into authz (role_id, resource_id, authorized_group_id) values ((select id from roles where name=?), ?, ?)", role.getRoleName(), resource.getId(), group.getId()); } catch (DataIntegrityViolationException e) { throw new AlreadyAdminException("Group id=" + group.getId() + " is already "+role+" in resource " + resource, e, group, resource, role); } catch (RuntimeException e) { throw new InternalErrorException(e); } }
Source:
<code>public static boolean isValid(String acc) { boolean looksLikeSRA = false; File f = new File(acc); if (f.isFile()) { byte[] buffer = new byte[8]; byte[] signature1 = "NCBI.sra".getBytes(); byte[] signature2 = "NCBInenc".getBytes(); try (InputStream is = new FileInputStream(f)) { int numRead = is.read(buffer); looksLikeSRA = numRead == buffer.length && (Arrays.equals(buffer, signature1) || Arrays.equals(buffer, signature2)); } catch (IOException e) { looksLikeSRA = false; } } else if (f.exists()) { looksLikeSRA = false; } else { looksLikeSRA = acc.toUpperCase().matches ( "^[SED]RR[0-9]{6,9}$" ); } if (!looksLikeSRA) return false; ExceptionInInitializerError initError = checkIfInitialized(); if (initError != null) { if (noLibraryDownload && initError instanceof LibraryLoadError) { throw new LinkageError( "Failed to load SRA native libraries and auto-download is disabled. " + <START> "Please set property samjdk.sra_libraries_download=true to enable auto-download of native libraries", <END> initError ); } else { throw initError; } } return NGS.isValid(acc); }</code><technical_language>want explicit -D find users do this explicit..</technical_language>

Target:
public static boolean isValid(String acc) { boolean looksLikeSRA = false; File f = new File(acc); if (f.isFile()) { byte[] buffer = new byte[8]; byte[] signature1 = "NCBI.sra".getBytes(); byte[] signature2 = "NCBInenc".getBytes(); try (InputStream is = new FileInputStream(f)) { int numRead = is.read(buffer); looksLikeSRA = numRead == buffer.length && (Arrays.equals(buffer, signature1) || Arrays.equals(buffer, signature2)); } catch (IOException e) { looksLikeSRA = false; } } else if (f.exists()) { looksLikeSRA = false; } else { looksLikeSRA = acc.toUpperCase().matches ( "^[SED]RR[0-9]{6,9}$" ); } if (!looksLikeSRA) return false; final ExceptionInInitializerError initError = checkIfInitialized(); if (initError != null) { if (noLibraryDownload && initError instanceof LibraryLoadError) { throw new LinkageError( "Failed to load SRA native libraries and auto-download is disabled. " + "Please re-run with JVM argument -Dsamjdk.sra_libraries_download=true to enable auto-download of native libraries", initError ); } else { throw initError; } } return NGS.isValid(acc); }
Source:
<code>public void setUseBulkWriteOperations(final boolean useBulkWriteOperations) { <START> LOG.warning("Setting useBulkWriteOperations has no value functionally or performance-wise."); <END> }</code><technical_language>I deprecate is sufficient. log a warning</technical_language>

Target:
public void setUseBulkWriteOperations(final boolean useBulkWriteOperations) { }
Source:
<code>public boolean cast(final MagicSpell spell) { if (!ctx.game.tab(Game.Tab.MAGIC)) { return false; } final Component c = component(spell); <START> return c.visible() && c.click(spell.book() == Book.ARCEUUS ? "Reanimate" : "Cast"); <END> }</code><technical_language>This right. Arceuus teleports "Cast", "Reanimate." return c.visible() && c.click(c -> c.action.equals("Cast") || c.action.equals("Reanimate"))</technical_language>

Target:
public boolean cast(final MagicSpell spell) { if (!ctx.game.tab(Game.Tab.MAGIC)) { return false; } final Component c = component(spell); return c.visible() && c.click(cmd -> cmd.action.equals("Cast") || cmd.action.equals("Reanimate") || cmd.action.equals("Resurrect")); }
Source:
<code>public LogFileConfiguration(@NonNull String directory) { <START> if (directory == null) { throw new IllegalArgumentException("directory cannot be null"); } <END> this.directory = directory; readonly = false; }</code><technical_language>Preconditions.checkArgNotNull()? I understand change Precondition util bit bit</technical_language>

Target:
public LogFileConfiguration(@NonNull String directory) { Preconditions.checkArgNotNull(directory, "directory"); this.directory = directory; readonly = false; }
Source:
<code>void perform() { I id = aggregate.getId(); int eventCount = storage.readEventCountAfterLastSnapshot(id); UncommittedEvents uncommittedEvents = aggregate.getUncommittedEvents(); <START> for (Event event : uncommittedEvents.list()) { <END> eventCount = writeEvent(event, eventCount); } commit(eventCount); }</code><technical_language>events snapshot is written (all left), simply split 3 operations (or 1, if write snapshot, 2 if edge case) write events in bulk - improve performance. E.g. java if(!eventsBeforeSnapshot.isEmpty()) { write(eventsBeforeShapshot); } if(snapshot.isPresent()) { writeSnapshot(...); if(!eventsAfterSnapshot.isEmpty()) { write(eventsAfterSnapshot); } } remove this suspicious eventCount referency-bouncing back. a typical source of programming mistakes</technical_language>

Target:
void perform() { UncommittedEvents uncommittedEvents = aggregate.getUncommittedEvents(); List<Event> eventsToStore = uncommittedEvents.list(); writeEvents(eventsToStore); }
Source:
<code>public void applyLimit(long limit) { if (limit > Integer.MAX_VALUE) { throw new TableException( String.format("The maximum limit value is %d for jdbc connector. Get %d.", Integer.MAX_VALUE, limit)); } <START> this.limit = Math.toIntExact(limit); <END> }</code><technical_language>need cast int</technical_language>

Target:
public void applyLimit(long limit) { this.limit = limit; }
Source:
<code>public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { Set<String> runtimeNames = domainRoot ? AffectedDeploymentOverlay.listAllLinks(context, context.getCurrentAddressValue()) : AffectedDeploymentOverlay.listLinks(context, context.getCurrentAddress()); if(operation.hasDefined(RUNTIME_NAMES_DEFINITION.getName())) { Set<String> requiredRuntimeNames = new HashSet<>(RUNTIME_NAMES_DEFINITION.unwrap(context, operation)); if(!runtimeNames.containsAll(requiredRuntimeNames)) { <START> throw new OperationFailedException("WTF are you trying to do !!!!!"); <END> } runtimeNames = requiredRuntimeNames; } if (domainRoot) { AffectedDeploymentOverlay.redeployLinksAndTransformOperationForDomain(context, AffectedDeploymentOverlay.listServerGroupsReferencingOverlay(context, context.getCurrentAddressValue()), runtimeNames); } else { AffectedDeploymentOverlay.redeployLinksAndTransformOperationForServerGroup(context, context.getCurrentAddress().getParent(), runtimeNames); } }</code><technical_language>Ummm... :)</technical_language>

Target:
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { Set<String> runtimeNames = domainRoot ? AffectedDeploymentOverlay.listAllLinks(context, context.getCurrentAddressValue()) : AffectedDeploymentOverlay.listLinks(context, context.getCurrentAddress()); if(operation.hasDefined(RUNTIME_NAMES_DEFINITION.getName())) { Set<String> requiredRuntimeNames = new HashSet<>(RUNTIME_NAMES_DEFINITION.unwrap(context, operation)); Set<String> unaffectedDeployments = AffectedDeploymentOverlay.checkRequiredNames(requiredRuntimeNames, runtimeNames); if(!unaffectedDeployments.isEmpty() && !isRedeployAfterRemoval(operation)) { throw DomainControllerLogger.ROOT_LOGGER.redeployingUnaffactedDeployments(unaffectedDeployments); } runtimeNames = requiredRuntimeNames; } ModelNode removeOperation = null; if(isRedeployAfterRemoval(operation)) { removeOperation = Operations.createRemoveOperation(context.getCurrentAddress().append(DEPLOYMENT, runtimeNames.iterator().next()).toModelNode()); } if (domainRoot) { AffectedDeploymentOverlay.redeployLinksAndTransformOperationForDomain(context, runtimeNames, removeOperation); } else { AffectedDeploymentOverlay.redeployLinksAndTransformOperation(context, removeOperation, context.getCurrentAddress().getParent(), runtimeNames); } }
Source:
<code>List<DatanodeDetails> filterViableNodes( List<DatanodeDetails> excludedNodes, int nodesRequired) throws SCMException { List<DatanodeDetails> healthyNodes = nodeManager.getNodes(HddsProtos.NodeState.HEALTHY); if (excludedNodes != null) { healthyNodes.removeAll(excludedNodes); } String msg; if (healthyNodes.size() == 0) { <START> msg = "No healthy node found to allocate container."; <END> LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes .FAILED_TO_FIND_HEALTHY_NODES); } if (healthyNodes.size() < nodesRequired) { msg = String.format("Not enough healthy nodes to allocate container. %d " + " datanodes required. Found %d", nodesRequired, healthyNodes.size()); LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes.FAILED_TO_FIND_SUITABLE_NODE); } List<DatanodeDetails> healthyList = healthyNodes.stream().filter(d -> meetCriteria(d, heavyNodeCriteria)).collect(Collectors.toList()); if (healthyList.size() < nodesRequired) { msg = String.format("Unable to find enough nodes that meet " + "the criteria that cannot engage in more than %d pipelines." + " Nodes required: %d Found: %d", heavyNodeCriteria, nodesRequired, healthyList.size()); LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes.FAILED_TO_FIND_NODES_WITH_SPACE); } return healthyList; }</code><technical_language>"container" -> pipeline</technical_language>

Target:
List<DatanodeDetails> filterViableNodes( List<DatanodeDetails> excludedNodes, int nodesRequired) throws SCMException { List<DatanodeDetails> healthyNodes = nodeManager.getNodes(HddsProtos.NodeState.HEALTHY); if (excludedNodes != null) { healthyNodes.removeAll(excludedNodes); } String msg; if (healthyNodes.size() == 0) { msg = "No healthy node found to allocate pipeline."; LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes .FAILED_TO_FIND_HEALTHY_NODES); } if (healthyNodes.size() < nodesRequired) { msg = String.format("Not enough healthy nodes to allocate pipeline. %d " + " datanodes required. Found %d", nodesRequired, healthyNodes.size()); LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes.FAILED_TO_FIND_SUITABLE_NODE); } List<DatanodeDetails> healthyList = healthyNodes.stream().filter(d -> meetCriteria(d, heavyNodeCriteria)).collect(Collectors.toList()); if (healthyList.size() < nodesRequired) { msg = String.format("Unable to find enough nodes that meet " + "the criteria that cannot engage in more than %d pipelines." + " Nodes required: %d Found: %d", heavyNodeCriteria, nodesRequired, healthyList.size()); LOG.error(msg); throw new SCMException(msg, SCMException.ResultCodes.FAILED_TO_FIND_SUITABLE_NODE); } return healthyList; }
Source:
<code>public long getTimeUntilNextRun() { long timeUntilNextRun = (packetTransformer instanceof RecurringRunnable) ? ((RecurringRunnable) packetTransformer) <START> .getTimeUntilNextRun() : -1; <END> return timeUntilNextRun; }</code><technical_language>Returning -1 result in executor running this immediately (there special semantics for -1, executes long getTimeUntilNextRun <= 0). I easiest solution run interval RBESingleStream (500ms). Another option register executor while RBESingleStream, de-register switch RBEAbsSendTime</technical_language>

Target:
public long getTimeUntilNextRun() { long timeUntilNextRun = (packetTransformer instanceof RecurringRunnable) ? ((RecurringRunnable) packetTransformer) .getTimeUntilNextRun() : defaultTimeUntilNextRunMs; return timeUntilNextRun; }
Source:
<code>public <V> V getService(Class<V> serviceClass, String filter) { ServiceReference<V> serviceRef = getServiceReference(serviceClass, filter); if (serviceRef == null) { return null; } @SuppressWarnings("unchecked") V service = (V)fServices.get(serviceRef); if (service == null) { if <START> (fServices.containsKey(serviceRef) == false) { <END> service = fBundleContext.getService(serviceRef); fServices.put(serviceRef, service); } } return service; }</code><technical_language>Better: !fServices.containsKey(serviceRef)</technical_language>

Target:
public <V> V getService(Class<V> serviceClass, String filter) { ServiceReference<V> serviceRef = getServiceReference(serviceClass, filter); if (serviceRef == null) { return null; } @SuppressWarnings("unchecked") V service = (V)fServices.get(serviceRef); if (service == null) { if (!fServices.containsKey(serviceRef)) { service = fBundleContext.getService(serviceRef); fServices.put(serviceRef, service); } } return service; }
Source:
<code>public void test_setUrl_remote_with_post() { secondsToWaitTillFail = 35; String url = "<LINK_0>"; assumeTrue("Skipping test due to bad internet connection", checkInternet(url)); testLog.append("checkInternet() passed"); String expectedTitle = "Bug List"; Runnable browserSetFunc = () -> { testLog.append("Setting Browser url to:" + url); boolean opSuccess = browser.setUrl( url + "?bug_severity=enhancement&bug_status=NEW&email1=rgrunber&emailassigned_to1=1&emailtype1=substring", null, null); assertTrue("Expecting setUrl() to return true", opSuccess); <START> }; validateTitleChanged(expectedTitle, browserSetFunc); <END> System.out.println(browser.getText()); int numChars = browser.getText().length(); assertTrue("Response data contained " + numChars + " chars.", numChars > 10000); }</code><technical_language>if title change verify setURL is correct approach. other tests, 'example.com' triggers a title change, post data call neccesarily change title. idk? want write test run progress completion instead (see some other tests)</technical_language>

Target:
public void test_setUrl_remote_with_post() { assumeFalse(webkit1SkipMsg(), isWebkit1); secondsToWaitTillFail = 35; String url = "<LINK_0>"; assumeTrue("Skipping test due to bad internet connection", checkInternet(url)); testLog.append("checkInternet() passed"); String expectedTitle = "Bug List"; Runnable browserSetFunc = () -> { testLog.append("Setting Browser url to:" + url); boolean opSuccess = browser.setUrl( url + "?bug_severity=enhancement&bug_status=NEW&email1=rgrunber&emailassigned_to1=1&emailtype1=substring", null, null); assertTrue("Expecting setUrl() to return true", opSuccess); }; validateTitleChanged(expectedTitle, browserSetFunc); int numChars = browser.getText().length(); assertTrue("Response data contained " + numChars + " chars.", numChars > 10000); }
Source:
<code>public AbstractAuthenticationToken convert(Jwt jwt) { OAuth2AccessToken accessToken = new OAuth2AccessToken( OAuth2AccessToken.TokenType.BEARER, jwt.getTokenValue(), jwt.getIssuedAt(), jwt.getExpiresAt()); AbstractAuthenticationToken token = this.jwtAuthenticationConverter.convert(jwt); Collection<GrantedAuthority> authorities = token.getAuthorities(); JWTClaimsSet.Builder builder = new Builder(); for (Entry<String, Object> entry : jwt.getClaims().entrySet()) { builder.claim(entry.getKey(), entry.getValue()); } JWTClaimsSet jwtClaimsSet = builder.build(); JWSObject jwsObject = null; try { jwsObject = JWSObject.parse(accessToken.getTokenValue()); } catch (ParseException e) { <START> LOGGER.error( <END> e.getMessage() + ". When create an instance of JWSObject, an exception is resolved on the token."); } UserPrincipal userPrincipal = new UserPrincipal(accessToken.getTokenValue(), jwsObject, jwtClaimsSet); return new PreAuthenticatedAuthenticationToken(userPrincipal, null, authorities); }</code><technical_language>another method, error(String, Throwable) here</technical_language>

Target:
public AbstractAuthenticationToken convert(Jwt jwt) { OAuth2AccessToken accessToken = new OAuth2AccessToken( OAuth2AccessToken.TokenType.BEARER, jwt.getTokenValue(), jwt.getIssuedAt(), jwt.getExpiresAt()); Collection<GrantedAuthority> authorities = extractAuthorities(jwt); AzureOAuth2AuthenticatedPrincipal principal = new AzureOAuth2AuthenticatedPrincipal( jwt.getHeaders(), jwt.getClaims(), authorities, jwt.getTokenValue()); return new BearerTokenAuthentication(principal, accessToken, authorities); }
Source:
<code>private boolean useGlobalModelCache() { <START> return !Boolean.parseBoolean( System.getProperty( DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY ) ); <END> }</code><technical_language>Boolean#getBoolean()</technical_language>

Target:
private boolean useGlobalModelCache() { return !Boolean.getBoolean( DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY ); }
Source:
<code>public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return OffsetTime.parse(defaultStr, DateTimeFormatter.ofPattern("HH:mm:ss[.SSS]x")); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + <START> " parsing default LocalDateTime value: " + defaultStr, e); <END> } }</code><technical_language>This "OffsetTime"</technical_language>

Target:
public Object parseDefaultString(FieldType fieldType, String defaultStr) throws SQLException { try { return OffsetTime.parse(defaultStr, new DateTimeFormatterBuilder() .appendPattern("HH:mm:ss") .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true) .appendPattern("x") .toFormatter()); } catch (NumberFormatException e) { throw SqlExceptionUtil.create("Problems with field " + fieldType + " parsing default OffsetTime value: " + defaultStr, e); } }
Source:
<code>public static int divideRoundUp(int dividend, int divisor) { Preconditions.checkArgument(dividend >= 0, "Negative dividend is not supported."); Preconditions.checkArgument(divisor > 0, "Negative or zero divisor is not supported."); <START> if (dividend == 0) { <END> return 0; } return (dividend - 1) / divisor + 1; }</code><technical_language>nit: done in line. return dividend == 0 ? 0 : (dividend - 1) / divisor + 1</technical_language>

Target:
public static int divideRoundUp(int dividend, int divisor) { Preconditions.checkArgument(dividend >= 0, "Negative dividend is not supported."); Preconditions.checkArgument(divisor > 0, "Negative or zero divisor is not supported."); return dividend == 0 ? 0 : (dividend - 1) / divisor + 1; }
Source:
<code>protected boolean onAccessDenied(ServletRequest request, ServletResponse response) { try { return executeLogin(request, response); } catch (InvalidTokenException e) { log.info("Unable to login: " + e.getMessage()); <START> ((HttpServletResponse)response).setStatus(HttpStatus.SC_UNAUTHORIZED); <END> } catch (Exception e) { ((HttpServletResponse)response).setStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR); log.error(e.getMessage(), e); } return false; }</code><technical_language>WebUtils instead of casting this yourself</technical_language>

Target:
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { try { return executeLogin(request, response); } catch (InvalidTokenException e) { log.info("Unable to login: " + e.getMessage()); WebUtils.toHttp(response).setStatus(HttpStatus.SC_UNAUTHORIZED); return false; } catch (Exception e) { log.error(e.getMessage(), e); throw e; } }
Source:
<code><START> public void constructContextObject() { <END> final String key1 = "Key1"; final String value1 = "first-value"; Context emptyContext = Context.NONE; Context keyValueContext = new Context(key1, value1); END: com.azure.core.util.context#object-object }</code><technical_language>if Context values get passed other tracing, good in samples demonstrate real world scenarios</technical_language>

Target:
public void constructContextObject() { Context emptyContext = Context.NONE; final String userParentSpan = "user-parent-span"; Context keyValueContext = new Context(OPENCENSUS_SPAN_KEY, userParentSpan); END: com.azure.core.util.context#object-object }
Source:
<code>public void testVersioningNotImplemented_exactRef() throws IOException { assertFalse(refdir.hasVersioning()); Ref <START> exactRef = <END> refdir.exactRef(HEAD); assertNotNull(exactRef); exactRef.getUpdateIndex(); }</code><technical_language>optional: Ref ref</technical_language>

Target:
public void testVersioningNotImplemented_exactRef() throws IOException { assertFalse(refdir.hasVersioning()); Ref ref = refdir.exactRef(HEAD); assertNotNull(ref); ref.getUpdateIndex(); }
Source:
<code>private WriteResponse unpublishOldContent( HttpServletRequest request, HttpServletResponse response ) { String source = request.getParameter(SOURCE); <START> ImmutableList<String> validUris = ImmutableList.copyOf( <END> Arrays.asList( request.getParameter(VALID_URIS) .split(",") ) ); Publisher publisher = Publisher.fromKey(source).requireValue(); WriteResponse writeResponse = validateApiKey(request, response, publisher); if (writeResponse != null) { response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); return writeResponse; } if (oldContentDeactivator.deactivateOldContent(publisher, validUris, 50)) { response.setStatus(HttpServletResponse.SC_OK); } return null; }</code><technical_language>do ImmutableList.copyOf( request.getParameter(VALID_URIS) .split(",") );</technical_language>

Target:
private WriteResponse unpublishOldContent( HttpServletRequest request, HttpServletResponse response ) { String source = request.getParameter(SOURCE_PARAMETER); ImmutableList<String> validUris = ImmutableList.copyOf( request.getParameter(VALID_URIS_PARAMETER) .split(",") ); Publisher publisher = Publisher.fromKey(source).requireValue(); Optional<AtlasErrorSummary> apiKeyErrorSummary = validateApiKey( request, response, publisher ); if (apiKeyErrorSummary.isPresent()) { return error(request, response, apiKeyErrorSummary.get()); } if (oldContentDeactivator.deactivateOldContent(publisher, validUris, 50)) { response.setStatus(HttpServletResponse.SC_OK); } return null; }
Source:
<code>public Type getType() { <START> return Type.INDEX; <END> }</code><technical_language>I nice create a new task type for hadoop indexer. (This is for metrics emission, able separate in mmx_metrics)</technical_language>

Target:
public String getType() { return "index_hadoop"; }
Source:
<code>public KubernetesTenancyProvider() { String kubernetesMasterUrl = System.getenv(KUBERNETES_MASTER_ENV_VAR_NAME); if (kubernetesMasterUrl == null || kubernetesMasterUrl.isEmpty()) { kubernetesMasterUrl = System.getProperty(KUBERNETES_MASTER_SYS_PROPERTY_NAME); } <START> kubernetesClient = new DefaultKubernetesClient(kubernetesMasterUrl); <END> logger.info("Kubernetes tenancy provider initialized"); logger.info("Kubernetes master URL: {}", kubernetesMasterUrl); }</code><technical_language>happen if env system property is set</technical_language>

Target:
public KubernetesTenancyProvider() { String kubernetesMasterUrl = System.getenv(KUBERNETES_MASTER_ENV_VAR_NAME); if (kubernetesMasterUrl == null || kubernetesMasterUrl.isEmpty()) { kubernetesMasterUrl = System.getProperty(KUBERNETES_MASTER_SYS_PROPERTY_NAME); } if (kubernetesMasterUrl == null || kubernetesMasterUrl.isEmpty()) { throw new DeploymentEnvironmentException("Kubernetes master URL not found, set environment variable " + KUBERNETES_MASTER_ENV_VAR_NAME + " or system property " + KUBERNETES_MASTER_SYS_PROPERTY_NAME + "."); } kubernetesClient = new DefaultKubernetesClient(kubernetesMasterUrl); logger.info("Kubernetes tenancy provider initialized"); logger.info("Kubernetes master URL: {}", kubernetesMasterUrl); }
Source:
<code>public static Tuple generateTestTuple(String source, String index, String type, String id) { TopologyBuilder builder = new TopologyBuilder(); GeneralTopologyContext topologyContext = new GeneralTopologyContext(builder.createTopology(), <START> new Config(), new CustomIndexArray<String>(0,1), new HashMap<>(), new HashMap<>(), "") { <END> @Override public Fields getComponentOutputFields(String componentId, String streamId) { return new Fields("source", "index", "type", "id"); } }; return new TupleImpl(topologyContext, new Values(source, index, type, id), source, 1, ""); }</code><technical_language>nit: extra space</technical_language>

Target:
public static Tuple generateTestTuple(String source, String index, String type, String id) { TopologyBuilder builder = new TopologyBuilder(); GeneralTopologyContext topologyContext = new GeneralTopologyContext(builder.createTopology(), new Config(), new CustomIndexArray<String>(0,0), new HashMap<>(), new HashMap<>(), "") { @Override public Fields getComponentOutputFields(String componentId, String streamId) { return new Fields("source", "index", "type", "id"); } }; return new TupleImpl(topologyContext, new Values(source, index, type, id), source, 1, ""); }
Source:
<code><START> ValueRange rangeAlignedWeekOfMonth() { <END> return ValueRange.of(1, InternationalFixedChronology.WEEKS_IN_MONTH); }</code><technical_language>leap-day/year-day part of actual month, need return zero range</technical_language>

Target:
ValueRange rangeAlignedWeekOfMonth() { return this.month > 0 ? WEEK_OF_MONTH_RANGE : EMPTY_RANGE; }
Source:
<code>private boolean validateCpuChange(VDSGroup oldGroup) { VDSGroup vdsGroup = getVdsGroup(); String oldCpuName = oldGroup.getcpu_name(); String cpuName = vdsGroup.getcpu_name(); if (oldCpuName == null && cpuName == null) { return true; } Version compatVersion = vdsGroup.getcompatibility_version(); if (!CpuFlagsManagerHandler.CheckIfCpusExist(cpuName, compatVersion)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CPU_NOT_FOUND); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__CLUSTER); return false; } if (!StringHelper.isNullOrEmpty(oldCpuName)) { return true; } boolean isSameManufacturer = CpuFlagsManagerHandler.CheckIfCpusSameManufacture(oldCpuName, cpuName, compatVersion); int vdsNum = DbFacade.getInstance().getVdsStaticDAO().getAllForVdsGroup(getVdsGroup().getId()) .size(); if (!isSameManufacturer && vdsNum > 0) { <START> addCanDoActionMessage(VdcBllMessages.VDS_GROUP_CANNOT_UPDATE_CPU_ILLEGAL); <END> return false; } return true; }</code><technical_language>need add VAR__TYPE__CLUSTER</technical_language>

Target:
private boolean validateCpuChange(VDSGroup oldGroup) { VDSGroup vdsGroup = getVdsGroup(); String oldCpuName = oldGroup.getcpu_name(); String cpuName = vdsGroup.getcpu_name(); if (oldCpuName == null && cpuName == null) { return true; } Version compatVersion = vdsGroup.getcompatibility_version(); if (!CpuFlagsManagerHandler.CheckIfCpusExist(cpuName, compatVersion)) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CPU_NOT_FOUND); addCanDoActionMessage(VdcBllMessages.VAR__TYPE__CLUSTER); return false; } if (StringHelper.isNullOrEmpty(oldCpuName)) { return true; } boolean isSameManufacturer = CpuFlagsManagerHandler.CheckIfCpusSameManufacture(oldCpuName, cpuName, compatVersion); int vdsNum = DbFacade.getInstance().getVdsStaticDAO().getAllForVdsGroup(getVdsGroup().getId()) .size(); if (!isSameManufacturer && vdsNum > 0) { addCanDoActionMessage(VdcBllMessages.VDS_GROUP_CANNOT_UPDATE_CPU_ILLEGAL); return false; } return true; }
Source:
<code>protected IDiagramWorkbenchPart getDiagramWorkbenchPart() { IDiagramWorkbenchPart diagramPart = null; IEditorPart editorPart = partReference.getEditor(false); if (editorPart instanceof IDiagramWorkbenchPart) { diagramPart = (IDiagramWorkbenchPart) editorPart; } else if (editorPart != null) { diagramPart = <START> editorPart.getAdapter(IDiagramWorkbenchPart.class); <END> } return diagramPart; }</code><technical_language>previous: compile error</technical_language>

Target:
protected IDiagramWorkbenchPart getDiagramWorkbenchPart() { IDiagramWorkbenchPart diagramPart = null; IEditorPart editorPart = partReference.getEditor(false); if (editorPart instanceof IDiagramWorkbenchPart) { diagramPart = (IDiagramWorkbenchPart) editorPart; } else if (editorPart != null) { diagramPart = (IDiagramWorkbenchPart) editorPart.getAdapter(IDiagramWorkbenchPart.class); } return diagramPart; }
Source:
<code>public void setClientInfo(String name, String value) throws SQLClientInfoException { <START> if (value != null) { <END> this.properties.setProperty(name, value); } else { this.properties.remove(name); } }</code><technical_language>do remove checkClosed()</technical_language>

Target:
public void setClientInfo(String name, String value) throws SQLClientInfoException { if (isClosed()) { throw new SQLClientInfoException(); } if (value != null) { this.properties.setProperty(name, value); } else { this.properties.remove(name); } }
Source:
<code>protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException { super.renderProperties(renderer); if (_columns > 0) renderer.render("columns", _columns); if (_columns > 0 && _start > 0) renderer.render("start", _start); <START> renderer.render("smooth", isSmooth()); <END> }</code><technical_language>render(renderer, "smooth", isSmooth()); instead? send additional data if smooth is false</technical_language>

Target:
protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException { super.renderProperties(renderer); if (_columns > 0) renderer.render("columns", _columns); if (_columns > 0 && _start > 0) renderer.render("start", _start); if (!isSmooth()) renderer.render("smooth", false); }
Source:
<code>static void loadExternalLinksIntoExtensionElements(final org.kie.workbench.common.dmn.api.definition.v1_1.DRGElement source, final org.kie.dmn.model.api.DRGElement target) { if (Objects.isNull(source.getLinksHolder()) <START> || Objects.isNull(source.getLinksHolder().getValue())) { <END> return; } final DocumentationLinks links = source.getLinksHolder().getValue(); final DMNElement.ExtensionElements elements = getOrCreateExtensionElements(target); elements.getExternalLinks().clear(); for (final DMNExternalLink link : links.getLinks()) { final TDMNExternalLink external = new TDMNExternalLink(); external.setLinkDescription(link.getDescription()); external.setURL(link.getUrl()); elements.getExternalLinks().add(external); } target.setExtensionElements(elements); }</code><technical_language>this if condition line? exceed recommended length of line</technical_language>

Target:
static void loadExternalLinksIntoExtensionElements(final org.kie.workbench.common.dmn.api.definition.v1_1.DRGElement source, final org.kie.dmn.model.api.DRGElement target) { if (Objects.isNull(source.getLinksHolder()) || Objects.isNull(source.getLinksHolder().getValue())) { return; } final DocumentationLinks links = source.getLinksHolder().getValue(); final DMNElement.ExtensionElements elements = getOrCreateExtensionElements(target); removeAllExistingLinks(elements); for (final DMNExternalLink link : links.getLinks()) { final ExternalLink external = new ExternalLink(); external.setName(link.getDescription()); external.setUrl(link.getUrl()); elements.getAny().add(external); } target.setExtensionElements(elements); }
Source:
<code>public void testReplaceValueEqualStoreEntryCacheWriterException() throws Exception { final FakeStore realStore = new FakeStore(Collections.singletonMap("key", "oldValue")); this.store = spy(realStore); final FakeCacheWriter realCache = new FakeCacheWriter(Collections.singletonMap("key", "oldValue")); this.cacheWriter = spy(realCache); doThrow(new Exception()).when(this.cacheWriter).write("key", "newValue"); final Ehcache<String, String> ehcache = this.getEhcache(this.cacheWriter); try { ehcache.replace("key", "oldValue", "newValue"); fail(); } catch (CacheWriterException e) { } verify(this.store).computeIfPresent(eq("key"), getAnyBiFunction()); verifyZeroInteractions(this.spiedResilienceStrategy); <START> validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.ReplaceOutcome.class)); END> }</code><technical_language>I expect a FAILURE outcome depend contract want for CAS operations</technical_language>

Target:
public void testReplaceValueEqualStoreEntryCacheWriterException() throws Exception { final FakeStore fakeStore = new FakeStore(Collections.singletonMap("key", "oldValue")); this.store = spy(fakeStore); final FakeCacheWriter fakeWriter = new FakeCacheWriter(Collections.singletonMap("key", "oldValue")); this.cacheWriter = spy(fakeWriter); doThrow(new Exception()).when(this.cacheWriter).write("key", "newValue"); final Ehcache<String, String> ehcache = this.getEhcache(this.cacheWriter); try { ehcache.replace("key", "oldValue", "newValue"); fail(); } catch (CacheWriterException e) { } verify(this.store).computeIfPresent(eq("key"), getAnyBiFunction()); verifyZeroInteractions(this.spiedResilienceStrategy); validateStats(ehcache, EnumSet.noneOf(CacheOperationOutcomes.ReplaceOutcome.class)); }
Source:
<code>public Object read(JsonReader in) throws IOException { JsonToken token = in.peek(); if (token.equals(JsonToken.NUMBER)) { String str = in.nextString(); try { <START> return Integer.parseInt(str); <END> } catch (NumberFormatException e) { try { return Long.parseLong(str); } catch (NumberFormatException e1) { try { return Double.parseDouble(str); } catch (NumberFormatException e3) { throw e3; } } } } return objectAdapter.read(in); }</code><technical_language>if Number num = NumberFormat.getInstance().parse(myNumber);</technical_language>

Target:
public Object read(JsonReader in) throws IOException { JsonToken token = in.peek(); if (token.equals(JsonToken.NUMBER)) { try { return in.nextLong(); } catch (NumberFormatException e) { return in.nextDouble(); } } return objectAdapter.read(in); }
Source:
<code><START> public static String encrypt(String plainText, String secret) throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException { <END> Cipher cipher = Cipher.getInstance(TRANSFORMATION, PROVIDER); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(secret.getBytes(), ALGORITHM)); byte[] encrypted = cipher.doFinal(plainText.getBytes()); Base64 encoder = new Base64(32, linebreak, true); return new String(encoder.encode(encrypted)); }</code><technical_language>null checks for plainText secret neeeded</technical_language>

Target:
public static String encrypt(String plainText, String secret) { String toReturn = ""; try { toReturn = encrypt_with_exceptions(plainText, secret); } catch (Exception ex) { throw new OseeCoreException(ex); } return toReturn; }
Source:
<code>public void tearDown() throws Exception { CrashReporter.setIsInitialized(false); <START> } <END></code><technical_language>forget disable CrashReporter :wink:</technical_language>

Target:
public void tearDown() throws Exception { CrashReporter.setIsCrashReportEnabled(false); }