auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private KafkaConsumer<byte[], byte[]> getKafkaConsumer() throws IOException { <START> final Map<String, Object> configs = new HashMap<>(); <END> configs.put("metadata.max.age.ms", "10000"); configs.put("group.id", StringUtils.format("kafka-supervisor-%s", getRandomId())); for (Map.Entry<String, Object> entry : ioConfig.getConsumerProperties().entrySet()) { String propertyKey = entry.getKey(); if (propertyKey.equals(KafkaSupervisorIOConfig.TRUST_STORE_PASSWORD_KEY) || propertyKey.equals(KafkaSupervisorIOConfig.KEY_STORE_PASSWORD_KEY) || propertyKey.equals(KafkaSupervisorIOConfig.KEY_PASSWORD_KEY)) { PasswordProvider configPasswordProvider = sortingMapper.readValue( sortingMapper.writeValueAsString(entry.getValue()), PasswordProvider.class ); configs.put(propertyKey, (configPasswordProvider.getPassword())); } else { configs.put(propertyKey, entry.getValue()); } } configs.put("enable.auto.commit", "false"); ClassLoader currCtxCl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); return new KafkaConsumer<>(configs, new ByteArrayDeserializer(), new ByteArrayDeserializer()); } finally { Thread.currentThread().setContextClassLoader(currCtxCl); } }</code><technical_language>this repeated code, refactored reused</technical_language>

Target:
private KafkaConsumer<byte[], byte[]> getKafkaConsumer() { final Properties props = new Properties(); props.setProperty("metadata.max.age.ms", "10000"); props.setProperty("group.id", StringUtils.format("kafka-supervisor-%s", RealtimeIndexTask.makeRandomId())); KafkaIndexTask.addConsumerPropertiesFromConfig(props, sortingMapper, ioConfig.getConsumerProperties()); props.setProperty("enable.auto.commit", "false"); ClassLoader currCtxCl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); return new KafkaConsumer<>(props, new ByteArrayDeserializer(), new ByteArrayDeserializer()); } finally { Thread.currentThread().setContextClassLoader(currCtxCl); } }
Source:
<code>public void initialize() { <START> layoutProviders.stream().forEach(lp -> addProvider(lp.getAlias(), lp)); <END> logger.info("Initialized the layout provider registry."); }</code><technical_language>In StrongboxBooter LayoutProviderRegistry initialize repositories. layout providers registered want LayoutProviderRegistry ? This situation happen in branch in assembly. Reposiitories initialized properly LayoutProviderRegistry empty. Layout providers registered later. If this solution, need do in some other way</technical_language>

Target:
public void initialize() { logger.info("Initialized the layout provider registry."); }
Source:
<code>public static String[] parseImageName(String imageName) throws MojoExecutionException { <START> if (imageName == null) { <END> throw new MojoExecutionException("You must specify an \"imageName\" in your " + "docker-maven-client's plugin configuration"); } final int lastSlashIndex = imageName.lastIndexOf('/'); final int lastColonIndex = imageName.lastIndexOf(':'); String repo = imageName; String tag = null; if (lastColonIndex > lastSlashIndex) { repo = imageName.substring(0, lastColonIndex); tag = imageName.substring(lastColonIndex + 1); if (tag.isEmpty()) { tag = null; } } return new String[] { repo, tag }; }</code><technical_language>isNullOrEmpty instead of checking for null (empty null strings generally treated same)</technical_language>

Target:
public static String[] parseImageName(String imageName) throws MojoExecutionException { if (isNullOrEmpty(imageName)) { throw new MojoExecutionException("You must specify an \"imageName\" in your " + "docker-maven-client's plugin configuration"); } final int lastSlashIndex = imageName.lastIndexOf('/'); final int lastColonIndex = imageName.lastIndexOf(':'); String repo = imageName; String tag = null; if (lastColonIndex > lastSlashIndex) { repo = imageName.substring(0, lastColonIndex); tag = imageName.substring(lastColonIndex + 1); if (tag.isEmpty()) { tag = null; } } return new String[] { repo, tag }; }
Source:
<code>protected void collect(Resource resource, List<ModuleDefinition> holder) throws IOException { if (!resource.exists()) { return; } String path = resource.getURI().toString(); if (path.endsWith(HASH_EXTENSION)) { return; } else if (path.endsWith(ARCHIVE_AS_FILE_EXTENSION) && requireHashFiles && !hashResource(resource).exists()) { return; } if (path.endsWith("/")) { path = path.substring(0, path.length() - 1); } int lastSlash = path.lastIndexOf('/'); int nextToLastSlash = path.lastIndexOf('/', lastSlash - 1); String name = path.substring(lastSlash + 1); if (name.endsWith(ARCHIVE_AS_FILE_EXTENSION)) { name = name.substring(0, name.length() - ARCHIVE_AS_FILE_EXTENSION.length()); } String typeAsString = path.substring(nextToLastSlash + 1, lastSlash); ModuleType type = null; try { type = ModuleType.valueOf(typeAsString); } catch (IllegalArgumentException e) { return; } String locationToUse = resource.getURL().toString(); ModuleDefinition found = ModuleDefinitions.simple(name, type, locationToUse); if (holder.contains(found)) { <START> SimpleModuleDefinition one = (SimpleModuleDefinition) found; <END> SimpleModuleDefinition two = (SimpleModuleDefinition) holder.get(holder.indexOf(found)); throw new IllegalStateException(String.format("Duplicate module definitions for '%s:%s' found at '%s' and '%s'", found.getType(), found.getName(), one.getLocation(), two.getLocation())); } else { holder.add(found); } }</code><technical_language>of unprotected downcasts a code smell; need reconsider expose interface</technical_language>

