auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String dataSourceName; if (request.getPath().startsWith("druid/coordinator/v1/rules/")) { dataSourceName = request.getPathSegments().get(4).getPath(); <START> } else if ( <END> request.getPath().startsWith("druid/coordinator/v1/datasources/") || request.getPath().startsWith("druid/coordinator/v1/metadata/datasources/") || request.getPath().startsWith("druid/v2/datasources/") ) { dataSourceName = request.getPathSegments() .get( Iterables.indexOf( request.getPathSegments(), new Predicate<PathSegment>() { @Override public boolean apply(PathSegment input) { return input.getPath().equals("datasources"); } } ) + 1 ).getPath(); } else { throw new WebApplicationException( Response.status(Response.Status.BAD_REQUEST) .entity( String.format("Do not know how to extract dataSource information " + "for authorization check for request path: [%s]", request.getPath() ) ).build() ); } Preconditions.checkNotNull(dataSourceName); final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(dataSourceName, ResourceType.DATASOURCE), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException( Response.status(Response.Status.FORBIDDEN) .entity(String.format("Access-Check-Result: %s", authResult.toString())) .build() ); } } return request; }</code><technical_language>dedicate this filter applicable for URLs ..../datasources/{dataSourceName}/ ? remove conditionals hard coded urls. Users of this filter ensure this is applied resources</technical_language>

Target:
public ContainerRequest filter(ContainerRequest request) { if (getAuthConfig().isEnabled()) { final String dataSourceName = request.getPathSegments() .get( Iterables.indexOf( request.getPathSegments(), new Predicate<PathSegment>() { @Override public boolean apply(PathSegment input) { return input.getPath().equals("datasources"); } } ) + 1 ).getPath(); Preconditions.checkNotNull(dataSourceName); final AuthorizationInfo authorizationInfo = (AuthorizationInfo) getReq().getAttribute(AuthConfig.DRUID_AUTH_TOKEN); Preconditions.checkNotNull( authorizationInfo, "Security is enabled but no authorization info found in the request" ); final Access authResult = authorizationInfo.isAuthorized( new Resource(dataSourceName, ResourceType.DATASOURCE), getAction(request) ); if (!authResult.isAllowed()) { throw new WebApplicationException( Response.status(Response.Status.FORBIDDEN) .entity(String.format("Access-Check-Result: %s", authResult.toString())) .build() ); } } return request; }
Source:
<code>public void deactivate() { logger.debug("deactivate discovery service for scene type remove thing tyspes {}", sceneType, <START> super.getSupportedThingTypes().toString()); <END> removeOlderResults(new Date().getTime()); }</code><technical_language>remove toString()</technical_language>

Target:
public void deactivate() { logger.debug("deactivate discovery service for scene type remove thing tyspes {}", sceneType, super.getSupportedThingTypes()); removeOlderResults(new Date().getTime()); }
Source:
<code>public static void closeQuietly(Closeable closeable) { if (closeable == null) { return; } try { closeable.close(); } catch (IOException ignored) { <START> ignore(ignored); <END> } }</code><technical_language>Nitpicking: This belong "Update license header" commit</technical_language>

Target:
public static void closeQuietly(Closeable closeable) { if (closeable == null) { return; } try { closeable.close(); } catch (IOException ignored) { EmptyStatement.ignore(ignored); } }
Source:
<code>public static void assertAllGood(Cache cache) { SearchManager searchManager = Search.getSearchManager(cache); SearchIntegrator searchFactory = searchManager.unwrap(SearchIntegrator.class); ErrorHandler errorHandler = searchFactory.getErrorHandler(); Assert.assertNotNull(errorHandler); <START> if(errorHandler instanceof WrappingErrorHandler) { <END> errorHandler = ((WrappingErrorHandler) errorHandler).unwrap(); } Assert.assertTrue(errorHandler instanceof StaticTestingErrorHandler); StaticTestingErrorHandler instance = (StaticTestingErrorHandler) errorHandler; Object fault = instance.getAndReset(); if (fault!=null) { Assert.fail(fault.toString()); } }</code><technical_language>Spacing</technical_language>

Target:
public static void assertAllGood(Cache cache) { SearchManager searchManager = Search.getSearchManager(cache); SearchIntegrator searchFactory = searchManager.unwrap(SearchIntegrator.class); ErrorHandler errorHandler = searchFactory.getErrorHandler(); assertNotNull(errorHandler); if (errorHandler instanceof WrappingErrorHandler) { errorHandler = ((WrappingErrorHandler) errorHandler).unwrap(); } assertTrue(errorHandler instanceof StaticTestingErrorHandler); StaticTestingErrorHandler instance = (StaticTestingErrorHandler) errorHandler; Object fault = instance.getAndReset(); if (fault != null) { fail(fault.toString()); } }
Source:
<code>private void sendLatency(long latency, String service, Throwable er) { <START> connection.getClient().event() <END> .description("This is a storm latency.") .metric(latency) .service(service) .tags("storm", "latency") .state(er == null ? "success" : "failure").send(); }</code><technical_language>throw exceptions try/catch throwable protect code riemann errors. --> logger.warn()</technical_language>

Target:
private void sendLatency(long latency, String service, Throwable er) { try { connection.getClient().event() .description("This is a storm latency.") .metric(latency) .service(service) .tags("storm", "latency") .state(er == null ? "success" : "failure").send(); } catch(Throwable t) { logger.warn("Riemann error during send : " + t.getStackTrace()); } }
Source:
<code>public void start() { <START> if (stepClassWithSpringContext == null) { <END> throw new CucumberException("No glue class with @ContextConfiguration or " + "@ContextHierarcy annotation found in: " + stepClasses.toString()); } testContextManager = new CucumberTestContextManager(stepClassWithSpringContext); notifyContextManagerAboutTestClassStarted(); if (isFirstScenario() || isNewContextCreated()) { beanFactory = testContextManager.getBeanFactory(); for (Class<?> stepClass : stepClasses) { registerStepClassBeanDefinition(stepClass); } } GlueCodeContext.INSTANCE.start(); }</code><technical_language>protecting against? is logical expect some annotated glue classes SpringFactory, imagine some scenarios do depend Spring contexts SpringFactory in class path - for scenarios execute peacefully if glue classes annotated, called individually</technical_language>

