auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Response postRequest(URI url, String payload, Map<String, String> headers, MediaType mediaType, String metricsPrefix) throws GatewayClientException, GatewayException, DownstreamException { Stopwatch responseTimeStopwatch = Stopwatch.createStarted(); Response response; try { logger.info("POSTing request for gateway url={}", url); Invocation.Builder clientBuilder = client.target(url.toString()).request(); headers.keySet().forEach(headerKey -> clientBuilder.header(headerKey, headers.get(headerKey))); response = clientBuilder.post(Entity.entity(payload, mediaType)); <START> throwIfErrorResponse(response, metricsPrefix); <END> } catch (Exception e) { metricRegistry.counter(metricsPrefix + ".failures").inc(); logger.error(format("Exception for gateway url=%s", url.toString()), e); throw new GatewayException(url.toString(), e); } finally { responseTimeStopwatch.stop(); metricRegistry.histogram(metricsPrefix + ".response_time").update(responseTimeStopwatch.elapsed(TimeUnit.MILLISECONDS)); } return response; }</code><technical_language>this move works. throwIfErrorResponse throws checked exceptions based response status (4xx,5xx) caught catch (Exception e) is desired. want throw exceptions payment provider deal them</technical_language>

Target:
public Response postRequest(URI url, String payload, Map<String, String> headers, MediaType mediaType, String metricsPrefix) throws GatewayClientException, GatewayException, DownstreamException { Stopwatch responseTimeStopwatch = Stopwatch.createStarted(); Response response; try { logger.info("POSTing request for gateway url={}", url); Invocation.Builder clientBuilder = client.target(url.toString()).request(); headers.keySet().forEach(headerKey -> clientBuilder.header(headerKey, headers.get(headerKey))); response = clientBuilder.post(Entity.entity(payload, mediaType)); } catch (Exception e) { metricRegistry.counter(metricsPrefix + ".failures").inc(); logger.error(format("Exception for gateway url=%s", url.toString()), e); throw new GatewayException(url.toString(), e); } finally { responseTimeStopwatch.stop(); metricRegistry.histogram(metricsPrefix + ".response_time").update(responseTimeStopwatch.elapsed(TimeUnit.MILLISECONDS)); } throwIfErrorResponse(response, metricsPrefix); return response; }
Source:
<code>private boolean isPausableMethod(Method pausableMethod) { Class<?> declaringClass = pausableMethod.getDeclaringClass(); <START> return (Pausable.class.isAssignableFrom(declaringClass) || Lifecycle.class.isAssignableFrom(declaringClass)) <END> && ReflectionUtils.findMethod(Pausable.class, pausableMethod.getName(), pausableMethod.getParameterTypes()) != null; }</code><technical_language>chances log special info Pausable methods considered candidates</technical_language>

Target:
private boolean isPausableMethod(Method pausableMethod) { Class<?> declaringClass = pausableMethod.getDeclaringClass(); boolean pausable = (Pausable.class.isAssignableFrom(declaringClass) || Lifecycle.class.isAssignableFrom(declaringClass)) && ReflectionUtils.findMethod(Pausable.class, pausableMethod.getName(), pausableMethod.getParameterTypes()) != null; if (pausable && this.logger.isTraceEnabled()) { this.logger.trace(pausableMethod + " is not considered a candidate method unless explicitly requested"); } return pausable; }
Source:
<code>public <T extends Annotation> T getAnnotation(Class<T> annotationType) { <START> return delegate.getAnnotation(annotationType); <END> }</code><technical_language>This method modified annotations set, i.e. like: for (Annotation annotation : getAnnotations()) { if (annotation.annotationType().equals(annotationType)) { return annotationType.cast(annotation); } } return null;</technical_language>

Target:
public <T extends Annotation> T getAnnotation(Class<T> annotationType) { for (Annotation annotation : annotations) { if (annotation.annotationType().equals(annotationType)) { return annotationType.cast(annotation); } } return null; }
Source:
<code>public void testRead() throws Exception { ByteBuf buf = Unpooled.buffer(16); buf.writeBytes(new byte[]{1, 2, 3, 4, 5, 6}); ByteBufInputStream in = new ByteBufInputStream(buf, 3); assertEquals(1, in.read()); assertEquals(2, in.read()); assertEquals(3, in.read()); assertEquals(-1, in.read()); assertEquals(-1, in.read()); <START> assertEquals(-1, in.read()); <END> ByteBuf buf2 = Unpooled.buffer(16); buf2.writeBytes(new byte[]{1, 2, 3, 4, 5, 6}); ByteBufInputStream in2 = new ByteBufInputStream(buf2, 4); assertEquals(1, in2.read()); assertEquals(2, in2.read()); assertEquals(3, in2.read()); assertEquals(4, in2.read()); assertNotEquals(5, in2.read()); assertEquals(-1, in2.read()); }</code><technical_language>Call buf.release() in.close()</technical_language>

Target:
public void testRead() throws Exception { ByteBuf buf = Unpooled.buffer(16); buf.writeBytes(new byte[]{1, 2, 3, 4, 5, 6}); ByteBufInputStream in = new ByteBufInputStream(buf, 3); assertEquals(1, in.read()); assertEquals(2, in.read()); assertEquals(3, in.read()); assertEquals(-1, in.read()); assertEquals(-1, in.read()); assertEquals(-1, in.read()); buf.release(); in.close(); ByteBuf buf2 = Unpooled.buffer(16); buf2.writeBytes(new byte[]{1, 2, 3, 4, 5, 6}); ByteBufInputStream in2 = new ByteBufInputStream(buf2, 4); assertEquals(1, in2.read()); assertEquals(2, in2.read()); assertEquals(3, in2.read()); assertEquals(4, in2.read()); assertNotEquals(5, in2.read()); assertEquals(-1, in2.read()); buf2.release(); in2.close(); }
Source:
<code>public synchronized ExtendedLogEntry getEntryX() { <START> ExtendedLogEntry current = (ExtendedLogEntry) entry; entry = null; return current; <END> }</code><technical_language>This able check if logs.size > 0 remove element return</technical_language>