Target:
protected void collect(Resource resource, List<ModuleDefinition> holder) throws IOException { if (!resource.exists()) { return; } String path = resource.getURI().toString(); if (path.endsWith(HASH_EXTENSION)) { return; } else if (path.endsWith(ARCHIVE_AS_FILE_EXTENSION) && requireHashFiles && !hashResource(resource).exists()) { return; } if (path.endsWith("/")) { path = path.substring(0, path.length() - 1); } int lastSlash = path.lastIndexOf('/'); int nextToLastSlash = path.lastIndexOf('/', lastSlash - 1); String name = path.substring(lastSlash + 1); if (name.endsWith(ARCHIVE_AS_FILE_EXTENSION)) { name = name.substring(0, name.length() - ARCHIVE_AS_FILE_EXTENSION.length()); } String typeAsString = path.substring(nextToLastSlash + 1, lastSlash); ModuleType type = null; try { type = ModuleType.valueOf(typeAsString); } catch (IllegalArgumentException e) { return; } String locationToUse = resource.getURL().toString(); SimpleModuleDefinition found = ModuleDefinitions.simple(name, type, locationToUse); if (holder.contains(found)) { SimpleModuleDefinition other = (SimpleModuleDefinition) holder.get(holder.indexOf(found)); throw new IllegalStateException(String.format("Duplicate module definitions for '%s:%s' found at '%s' and" + " " + "'%s'", found.getType(), found.getName(), found.getLocation(), other.getLocation())); } else { holder.add(found); } }
Source:
<code>void handleApiError(IOException e) throws IOException { int responseCode; try { responseCode = uc.getResponseCode(); } catch (IOException e2) { if (LOGGER.isLoggable(FINE)) LOGGER.log(FINE, "Silently ignore exception retrieving response code for '" + uc.getURL() + "'" + " handling exception " + e, e); throw e; } if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) throw e; if ("0".equals(uc.getHeaderField("X-RateLimit-Remaining"))) { root.rateLimitHandler.onError(e,uc); return; } InputStream es = wrapStream(uc.getErrorStream()); try { if (es!=null) { <START> String errorString = IOUtils.toString(es, "UTF-8"); <END> if (responseCode == HttpURLConnection.HTTP_FORBIDDEN && uc.getHeaderField("Retry-After") != null) { this.root.abuseLimitHandler.onError(e,uc); return; } if (e instanceof FileNotFoundException) { throw (IOException) new FileNotFoundException(IOUtils.toString(es, "UTF-8")).initCause(e); } else throw (IOException) new IOException(IOUtils.toString(es, "UTF-8")).initCause(e); } else throw e; } finally { IOUtils.closeQuietly(es); } }</code><technical_language>Dead store errorString in org.kohsuke.github.Requester.handleApiError(IOException) [org.kohsuke.github.Requester] Requester.java:[line 579]</technical_language>

Target:
void handleApiError(IOException e) throws IOException { int responseCode; try { responseCode = uc.getResponseCode(); } catch (IOException e2) { if (LOGGER.isLoggable(FINE)) LOGGER.log(FINE, "Silently ignore exception retrieving response code for '" + uc.getURL() + "'" + " handling exception " + e, e); throw e; } if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) throw e; if ("0".equals(uc.getHeaderField("X-RateLimit-Remaining"))) { root.rateLimitHandler.onError(e,uc); return; } if (responseCode == HttpURLConnection.HTTP_FORBIDDEN && uc.getHeaderField("Retry-After") != null) { this.root.abuseLimitHandler.onError(e,uc); return; } InputStream es = wrapStream(uc.getErrorStream()); try { if (es!=null) { if (e instanceof FileNotFoundException) { throw (IOException) new FileNotFoundException(IOUtils.toString(es, "UTF-8")).initCause(e); } else throw (IOException) new IOException(IOUtils.toString(es, "UTF-8")).initCause(e); } else throw e; } finally { IOUtils.closeQuietly(es); } }
Source:
<code>public void send(Command cmd) { sync.lock(); try { cpipe.write(cmd, false); boolean ok = cpipe.flush(); if (!ok) { condition.signalAll(); <START> signalers.forEach(Signaler::send); <END> } } finally { sync.unlock(); } }</code><technical_language>Java iterators generate garbage unfortunately. if matters</technical_language>

Target:
public void send(Command cmd) { sync.lock(); try { cpipe.write(cmd, false); boolean ok = cpipe.flush(); if (!ok) { condition.signalAll(); for (int i = 0; i < signalers.size(); i++) { signalers.get(i).send(); } } } finally { sync.unlock(); } }
Source:
<code>public boolean requestRouteToHost(int networkType, int hostAddress) { <START> InetAddress inetAddress = NetworkUtils.lookupHost(hostAddress); <END> if (inetAddress == null) { return false; } return requestRouteToHostAddress(networkType, inetAddress); }</code><technical_language>lookupHost is right name. other connotations doing. v4IntToInetAddress? intToInetAddress? do think</technical_language>

Target:
public boolean requestRouteToHost(int networkType, int hostAddress) { InetAddress inetAddress = NetworkUtils.intToInetAddress(hostAddress); if (inetAddress == null) { return false; } return requestRouteToHostAddress(networkType, inetAddress); }
Source:
<code>public void checkAttributeValue(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if(attribute.getValue() == null) return; if(!(attribute.getValue() instanceof String)) { throw new WrongAttributeValueException(attribute, key, "value must be of type String"); } <START> String value = attribute.valueAsString(); <END> }</code><technical_language>This line of code is useless</technical_language>