Target:
public void start() { if (stepClassWithSpringContext != null) { testContextManager = new CucumberTestContextManager(stepClassWithSpringContext); } else { if (beanFactory == null) { beanFactory = createFallbackContext(); } } notifyContextManagerAboutTestClassStarted(); if (beanFactory == null || isNewContextCreated()) { beanFactory = testContextManager.getBeanFactory(); for (Class<?> stepClass : stepClasses) { registerStepClassBeanDefinition(beanFactory, stepClass); } } GlueCodeContext.INSTANCE.start(); }
Source:
<code>public APIResult getExtensionDescription( @PathParam("extension-name") String extensionName) { checkIfExtensionServiceIsEnabled(); validateExtensionName(extensionName); try { return new APIResult(APIResult.Status.SUCCEEDED, ExtensionStore.get().getResource(extensionName, README)); } catch (Throwable e) { <START> throw FalconWebException.newAPIException(e, Response.Status.BAD_REQUEST); <END> } }</code><technical_language>catching Throwable do is a bad request a server error</technical_language>

Target:
public APIResult getExtensionDescription( @PathParam("extension-name") String extensionName) { checkIfExtensionServiceIsEnabled(); validateExtensionName(extensionName); try { return new APIResult(APIResult.Status.SUCCEEDED, ExtensionStore.get().getResource(extensionName, README)); } catch (FalconException e) { throw FalconWebException.newAPIException(e, Response.Status.BAD_REQUEST); } catch (Throwable e) { throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } }
Source:
<code>protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsReadable(SEQUENCE_DICTIONARY); IOUtil.assertFileIsWritable(OUTPUT); final SAMSequenceDictionary samSequenceDictionary = SAMSequenceDictionaryExtractor.extractDictionary(SEQUENCE_DICTIONARY); final VCFFileReader fileReader = new VCFFileReader(INPUT, false); final VCFHeader fileHeader = fileReader.getFileHeader(); final VariantContextWriterBuilder builder = new VariantContextWriterBuilder() .setReferenceDictionary(samSequenceDictionary) .clearOptions(); if (CREATE_INDEX) builder.setOption(Options.INDEX_ON_THE_FLY); <START> if ( OUTPUT.getPath().equals(STD_OUT) ) { <END> builder.setOutputStream(System.out); } else { builder.setOutputFile(OUTPUT); } final VariantContextWriter vcfWriter = builder.build(); fileHeader.setSequenceDictionary(samSequenceDictionary); vcfWriter.writeHeader(fileHeader); final ProgressLogger progress = new ProgressLogger(log, 10000); final CloseableIterator<VariantContext> iterator = fileReader.iterator(); while (iterator.hasNext()) { final VariantContext context = iterator.next(); vcfWriter.add(context); progress.record(context.getContig(), context.getStart()); } CloserUtil.close(iterator); CloserUtil.close(fileReader); vcfWriter.close(); return 0; }</code><technical_language>Stdout O=/dev/stdout. about: builder.setOutputStream(new FileOutputStream(OUTPUT, false)); instead of if/else</technical_language>

Target:
protected int doWork() { IOUtil.assertFileIsReadable(INPUT); IOUtil.assertFileIsReadable(SEQUENCE_DICTIONARY); IOUtil.assertFileIsWritable(OUTPUT); final SAMSequenceDictionary samSequenceDictionary = SAMSequenceDictionaryExtractor.extractDictionary(SEQUENCE_DICTIONARY); final VCFFileReader fileReader = new VCFFileReader(INPUT, false); final VCFHeader fileHeader = fileReader.getFileHeader(); final VariantContextWriterBuilder builder = new VariantContextWriterBuilder() .setReferenceDictionary(samSequenceDictionary) .clearOptions(); if (CREATE_INDEX) builder.setOption(Options.INDEX_ON_THE_FLY); try { builder.setOutputStream(new FileOutputStream(OUTPUT)); } catch (final FileNotFoundException ex ) { throw new PicardException("Could not open " + OUTPUT.getAbsolutePath() + ": " + ex.getMessage(), ex); } final VariantContextWriter vcfWriter = builder.build(); fileHeader.setSequenceDictionary(samSequenceDictionary); vcfWriter.writeHeader(fileHeader); final ProgressLogger progress = new ProgressLogger(log, 10000); final CloseableIterator<VariantContext> iterator = fileReader.iterator(); while (iterator.hasNext()) { final VariantContext context = iterator.next(); vcfWriter.add(context); progress.record(context.getContig(), context.getStart()); } CloserUtil.close(iterator); CloserUtil.close(fileReader); vcfWriter.close(); return 0; }
Source:
<code>static void checkConfigGroupsHasServiceName() { Map<Long, ConfigGroup> configGroupMap = collectConfigGroupsWithoutServiceName(); if (MapUtils.isEmpty(configGroupMap)) return; StringBuilder output = new StringBuilder("[(ConfigGroup) => "); for (ConfigGroup configGroup : configGroupMap.values()) { output.append("( "); output.append(configGroup.getName()); output.append(" ), "); } <START> output.replace(output.lastIndexOf(","), output.length(), "]"); <END> warning("You have config groups present in the database with no " + "service name, {}. Run --auto-fix-database to fix " + "this automatically. Please backup Ambari Server database before running --auto-fix-database.", output.toString()); }</code><technical_language>a Guava Joiner (works Java 7 too) String.join (Java 8+) here</technical_language>

Target:
static void checkConfigGroupsHasServiceName() { Map<Long, ConfigGroup> configGroupMap = collectConfigGroupsWithoutServiceName(); if (MapUtils.isEmpty(configGroupMap)) return; String message = String.join(" ), ( ", configGroupMap.values().stream().map(ConfigGroup::getName).collect(Collectors.toList())); warning("You have config groups present in the database with no " + "service name, [(ConfigGroup) => ( )]. Run --auto-fix-database to fix " + "this automatically. Please backup Ambari Server database before running --auto-fix-database.", message); }
Source:
<code>public void run() { try { <START> int priority = getThreadPlatformPriority(); <END> if (priority != initialPlatformPriority) { throw new Error("Expected " + maxPlatformPriority + ", got " + priority); } processStarted.countDown(); prioritySet.await(); priority = getThreadPlatformPriority(); if (priority != maxPlatformPriority) { throw new Error("Expected " + maxPlatformPriority + ", got " + priority); } } catch (Exception e) { throw new Error(e); } }</code><technical_language>fail if initialPlatformPriority == maxPlatformPriority, test vacuous</technical_language>