Target:
public synchronized ExtendedLogEntry getEntryX() throws InterruptedException { return getEntryX(20000); }
Source:
<code>public static boolean deleteVM(String hostIpPort, String id) { String ret = null; URL url = null; try { CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL)); url = new URL("http://" + hostIpPort + "/compute/" + id); } catch (MalformedURLException e) { <START> e.printStackTrace(); <END> } HttpURLConnection httpURLConnection = null; DataInputStream in = null; try { httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("DELETE"); httpURLConnection.setRequestProperty("Content-Type", "text/occi"); httpURLConnection.setRequestProperty("Accept", "* } } if (httpURLConnection != null) { httpURLConnection.disconnect(); } } return ("OK".equalsIgnoreCase(ret)); }</code><technical_language>Throw a target exception</technical_language>

Target:
public static boolean deleteVM(String hostIpPort, String id) throws TargetException { String ret = null; URL url = null; try { CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL)); url = new URL("http://" + hostIpPort + "/compute/" + id); } catch (MalformedURLException e) { throw new TargetException(e); } HttpURLConnection httpURLConnection = null; DataInputStream in = null; try { httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("DELETE"); httpURLConnection.setRequestProperty("Content-Type", "text/occi"); httpURLConnection.setRequestProperty("Accept", "*/*"); in = new DataInputStream(httpURLConnection.getInputStream()); ByteArrayOutputStream out = new ByteArrayOutputStream(); Utils.copyStreamSafely(in, out); ret = out.toString(); } catch (IOException e) { throw new TargetException(e); } finally { Utils.closeQuietly(in); if (httpURLConnection != null) { httpURLConnection.disconnect(); } } return ("OK".equalsIgnoreCase(ret)); }
Source:
<code><START> public BatchUpdate addRefUpdate(ReceiveCommand cmd) { <END> batchRefUpdate.addCommand(cmd); return this; }</code><technical_language>initRepository() needs called too</technical_language>

Target:
public BatchUpdate addRefUpdate(ReceiveCommand cmd) { getBatchRefUpdate().addCommand(cmd); return this; }
Source:
<code>public RoutingTableSnapshot(RoutingTable routingTable) { _routingTable = routingTable; <START> _propertyType = routingTable.getPropertyType(); <END> _customizedStateType = routingTable.getCustomizedStateType(); }</code><technical_language>routingTable, is necessary private fields</technical_language>

Target:
public RoutingTableSnapshot(RoutingTable routingTable) { _routingTable = routingTable; _propertyType = routingTable.getPropertyType(); _stateType = routingTable.getStateType(); }
Source:
<code><START> private List<PrometheusMetric> scrapeBean(MBeanServer beanServer, ObjectName beanName, Map<ObjectName, LinkedHashMap<String, String>> keyPropertiesPerBean) { <END> try { MBeanInfo beanInfo = beanServer.getMBeanInfo(beanName); MBeanAttributeInfo[] beanAttributes = beanInfo.getAttributes(); Map<String, MBeanAttributeInfo> attributeMap = new HashMap<>(); for (MBeanAttributeInfo attribute : beanAttributes) { if (attribute.isReadable()) { attributeMap.put(attribute.getName(), attribute); } } AttributeList attributes = beanServer.getAttributes(beanName, attributeMap.keySet().toArray(new String[0])); List<PrometheusMetric> metrics = new ArrayList<>(); for (Attribute attribute : attributes.asList()) { MBeanAttributeInfo attributeInfo = attributeMap.get(attribute.getName()); PrometheusMetric metric = processBeanValue(toSnakeAndLowerCase(beanName.getDomain()), toSnakeAndLowerCase(attributeInfo.getName()), attributeInfo.getDescription(), attribute.getValue(), getKeyPropertyList(keyPropertiesPerBean, beanName)); if (metric != null) { metrics.add(metric); } } return metrics; } catch (ReflectionException | IntrospectionException | InstanceNotFoundException e) { LOGGER.error("Error in scraping bean - " + beanName.toString()); } return Collections.emptyList(); }</code><technical_language>fix formatting (length)</technical_language>

Target:
private List<PrometheusMetric> scrapeBean(MBeanServer beanServer, ObjectName beanName, Map<ObjectName, LinkedHashMap<String, String>> keyPropertiesPerBean) { try { MBeanInfo beanInfo = beanServer.getMBeanInfo(beanName); MBeanAttributeInfo[] beanAttributes = beanInfo.getAttributes(); Map<String, MBeanAttributeInfo> attributeMap = new HashMap<>(); for (MBeanAttributeInfo attribute : beanAttributes) { if (attribute.isReadable()) { attributeMap.put(attribute.getName(), attribute); } } AttributeList attributes = beanServer.getAttributes(beanName, attributeMap.keySet().toArray(new String[0])); List<PrometheusMetric> metrics = new ArrayList<>(); for (Attribute attribute : attributes.asList()) { MBeanAttributeInfo attributeInfo = attributeMap.get(attribute.getName()); PrometheusMetric metric = processBeanValue(toSnakeAndLowerCase(beanName.getDomain()), toSnakeAndLowerCase(attributeInfo.getName()), attributeInfo.getDescription(), attribute.getValue(), getKeyPropertyList(keyPropertiesPerBean, beanName)); if (metric != null) { metrics.add(metric); } } return metrics; } catch (ReflectionException | IntrospectionException | InstanceNotFoundException e) { LOGGER.error("Error in scraping bean - " + beanName.toString(), e); } return Collections.emptyList(); }
Source:
<code>public XWikiAttachment set(XWikiAttachment attachment) { XWikiAttachment ret = map.put(attachment.getFilename(), attachment); this.list = new ArrayList<XWikiAttachment>(map.values()); <START> added(ret); <END> onUpdate(); return ret; }</code><technical_language>modifying wrong instance, added Map is attachment</technical_language>