Target:
public void checkAttributeValue(PerunSessionImpl perunSession, String key, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException { if (attribute.getValue() == null) return; if (!(attribute.getValue() instanceof String)) { throw new WrongAttributeValueException(attribute, key, "value must be of type String"); } }
Source:
<code>public DB2MillisecondFunction() { <START> super("MICROSECOND(?1)"); <END> }</code><technical_language>divide result 1000 get milliseconds</technical_language>

Target:
public DB2MillisecondFunction() { super("(MICROSECOND(?1) / 1000)"); }
Source:
<code>public static ArrayList<String> getAllMsysHomes() { if (!isWindowsPlatform) { return null; } IEnvironmentVariable varMsysHome = CCorePlugin.getDefault().getBuildEnvironmentManager() .getVariable(ENV_MSYS_HOME, (ICConfigurationDescription) null, true); ArrayList<String> msysHomeValue = new <START> ArrayList<String>(); <END> msysHomeValue.add(varMsysHome != null ? varMsysHome.getValue() : null); if (msysHomeValue != null) { return msysHomeValue; } String envMinGWHomeValue = getMinGWHome(); if (isMSysLocationCached && CDataUtil.objectsEqual(envMinGWHomeValue, envMinGWHomeValueCached_msys)) { return allmSysLocations; } allmSysLocations = findMSysRoot(allMinGWLocations); if (allmSysLocations.size() > 0) mSysLocation = allmSysLocations.get(0); else minGWLocation = null; envMinGWHomeValueCached_msys = envMinGWHomeValue; isMSysLocationCached = true; return allmSysLocations; }</code><technical_language>Diamond operator: <LINK_0></technical_language>

Target:
public static ArrayList<String> getAllMsysHomes() { if (!isWindowsPlatform) { return null; } IEnvironmentVariable varMsysHome = CCorePlugin.getDefault().getBuildEnvironmentManager() .getVariable(ENV_MSYS_HOME, (ICConfigurationDescription) null, true); ArrayList<String> msysHomeValue = new ArrayList<>(); msysHomeValue.add(varMsysHome != null ? varMsysHome.getValue() : null); if (msysHomeValue != null) { return msysHomeValue; } String envMinGWHomeValue = getMinGWHome(); if (isMSysLocationCached && CDataUtil.objectsEqual(envMinGWHomeValue, envMinGWHomeValueCached_msys)) { return allmSysLocations; } allmSysLocations = findMSysRoot(allMinGWLocations); if (allmSysLocations.size() > 0) mSysLocation = allmSysLocations.get(0); else minGWLocation = null; envMinGWHomeValueCached_msys = envMinGWHomeValue; isMSysLocationCached = true; return allmSysLocations; }
Source:
<code>public void setDrain(boolean drain) { super.setDrain(drain); LOG.info("Stopping socket input: {}", getShortDescription()); try { serverSocket.close(); setClosed(true); } catch (Exception e) { <START> LOG.error("Error during closing socket input: {}", e); <END> } }</code><technical_language>stacktrace is lost Exception.toString() invoked</technical_language>

Target:
public void setDrain(boolean drain) { super.setDrain(drain); LOG.info("Stopping socket input: {}", getShortDescription()); try { serverSocket.close(); setClosed(true); } catch (Exception e) { LOG.error("Error during closing socket input.", e); } }
Source:
<code>private LiveMigrateDiskParameters createLiveMigrateDiskParameters(MoveDiskParameters moveDiskParameters, Guid vmId) { LiveMigrateDiskParameters toReturn = new LiveMigrateDiskParameters(moveDiskParameters.getImageId(), moveDiskParameters.getSourceDomainId(), moveDiskParameters.getStorageDomainId(), vmId, moveDiskParameters.getQuotaId()); <START> toReturn.setImageGroupID(diskMap.get(moveDiskParameters.getImageId()).getId()); <END> return toReturn; }</code><technical_language>add parameters of LiveMigrateDiskParameters's constructor enforce parameters of live migrate disk command image group id</technical_language>

Target:
private LiveMigrateDiskParameters createLiveMigrateDiskParameters(MoveDiskParameters moveDiskParameters, Guid vmId) { return new LiveMigrateDiskParameters(moveDiskParameters.getImageId(), moveDiskParameters.getSourceDomainId(), moveDiskParameters.getStorageDomainId(), vmId, moveDiskParameters.getQuotaId(), diskMap.get(moveDiskParameters.getImageId()).getId()); }
Source:
<code>public void userCanCloseJoinPage() { <START> ArticlePage article = openArticleOnMobile(); <END> String title = article.getArticleTitle(); article .getTopBar() .openNavigation() .clickOnSignInRegisterButton() .close(); Assertion.assertEquals(article.getArticleTitle(), title); }</code><technical_language>Is remove this</technical_language>

Target:
public void userCanCloseJoinPage() { ArticlePage article = openArticleOnMobile(); String previousTitle = article.getArticleTitle(); article .getTopBar() .openNavigation() .clickOnSignInRegisterButton() .close(); Assertion.assertEquals(article.getArticleTitle(), previousTitle); }
Source:
<code>public boolean removeNode(N node) { List<E> incident_edges = ImmutableList.copyOf(delegate.incidentEdges(node)); for (E e : incident_edges) { this.removeEdge(e); } boolean state = delegate.removeNode(node); if (state) { NetworkEvent<N, E> evt = <START> new NetworkEvent.Node<N, E>(delegate, NetworkEvent.Type.VERTEX_REMOVED, (N) node); <END> fireGraphEvent(evt); } return state; }</code><technical_language>this cast necessary</technical_language>

Target:
public boolean removeNode(N node) { List<E> incident_edges = ImmutableList.copyOf(delegate.incidentEdges(node)); for (E e : incident_edges) { this.removeEdge(e); } boolean state = delegate.removeNode(node); if (state) { NetworkEvent<N, E> evt = new NetworkEvent.Node<N, E>(delegate, NetworkEvent.Type.NODE_REMOVED, (N) node); fireGraphEvent(evt); } return state; }
Source:
<code>protected synchronized void loadCatalog() { if (catalog!=null) return; BasicBrooklynCatalog catalog = null; String catalogUrl = getConfig().getConfig(BROOKLYN_CATALOG_URL); try { if (!Strings.isEmpty(catalogUrl)) { catalog = new BasicBrooklynCatalog(this, CatalogDtoUtils.newDtoFromUrl(catalogUrl)); if (log.isDebugEnabled()) log.debug("Loaded catalog from "+catalogUrl+": "+catalog); } } catch (Exception e) { if (Throwables.getRootCause(e) instanceof FileNotFoundException) { Maybe<Object> nonDefaultUrl = getConfig().getConfigRaw(BROOKLYN_CATALOG_URL, true); <START> if (nonDefaultUrl.isPresent() && nonDefaultUrl.get()!=null && !"".equals(nonDefaultUrl)) { <END> log.warn("Could not find catalog XML specified at "+nonDefaultUrl+"; using default (local classpath) catalog. Error was: "+e); } else { if (log.isDebugEnabled()) log.debug("No default catalog file available; trying again using local classpath to populate catalog. Error was: "+e); } } else { log.warn("Error importing catalog XML at "+catalogUrl+"; using default (local classpath) catalog. Error was: "+e, e); } } if (catalog==null) { catalog = new BasicBrooklynCatalog(this, CatalogDtoUtils.newDefaultLocalScanningDto(CatalogScanningModes.ANNOTATIONS)); if (log.isDebugEnabled()) log.debug("Loaded default (local classpath) catalog: "+catalog); } catalog.getCatalog().load(this, null); this.catalog = catalog; }</code><technical_language>nonDefaultUrl.isPresentAndNonNull() && !"".equals(nonDefaultUrl.get()) Note fix for comparing a empty string, nonDefaultUrl.get()</technical_language>

Target:
protected synchronized void loadCatalog() { if (catalog!=null) return; BasicBrooklynCatalog catalog = null; String catalogUrl = getConfig().getConfig(BROOKLYN_CATALOG_URL); try { if (!Strings.isEmpty(catalogUrl)) { catalog = new BasicBrooklynCatalog(this, CatalogDtoUtils.newDtoFromUrl(catalogUrl)); if (log.isDebugEnabled()) log.debug("Loaded catalog from "+catalogUrl+": "+catalog); } } catch (Exception e) { if (Throwables.getRootCause(e) instanceof FileNotFoundException) { Maybe<Object> nonDefaultUrl = getConfig().getConfigRaw(BROOKLYN_CATALOG_URL, true); if (nonDefaultUrl.isPresentAndNonNull() && !"".equals(nonDefaultUrl.get())) { log.warn("Could not find catalog XML specified at "+nonDefaultUrl+"; using default (local classpath) catalog. Error was: "+e); } else { if (log.isDebugEnabled()) log.debug("No default catalog file available; trying again using local classpath to populate catalog. Error was: "+e); } } else { log.warn("Error importing catalog XML at "+catalogUrl+"; using default (local classpath) catalog. Error was: "+e, e); } } if (catalog==null) { catalog = new BasicBrooklynCatalog(this, CatalogDtoUtils.newDefaultLocalScanningDto(CatalogScanningModes.ANNOTATIONS)); if (log.isDebugEnabled()) log.debug("Loaded default (local classpath) catalog: "+catalog); } catalog.getCatalog().load(this, null); this.catalog = catalog; }
Source:
<code>private void timeout() { <START> replyFuture.completeExceptionally(new TimeoutException("Request type " + type + " timed out in " + timeout + " milliseconds")); <END> }</code><technical_language>Yeah risk of memory leak</technical_language>

Target:
private void timeout() { replyFuture.completeExceptionally(new TimeoutException("Request type " + type + " timed out in " + timeout + " milliseconds")); callbacks.remove(id); }
Source:
<code>private DeleteRequest createDeleteRequest() { <START> return new DeleteRequest(correlationIdGenerator.incrementAndGet(), routerConfig.routerHostname, blobId); <END> }</code><technical_language>I missed out in Put patch. routerHostName is client id. give info partition/replica for request</technical_language>

Target:
private DeleteRequest createDeleteRequest() { return new DeleteRequest(NonBlockingRouter.correlationIdGenerator.incrementAndGet(), routerConfig.routerHostname, blobId); }
Source:
<code>@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.rawData: try { <START> String json = FileUtils.readFileToString(Measurement.getEntryFile(this, measurement.id, measurement.test_name), StandardCharsets.UTF_8); <END> json = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create().toJson(new JsonParser().parse(json).getAsJsonObject()); startActivity(TextActivity.newIntent(this, json)); } catch (Exception e) { e.printStackTrace(); } return true; case R.id.viewLog: try { String log = FileUtils.readFileToString(Measurement.getLogFile(this, measurement.result.id, measurement.test_name), StandardCharsets.UTF_8); startActivity(TextActivity.newIntent(this, log)); } catch (Exception e) { e.printStackTrace(); } return true; default: return super.onOptionsItemSelected(item); } }</code><technical_language>In code getEntryFile I surprising that: static File getMeasurementDir(Context c) { File dir = new File(c.getFilesDir(), Measurement.class.getSimpleName()); dir.mkdirs(); return dir; } is calling dir.mkdirs is a side-effect I expect a getter method. android docs: <LINK_0> > returned path change time if calling app is moved adopted storage device, relative paths persisted. repeated calls getMeasurementDir yield create unexpected side effects if properly controlled. suggestion explicitly call directory tree creation function separately determining measurement filepath</technical_language>