Target:
public void run() { try { int priority = getThreadPlatformPriority(); if (priority != initialPlatformPriority) { throw new Error("Expected " + initialPlatformPriority + ", got " + priority); } processStarted.countDown(); prioritySet.await(); priority = getThreadPlatformPriority(); if (priority != maxPlatformPriority) { throw new Error("Expected " + maxPlatformPriority + ", got " + priority); } } catch (Exception e) { throw new Error(e); } }
Source:
<code>public static List<AccurevTransaction> getTransactionsAfterLastTransaction( final AccurevSCM scm, final AccurevServer server, final EnvVars accurevEnv, final FilePath workspace, final TaskListener listener, final Launcher launcher, final String stream, final int lastTransaction) throws IOException{ final ArgumentListBuilder cmd = new ArgumentListBuilder(); cmd.add("hist"); addServer(cmd, server); cmd.add("-fx"); cmd.add("-p"); cmd.add(scm.getDepot()); cmd.add("-s"); cmd.add(stream); if (lastTransaction > 0) { cmd.add("-t"); cmd.add("now-" + (lastTransaction+1)); } XmlPullParserFactory parser = XmlParserFactory.getFactory(); if (parser == null) throw new IOException("No XML Parser"); final List<AccurevTransaction> transactions = new ArrayList<AccurevTransaction>(); <START> final Boolean transactionFound = AccurevLauncher.runCommand("History command", launcher, cmd, scm.getOptionalLock(), accurevEnv, workspace, listener, <END> logger, parser, new ParseHistory(), transactions, true); if (transactionFound == null) { throw new IOException("History command failed when trying to get all the transactionse "); } return transactions; }</code><technical_language>need supply scm.getAccurevTool() job/node a Tool location</technical_language>

Target:
public static List<AccurevTransaction> getTransactionsAfterLastTransaction( final AccurevSCM scm, final AccurevServer server, final EnvVars accurevEnv, final FilePath workspace, final TaskListener listener, final Launcher launcher, final String stream, final int lastTransaction) throws IOException{ final ArgumentListBuilder cmd = new ArgumentListBuilder(); cmd.add("hist"); addServer(cmd, server); cmd.add("-fx"); cmd.add("-p"); cmd.add(scm.getDepot()); cmd.add("-s"); cmd.add(stream); if (lastTransaction > 0) { cmd.add("-t"); cmd.add("now-" + (lastTransaction+1)); } XmlPullParserFactory parser = XmlParserFactory.getFactory(); if (parser == null) throw new IOException("No XML Parser"); final List<AccurevTransaction> transactions = new ArrayList<AccurevTransaction>(); final Boolean transactionFound = AccurevLauncher.runHistCommandForAll("History command", scm.getAccurevTool(),launcher, cmd, scm.getOptionalLock(), accurevEnv, workspace, listener, logger, parser, new ParseHistory(), transactions); if (transactionFound == null) { throw new IOException("History command failed when trying to get all the transactionse "); } return transactions; }
Source:
<code><START> public <K, V> BulkOperations.Cache<K, V> getCache(String cacheName, boolean preferAsync) { <END> return getCache(cacheName); }</code><technical_language>honour preferAsync flag (for putAll). Also, versions of RemoteCache getAll operation implemented natively</technical_language>

Target:
public <K, V> BulkOperations.Cache<K, V> getCache(String cacheName, boolean preferAsync) { if (cacheName == null) { cacheName = service.cacheName; } if (cacheName == null) { return new HotRodBulkOperationsCache<>((RemoteCache<K,V>) service.managerNoReturn.getCache(false), (RemoteCache<K,V>) service.managerForceReturn.getCache(true), preferAsync); } else { return new HotRodBulkOperationsCache<>((RemoteCache<K,V>) service.managerNoReturn.getCache(cacheName, false), (RemoteCache<K,V>) service.managerForceReturn.getCache(cacheName, true), preferAsync); } }
Source:
<code>public String getHelpContextId(String commandId, IEclipseContext context) <START> throws NotDefinedException { <END> if (commandId == null || context == null) { return null; } Command command = commandService.getCommand(commandId); if (!command.isDefined()) { throw new NotDefinedException("The command is not defined. " + command.getId()); } IHandler handler = (IHandler) HandlerServiceImpl.lookUpHandler(context, commandId); if (handler instanceof E4HandlerProxy) { handler = ((E4HandlerProxy) handler).getHandler(); } String contextId = helpContextIdsByHandler.get(handler); if (contextId == null) { contextId = Util.getHelpContextId(command); } return contextId; }</code><technical_language>Do throw defined exception? return null turn a no-op</technical_language>

Target:
public String getHelpContextId(String commandId, IEclipseContext context) { if (commandId == null || context == null) { return null; } Command command = commandService.getCommand(commandId); if (!command.isDefined()) { if (logger != null) { logger.error("The command " + commandId + " is not defined. Help context ID cannot be determined."); } return null; } IHandler handler = (IHandler) HandlerServiceImpl.lookUpHandler(context, commandId); if (handler instanceof E4HandlerProxy) { handler = ((E4HandlerProxy) handler).getHandler(); } String contextId = helpContextIdsByHandler.get(handler); if (contextId == null) { contextId = Util.getHelpContextId(command); } return contextId; }
Source:
<code>public void testExecute_withNewStudent_shouldBeAddedToDatabase() { String courseId = typicalBundle.students.get("student1InCourse1").getCourse(); StudentAttributes newStudent = getTypicalNewStudent(courseId); <START> StudentsEnrollRequest req = prepareRequest(Collections.singletonList(newStudent)); <END> loginAsInstructor(typicalBundle.instructors.get("instructor1OfCourse1").getGoogleId()); List<StudentData> enrolledStudents = executeActionAndReturnResults(courseId, req); assertEquals(1, enrolledStudents.size()); verifyStudentInDatabase(newStudent, enrolledStudents.get(0).getCourseId(), enrolledStudents.get(0).getEmail()); verifyCorrectResponseData(req.getStudentEnrollRequests().get(0), enrolledStudents.get(0)); }</code><technical_language>This is unrelated change</technical_language>