Target:
public XWikiAttachment set(XWikiAttachment attachment) { XWikiAttachment put = map.put(attachment.getFilename(), attachment); if (put != attachment) { added(attachment); updatedMap(); } return put; }
Source:
<code>protected DatastaxCassandraOrganisationStore(Session session, ConsistencyLevel writeConsistency, ConsistencyLevel readConsistency) { this.session = checkNotNull(session); this.readConsistency = checkNotNull(readConsistency); this.serializer = new OrganisationSerializer(); this.writeConsistency = checkNotNull(writeConsistency); RegularStatement statement = select().all() .from(ORGANISATION_TABLE) <START> .where(in(PRIMARY_KEY_COLUMN, bindMarker("keys"))); <END> statement.setFetchSize(Integer.MAX_VALUE); selectStatement = session.prepare(statement); rowUpdate = session.prepare(update(ORGANISATION_TABLE) .where(eq(PRIMARY_KEY_COLUMN, bindMarker("organisationId"))) .with(set(DATA_COLUMN, bindMarker("data")))) .setConsistencyLevel(writeConsistency); }</code><technical_language>bind markers magic strings. Extract constants</technical_language>

Target:
protected DatastaxCassandraOrganisationStore(Session session, ConsistencyLevel writeConsistency, ConsistencyLevel readConsistency) { this.session = checkNotNull(session); this.readConsistency = checkNotNull(readConsistency); this.serializer = new OrganisationSerializer(); this.writeConsistency = checkNotNull(writeConsistency); RegularStatement statement = select().all() .from(ORGANISATION_TABLE) .where(in(PRIMARY_KEY_COLUMN, bindMarker(KEYS))); statement.setFetchSize(Integer.MAX_VALUE); selectStatement = session.prepare(statement); rowUpdate = session.prepare(update(ORGANISATION_TABLE) .where(eq(PRIMARY_KEY_COLUMN, bindMarker(ORGANISATION_ID))) .with(set(DATA_COLUMN, bindMarker(DATA)))) .setConsistencyLevel(writeConsistency); }
Source:
<code>public void close() throws IOException { for (OperationController oc : ocList) { <START> oc.close(); <END> } }</code><technical_language>havnet OperationController code yet. is close() idempotent. do wanna isRunning aotmic variable avoid calling close if triggered</technical_language>

Target:
public void close() { if (isOpen.compareAndSet(true, false)) { logger.info("Closing down the router"); for (OperationController oc : ocList) { oc.shutdown(); } } }
Source:
<code>private void handleBinderVariables(KItem kItem, boolean add) { if (!(kItem.kLabel() instanceof KLabel) || !(kItem.kList() instanceof KList)) { return; } <START> assert kItem.kLabel() instanceof KLabel : "KLabel variables are not supported"; <END> assert kItem.kList() instanceof KList : "KList must be concrete"; KLabel kLabel = (KLabel) kItem.kLabel(); KList kList = (KList) kItem.kList(); if (kLabel instanceof KLabelConstant) { KLabelConstant kLabelConstant = (KLabelConstant) kLabel; if (kLabelConstant.isBinder()) { Multimap<Integer, Integer> binderMap = kLabelConstant.getBinderMap(); for (Integer keyIndex : binderMap.keySet()) { if (add) { boundVariables.add(kList.get(keyIndex)); } else { boundVariables.remove(kList.get(keyIndex)); } } } } }</code><technical_language>lines needed? unreachable</technical_language>

Target:
private void handleBinderVariables(KItem kItem, boolean add) { if (!(kItem.kLabel() instanceof KLabel) || !(kItem.kList() instanceof KList)) { return; } KLabel kLabel = (KLabel) kItem.kLabel(); KList kList = (KList) kItem.kList(); if (kLabel instanceof KLabelConstant) { KLabelConstant kLabelConstant = (KLabelConstant) kLabel; if (kLabelConstant.isBinder()) { Multimap<Integer, Integer> binderMap = kLabelConstant.getBinderMap(); for (Integer keyIndex : binderMap.keySet()) { if (add) { boundVariables.add(kList.get(keyIndex)); } else { boundVariables.remove(kList.get(keyIndex)); } } } } }
Source:
<code>public void testServiceAnnouncement() throws Exception { curator.start(); List<String> serviceNames = ImmutableList.of( "druid/overlord", "druid/coordinator", "druid/firehose/tranquility_test-50-0000-0000" ); final ServiceDiscovery serviceDiscovery = createAndAnnounceServices(serviceNames); Assert.assertTrue( Iterators.all( serviceNames.iterator(), new Predicate<String>() { @Override public boolean apply(String input) { try { return serviceDiscovery.queryForInstances(input.replaceAll("/", ":")).size() == 1; } catch (Exception e) { <START> e.printStackTrace(); <END> throw new ISE( "Something went wrong while finding instance with name [%s] in Service Discovery", input ); } } } ) ); }</code><technical_language>remove this add e ISE instead</technical_language>

Target:
public void testServiceAnnouncement() throws Exception { curator.start(); List<String> serviceNames = ImmutableList.of( "druid/overlord", "druid/coordinator", "druid/firehose/tranquility_test-50-0000-0000" ); final ServiceDiscovery serviceDiscovery = createAndAnnounceServices(serviceNames); Assert.assertTrue( Iterators.all( serviceNames.iterator(), new Predicate<String>() { @Override public boolean apply(String input) { try { return serviceDiscovery.queryForInstances(input.replaceAll("/", ":")).size() == 1; } catch (Exception e) { throw new ISE( "Something went wrong while finding instance with name [%s] in Service Discovery", input ); } } } ) ); }
Source:
<code>public List<T> getPossible(MediaType accept, Class<?> type) { List<T> cached = null; CachedMediaTypeAndClass cacheEntry = null; if (useCache) <START> { <END> cacheEntry = new CachedMediaTypeAndClass(type, accept); if (classCache != null) { cached = classCache.get(cacheEntry); if (cached != null) return cached; } } accept = new MediaType(accept.getType().toLowerCase(), accept.getSubtype().toLowerCase(), accept.getParameters()); List<Entry<T>> matches = new ArrayList<Entry<T>>(); if (accept.isWildcardType()) { matches.addAll(everything); } else { SubtypeMap<T> indexed = index.get(accept.getType()); if (indexed != null) { matches.addAll(indexed.getPossible(accept)); } matches.addAll(wildcards); } Collections.sort(matches, new TypedEntryComparator(type)); cached = convert(matches); if (useCache) { Map<CachedMediaTypeAndClass, List<T>> cache = classCache; if (cache == null) { synchronized (this) { if (classCache == null) { classCache = new ConcurrentHashMap<>(); } cache = classCache; } } cache.put(cacheEntry, cached); } return cached; }</code><technical_language>is this line moved out of check block</technical_language>