Target:
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.rawData: try { File entryFile = Measurement.getEntryFile(this, measurement.id, measurement.test_name); String json = FileUtils.readFileToString(entryFile, StandardCharsets.UTF_8); json = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create().toJson(new JsonParser().parse(json).getAsJsonObject()); startActivity(TextActivity.newIntent(this, json)); } catch (Exception e) { e.printStackTrace(); } return true; case R.id.viewLog: try { File logFile = Measurement.getLogFile(this, measurement.result.id, measurement.test_name); String log = FileUtils.readFileToString(logFile, StandardCharsets.UTF_8); startActivity(TextActivity.newIntent(this, log)); } catch (Exception e) { e.printStackTrace(); } return true; default: return super.onOptionsItemSelected(item); } }
Source:
<code>public static boolean codeAwareEqualsIgnoreSpaces(String in1, String in2) { if ( in1 == null || in2 == null ) { return in1 == null && in2 == null; } if ( in1.isEmpty() && in2.isEmpty() ) { return true; } if ( in1.length() == 0 ) { in1 = " "; } if ( in2.length() == 0 ) { in2 = " "; } int idx1 = 0; boolean quoted1 = false; int idx2 = 0; boolean quoted2 = false; boolean equals = true; while ( idx1 < in1.length() && idx2 < in2.length() ) { <START> equals &= in1.charAt(idx1) == in2.charAt(idx2); <END> if (!equals) { break; } if ( in1.charAt(idx1) == '"' ) { if (idx1 == 0 || in1.charAt(idx1-1) != '\\') { quoted1 = !quoted1; } } if ( in2.charAt(idx2) == '"' ) { if (idx2 == 0 || in2.charAt(idx2-1) != '\\') { quoted2 = !quoted2; } } idx1++; idx2++; while ( idx1 < in1.length() && !quoted1 && isWhitespace(in1.charAt(idx1)) ) { idx1++; } while ( idx2 < in2.length() && !quoted2 && isWhitespace(in2.charAt(idx2)) ) { idx2++; } } return equals && idx1 == in1.length() && idx2 == in2.length(); }</code><technical_language>I this fail if of 2 strings starts a space while other doesn't. trivial fix this move this statement skipped spaces 2 indexes</technical_language>