Target:
public void testExecute_withNewStudent_shouldBeAddedToDatabase() { String courseId = typicalBundle.students.get("student1InCourse1").getCourse(); StudentAttributes newStudent = getTypicalNewStudent(courseId); StudentsEnrollRequest req = prepareRequest(Arrays.asList(newStudent)); loginAsInstructor(typicalBundle.instructors.get("instructor1OfCourse1").getGoogleId()); List<StudentData> enrolledStudents = executeActionAndReturnResults(courseId, req); assertEquals(1, enrolledStudents.size()); verifyStudentInDatabase(newStudent, enrolledStudents.get(0).getCourseId(), enrolledStudents.get(0).getEmail()); verifyCorrectResponseData(req.getStudentEnrollRequests().get(0), enrolledStudents.get(0)); }
Source:
<code>public static List<String> readFromClasspath(String filename) { List<String> lines = null; try { InputStream resource = IOUtils.lsResources(IllinoisLemmatizer.class, filename).get(0).openStream(); lines = LineIO.read(resource, Charset.defaultCharset().name(), new ITransformer<String, String>() { public String transform(String line) { return line; <START> } <END> }); } catch (IOException | URISyntaxException e) { logger.error("Error while trying to read " + filename + "."); System.exit(-1); } return lines; }</code><technical_language>exception, stdout</technical_language>

Target:
public static List<String> readFromClasspath(String filename) { List<String> lines = null; try { InputStream resource = IOUtils.lsResources(IllinoisLemmatizer.class, filename).get(0).openStream(); lines = LineIO.read(resource, Charset.defaultCharset().name(), new ITransformer<String, String>() { public String transform(String line) { return line; } }); } catch (IOException | URISyntaxException e) { System.err.println("Error while trying to read " + filename + "."); System.exit(-1); } return lines; }
Source:
<code>private Action getAction(int position) { <START> return detail.getCustomActions().get(position - (dividerPosition + 1)); <END> }</code><technical_language>extra parens in this expression unnecessary. If dividerPosition + 1 is logical entity, expression variable</technical_language>

Target:
private Action getAction(int position) { int baseActionPosition = dividerPosition + 1; return detail.getCustomActions().get(position - baseActionPosition); }
Source:
<code>public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TeleportInfo other = (TeleportInfo) obj; try { if (!(world.equalsIgnoreCase(other.getWorld()) <START> || (Bukkit.getWorld(UUID.fromString(world)).getName().equalsIgnoreCase(other.getWorld()) <END> || Bukkit.getWorld(UUID.fromString(other.getWorld())).getName().equalsIgnoreCase(world)))) { return false; } } catch (Exception e) { return false; } return server.equalsIgnoreCase(other.getServer()) && x == other.getX() && y == other.getY() && z == other.getZ(); }</code><technical_language>This a big NPE source, especially considering TeleportInfos handled, this server</technical_language>

Target:
public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TeleportInfo other = (TeleportInfo) obj; return world.equals(other.getWorld()) && server.equalsIgnoreCase(other.getServer()) && x == other.getX() && y == other.getY() && z == other.getZ(); }
Source:
<code>public static String buildString(@Nullable final MessageNumberSet[] msgsets) { if (msgsets == null || msgsets.length == 0) { return null; } <START> <END> int i = 0; final StringBuilder s = new StringBuilder(); int size = msgsets.length; long start, end; for (;;) { start = msgsets[i].start; end = msgsets[i].end; if (msgsets[i].seqType == SequenceType.LAST_MESSAGE_ONLY) { s.append('*'); } else if (msgsets[i].seqType == SequenceType.LAST_MESSAGE_END) { s.append(start).append(':').append('*'); } else if (end > start) { s.append(start).append(':').append(end); } else { s.append(start); } i++; if (i >= size) { break; } else { s.append(','); } } return s.toString(); }</code><technical_language>a while loop</technical_language>

Target:
public static String buildString(@Nullable final MessageNumberSet[] msgsets) { if (msgsets == null || msgsets.length == 0) { return null; } final Set<MessageNumberSet> elems = new LinkedHashSet<>(Arrays.asList(msgsets)); int i = 0; final StringBuilder s = new StringBuilder(); final int size = elems.size(); long start, end; for (final MessageNumberSet elem : elems) { start = elem.start; end = elem.end; if (elem.seqType == SequenceType.LAST_MESSAGE_ONLY) { s.append('*'); } else if (elem.seqType == SequenceType.LAST_MESSAGE_END) { s.append(start).append(':').append('*'); } else if (end > start) { s.append(start).append(':').append(end); } else { s.append(start); } i++; if (i >= size) { break; } else { s.append(','); } } return s.toString(); }
Source:
<code>OCFileListFragment.class.getPackage().getName() : "com.owncloud.android.ui.fragment"; protected final static String ARG_ALLOW_CONTEXTUAL_MODE = MY_PACKAGE + ".ALLOW_CONTEXTUAL"; protected final static String ARG_HIDE_FAB = MY_PACKAGE + ".HIDE_FAB"; private static final String KEY_FILE = MY_PACKAGE + ".extra.FILE"; private static final String KEY_FAB_EVER_CLICKED = "FAB_EVER_CLICKED"; <START> private static final String QUERY_TO_MOVE_DIALOG_TAG = "QUERY_TO_MOVE"; <END> private static final int CAMERA_REQUEST = 1888; private static final int REQUEST_IMAGE_CAPTURE = 1; private static final int CAPTURED_IMAGE_CHECK = 80; private static final String GRID_IS_PREFERED_PREFERENCE = "gridIsPrefered"; private static String DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER"; private FileFragment.ContainerActivity mContainerActivity; private OCFile mFile = null; private FileListListAdapter mAdapter; private LinearLayout filesLinearLayout; private LinearLayout cameraUploadLinearLayout; private int mStatusBarColorActionMode; private int mStatusBarColor; private boolean mHideFab = true; private boolean miniFabClicked = false; private ActionMode mActiveActionMode; private OCFileListFragment.MultiChoiceModeListener mMultiChoiceModeListener; public static OCFileListFragment newInstance( boolean justFolders, boolean hideFAB, boolean allowContextualMode ) { OCFileListFragment frag = new OCFileListFragment(); Bundle args = new Bundle(); args.putBoolean(ARG_JUST_FOLDERS, justFolders); args.putBoolean(ARG_HIDE_FAB, hideFAB); args.putBoolean(ARG_ALLOW_CONTEXTUAL_MODE, allowContextualMode); frag.setArguments(args); return frag; }</code><technical_language>params, delete</technical_language>