Target:
public List<T> getPossible(MediaType accept, Class<?> type) { List<T> cached = null; CachedMediaTypeAndClass cacheEntry = null; if (useCache) { cacheEntry = new CachedMediaTypeAndClass(type, accept); if (classCache != null) { cached = classCache.get(cacheEntry); if (cached != null) return cached; } } accept = new MediaType(accept.getType().toLowerCase(), accept.getSubtype().toLowerCase(), accept.getParameters()); List<Entry<T>> matches = new ArrayList<Entry<T>>(); if (accept.isWildcardType()) { matches.addAll(everything); } else { SubtypeMap<T> indexed = index.get(accept.getType()); if (indexed != null) { matches.addAll(indexed.getPossible(accept)); } matches.addAll(wildcards); } Collections.sort(matches, new TypedEntryComparator(type)); cached = convert(matches); if (useCache) { Map<CachedMediaTypeAndClass, List<T>> cache = classCache; if (cache == null) { synchronized (this) { if (classCache == null) { classCache = new HashMap<>(); } cache = classCache; } } cache.put(cacheEntry, cached); } return cached; }
Source:
<code>default void setEnterMessage(@Nullable Text message) { <START> setEnterMessage(message, null); <END> }</code><technical_language>above, pass ChatTypes.CHAT instead of null</technical_language>

Target:
default void setEnterMessage(@Nullable Text message) { setEnterMessage(message, ChatTypes.CHAT); }
Source:
<code>public OkCancelShell(String text) { <START> super(ShellLookup.getInstance().getShell(text)); <END> }</code><technical_language>call super(text), applies for constructor matchers, empty</technical_language>

Target:
public OkCancelShell(String text) { super(text); }
Source:
<code>public SyncPoller<OperationResult, CustomFormModel> beginTraining(String trainingFilesUrl, boolean useTrainingLabels, <START> TrainModelOptions trainModelOptions, Duration pollInterval) { <END> return client.beginTraining(trainingFilesUrl, useTrainingLabels, null, pollInterval).getSyncPoller(); }</code><technical_language>merge lines in</technical_language>

Target:
public SyncPoller<OperationResult, CustomFormModel> beginTraining(String trainingFilesUrl, boolean useTrainingLabels, TrainModelOptions trainModelOptions, Duration pollInterval) { return client.beginTraining(trainingFilesUrl, useTrainingLabels, trainModelOptions, pollInterval) .getSyncPoller(); }
Source:
<code>private OvfDataUpdater(){ <START> SchedulerUtil scheduler = SchedulerUtilQuartzImpl.getInstance(); <END> scheduler.scheduleAFixedDelayJob(this, "ovfUpdate_timer", new Class[] {}, new Object[] {}, Config.<Integer> GetValue(ConfigValues.OvfUpdateIntervalInMinutes), Config.<Integer> GetValue(ConfigValues.OvfUpdateIntervalInMinutes), TimeUnit.SECONDS); }</code><technical_language>I prefer move this init method</technical_language>

Target:
private OvfDataUpdater(){ vmsAndTemplateMetadata = new HashMap<Guid, KeyValuePairCompat<String, List<Guid>>>(ITEMS_COUNT_PER_UPDATE); proccessedIdsInfo = new ArrayList<Guid>(); proccessedOvfGenerationsInfo = new ArrayList<Long>(); ovfManager = new OvfManager(); }
Source:
<code>public SelectorBuilder builder() { <START> return null; <END> }</code><technical_language>a good idea test ;P</technical_language>

Target:
public SelectorBuilder builder() { SelectorBuilder builder = Selectors.builder(getType()); builder.add(getArguments()); return builder; }
Source:
<code>public static EvaluationView toView(Evaluation evaluation) { EvaluationView evaluationView = new EvaluationView(); try { BeanUtils.copyProperties(evaluationView, evaluation); } catch (IllegalAccessException | InvocationTargetException ex) { throw new OpenStorefrontRuntimeException(ex); } Service service = ServiceProxyFactory.getServiceProxy(); evaluationView.setComponentName(service.getComponentService().getComponentName(evaluation.getComponentId())); if (StringUtils.isBlank(evaluationView.getComponentName())) { evaluationView.setComponentName(service.getComponentService().getComponentName(evaluation.getOriginComponentId())); } evaluationView.setWorkflowStatusDescription(TranslateUtil.translate(WorkflowStatus.class, evaluation.getWorkflowStatus())); ComponentIntegrationConfig integrationExample = new ComponentIntegrationConfig(); integrationExample.setActiveStatus(ACTIVE_STATUS); integrationExample.setComponentId(evaluation.getOriginComponentId()); ComponentIntegrationConfig integration = integrationExample.find(); <START> if(integration != null && integration.getIntegrationType().equals("JIRA")) <END> { evaluationView.setIssueNumber(integration.getIssueNumber()); String url = MessageFormat.format("{0}/browse/{1}", PropertiesManager.getInstance().getValue("jira.server.url"),integration.getIssueNumber()); evaluationView.setIntegrationUrl(url); } return evaluationView; }</code><technical_language>"JIRA" constant IntegrationType.JIRA</technical_language>

Target:
public static EvaluationView toView(Evaluation evaluation) { return toView(evaluation, new HashMap<>()); }
Source:
<code>public LogServlet(Config cfg, Renderer renderer, Linkifier linkifier) { super(cfg, renderer); this.linkifier = checkNotNull(linkifier, "linkifier"); <START> String tn = cfg.getString("gitiles", "template", "log"); <END> this.template_name = (tn == null) ? "gitiles.logDetail" : tn; }</code><technical_language>gitiles.logTemplate more idiomatic, component is free-form. String tn = cfg.getString("gitiles", null, "logTemplate"); put [gitiles] logtemplate = foo in gerrit.config</technical_language>