Target:
public static boolean codeAwareEqualsIgnoreSpaces(String in1, String in2) { if ( in1 == null || in2 == null ) { return in1 == null && in2 == null; } if ( in1.isEmpty() && in2.isEmpty() ) { return true; } if ( in1.length() == 0 ) { in1 = " "; } if ( in2.length() == 0 ) { in2 = " "; } int idx1 = 0; Character quoted1 = null; int idx2 = 0; Character quoted2 = null; boolean equals = true; while ( equals ) { while ( idx1 < (in1.length()) && (quoted1==null) && isWhitespace(in1.charAt(idx1)) ) { idx1++; } while ( idx2 < (in2.length()) && (quoted2==null) && isWhitespace(in2.charAt(idx2)) ) { idx2++; } if ( idx1 >= in1.length() || idx2 >= in2.length() ) { equals = equals && idx1 == in1.length() && idx2 == in2.length(); break; } if ( in1.charAt(idx1) == '"' || in1.charAt(idx1) == '\'' ) { if ( quoted1 == null ) { quoted1 = in1.charAt(idx1); } else if ( quoted1 != null && quoted1.equals( in1.charAt(idx1) ) ) { if ( in1.charAt(idx1-1) != '\\' ) { quoted1 = null; } } } if ( in2.charAt(idx2) == '"' || in2.charAt(idx2) == '\'' ) { if ( quoted2 == null ) { quoted2 = in2.charAt(idx2); } else if ( quoted2 != null && quoted2.equals( in2.charAt(idx2) ) ) { if ( in2.charAt(idx2-1) != '\\' ) { quoted2 = null; } } } equals &= in1.charAt(idx1) == in2.charAt(idx2); idx1++; idx2++; } return equals; }
Source:
<code>private void writeVmMetadata() { writer.setPrefix(OVIRT_VM_PREFIX, OVIRT_VM_URI); writer.writeStartElement(OVIRT_VM_URI, "vm"); writer.writeNamespace(OVIRT_VM_PREFIX, OVIRT_VM_URI); <START> if (vm.isRunOnce()) { <END> writer.writeStartElement(OVIRT_VM_URI, "destroy_on_reboot"); writer.writeAttributeString("type", "bool"); writer.writeRaw("True"); writer.writeEndElement(); } writer.writeEndElement(); }</code><technical_language>do want set in run-once? for example, I case: 1. define headless VM 2. run a console for installing 3. installer reboots machine installation process this point, is debateable VM started run-once configuration (for instance, user is required provide some input window's timezone user accounts initial reboot) regular configuration. this configurable in run-once dialog.</technical_language>

Target:
private void writeVmMetadata() { writer.setPrefix(OVIRT_VM_PREFIX, OVIRT_VM_URI); writer.writeStartElement(OVIRT_VM_URI, "vm"); writer.writeNamespace(OVIRT_VM_PREFIX, OVIRT_VM_URI); if (scratchRun) { writer.writeStartElement(OVIRT_VM_URI, "destroy_on_reboot"); writer.writeAttributeString("type", "bool"); writer.writeRaw("True"); writer.writeEndElement(); } writer.writeEndElement(); }
Source:
<code>public void addDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc, boolean buildVersion2Descriptor) throws StandardException{ TabInfoImpl ti=(catalogNumber<NUM_CORE)?coreInfo[catalogNumber]:getNonCoreTI(catalogNumber); ExecRow row=ti.getCatalogRowFactory().makeRow(td,parent); <START> if (buildVersion2Descriptor) <END> { row.setColumn(SYSTABLESRowFactory.SYSTABLES_VERSION,new SQLVarchar("2.0")); } int insertRetCode=ti.insertRow(row,tc); if(!duplicatesAllowed){ if(insertRetCode!=TabInfoImpl.ROWNOTDUPLICATE) throw duplicateDescriptorException(td,parent); } }</code><technical_language>check if catalogNumber is SYSTABLEPERMS_CATALOG_NUM in addition flag of buildVersion2Descriptor</technical_language>

Target:
public void addDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc, boolean buildVersion2Descriptor) throws StandardException{ TabInfoImpl ti=(catalogNumber<NUM_CORE)?coreInfo[catalogNumber]:getNonCoreTI(catalogNumber); ExecRow row=ti.getCatalogRowFactory().makeRow(td,parent); if (buildVersion2Descriptor && catalogNumber == DataDictionary.SYSTABLES_CATALOG_NUM) { row.setColumn(SYSTABLESRowFactory.SYSTABLES_VERSION,new SQLVarchar("2.0")); } int insertRetCode=ti.insertRow(row,tc); if(!duplicatesAllowed){ if(insertRetCode!=TabInfoImpl.ROWNOTDUPLICATE) throw duplicateDescriptorException(td,parent); } }
Source:
<code>public String toString() { StringBuilder builder = new StringBuilder(StringUtil.simpleClassName(this)).append('['); <START> for (MqttTopicSubscription subscription : topicSubscriptions) { <END> builder.append(subscription).append(", "); } if (!topicSubscriptions.isEmpty()) { builder.setLength(builder.length() - 2); } return builder.append(']').toString(); }</code><technical_language>please "for loop" style reduce GC</technical_language>

Target:
public String toString() { StringBuilder builder = new StringBuilder(StringUtil.simpleClassName(this)).append('['); for (int i = 0; i < topicSubscriptions.size(); i++) { builder.append(topicSubscriptions.get(i)).append(", "); } if (!topicSubscriptions.isEmpty()) { builder.setLength(builder.length() - 2); } return builder.append(']').toString(); }
Source:
<code>public final void visitNewArray(NewArrayTree tree) { scan(tree.dimensions()); scan(tree.initializers()); SymbolicValue value = createSymbolicInstanceValue(); for (ExecutionState executionState : currentStates) { <START> for (int i = tree.dimensions().size() + tree.initializers().size() - 1; i >= 0; i -= 1) { <END> executionState.pop(); } executionState.push(value); } }</code><technical_language>@merciesa matter of taste, i-- instead of i -= 1</technical_language>