Target:
OCFileListFragment.class.getPackage().getName() : "com.owncloud.android.ui.fragment"; protected final static String ARG_ALLOW_CONTEXTUAL_MODE = MY_PACKAGE + ".ALLOW_CONTEXTUAL"; protected final static String ARG_HIDE_FAB = MY_PACKAGE + ".HIDE_FAB"; private static final String KEY_FILE = MY_PACKAGE + ".extra.FILE"; private static final String KEY_FAB_EVER_CLICKED = "FAB_EVER_CLICKED"; private static final String GRID_IS_PREFERED_PREFERENCE = "gridIsPrefered"; private static String DIALOG_CREATE_FOLDER = "DIALOG_CREATE_FOLDER"; private FileFragment.ContainerActivity mContainerActivity; private OCFile mFile = null; private FileListListAdapter mAdapter; private LinearLayout uploadFilesLinearLayout; private LinearLayout uploadFromCameraLinearLayout; private BottomSheetBehavior uploadBottomSheetBehavior; private int mStatusBarColorActionMode; private int mStatusBarColor; private boolean mHideFab = true; private boolean miniFabClicked = false; private ActionMode mActiveActionMode; private OCFileListFragment.MultiChoiceModeListener mMultiChoiceModeListener; public static OCFileListFragment newInstance( boolean justFolders, boolean hideFAB, boolean allowContextualMode ) { OCFileListFragment frag = new OCFileListFragment(); Bundle args = new Bundle(); args.putBoolean(ARG_JUST_FOLDERS, justFolders); args.putBoolean(ARG_HIDE_FAB, hideFAB); args.putBoolean(ARG_ALLOW_CONTEXTUAL_MODE, allowContextualMode); frag.setArguments(args); return frag; }
Source:
<code>protected void executeCommand() { List<String> macsToRemove = getVmNetworkInterfaceDao().getAllMacsByDataCenter(getStoragePool().getId()); removeNetworks(); List<storage_domains> storageDomains = DbFacade.getInstance().getStorageDomainDao().getAllForStoragePool( getStoragePool().getId()); Collections.sort(storageDomains, new Comparator<storage_domains>() { @Override public int compare(storage_domains o1, storage_domains o2) { return o1.getstorage_domain_type().compareTo(o2.getstorage_domain_type()); } }); if (storageDomains.size() > 0) { if (!getParameters().getForceDelete() && getAllRunningVdssInPool().size() > 0) { if(!regularRemoveStorageDomains(storageDomains)) { setSucceeded(false); return; } } else if (getParameters().getForceDelete()) { forceRemoveStorageDomains(storageDomains); } else { return; } } getStoragePoolDAO().remove(getStoragePool().getId()); setSucceeded(true); <START> if (macsToRemove != null && !macsToRemove.isEmpty()) { <END> MacPoolManager.getInstance().freeMacs(macsToRemove); } }</code><technical_language>I point.. list null DAO guarantees that. list empty, in case mac freed method accepts</technical_language>

Target:
protected void executeCommand() { List<String> macsToRemove = getVmNetworkInterfaceDao().getAllMacsByDataCenter(getStoragePool().getId()); removeNetworks(); List<storage_domains> storageDomains = DbFacade.getInstance().getStorageDomainDao().getAllForStoragePool( getStoragePool().getId()); Collections.sort(storageDomains, new Comparator<storage_domains>() { @Override public int compare(storage_domains o1, storage_domains o2) { return o1.getstorage_domain_type().compareTo(o2.getstorage_domain_type()); } }); if (storageDomains.size() > 0) { if (!getParameters().getForceDelete() && getAllRunningVdssInPool().size() > 0) { if(!regularRemoveStorageDomains(storageDomains)) { setSucceeded(false); return; } } else if (getParameters().getForceDelete()) { forceRemoveStorageDomains(storageDomains); } else { return; } } getStoragePoolDAO().remove(getStoragePool().getId()); MacPoolManager.getInstance().freeMacs(macsToRemove); setSucceeded(true); }
Source:
<code>public void setArea(String area) throws ParseException { if (area.startsWith("CIRCLE")) { geometry = new GeofenceCircle(area); } else if (area.startsWith("POLYGON")) { geometry = new GeofencePolygon(area); } else if (area.startsWith("LINESTRING")) { final double distance = getDouble("polylineDistance"); <START> geometry = new GeofencePolyline(area, distance >= 1 ? distance <END> : Context.getConfig().getDouble("geofence.polylineDistance", 25)); } else { throw new ParseException("Unknown geometry type", 0); } this.area = area; }</code><technical_language>= 1</technical_language>

Target:
public void setArea(String area) throws ParseException { if (area.startsWith("CIRCLE")) { geometry = new GeofenceCircle(area); } else if (area.startsWith("POLYGON")) { geometry = new GeofencePolygon(area); } else if (area.startsWith("LINESTRING")) { final double distance = getDouble("polylineDistance"); geometry = new GeofencePolyline(area, distance > 0 ? distance : Context.getConfig().getDouble("geofence.polylineDistance", 25)); } else { throw new ParseException("Unknown geometry type", 0); } this.area = area; }
Source:
<code>public abstract void load(Connection conn) throws SQLException; <START> public Connection getConn() { <END> return conn; }</code><technical_language>Rename getConnection</technical_language>