Target:
public LogServlet(Config cfg, Renderer renderer, Linkifier linkifier) { super(cfg, renderer); this.linkifier = checkNotNull(linkifier, "linkifier"); String tn = cfg.getString("gitiles", null, "logTemplate"); this.template_name = (tn == null) ? "gitiles.logDetail" : tn; }
Source:
<code>public void explicitCastReturnValueParentToChild() throws Throwable { MethodHandle mh = explicitCastReturnValueFromIdentity(Parent.class, Child.class); try { Child c = (Child) mh.invokeExact(new Parent()); <START> } catch (ClassCastException expected) { <END> } }</code><technical_language>missing fail(); this line</technical_language>

Target:
public void explicitCastReturnValueParentToChild() throws Throwable { MethodHandle mh = explicitCastReturnValueFromIdentity(Parent.class, Child.class); try { Child c = (Child) mh.invokeExact(new Parent()); fail("Expected CCE"); } catch (ClassCastException expected) }
Source:
<code>public void testContainerWithHostConfig() throws Exception { assumeTrue("Docker API should be at least v1.18 to support Container Creation with " + "HostConfig, got " + sut.version().apiVersion(), versionCompare(sut.version().apiVersion(), "1.18") >= 0); sut.pull(BUSYBOX_LATEST); final boolean privileged = true; final boolean publishAllPorts = true; final String dns = "1.2.3.4"; final HostConfig expected = HostConfig.builder() .privileged(privileged) .publishAllPorts(publishAllPorts) .dns(dns) .cpuShares((long) 4096) <START> .cpuQuota((long) 50000) <END> .build(); final ContainerConfig config = ContainerConfig.builder() .image(BUSYBOX_LATEST) .hostConfig(expected) .build(); final String name = randomName(); final ContainerCreation creation = sut.createContainer(config, name); final String id = creation.id(); sut.startContainer(id); final HostConfig actual = sut.inspectContainer(id).hostConfig(); assertThat(actual.privileged(), equalTo(expected.privileged())); assertThat(actual.publishAllPorts(), equalTo(expected.publishAllPorts())); assertThat(actual.dns(), equalTo(expected.dns())); }</code><technical_language>For this test meaningful, inspect container this right? I do for cpuShares above</technical_language>

Target:
public void testContainerWithHostConfig() throws Exception { assumeTrue("Docker API should be at least v1.18 to support Container Creation with " + "HostConfig, got " + sut.version().apiVersion(), versionCompare(sut.version().apiVersion(), "1.18") >= 0); sut.pull(BUSYBOX_LATEST); final boolean privileged = true; final boolean publishAllPorts = true; final String dns = "1.2.3.4"; final HostConfig expected = HostConfig.builder() .privileged(privileged) .publishAllPorts(publishAllPorts) .dns(dns) .cpuShares((long) 4096) .build(); final ContainerConfig config = ContainerConfig.builder() .image(BUSYBOX_LATEST) .hostConfig(expected) .build(); final String name = randomName(); final ContainerCreation creation = sut.createContainer(config, name); final String id = creation.id(); sut.startContainer(id); final HostConfig actual = sut.inspectContainer(id).hostConfig(); assertThat(actual.privileged(), equalTo(expected.privileged())); assertThat(actual.publishAllPorts(), equalTo(expected.publishAllPorts())); assertThat(actual.dns(), equalTo(expected.dns())); assertThat(actual.cpuShares(), equalTo(expected.cpuShares())); }
Source:
<code>private static void validatePrincipalParameter(Method method) { Parameter[] parameters = method.getParameters(); if (!isAuth(method)) { for (Parameter parameter : parameters) { if (parameter.isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( "@Principal can be used only for parameter of @Auth method"); } } } if (method.getParameterCount() == 2) { if (parameters[0].isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( <START> "@Principal cannot be the first parameter if parameters count equals 2"); <END> } if (!parameters[1].isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( "The second parameter can be only @Principal (optional)"); } } }</code><technical_language>suggestion "@Principal parameter method parameters");</technical_language>

Target:
private static void validatePrincipalParameter(Method method) { Parameter[] parameters = method.getParameters(); if (!isAuth(method)) { for (Parameter parameter : parameters) { if (parameter.isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( "@Principal can be used only for parameter of @Auth method"); } } } if (method.getParameterCount() == 2) { if (parameters[0].isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( "@Principal cannot be the first parameter on method with two parameters"); } if (!parameters[1].isAnnotationPresent(Principal.class)) { throw new UnsupportedOperationException( "The second parameter can be only @Principal (optional)"); } } }
Source:
<code>public Object createWidget(final MUIElement element, Object parent) { if (!(element instanceof MPart) || !(parent instanceof Composite)) { return null; } final MPart part = (MPart) element; IEclipseContext localContext = part.getContext(); Widget parentWidget = (Widget) parent; <START> Composite partComposite = localContext.get(Composite.class); <END> if (partComposite == null) { final Composite newComposite = new Composite((Composite) parentWidget, SWT.NONE) { private boolean beingFocused = false; @Override public boolean setFocus() { if (!beingFocused) { try { beingFocused = true; Object object = part.getObject(); if (object != null && isEnabled()) { IPresentationEngine pe = part.getContext().get(IPresentationEngine.class); pe.focusGui(part); return true; } return super.setFocus(); } finally { beingFocused = false; } } return true; } }; newComposite.setLayout(new FillLayout(SWT.VERTICAL)); partComposite = newComposite; } bindWidget(element, partComposite); localContext.set(Composite.class, partComposite); IContributionFactory contributionFactory = localContext.get(IContributionFactory.class); Object newPart = contributionFactory.create(part.getContributionURI(), localContext); part.setObject(newPart); return partComposite; }</code><technical_language>I understand this situation? getLocal()? do need reparent existing partComposite parentWidget</technical_language>