Target:
public final void visitNewArray(NewArrayTree tree) { scan(tree.dimensions()); scan(tree.initializers()); SymbolicValue value = createSymbolicInstanceValue(); for (ExecutionState executionState : currentStates) { for (int i = tree.dimensions().size() + tree.initializers().size() - 1; i >= 0; i--) { executionState.pop(); } executionState.push(value); } }
Source:
<code>public void dump() { <START> System.out.println(resourceTable); <END> }</code><technical_language>Method synchronized probably</technical_language>

Target:
public synchronized void dump() { System.out.println(resourceTable); }
Source:
<code>public Float getUVCVideoAspectRatio(){ <START> return prefs.getFloat(PREF_UVC_VIDEO_ASPECT_RATIO, 3f / 4f); <END> }</code><technical_language>@guiseco turn 3f / 4f constant</technical_language>

Target:
public Float getUVCVideoAspectRatio(){ return prefs.getFloat(PREF_UVC_VIDEO_ASPECT_RATIO, DEFAULT_UVC_VIDEO_ASPECT_RATIO); }
Source:
<code>public void multipleValidApiUriConfigShouldSetApiUriPrefsOnScanResult() throws Exception { <START> List<String> uris=Lists.newArrayList("<LINK_0>", "<LINK_1>"); <END> setMultipleValidApiOnlyWithIntentResult(); assertThat(Lists.newArrayList(sharedPrefs.getString(PreferenceKeys.API_URIS, null).split(" ")),is(uris)); }</code><technical_language>spaces =</technical_language>

Target:
public void multipleValidApiUriConfigShouldSetApiUriPrefsOnScanResult() throws Exception { List<String> uris = Lists.newArrayList("<LINK_0>", "<LINK_1>"); setMultipleValidApiOnlyWithIntentResult(); assertThat(prefs.getRestApiBaseUris(), is(uris)); }
Source:
<code>private void addError(@NotNull ReviewFile reviewFile, @NotNull String source, int line, @Nullable String message, Severity severity) { reviewFile.getComments().add(new Comment(line, MessageFormat.format( ConfigurationHolder.instance().getProperty(GeneralOption.COMMENT_FORMAT), <START> source, severity, message))); <END> incrementCounters(severity); }</code><technical_language>ReviewFormatter great. DTO names bad, I wanted share concept container objects</technical_language>

Target:
private void addError(@NotNull ReviewFile reviewFile, @NotNull String source, int line, @Nullable String message, Severity severity) { reviewFile.getComments().add(new Comment(line, formatter.formatComment(source, severity, message))); incrementCounters(severity); }
Source:
<code>public AbstractDictionary(Object subject, Locale defaultLocale) { <START> checkNotNull(subject, "subject"); <END> checkNotNull(defaultLocale, "default locale"); this.subject = subject; this.defaultLocale = defaultLocale; }</code><technical_language>this.subject = checkNotNull(subject, "subject");</technical_language>