Target:
public abstract void load(Connection conn) throws SQLException; public Connection getConnection() { return conn; }
Source:
<code>public DiscussionPostsAdapter(Context context, IEdxEnvironment environment) { super(context, R.layout.row_discussion_thread, environment); edx_brand_primary_base = context.getResources().getColor(R.color.edx_brand_primary_base); <START> grey_medium = context.getResources().getColor(R.color.grey_medium); <END> edx_brand_secondary_dark = context.getResources().getColor(R.color.edx_brand_secondary_dark); edx_utility_success_dark = context.getResources().getColor(R.color.edx_success_text); semiBoldFont = ResourcesCompat.getFont(context, R.font.inter_semi_bold); }</code><technical_language>changing grey_medium</technical_language>

Target:
public DiscussionPostsAdapter(Context context, IEdxEnvironment environment) { super(context, R.layout.row_discussion_thread, environment); edx_brand_primary_base = context.getResources().getColor(R.color.edx_brand_primary_base); edx_grayscale_neutral_dark = context.getResources().getColor(R.color.edx_brand_gray_accent); edx_brand_secondary_dark = context.getResources().getColor(R.color.edx_brand_secondary_dark); edx_utility_success_dark = context.getResources().getColor(R.color.edx_success_text); semiBoldFont = ResourcesCompat.getFont(context, R.font.inter_semi_bold); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification); ButterKnife.bind(this); mNotificationWorkerFragment = (NotificationWorkerFragment) getFragmentManager() .findFragmentByTag(TAG_NOTIFICATION_WORKER_FRAGMENT); initListView(); initDrawer(); <START> toolbar = findViewById(R.id.toolbar); <END> nonotificationtext = (TextView)this.findViewById(R.id.no_notification_text); }</code><technical_language>butterknife</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_notification); ButterKnife.bind(this); mNotificationWorkerFragment = (NotificationWorkerFragment) getFragmentManager() .findFragmentByTag(TAG_NOTIFICATION_WORKER_FRAGMENT); initListView(); initDrawer(); nonotificationtext = (TextView)this.findViewById(R.id.no_notification_text); setPageTitle(); }
Source:
<code>protected Pair<Boolean, EngineFault> runConnectionStorageToDomain(StorageDomain storageDomain, Guid vdsId, int type) { VDS vds = getVdsDao().get(vdsId); if (!isGlusterfsCliInstalled(vds)) { <START> log.error("Coulsn't <END> find glusterfs-cli package on vds (needed for connecting storage domain {}).", vds.getName(), storageDomain.getName()); StorageHelperBase.addMessageToAuditLog(AuditLogType.GLUSTERFS_CLI_PACKAGE_NOT_INSTALLED, null, vds.getName()); return new Pair<>(false, null); } return super.runConnectionStorageToDomain(storageDomain, vdsId, type); }</code><technical_language>s/Coulsn't/Couldn't</technical_language>

Target:
protected Pair<Boolean, EngineFault> runConnectionStorageToDomain(StorageDomain storageDomain, Guid vdsId, int type) { VDS vds = getVdsDao().get(vdsId); if (!isGlusterfsCliInstalled(vds)) { log.error("Couldn't find glusterfs-cli package on vds (needed for connecting storage domain {}).", vds.getName(), storageDomain.getName()); StorageHelperBase.addMessageToAuditLog(AuditLogType.GLUSTERFS_CLI_PACKAGE_NOT_INSTALLED, null, vds.getName()); return new Pair<>(false, null); } return super.runConnectionStorageToDomain(storageDomain, vdsId, type); }
Source:
<code>public void setConf(Configuration conf) { super.setConf(conf); <START> timeout = conf.getLong( <END> CommonConfigurationKeys.HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT, CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_DEFAULT); }</code><technical_language>Configuration#getTimeDuration() instead of Configuration#getLong newly added configuration key easier use</technical_language>

Target:
public void setConf(Configuration conf) { super.setConf(conf); if (conf != null) { timeout = conf.getTimeDuration( CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_SECS, CommonConfigurationKeys. HADOOP_SECURITY_GROUP_SHELL_COMMAND_TIMEOUT_SECS_DEFAULT, TimeUnit.SECONDS); } }
Source:
<code>protected void verifyPresentInDatastore(DataBundle data) { Map<String, AccountAttributes> accounts = data.accounts; for (AccountAttributes account : accounts.values()) { verifyPresentInDatastore(account); } Map<String, InstructorAttributes> instructors = data.instructors; for (InstructorAttributes instructor : instructors.values()) { verifyPresentInDatastore(instructor); } Map<String, CourseAttributes> courses = data.courses; for (CourseAttributes course : courses.values()) { if (!course.isCourseDeleted()) { <START> verifyPresentInDatastore(course); <END> } } Map<String, StudentAttributes> students = data.students; for (StudentAttributes student : students.values()) { verifyPresentInDatastore(student); } }</code><technical_language>Stream</technical_language>

Target:
protected void verifyPresentInDatastore(DataBundle data) { data.accounts.values().forEach(this::verifyPresentInDatastore); data.instructors.values().forEach(this::verifyPresentInDatastore); data.courses.values().stream() .filter(course -> !course.isCourseDeleted()) .forEach(this::verifyPresentInDatastore); data.students.values().forEach(this::verifyPresentInDatastore); }
Source:
<code>public boolean isRebuildAvailable() { Job project = getProject(); return project != null && project.hasPermission(Item.BUILD) && project.isBuildable() && project instanceof Queue.Task && !isMatrixRun() <START> && isAutoRebuildDisbaled(); <END> }</code><technical_language>name suggests return !isAutoRebuildDisbaled()</technical_language>

Target:
public boolean isRebuildAvailable() { Job project = getProject(); return project != null && project.hasPermission(Item.BUILD) && project.isBuildable() && project instanceof Queue.Task && !isMatrixRun() && !isRebuildDisbaled(); }
Source:
<code>public static void refreshAllFeeds(final Context context, final List<Feed> feeds) { <START> new Thread(() -> refreshAllFeedsSynchronously(context, feeds)).start(); <END> }</code><technical_language>right... executor service is a abstraction</technical_language>