Target:
public Object createWidget(final MUIElement element, Object parent) { if (!(element instanceof MPart) || !(parent instanceof Composite)) { return null; } final MPart part = (MPart) element; IEclipseContext localContext = part.getContext(); Widget parentWidget = (Widget) parent; Composite partComposite = localContext.getLocal(Composite.class); if (partComposite == null) { final Composite newComposite = new Composite((Composite) parentWidget, SWT.NONE) { private boolean beingFocused = false; @Override public boolean setFocus() { if (!beingFocused) { try { beingFocused = true; Object object = part.getObject(); if (object != null && isEnabled()) { IPresentationEngine pe = part.getContext().get(IPresentationEngine.class); pe.focusGui(part); return true; } return super.setFocus(); } finally { beingFocused = false; } } return true; } }; newComposite.setLayout(new FillLayout(SWT.VERTICAL)); partComposite = newComposite; } bindWidget(element, partComposite); localContext.set(Composite.class, partComposite); IContributionFactory contributionFactory = localContext.get(IContributionFactory.class); Object newPart = contributionFactory.create(part.getContributionURI(), localContext); part.setObject(newPart); return partComposite; }
Source:
<code>public void registerTransformers(SubsystemTransformerRegistration registration) { ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(registration.getCurrentSubsystemVersion()); buildTransformers_3_0(chainedBuilder.createBuilder(VERSION_3_0, VERSION_2_0)); buildTransformers_2_0(chainedBuilder.createBuilder(VERSION_2_0, VERSION_1_0)); <START> <END> chainedBuilder.buildAndRegister(registration, new ModelVersion[]{ VERSION_3_0, VERSION_2_0 }); }</code><technical_language>correct, version chain oldest newest ("current version excluded"). be: chainedBuilder.buildAndRegister(registration, new ModelVersion[]{ VERSION_2_0, VERSION_3_0 });</technical_language>

Target:
public void registerTransformers(SubsystemTransformerRegistration registration) { ChainedTransformationDescriptionBuilder chainedBuilder = TransformationDescriptionBuilder.Factory.createChainedSubystemInstance(registration.getCurrentSubsystemVersion()); buildTransformers_2_0(chainedBuilder.createBuilder(registration.getCurrentSubsystemVersion(), VERSION_2_0)); chainedBuilder.buildAndRegister(registration, new ModelVersion[]{VERSION_2_0}); }
Source:
<code>private static void checkAddress(long address, long offset) { if (!trace) return; Long blockSize = allocatedBlocks.get(address); if (blockSize == null || blockSize < offset) { throw new IllegalArgumentException(String.format("Trying to access address 0x%016x+%d, but blockSize was %s", <START> address, offset, blockSize)); <END> } }</code><technical_language>..block size %d</technical_language>

Target:
private static void checkAddress(long address, long offset) { if (!trace) return; Long blockSize = allocatedBlocks.get(address); if (blockSize == null || blockSize < offset) { throw new IllegalArgumentException(String.format("Trying to access address 0x%016x+%d, but blockSize was %d", address, offset, blockSize)); } }
Source:
<code>public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { final View layout = inflater.inflate(R.layout.signup_bottom_sheet_dialog, container, false); Button termsOfServiceText = layout.findViewById(R.id.signup_tos); termsOfServiceText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mSignupSheetListener.onSignupSheetTermsOfServiceClicked(); } }); termsOfServiceText.setText(Html.fromHtml(String.format( getDialog() .getContext() .getResources() .getString(R.string.signup_terms_of_service_text), "<u>", "</u>"))); Button signupWithEmailButton = layout.findViewById(R.id.signup_email); signupWithEmailButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mSignupSheetListener.onSignupSheetEmailClicked(); } }); Button signupWithGoogleButton = layout.findViewById(R.id.signup_google); signupWithGoogleButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mSignupSheetListener.onSignupSheetGoogleClicked(); } }); Dialog dialog = getDialog(); if (dialog != null) { dialog.setOnDismissListener(new DialogInterface.OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { <START> mSignupSheetListener.onSignupSheetCanceled(); <END> } }); dialog.setContentView(layout); final BottomSheetBehavior behavior = BottomSheetBehavior.from((View) layout.getParent()); dialog.setOnShowListener(new OnShowListener() { @Override public void onShow(DialogInterface dialog) { behavior.setPeekHeight(layout.getHeight()); } }); } return super.onCreateView(inflater, container, savedInstanceState); }</code><technical_language>this call is duplicated - invoke callback in public void onDismiss(DialogInterface dialog). Is this intentional</technical_language>

Target:
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.signup_bottom_sheet_dialog, container); }
Source:
<code>protected boolean extractGuide(long guideTime) { int defaultStationID = Long.toString(providerID).hashCode(); if (defaultStationID > 0) defaultStationID *= -1; boolean[] didAdd = new boolean[1]; MMC mmc = MMC.getInstance(); CaptureDeviceInput cdi = mmc.getInputForProvider(providerID); if (cdi == null) return true; if (cdi.getType() == CaptureDeviceInput.DIGITAL_TUNER_CROSSBAR_INDEX) { EPG.getInstance().setLineup(providerID, new java.util.HashMap<Integer, String[]>()); <START> EPG.getInstance().setServiceLevels(providerID, new java.util.HashMap<Long, Integer>()); <END> return true; } int minChan = cdi.getMinChannel(); int maxChan = cdi.getMaxChannel(); if ((cdi.getType() != 1 || cdi.weirdRF()) && Sage.getBoolean("epg/dont_create_full_channel_list_for_non_tuner_inputs", true)) { maxChan = minChan; } java.util.HashMap<Integer, String[]> lineMap = new java.util.HashMap<Integer, String[]>(); for (int i = minChan; i <= maxChan; i++) { wiz.addChannel(cdi.getCrossName(), name, null, defaultStationID + i, 0, didAdd); if (didAdd[0]) wiz.resetAirings(defaultStationID + i); lineMap.put(new Integer(defaultStationID + i), new String[] { Integer.toString(i) }); } EPG.getInstance().setLineup(providerID, lineMap); EPG.getInstance().setServiceLevels(providerID, new java.util.HashMap<Long, Integer>()); return true; }</code><technical_language>EPG.java change, this Integer, Integer map</technical_language>