Target:
public AbstractDictionary(Object subject, Locale defaultLocale) { this.subject = checkNotNull(subject, "subject"); this.defaultLocale = checkNotNull(defaultLocale, "default locale"); }
Source:
<code>InternalTopicConfig(final String name, final Map<String, String> topicConfigs, final int numberOfPartitions, final boolean enforceNumberOfPartitions) { <START> Objects.requireNonNull(name, "name can't be null"); <END> Topic.validate(name); validateNumberOfPartitions(numberOfPartitions); this.name = name; this.topicConfigs = topicConfigs; this.numberOfPartitions = Optional.of(numberOfPartitions); this.enforceNumberOfPartitions = enforceNumberOfPartitions; }</code><technical_language>this.name = Objects.requireNonNull(name, "name null"); ? Also, I topicConfig null -- add a check (also for existing constructor above</technical_language>

Target:
InternalTopicConfig(final String name, final Map<String, String> topicConfigs, final int numberOfPartitions, final boolean enforceNumberOfPartitions) { this.name = Objects.requireNonNull(name, "name can't be null"); Topic.validate(name); validateNumberOfPartitions(numberOfPartitions); this.topicConfigs = Objects.requireNonNull(topicConfigs, "topicConfigs can't be null"); this.numberOfPartitions = Optional.of(numberOfPartitions); this.enforceNumberOfPartitions = enforceNumberOfPartitions; }
Source:
<code>public boolean hasAttribute(final SAMTag tag) { <START> return getAttribute(tag.name())!=null; <END> }</code><technical_language>new methods getAttribute(tag.getBinaryTag()) avoid redundant conversions</technical_language>

Target:
public boolean hasAttribute(final SAMTag tag) { return getAttribute(tag) != null; }
Source:
<code>public Map<String, FederatedAuthenticatorConfig> getAllFederatedAuthenticators() throws Exception { Map<String, FederatedAuthenticatorConfig> configMap = new HashMap<String, FederatedAuthenticatorConfig>(); try { FederatedAuthenticatorConfig[] fedAuthConfigs = idPMgtStub .getAllFederatedAuthenticators(); if (fedAuthConfigs != null && fedAuthConfigs.length > 0) { for (FederatedAuthenticatorConfig config : fedAuthConfigs) { if (!("facebook").equals(config.getDisplayName()) || ("openid").equals(config.getDisplayName()) || ("openidconnect").equals(config.getDisplayName()) <START> || ("samlsso").equals(config.getDisplayName())|| ("passovests"). <END> equals(config.getDisplayName())) configMap.put(config.getName(), config); } } } catch (Exception e) { log.error(e.getMessage(), e); throw new Exception("Error occurred while retrieving all local claim URIs"); } return configMap; }</code><technical_language>change "passovests" -> "passivests"</technical_language>

Target:
public Map<String, FederatedAuthenticatorConfig> getAllFederatedAuthenticators() throws Exception { Map<String, FederatedAuthenticatorConfig> configMap = new HashMap<String, FederatedAuthenticatorConfig>(); try { FederatedAuthenticatorConfig[] fedAuthConfigs = idPMgtStub .getAllFederatedAuthenticators(); if (fedAuthConfigs != null && fedAuthConfigs.length > 0) { for (FederatedAuthenticatorConfig config : fedAuthConfigs) { if (!("facebook").equals(config.getDisplayName()) || ("openid").equals(config.getDisplayName()) || ("openidconnect").equals(config.getDisplayName()) || ("samlsso").equals(config.getDisplayName()) || ("passivests"). equals(config.getDisplayName())) configMap.put(config.getName(), config); } } } catch (Exception e) { log.error(e.getMessage(), e); throw new Exception("Error occurred while retrieving all local claim URIs"); } return configMap; }
Source:
<code>@Override public void onResponse(Call<List<Metric>> call, Response<List<Metric>> response) { if (response.isSuccessful()){ getActivity().succeed(); <START> } <END> }</code><technical_language>@garg-anuj Yeah only</technical_language>

Target:
@Override public void onResponse(Call<List<Metric>> call, Response<List<Metric>> response) { if (response.isSuccessful()){ getActivity().succeed(); } else { LoginActivity activity = getActivity(); if (activity.authIndicator.isShowing()){ activity.authIndicator.setMessage("Error occurred"); activity.authIndicator.dismiss(); } switch (response.code()){ case 404: activity.showError(R.string.error_not_found); break; case 401: activity.showError(R.string.error_unauth); break; default: activity.showError(R.string.error_general); } } }
Source:
<code>public Order cloneForRevision() { Order newOrder = new Order(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.REVISE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); <START> newOrder.setOrderer(this.getOrderer()); <END> newOrder.setInstructions(this.getInstructions()); newOrder.setUrgency(this.getUrgency()); newOrder.setCommentToFulfiller(this.getCommentToFulfiller()); newOrder.setAccessionNumber(this.getAccessionNumber()); newOrder.setAutoExpireDate(this.getAutoExpireDate()); newOrder.setOrderReason(this.getOrderReason()); newOrder.setOrderReasonNonCoded(this.getOrderReasonNonCoded()); return newOrder; }</code><technical_language>here, copy orderer</technical_language>

Target:
public Order cloneForRevision() { Order newOrder = new Order(); newOrder.setCareSetting(this.getCareSetting()); newOrder.setConcept(this.getConcept()); newOrder.setAction(Action.REVISE); newOrder.setPreviousOrder(this); newOrder.setPatient(this.getPatient()); newOrder.setInstructions(this.getInstructions()); newOrder.setUrgency(this.getUrgency()); newOrder.setCommentToFulfiller(this.getCommentToFulfiller()); newOrder.setAccessionNumber(this.getAccessionNumber()); newOrder.setAutoExpireDate(this.getAutoExpireDate()); newOrder.setOrderReason(this.getOrderReason()); newOrder.setOrderReasonNonCoded(this.getOrderReasonNonCoded()); return newOrder; }
Source:
<code><START> public ExpressionTree UNARY_EXPR() { <END> return b.<ExpressionTree>nonterminal(PHPLexicalGrammar.UNARY_EXPR).is( b.firstOf( f.unaryExpr( b.firstOf( b.token(PHPPunctuator.INC), b.token(PHPPunctuator.DEC), b.token(PHPPunctuator.PLUS), b.token(PHPPunctuator.MINUS), b.token(PHPPunctuator.TILDA), b.token(PHPPunctuator.BANG), b.token(PHPPunctuator.AT)), UNARY_EXPR()), CAST_EXPR(), COMMON_SCALAR(), EXPRESSION())); }</code><technical_language>![MAJOR](<LINK_1> Rename this method name match regular expression '^[a-z][a-zA-Z0-9]*$'. [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public ExpressionTree UNARY_EXPR() { return b.<ExpressionTree>nonterminal(PHPLexicalGrammar.UNARY_EXPR).is( b.firstOf( f.prefixExpr( b.firstOf( b.token(PHPPunctuator.INC), b.token(PHPPunctuator.DEC), b.token(PHPPunctuator.PLUS), b.token(PHPPunctuator.MINUS), b.token(PHPPunctuator.TILDA), b.token(PHPPunctuator.BANG), b.token(PHPPunctuator.AT)), UNARY_EXPR()), CAST_EXPR(), ASSIGNMENT_EXPRESSION(), ASSIGNMENT_BY_REFERENCE(), POSTFIX_EXPRESSION())); }
Source:
<code>protected void onReveal() { ActionBarVisibilityEvent.fire(this, false); if (!Strings.isNullOrEmpty(getLoggedInCookie())) { tryLoggingInWithCookieFirst(); } if (!currentUser.isLoggedIn() && !isOnLoginPage()) { <START> PlaceRequest p = new Builder().nameToken(NameTokens.login).with(REDIRECT_PARAMETER_NAME, getHistoryToken()).build(); <END> placeManager.revealPlace(p); } }</code><technical_language>For readability, multiple lines</technical_language>

Target:
protected void onReveal() { ActionBarVisibilityEvent.fire(this, false); if (!Strings.isNullOrEmpty(getLoggedInCookie())) { tryLoggingInWithCookieFirst(); } }
Source:
<code>public static Client getClient(ClientConfig config, String[] servers, int port) throws Exception { config.setTopologyChangeAware(true); final Client client = ClientFactory.createClient(config); for (String server : servers) { try { client.createConnection(server.trim(), port); break; <START> } catch(Exception e) { } <END> } if (client.getConnectedHostList().isEmpty()) { throw new Exception("Fail to connect any server."); } return client; }</code><technical_language>Right swallowing exceptions, hide problems do servers unavailable. check for IOException UnknownHostException, createConnection() declares throw them</technical_language>

Target:
public static Client getClient(ClientConfig config, String[] servers, int port) throws Exception { config.setTopologyChangeAware(true); final Client client = ClientFactory.createClient(config); for (String server : servers) { try { client.createConnection(server.trim(), port); break; } catch(IOException e) { } } if (client.getConnectedHostList().isEmpty()) { throw new Exception("Unable to connect to any servers."); } return client; }
Source:
<code>Map<String, String> getPackageJsonMainEntries() { <START> return null; <END> }</code><technical_language>return empty map instead of null this method @Nullable</technical_language>

Target:
Map<String, String> getPackageJsonMainEntries() { return ImmutableMap.of(); }
Source:
<code>private KeyStore getKeystore(Path keystorePath, String keystoreType, String alias, boolean failIfNotAccessible) throws KeystoreServiceException { if (failIfNotAccessible) { <START> File keystoreFile = keystorePath.toFile(); <END> if (!keystoreFile.exists()) { LOG.keystoreFileDoesNotExist(keystorePath.toString()); throw new KeystoreServiceException("The keystore file does not exist: " + keystoreFile.getAbsolutePath()); } else if (!keystoreFile.isFile()) { LOG.keystoreFileIsNotAFile(keystorePath.toString()); throw new KeystoreServiceException("The keystore file is not a file: " + keystoreFile.getAbsolutePath()); } else if (!keystoreFile.canRead()) { LOG.keystoreFileIsNotAccessible(keystorePath.toString()); throw new KeystoreServiceException("The keystore file cannot be read: " + keystoreFile.getAbsolutePath()); } } readLock.lock(); try { return loadKeyStore(keystorePath, keystoreType, getKeyStorePassword(alias)); } finally { readLock.unlock(); } }</code><technical_language>Do need this? operate Path directly? Files.exists(keystorePath)</technical_language>

Target:
private KeyStore getKeystore(Path keystorePath, String keystoreType, String alias, boolean failIfNotAccessible) throws KeystoreServiceException { if (failIfNotAccessible) { if (Files.notExists(keystorePath)) { LOG.keystoreFileDoesNotExist(keystorePath.toString()); throw new KeystoreServiceException("The keystore file does not exist: " + keystorePath.toString()); } else if (!Files.isRegularFile(keystorePath)) { LOG.keystoreFileIsNotAFile(keystorePath.toString()); throw new KeystoreServiceException("The keystore file is not a file: " + keystorePath.toString()); } else if (!Files.isReadable(keystorePath)) { LOG.keystoreFileIsNotAccessible(keystorePath.toString()); throw new KeystoreServiceException("The keystore file cannot be read: " + keystorePath.toString()); } } readLock.lock(); try { return loadKeyStore(keystorePath, keystoreType, getKeyStorePassword(alias)); } finally { readLock.unlock(); } }
Source:
<code>private void flushBuffer() throws IOException { <START> Log.d(TAG, "Writing " + fileBuffer.size() + " bytes to incoming file (" + this.fileBytesLeft + " bytes left)"); <END> fileStream.write(fileBuffer.toByteArray()); fileBuffer.reset(); }</code><technical_language>This is of places checking if log logging</technical_language>

Target:
private void flushBuffer() throws IOException { if (LogUtil.isLogAvailable()) { Log.d(TAG, "Writing " + fileBuffer.size() + " bytes to incoming file (" + this.fileBytesLeft + " bytes left)"); } fileStream.write(fileBuffer.toByteArray()); fileBuffer.reset(); }
Source:
<code>void serviceShouldNotLogHeadersWhenFalse() throws Exception { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("LogContext") .mailetContext(mailContext) .setProperty("headers",false) .setProperty("body",true) .setProperty("level",LogLevel.INFO) .build(); mailet.init(mailetConfig); mailet.service(createMail()); verify(logger).isInfoEnabled(); <START> verify(logger).info("\nThis is a fake mail"); <END> verifyNoMoreInteractions(logger); }</code><technical_language>This \\n bad, no? avoid it</technical_language>

Target:
void serviceShouldNotLogHeadersWhenFalse() throws Exception { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName("LogContext") .mailetContext(mailContext) .setProperty("headers", false) .setProperty("body", true) .setProperty("level", LogLevel.INFO) .build(); mailet.init(mailetConfig); mailet.service(createMail()); verify(logger).isInfoEnabled(); verify(logger).info("This is a fake mail"); verifyNoMoreInteractions(logger); }
Source:
<code>protected int getNumberOfInstructorsDisplayedToStudents(String courseId) { List<InstructorAttributes> instructors = logic.getInstructorsForCourse(courseId); int numberOfInstructorsDisplayed = 0; for (InstructorAttributes instructor : instructors) { if (instructor.isDisplayedToStudents) { numberOfInstructorsDisplayed++; } <START> } <END> return numberOfInstructorsDisplayed; }</code><technical_language>This is fine is a count matching items in a list Java 8 streams. <LINK_0></technical_language>

Target:
private long getNumberOfInstructorsDisplayedToStudents(String courseId) { List<InstructorAttributes> instructors = logic.getInstructorsForCourse(courseId); return instructors.stream().filter(instructor -> instructor.isDisplayedToStudents).count(); }
Source:
<code>public void endWithFailure() { setSucceeded(true); if (getParameters().getStage() <START> != LiveMigrateStage.AUTO_GENERATED_SNAPSHOT_REMOVE_START) { <END> ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation( getMovedDiskIds(), ImageStatus.OK, ImageStatus.OK, getCompensationContext()); } }</code><technical_language>RemoveSnapshot fail validate() methoid - iterate disks free in LOCKED status</technical_language>

Target:
public void endWithFailure() { setSucceeded(true); if (getParameters().getStage() == LiveMigrateStage.CREATE_SNAPSHOT) { ImagesHandler.updateAllDiskImagesSnapshotsStatusInTransactionWithCompensation( getMovedDiskIds(), ImageStatus.OK, ImageStatus.OK, getCompensationContext()); } }
Source:
<code>private void preExpandCollapseNotify() { notifyExpandBar(SWT.Activate); notifyExpandBar(SWT.FocusIn); <START> notifyExpandBar(SWT.MouseDown); <END> }</code><technical_language>I test (in Linux) I SWT.MouseDown SWT.MouseUp events sent? Do you? I if I click empty space of ExpandBar, if I click ExpandItem expand collapse it</technical_language>

Target:
private void preExpandCollapseNotify() { notifyExpandBar(SWT.Activate, super.createEvent()); notifyExpandBar(SWT.FocusIn, super.createEvent()); notifyExpandBar(SWT.MouseDown, super.createEvent()); }