Target:
public static void refreshAllFeeds(final Context context, final List<Feed> feeds) { refreshAllFeeds(context, feeds, null); }
Source:
<code>protected void validateFingerprint(SSHClient client, String fingerprint) { if (!fingerprint.equals(getFingerprint(client))) { <START> throw new AccessControlException("SSH Fingerprint of server " + getParameters().getServerName() <END> + " did not match expected fingerprint " + fingerprint); } }</code><technical_language>String.format this nicer</technical_language>

Target:
protected void validateFingerprint(SSHClient client, String fingerprint) { if (!fingerprint.equals(getFingerprint(client))) { throw new AccessControlException(String.format("SSH Fingerprint of server " + getParameters().getServerName() + " did not match expected fingerprint " + fingerprint)); } }
Source:
<code>public boolean addValidationParametersWithChecks(DiseaseOccurrence occurrence, boolean isGoldStandard) { if (isEligibleForValidation(occurrence)) { setDefaultParameters(occurrence); if (isGoldStandard) { addGoldStandardParameters(occurrence); <START> } else if (automaticModelRunsEnabled(occurrence) && !isCountryPoint(occurrence)) { <END> addValidationParameters(occurrence, null); } return true; } return false; }</code><technical_language>I this new clause in addValidationParameters(occurrence, raster) method itself, this method is called in places</technical_language>

Target:
public void addValidationParametersWithChecks(DiseaseOccurrence occurrence, boolean isGoldStandard) { if (isEligibleForValidation(occurrence)) { setDefaultParameters(occurrence); if (isGoldStandard) { addGoldStandardParameters(occurrence); } else if (automaticModelRunsEnabled(occurrence)) { addValidationParameters(occurrence); } } }
Source:
<code>public void execute(final String activeContextId, final EventHandler<AvroElasticMemoryMessage> callback) { final ActiveContext activeContext = activeContexts.remove(activeContextId); final boolean isSuccess; if (activeContext == null) { LOG.log(Level.WARNING, <START> "Trying to remove running task on active context {0}. Cannot find running task on it", activeContextId); <END> isSuccess = false; } else { serverContexts.remove(activeContext); activeContext.close(); final int remainingNumServers = runningServerContextCount.decrementAndGet(); LOG.log(Level.FINE, "Server has been deleted successfully. Remaining Servers: {0}", remainingNumServers); isSuccess = true; } sendCallback(activeContextId, callback, isSuccess); }</code><technical_language>activeContext registered activeContexts, event of ActiveContext happens. is mentioning running tasks? Furthermore, tasks submitted server-side contexts</technical_language>

Target:
public boolean execute(final String activeContextId, final EventHandler<AvroElasticMemoryMessage> callback) { final ActiveContext activeContext = activeContexts.remove(activeContextId); final boolean isSuccess; if (activeContext == null) { LOG.log(Level.WARNING, "Trying to remove active context {0}, which is not found", activeContextId); isSuccess = false; } else { serverContexts.remove(activeContext); activeContext.close(); final int remainingNumServers = runningServerContextCount.decrementAndGet(); LOG.log(Level.FINE, "Server has been deleted successfully. Remaining Servers: {0}", remainingNumServers); isSuccess = true; } sendCallback(activeContextId, callback, isSuccess); return isSuccess; }
Source:
<code>public ServiceTest(TOptions options) { super(options); String searchEndpoint = Configuration.getGlobalConfiguration().get("SEARCH_ENDPOINT"); if (CoreUtils.isNullOrEmpty(searchEndpoint)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_ENDPOINT"); System.exit(1); } String searchApiKey = Configuration.getGlobalConfiguration().get("SEARCH_API_KEY"); if (CoreUtils.isNullOrEmpty(searchApiKey)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_API_KEY"); System.exit(1); } SearchIndexClientBuilder builder = new SearchIndexClientBuilder() .endpoint(searchEndpoint) .credential(new AzureKeyCredential(searchApiKey)) .httpClient(new NettyAsyncHttpClientBuilder().build()); this.searchIndexAsyncClient = builder.buildAsyncClient(); Random random = new Random(); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < INDEX_NAME_LENGTH; i++) { stringBuilder.append(ALLOWED_INDEX_CHARACTERS.charAt(random.nextInt(ALLOWED_INDEX_CHARACTERS.length()))); } <START> this.indexName = stringBuilder.toString(); <END> this.searchClient = builder.buildClient().getSearchClient(this.indexName); this.searchAsyncClient = this.searchIndexAsyncClient.getSearchAsyncClient(this.indexName); }</code><technical_language>indexName generation logic optionally replaced this. java this.indexName = random.ints(0, ALLOWED_INDEX_CHARACTERS.length()) .limit(INDEX_NAME_LENGTH) .collect(StringBuilder::new, ((stringBuilder, value) -> stringBuilder.append(ALLOWED_INDEX_CHARACTERS.charAt(value))), StringBuilder::append) .toString();</technical_language>