Target:
protected boolean extractGuide(long guideTime) { int defaultStationID = Long.toString(providerID).hashCode(); if (defaultStationID > 0) defaultStationID *= -1; boolean[] didAdd = new boolean[1]; MMC mmc = MMC.getInstance(); CaptureDeviceInput cdi = mmc.getInputForProvider(providerID); if (cdi == null) return true; if (cdi.getType() == CaptureDeviceInput.DIGITAL_TUNER_CROSSBAR_INDEX) { EPG.getInstance().setLineup(providerID, new java.util.HashMap<Integer, String[]>()); EPG.getInstance().setServiceLevels(providerID, new java.util.HashMap<Integer, Integer>()); return true; } int minChan = cdi.getMinChannel(); int maxChan = cdi.getMaxChannel(); if ((cdi.getType() != 1 || cdi.weirdRF()) && Sage.getBoolean("epg/dont_create_full_channel_list_for_non_tuner_inputs", true)) { maxChan = minChan; } java.util.HashMap<Integer, String[]> lineMap = new java.util.HashMap<Integer, String[]>(); for (int i = minChan; i <= maxChan; i++) { wiz.addChannel(cdi.getCrossName(), name, null, defaultStationID + i, 0, didAdd); if (didAdd[0]) wiz.resetAirings(defaultStationID + i); lineMap.put(new Integer(defaultStationID + i), new String[] { Integer.toString(i) }); } EPG.getInstance().setLineup(providerID, lineMap); EPG.getInstance().setServiceLevels(providerID, new java.util.HashMap<Integer, Integer>()); return true; }
Source:
<code>private static Area offsetIntersection(final ObsContext ctx, final Set<Offset> offsets) { final double t = ctx.getPositionAngle().toRadians(); return offsets.stream().map(pos -> { final double p = pos.p().toArcsecs().getMagnitude(); final double q = pos.q().toArcsecs().getMagnitude(); final AffineTransform xform = new AffineTransform(); <START> if (t != 0.0) xform.rotate(-t); <END> xform.translate(-p, -q); return patrolField.getArea().createTransformedArea(xform); }).reduce(patrolField.getArea(), (a1, a2) -> { a1.intersect(a2); return a1; }); }</code><technical_language>This slightly clearer if position angle if (pa != PositionAngle.zero) xform.rotate(-pa.toRadians)</technical_language>

Target:
private static Area offsetIntersection(final ObsContext ctx, final Set<Offset> offsets) { final edu.gemini.spModel.core.Angle pa = ctx.getPositionAngle(); return offsets.stream().map(pos -> { final double p = pos.p().toArcsecs().getMagnitude(); final double q = pos.q().toArcsecs().getMagnitude(); final AffineTransform xform = new AffineTransform(); if (!pa.equals(Angle$.MODULE$.zero())) xform.rotate(-pa.toRadians()); xform.translate(-p, -q); return patrolField.getArea().createTransformedArea(xform); }).reduce((a1, a2) -> { final Area result = (Area) a1.clone(); result.intersect(a2); return result; }).orElse(patrolField.getArea()); }
Source:
<code>protected String createHttpRequestURL() { String bugUrl = getUrlSuffix(); if (bugUrl.length() > 0 && authenticationRequired) { RepositoryLocation location = getClient().getLocation(); <START> if (Boolean.parseBoolean(location.getProperty(IBugzillaRestConstants.REPOSITORY_USE_API_KEY))) { <END> bugUrl += MessageFormat.format("{1}Bugzilla_api_key={0}", new Object[] { location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY), bugUrl.endsWith("?") ? "" : "&" }); } else { if (!bugUrl.endsWith("?")) { bugUrl += "&"; } UserCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } bugUrl += MessageFormat.format("Bugzilla_login={0}&Bugzilla_password={1}", new Object[] { credentials.getUserName(), credentials.getPassword() }); } } return baseUrl() + bugUrl; }</code><technical_language>RepositoryLocation a getBooleanProperty method is nullsafe want</technical_language>

Target:
protected String createHttpRequestURL() { String bugUrl = getUrlSuffix(); if (bugUrl.length() > 0 && authenticationRequired) { RepositoryLocation location = getClient().getLocation(); if (location.getBooleanPropery(IBugzillaRestConstants.REPOSITORY_USE_API_KEY)) { bugUrl += MessageFormat.format("{1}Bugzilla_api_key={0}", new Object[] { location.getProperty(IBugzillaRestConstants.REPOSITORY_API_KEY), bugUrl.endsWith("?") ? "" : "&" }); } else { if (!bugUrl.endsWith("?")) { bugUrl += "&"; } UserCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY); if (credentials == null) { throw new IllegalStateException("Authentication requested without valid credentials"); } bugUrl += MessageFormat.format("Bugzilla_login={0}&Bugzilla_password={1}", new Object[] { credentials.getUserName(), credentials.getPassword() }); } } return baseUrl() + bugUrl; }
Source:
<code>protected void resetAggregatesComputed() { super.resetAggregatesComputed(); <START> if (weekActivity != null) <END> { weekActivity.resetAggregatesComputed(); } }</code><technical_language>this null</technical_language>

Target:
protected void resetAggregatesComputed() { super.resetAggregatesComputed(); if (weekActivity == null) { return; } weekActivity.resetAggregatesComputed(); }
Source:
<code>private InetAddress getBindAddress() { RuntimeContext context = getRuntimeContext(); Preconditions.checkState( context instanceof StreamingRuntimeContext, "CollectSinkFunction can only be used in StreamTask"); StreamingRuntimeContext streamingContext = (StreamingRuntimeContext) context; String bindHost = streamingContext .getTaskManagerRuntimeInfo() <START> .getConfiguration() <END> .getString(TaskManagerOptions.BIND_HOST); if (bindHost != null) { try { return InetAddress.getByName(bindHost); } catch (UnknownHostException e) { return null; } } return null; }</code><technical_language>useless method</technical_language>