Target:
public ServiceTest(TOptions options) { super(options); String searchEndpoint = Configuration.getGlobalConfiguration().get("SEARCH_ENDPOINT"); if (CoreUtils.isNullOrEmpty(searchEndpoint)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_ENDPOINT"); System.exit(1); } String searchApiKey = Configuration.getGlobalConfiguration().get("SEARCH_API_KEY"); if (CoreUtils.isNullOrEmpty(searchApiKey)) { System.out.printf(CONFIGURATION_ERROR, "SEARCH_API_KEY"); System.exit(1); } SearchIndexClientBuilder builder = new SearchIndexClientBuilder() .endpoint(searchEndpoint) .credential(new AzureKeyCredential(searchApiKey)) .httpClient(new NettyAsyncHttpClientBuilder() .proxy(new ProxyOptions(ProxyOptions.Type.HTTP, new InetSocketAddress("localhost", 8888))) .build()); this.searchIndexAsyncClient = builder.buildAsyncClient(); this.indexName = new Random().ints(INDEX_NAME_LENGTH, 0, ALLOWED_INDEX_CHARACTERS.length()) .mapToObj(ALLOWED_INDEX_CHARACTERS::charAt) .collect(StringBuilder::new, StringBuilder::append, StringBuilder::append) .toString(); this.searchClient = builder.buildClient().getSearchClient(this.indexName); this.searchAsyncClient = this.searchIndexAsyncClient.getSearchAsyncClient(this.indexName); }
Source:
<code><START> private static void warmCache( <END> TransactionService transactionService, TLongSet startTssToWarmingCache, TLongLongMap cache) { for (List<Long> longList : Iterables.partition(TDecorators.wrap(startTssToWarmingCache), TS_PER_BATCH)) { cache.putAll(transactionService.get(longList)); } }</code><technical_language>get rid of this try reuse cache instead. scope of this PR</technical_language>

Target:
private static void warmCache( TransactionService transactionService, TLongSet startTssToWarmingCache, TLongLongMap cache) { for (List<Long> longList : Iterables.partition(TDecorators.wrap(startTssToWarmingCache), AtlasDbConstants.TRANSACTION_TIMESTAMP_LOAD_BATCH_LIMIT)) { cache.putAll(transactionService.get(longList)); } }
Source:
<code>public Integer deleteSelectedCategories(String[] inodes) throws Exception { final WebContext ctx = WebContextFactory.get(); final HttpServletRequest request = ctx.getHttpServletRequest(); final User user = WebAPILocator.getUserWebAPI().getLoggedInUser(request); Integer catsWithDependencies = 0; for (String inode : inodes) { final Category catToDelete = categoryAPI.find(inode, user, false); try { categoryAPI.delete(catToDelete, user, false); } catch(DotSecurityException | DotDataException e) { catsWithDependencies++; Logger.error(this, "Error delete Category. Name: " + catToDelete.getCategoryName() + ". Error: " + e.getMessage()); } } if(catsWithDependencies>0) { <START> return 1; <END> } return 0; }</code><technical_language>is meaning of 1? I good a constant public static final int OK = 1; public static final int FAIL = 2;</technical_language>

Target:
public Integer deleteSelectedCategories(String[] inodes) throws Exception { final WebContext ctx = WebContextFactory.get(); final HttpServletRequest request = ctx.getHttpServletRequest(); final User user = WebAPILocator.getUserWebAPI().getLoggedInUser(request); int returnValue = ALL_CATEGORIES_DELETED; for (String inode : inodes) { final Category catToDelete = categoryAPI.find(inode, user, false); try { categoryAPI.delete(catToDelete, user, false); } catch(DotSecurityException | DotDataException e) { returnValue = SOME_CATEGORIES_DELETED; Logger.error(this, "Error delete Category. Name: " + catToDelete.getCategoryName() + ". Error: " + e.getMessage()); } } return returnValue; }
Source:
<code>public List<StudentAttributes> createStudents(String lines, String courseId) throws EnrollException { List<String> invalidityInfo = new ArrayList<>(); String[] linesArray = lines.split(Const.EOL); List<StudentAttributes> studentList = new ArrayList<>(); StudentAttributesFactory saf = new StudentAttributesFactory(linesArray[0]); for (int i = 1; i < linesArray.length; i++) { String line = linesArray[i]; String sanitizedLine = SanitizationHelper.sanitizeForHtml(line); if (StringHelper.isWhiteSpace(line)) { continue; } try { StudentAttributes student = saf.makeStudent(line, courseId); <START> if (!student.isValid()) { <END> String info = StringHelper.toString(SanitizationHelper.sanitizeForHtml(student.getInvalidityInfo()), "<br>" + Const.StatusMessages.ENROLL_LINES_PROBLEM_DETAIL_PREFIX + " "); invalidityInfo.add(String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, info)); } if (isStudentEmailDuplicated(student.email, studentList)) { String info = getInvalidityInfoInDuplicatedEmail(student.email, studentList, linesArray) + "<br>" + Const.StatusMessages.ENROLL_LINES_PROBLEM_DETAIL_PREFIX + " "; invalidityInfo.add(String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, info)); } studentList.add(student); } catch (EnrollException e) { String info = String.format(Const.StatusMessages.ENROLL_LINES_PROBLEM, sanitizedLine, e.getMessage()); invalidityInfo.add(info); } } if (!invalidityInfo.isEmpty()) { throw new EnrollException(StringHelper.toString(invalidityInfo, "<br>")); } return studentList; }</code><technical_language>SLAP this i.e. extract this a helper method addInvalidStudentInfo(List<String> invalidityInfo, StudentAttributes student, String sanitizedLine)</technical_language>

Target:
public List<StudentAttributes> createStudents(String lines, String courseId) throws EnrollException { List<String> invalidityInfo = new ArrayList<>(); String[] linesArray = lines.split(Const.EOL); List<StudentAttributes> studentList = new ArrayList<>(); StudentAttributesFactory saf = new StudentAttributesFactory(linesArray[0]); for (int i = 1; i < linesArray.length; i++) { String line = linesArray[i]; String sanitizedLine = SanitizationHelper.sanitizeForHtml(line); if (StringHelper.isWhiteSpace(line)) { continue; } try { StudentAttributes student = saf.makeStudent(line, courseId); if (!student.isValid()) { invalidityInfo.add(invalidStudentInfo(sanitizedLine, student)); } int duplicateEmailIndex = getDuplicateEmailIndex(student.email, studentList); if (duplicateEmailIndex != -1) { invalidityInfo.add(duplicateEmailInfo(sanitizedLine, linesArray[duplicateEmailIndex + 1])); } studentList.add(student); } catch (EnrollException e) { invalidityInfo.add(enrollExceptionInfo(sanitizedLine, e.getMessage())); } } if (!invalidityInfo.isEmpty()) { throw new EnrollException(StringHelper.toString(invalidityInfo, "<br>")); } return studentList; }
Source:
<code><START> public static boolean isRoute(URL url) { <END> return ROUTE_PROTOCOL.equals(url.getProtocol()) || ROUTERS_CATEGORY.equals(url.getParameter(Constants.CATEGORY_KEY, Constants.DEFAULT_CATEGORY)); }</code><technical_language>public static boolean isRoute(final URL url)</technical_language>

Target:
public static boolean isRoute(URL url) { return ROUTE_PROTOCOL.equals(url.getProtocol()) || ROUTERS_CATEGORY.equals(url.getParameter(CATEGORY_KEY, DEFAULT_CATEGORY)); }