Target:
private InetAddress getBindAddress() { RuntimeContext context = getRuntimeContext(); Preconditions.checkState( context instanceof StreamingRuntimeContext, "CollectSinkFunction can only be used in StreamTask"); StreamingRuntimeContext streamingContext = (StreamingRuntimeContext) context; String bindAddress = streamingContext.getTaskManagerRuntimeInfo().getTaskManagerBindAddress(); if (bindAddress != null) { try { return InetAddress.getByName(bindAddress); } catch (UnknownHostException e) { return null; } } return null; }
Source:
<code><START> public void initMetaData(ResourceIndex resIndex){ <END> for(Map.Entry<String,String> entry : applicationMetaData.entrySet()){ if(entry.getValue().startsWith("@")){ Integer resId = ResName.getResourceId(resIndex, entry.getValue(), packageName); if(resId != null) entry.setValue(resId.toString()); } } for(ReceiverAndIntentFilter receiver : receivers){ for(Map.Entry<String,String> entry : receiver.metaData.entrySet()){ if(entry.getValue().startsWith("@")){ Integer resId = ResName.getResourceId(resIndex, entry.getValue(), packageName); if(resId != null) entry.setValue(resId.toString()); } } } }</code><technical_language>nit: space {</technical_language>

Target:
public void initMetaData(ResourceIndex resIndex) { for (Map.Entry<String,String> entry : applicationMetaData.entrySet()) { if (entry.getValue().startsWith("@")) { Integer resId = ResName.getResourceId(resIndex, entry.getValue(), packageName); if (resId != null) { entry.setValue(resId.toString()); } } } for (ReceiverAndIntentFilter receiver : receivers) { for (Map.Entry<String,String> entry : receiver.metaData.entrySet()) { if (entry.getValue().startsWith("@")) { Integer resId = ResName.getResourceId(resIndex, entry.getValue(), packageName); if (resId != null) { entry.setValue(resId.toString()); } } } } }
Source:
<code>public void validate(ValidationContext validationContext) { super.validate(validationContext); this.validateUniquenessOfId(validationContext); this.validateRepoIsSet(); this.validateMaterial(validationContext); if (isValidMaterial()) { <START> this.validateAutoUpdateState(validationContext); <END> this.validateMaterialUniqueness(validationContext); } }</code><technical_language>implementation for validateAutoUpdateState change check if auto_update for ConfigRepo material matches regular material</technical_language>

Target:
public void validate(ValidationContext validationContext) { super.validate(validationContext); this.validateUniquenessOfId(validationContext); this.validateRepoIsSet(); this.validateMaterial(validationContext); if (isValidMaterial()) { this.validateAutoUpdateIsConsistentAmongSimilarMaterials(validationContext); this.validateMaterialUniqueness(validationContext); } }
Source:
<code>public SnapshotStatus[] getSnapshotListing(String snapshotRoot) throws IOException { rpcServer.checkOperation(NameNode.OperationCategory.READ); final List<RemoteLocation> locations = rpcServer.getLocationsForPath(snapshotRoot, true, false); RemoteMethod remoteMethod = new RemoteMethod("getSnapshotListing", new Class<?>[]{String.class}, new RemoteParam()); <START> if (rpcServer.isInvokeConcurrent(snapshotRoot)) { Map<RemoteLocation, SnapshotStatus[]> ret = rpcClient.invokeConcurrent( locations, remoteMethod, true, false, SnapshotStatus[].class); return ret.values().iterator().next(); } else { return rpcClient.invokeSequential( locations, remoteMethod, SnapshotStatus[].class, null); <END> } }</code><technical_language>SnapshotStatus contains parentpath well, path wrt actual namespace respect mount table. need replace parentpath path mount entry. if mount entry is : /mnt -> /dir in ns0, if trigger call ns0 path /dir/sub.. need change /mnt/sub.. In case of InvokeConcurrent able get Src Dst ret this work - response = ret.values().iterator().next(); String src = ret.keySet().iterator().next().getSrc(); String dst = ret.keySet().iterator().next().getDest(); for (SnapshotStatus s : response) { String mountPath = new String(s.getParentFullPath()).replaceFirst(dst, src); s.setParentFullPath(mountPath.getBytes()); } For invokeSequential detail location call success, For get returned RouterRpcClient#L858, I guess get location returned require a new InvokeSequential method returns location well, refactor reuse this one... This problem I in getSnapshottableDirListing() well. If want, put a TODO handle location stuff in a separate follow jira for API's</technical_language>

Target:
public SnapshotStatus[] getSnapshotListing(String snapshotRoot) throws IOException { rpcServer.checkOperation(NameNode.OperationCategory.READ); final List<RemoteLocation> locations = rpcServer.getLocationsForPath(snapshotRoot, true, false); RemoteMethod remoteMethod = new RemoteMethod("getSnapshotListing", new Class<?>[]{String.class}, new RemoteParam()); SnapshotStatus[] response; if (rpcServer.isInvokeConcurrent(snapshotRoot)) { Map<RemoteLocation, SnapshotStatus[]> ret = rpcClient.invokeConcurrent( locations, remoteMethod, true, false, SnapshotStatus[].class); response = ret.values().iterator().next(); String src = ret.keySet().iterator().next().getSrc(); String dst = ret.keySet().iterator().next().getDest(); for (SnapshotStatus s : response) { String mountPath = DFSUtil.bytes2String(s.getParentFullPath()). replaceFirst(src, dst); s.setParentFullPath(DFSUtil.string2Bytes(mountPath)); } } else { response = rpcClient.invokeSequential( locations, remoteMethod, SnapshotStatus[].class, null); RemoteLocation loc = locations.get(0); for (SnapshotStatus s : response) { String mountPath = DFSUtil.bytes2String(s.getParentFullPath()). replaceFirst(loc.getDest(), loc.getSrc()); s.setParentFullPath(DFSUtil.string2Bytes(mountPath)); } } return response; }
Source:
<code>public static void check(Configuration cfg, List<String> subFilesList) throws Exception { File indexRoot = new File(cfg.getDataRoot(), IndexDatabase.INDEX_DIR); <START> if (subFilesList.size() > 0) { <END> for (String projectName : subFilesList) { checkDir(getDirectory(new File(indexRoot, projectName))); } } else { if (cfg.isProjectsEnabled()) { for (String projectName : cfg.getProjects().keySet()) { checkDir(getDirectory(new File(indexRoot, projectName))); } } else { checkDir(getDirectory(indexRoot)); } } }</code><technical_language>I isEmpty() is more preferable this construct</technical_language>

Target:
public static void check(Configuration cfg, List<String> subFilesList) throws Exception { File indexRoot = new File(cfg.getDataRoot(), IndexDatabase.INDEX_DIR); if (!subFilesList.isEmpty()) { for (String projectName : subFilesList) { checkDir(getDirectory(new File(indexRoot, projectName))); } } else { if (cfg.isProjectsEnabled()) { for (String projectName : cfg.getProjects().keySet()) { checkDir(getDirectory(new File(indexRoot, projectName))); } } else { checkDir(getDirectory(indexRoot)); } } }