auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean isLowerOrEqualParameterTypes(IService service1, IService service2) { final List<IType> paramTypes1 = service1.getParameterTypes(queryEnvironment); final List<IType> paramTypes2 = service2.getParameterTypes(queryEnvironment); boolean result = paramTypes1.size() == paramTypes2.size(); if (result) { final Iterator<IType> it1 = paramTypes1.iterator(); final Iterator<IType> it2 = paramTypes2.iterator(); <START> while (it1.hasNext()) { <END> IType paramType1 = it1.next(); IType paramType2 = it2.next(); if (!paramType2.isAssignableFrom(paramType1)) { result = false; break; } } } return result; }</code><technical_language>&& result</technical_language>

Target:
private boolean isLowerOrEqualParameterTypes(IService service1, IService service2) { final List<IType> paramTypes1 = service1.getParameterTypes(queryEnvironment); final List<IType> paramTypes2 = service2.getParameterTypes(queryEnvironment); boolean result = paramTypes1.size() == paramTypes2.size(); final Iterator<IType> it1 = paramTypes1.iterator(); final Iterator<IType> it2 = paramTypes2.iterator(); while (result && it1.hasNext()) { IType paramType1 = it1.next(); IType paramType2 = it2.next(); if (!paramType2.isAssignableFrom(paramType1)) { result = false; } } return result; }
Source:
<code>public Response updatePolicy(@PathParam("tenant") String tenant, @PathParam("subject") String subject, @PathParam("policyId") String policyId, String policy) { <START> LOGGER.debug("Updating policy with id [" + policyId + "] for [" + tenant + "] and subject [" + subject + "]"); <END> String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { Policy newP = dao.updatePolicy(new Policy(id, tenant, subject, policy)); return Response.ok(newP.getPolicy()).build(); } else { return Response.status(404).build(); } }</code><technical_language><LINK_0></technical_language>

Target:
public Response updatePolicy(@PathParam("tenant") String tenant, @PathParam("subject") String subject, @PathParam("policyId") String policyId, String policy) { LOGGER.debug("Updating policy with id for and subject [{}]", policyId, tenant, subject); String id = URLEncoding.decode(policyId); Policy p = dao.loadPolicy(tenant, subject, id); if (p != null) { Policy newP = dao.updatePolicy(new Policy(id, tenant, subject, policy)); return Response.ok(newP.getPolicy()).build(); } else { return Response.status(404).build(); } }
Source:
<code>public void testList() { FluentIterable<VPC> vpcs = client.describeVpcsInRegion(null); <START> assertTrue(!vpcs.toList().isEmpty()); <END> }</code><technical_language>assertFalse. Also, check created VPC is in list, check method passing region id too</technical_language>

Target:
public void testList() { FluentIterable<VPC> vpcs = client.describeVpcsInRegion(null); assertFalse(vpcs.toList().isEmpty()); }
Source:
<code>public void delete() { KernelTransaction transaction = safeAcquireTransaction(); try { boolean deleted = transaction.dataWrite().nodeDelete( getId() ); if ( !deleted ) { throw new NotFoundException( "Unable to delete Node[" + nodeId + "] since it has already been deleted." ); } } catch ( InvalidTransactionTypeKernelException e ) { throw new ConstraintViolationException( e.getMessage(), e ); } catch ( AutoIndexingKernelException e ) { throw new IllegalStateException( "Auto indexing encountered a failure while deleting the node: " + e.getMessage(), e ); } catch ( EntityNotFoundException e ) { throw new NotFoundException( "Unable to delete node[" + getId() + "] since it is already deleted." ); <START> } <END> }</code><technical_language>This handled nodeDelete return value, need this catch</technical_language>

Target:
public void delete() { KernelTransaction transaction = safeAcquireTransaction(); try { boolean deleted = transaction.dataWrite().nodeDelete( getId() ); if ( !deleted ) { throw new NotFoundException( "Unable to delete Node[" + nodeId + "] since it has already been deleted." ); } } catch ( InvalidTransactionTypeKernelException e ) { throw new ConstraintViolationException( e.getMessage(), e ); } catch ( AutoIndexingKernelException e ) { throw new IllegalStateException( "Auto indexing encountered a failure while deleting the node: " + e.getMessage(), e ); } }
Source:
<code>public void compareReplicaIndexEntriestoLogContent(String replicaRootDirectory, String logFile) throws Exception { if (logFile == null) { logger.error("logFile needs to be set for compareIndexToLog"); System.exit(0); } RandomAccessFile randomAccessFile = new RandomAccessFile(new File(logFile), "r"); logger.info("Comparing Index entries to Log "); File replicaDirectory = new File(replicaRootDirectory); for (File indexFile : replicaDirectory.listFiles(new IndexFileNameFilter())) { TreeMap<Long, Long> coveredRanges = new TreeMap<Long, Long>(); Set<Long> deleteMsgsOriginalOffsets = new HashSet<Long>(); compareIndexEntriesToLogContent(indexFile, replicaDirectory, randomAccessFile, coveredRanges, deleteMsgsOriginalOffsets); <START> } <END> }</code><technical_language>how/where checking index segments cover log</technical_language>

Target:
public void compareReplicaIndexEntriestoLogContent(String replicaRootDirectory, String logFile) throws Exception { if (logFile == null) { logger.error("logFile needs to be set for compareIndexToLog"); System.exit(0); } RandomAccessFile randomAccessFile = new RandomAccessFile(new File(logFile), "r"); logger.info("Comparing Index entries to Log "); File replicaDirectory = new File(replicaRootDirectory); File[] replicas = replicaDirectory.listFiles(new IndexFileNameFilter()); Arrays.sort(replicas, new ConsistencyCheckerTool.IndexFileNameComparator()); for (File indexFile : replicas) { compareIndexEntriesToLogContent(indexFile, replicaDirectory, randomAccessFile); } }
Source:
<code>private WorkerJvm startWorkerJvm(String mode) throws IOException { String workerId = "worker-" + getHostAddress() + "-" + WORKER_ID_GENERATOR.incrementAndGet() + "-" + mode; File workerHome = new File(testSuiteDir, workerId); Utils.ensureExistingDirectory(workerHome); String javaHome = getJavaHome(settings.javaVendor, settings.javaVersion); WorkerJvm workerJvm = new WorkerJvm(workerId); workerJvm.workerHome = workerHome; generateWorkerStartScript(mode, workerJvm); ProcessBuilder processBuilder = new ProcessBuilder(new String[]{"bash", "worker.sh"}) .directory(workerHome) .redirectErrorStream(true); Map<String, String> environment = processBuilder.environment(); String path = javaHome + File.pathSeparator + "bin:" + environment.get("PATH"); environment.put("PATH", path); environment.put("JAVA_HOME", javaHome); Process process = processBuilder.start(); File logFile = new File(workerHome, "out.log"); new WorkerJvmProcessOutputGobbler(process.getInputStream(), new FileOutputStream(logFile)).start(); workerJvm.process = process; workerJvm.mode = WorkerJvm.Mode.valueOf(mode.toUpperCase()); <START> uploadResourcesToWorker(workerId); <END> workerJVMs.put(workerId, workerJvm); return workerJvm; }</code><technical_language>I call this copyResourcesToWorkerId, uploading afaik is done</technical_language>

Target:
private WorkerJvm startWorkerJvm(String mode) throws IOException { String workerId = "worker-" + getHostAddress() + "-" + WORKER_ID_GENERATOR.incrementAndGet() + "-" + mode; File workerHome = new File(testSuiteDir, workerId); Utils.ensureExistingDirectory(workerHome); String javaHome = getJavaHome(settings.javaVendor, settings.javaVersion); WorkerJvm workerJvm = new WorkerJvm(workerId); workerJvm.workerHome = workerHome; generateWorkerStartScript(mode, workerJvm); ProcessBuilder processBuilder = new ProcessBuilder(new String[]{"bash", "worker.sh"}) .directory(workerHome) .redirectErrorStream(true); Map<String, String> environment = processBuilder.environment(); String path = javaHome + File.pathSeparator + "bin:" + environment.get("PATH"); environment.put("PATH", path); environment.put("JAVA_HOME", javaHome); Process process = processBuilder.start(); File logFile = new File(workerHome, "out.log"); new WorkerJvmProcessOutputGobbler(process.getInputStream(), new FileOutputStream(logFile)).start(); workerJvm.process = process; workerJvm.mode = WorkerJvm.Mode.valueOf(mode.toUpperCase()); copyResourcesToWorkerId(workerId); workerJVMs.put(workerId, workerJvm); return workerJvm; }
Source:
<code>public void onStart(SourceCallback<T, A> sourceCallback) throws MuleException { delegate.onStart(sourceCallback); flowName = componentLocation.getRootContainerName(); inflightIdsObjectStore = objectStoreManager.getOrCreateObjectStore(formatKey(INFLIGHT_IDS_OS_NAME_SUFFIX), unmanagedTransient()); recentlyProcessedIds = objectStoreManager.getOrCreateObjectStore(formatKey(RECENTLY_PROCESSED_IDS_OS_NAME_SUFFIX), unmanagedPersistent()); idsOnUpdatedWatermark = objectStoreManager.getOrCreateObjectStore(formatKey(IDS_ON_UPDATED_WATERMARK_OS_NAME_SUFFIX), unmanagedPersistent()); watermarkObjectStore = objectStoreManager.getOrCreateObjectStore(formatKey(WATERMARK_OS_NAME_SUFFIX), unmanagedPersistent()); executor = schedulerService.customScheduler(SchedulerConfig.config() .withMaxConcurrentTasks(1) <START> .withWaitAllowed(true) <END> .withName(formatKey("executor"))); stopRequested.set(false); if (restarting.compareAndSet(true, false)) { delegateRunnable.setDelegate(() -> poll(sourceCallback)); poll(sourceCallback); } else { delegateRunnable = new DelegateRunnable(() -> poll(sourceCallback)); scheduler.schedule(executor, delegateRunnable); } }</code><technical_language>I understand point of this... if this guy is reconnecting is failed while executing. means simply poll() simply scheduler.schedule(executor, () -> poll(sourceCallback));... else added unnecessary. I missing</technical_language>

Target:
public void onStart(SourceCallback<T, A> sourceCallback) throws MuleException { delegate.onStart(sourceCallback); flowName = componentLocation.getRootContainerName(); inflightIdsObjectStore = objectStoreManager.getOrCreateObjectStore(formatKey(INFLIGHT_IDS_OS_NAME_SUFFIX), unmanagedTransient()); recentlyProcessedIds = objectStoreManager.getOrCreateObjectStore(formatKey(RECENTLY_PROCESSED_IDS_OS_NAME_SUFFIX), unmanagedPersistent()); idsOnUpdatedWatermark = objectStoreManager.getOrCreateObjectStore(formatKey(IDS_ON_UPDATED_WATERMARK_OS_NAME_SUFFIX), unmanagedPersistent()); watermarkObjectStore = objectStoreManager.getOrCreateObjectStore(formatKey(WATERMARK_OS_NAME_SUFFIX), unmanagedPersistent()); stopRequested.set(false); if (restarting.compareAndSet(true, false)) { poll(sourceCallback); delegateRunnable.setDelegate(() -> poll(sourceCallback)); } else { executor = schedulerService.customScheduler(SchedulerConfig.config() .withMaxConcurrentTasks(1) .withWaitAllowed(true) .withName(formatKey("executor"))); delegateRunnable = new DelegateRunnable(() -> poll(sourceCallback)); scheduler.schedule(executor, delegateRunnable); } }
Source:
<code>public RangePickerDecimalWidget(Context context, QuestionDetails questionDetails) { super(context, questionDetails); RangePickerViewModel rangePickerViewModel = new ViewModelProvider(((ScreenContext) getContext()).getActivity(), new ViewModelProvider.NewInstanceFactory()).get(RangePickerViewModel.class); rangePickerViewModel.getNumberPickerValue().observe(((ScreenContext) getContext()).getViewLifecycle(), answer -> { if (answer != null) { <START> progress = rangePickerViewModel.getNumberPickerProgress(rangeStart, rangeStep, rangeEnd, answer); <END> binding.widgetAnswerText.setText(rangePickerViewModel.getStringAnswer()); binding.widgetButton.setText(R.string.edit_value); } }); }</code><technical_language>I feel getNumberPickerProgress remain a util method rely state in view model</technical_language>

Target:
public RangePickerDecimalWidget(Context context, QuestionDetails questionDetails) { super(context, questionDetails); }
Source:
<code>public String createUser(StudyParticipant participant, boolean consentUser) { session.checkSignedIn(); ObjectNode node = (ObjectNode)Utilities.getMapper().valueToTree(participant); node.put("consent", Boolean.toString(consentUser)); JsonNode sessionNode = postForJSON(config.getUsersApi(), node); <START> return sessionNode.get("id").asText(); <END> }</code><technical_language>If expect session ID, part of UserSession object</technical_language>

Target:
public String createUser(StudyParticipant participant, boolean consentUser) { session.checkSignedIn(); ObjectNode node = (ObjectNode)Utilities.getMapper().valueToTree(participant); node.put("consent", Boolean.toString(consentUser)); UserSession userSession = post(config.getUsersApi(), node, UserSession.class); return userSession.getStudyParticipant().getId(); }
Source:
<code>public static int writeStreamEvent(final OutputStream outputStream, final Cursor cursor, final List<byte[]> events) throws IOException { final CountingOutputStream countingOutputStream = new CountingOutputStream(outputStream) { @Override public void flush() throws IOException { } }; final Writer writer = new OutputStreamWriter(countingOutputStream); writer.write("{\"cursor\":{\"partition\":\""); writer.write(cursor.getPartition()); writer.write("\",\"offset\":\""); writer.write(cursor.getOffset()); writer.write("\"}"); if (!events.isEmpty()) { writer.write(",\"events\":["); writer.flush(); boolean first = true; for (final byte[] event : events) { if (!first) { <START> countingOutputStream.write(','); <END> } countingOutputStream.write(event); first = false; } countingOutputStream.write(']'); } writer.write("}"); writer.write(BATCH_SEPARATOR); writer.flush(); outputStream.flush(); return countingOutputStream.getCount(); }</code><technical_language>countingOutputStream writer, counting events byte size size</technical_language>

Target:
public static int writeStreamEvent(final OutputStream outputStream, final Cursor cursor, final List<byte[]> events) throws IOException { final CountingOutputStream countingOutputStream = new CountingOutputStream(outputStream) { @Override public void flush() throws IOException { } }; final Writer writer = new OutputStreamWriter(countingOutputStream, UTF_8); writer.write("{\"cursor\":{\"partition\":\""); writer.write(cursor.getPartition()); writer.write("\",\"offset\":\""); writer.write(cursor.getOffset()); writer.write("\"}"); if (!events.isEmpty()) { writer.write(",\"events\":["); writer.flush(); boolean first = true; for (final byte[] event : events) { if (!first) { countingOutputStream.write(','); } countingOutputStream.write(event); first = false; } countingOutputStream.write(']'); } writer.write("}"); writer.write(BATCH_SEPARATOR); writer.flush(); outputStream.flush(); return countingOutputStream.getCount(); }
Source:
<code>public boolean contains(float[] coords) { int polyCorners = abscissa.length; int j = polyCorners - 1; boolean oddNodes = false; for (int i = 0; i < polyCorners; i++) { <START> if(abscissa[i] == coords[0] && ordinate[i] == coords[1]) { <END> return true; } if(ordinate[i] == ordinate[j] && ordinate[j] == coords[1]) { if ((abscissa[i] < abscissa[j] && abscissa[j] > coords[0] && abscissa[i] < coords[0]) || (abscissa[i] > abscissa[j] && abscissa[j] < coords[0] && abscissa[i] > coords[0])) { return true; } } if ((ordinate[i] < coords[1] && ordinate[j] >= coords[1] || ordinate[j] < coords[1] && ordinate[i] >= coords[1]) && (abscissa[i] <= coords[0] || abscissa[j] <= coords[0])) { if (abscissa[i] + (coords[1] - ordinate[i]) / (ordinate[j] - ordinate[i]) * (abscissa[j] - abscissa[i]) == coords[0]) { return true; } else if (abscissa[i] + (coords[1] - ordinate[i]) / (ordinate[j] - ordinate[i]) * (abscissa[j] - abscissa[i]) < coords[0]) { oddNodes = !oddNodes; } } j = i; } return oddNodes; }</code><technical_language>Add space</technical_language>

Target:
public boolean contains(float[] coords) { int polyCorners = abscissa.length; int j = polyCorners - 1; boolean oddNodes = false; for (int i = 0; i < polyCorners; i++) { if (abscissa[i] == coords[0] && ordinate[i] == coords[1]) { return true; } if (isPointLayingOnHorizontalBound(i, j, coords)) { return true; } if (between(ordinate[i], ordinate[j], coords[1]) && (abscissa[j] <= coords[0] || abscissa[i] <= coords[0])) { float intersectionPointX = abscissa[i] + (coords[1] - ordinate[i]) / (ordinate[j] - ordinate[i]) * (abscissa[j] - abscissa[i]); if (intersectionPointX == coords[0]) { return true; } else if (intersectionPointX < coords[0]) { oddNodes = !oddNodes; } } j = i; } return oddNodes; }
Source:
<code>private static GeometryType find( int gtype ) { for ( GeometryType type : GeometryType.values() ) { <START> if ( type.gtype == gtype ) <END> { return type; } } return null; }</code><technical_language>this field is public</technical_language>

Target:
private static GeometryType find( int gtype ) { if ( gtype < TYPES.length ) { return TYPES[gtype]; } else { return GEOMETRY_INVALID; } }
Source:
<code><START> private HttpResponse readFromStream(Properties properties, long startTime, long endTime) throws Exception { <END> String host = properties.getProperty("sink1.host"); String port = properties.getProperty("sink1.port"); boolean ssl = Boolean.parseBoolean(properties.getProperty("sink1.ssl")); String streamId = properties.getProperty("sink1.streamName"); String authClientPropertiesPath = properties.getProperty("sink1.authClientProperties"); URI baseUrl = URI.create(String.format("%s://%s:%s", ssl ? "https" : "http", host, port)); HttpGet getRequest = new HttpGet(baseUrl.resolve(String.format("/v2/streams/%s/events?start=%s&end=%s", streamId, startTime, endTime))); if (authClientPropertiesPath != null) { String authClientClassName = properties.getProperty( "sink1.authClientClass", "co.cask.cdap.security.authentication.client.basic.BasicAuthenticationClient"); AuthenticationClient authClient = (AuthenticationClient) Class.forName(authClientClassName).newInstance(); Properties authProperties = new Properties(); InputStream inStream = null; try { inStream = new FileInputStream(authClientPropertiesPath); properties.load(inStream); authClient.configure(properties); authClient.setConnectionInfo(host, Integer.parseInt(port), ssl); AccessToken token = authClient.getAccessToken(); getRequest.setHeader("Authorization", token.getTokenType() + " " + token.getValue()); } finally { try { if (inStream != null) { inStream.close(); } } catch (IOException e) { } } } CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager( new BasicHttpClientConnectionManager()).build(); HttpResponse response = httpClient.execute(getRequest); return response; }</code><technical_language>is a reason need apache.http for URL connections? useJava's URL.openConnection()? try avoid pulling in extra libraries is strictly required. If for more convenience, HttpRequests in cdap-common</technical_language>

Target:
private String readFromStream(Properties properties, long startTime, long endTime) throws Exception { URI baseUrl = URI.create(String.format("%s://%s:%s", ssl ? "https" : "http", cdapHost, cdapPort)); HttpGet getRequest = new HttpGet(baseUrl.resolve(String.format("/v2/streams/%s/events?start=%s&end=%s", streamId, startTime, endTime))); if (authClientPropertiesPath != null) { AuthenticationClient authClient = configureAuthClient(); AccessToken token = authClient.getAccessToken(); getRequest.setHeader("Authorization", token.getTokenType() + " " + token.getValue()); } CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager( new BasicHttpClientConnectionManager()).build(); HttpResponse response = httpClient.execute(getRequest); String res = EntityUtils.toString(response.getEntity()); Closeables.close(httpClient, true); return res; }
Source:
<code>protected void onLogin(final LoginModel loginModel) { ReportInit.getInstance().init(); ReportInit.getInstance().getReportsInitEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { <START> updateAvailability(); <END> } }); performLogin(loginModel); }</code><technical_language>updateAvialability() calls -> updateAvailability(SystemTreeItemType.System, null); reports init is longer blocking ui is guarantee system tree selected item is 'System'. Calling updateAvialability() update tabs (not reports) if system is selected. In opinion, extract a method in CommonModel update reports availability call in here</technical_language>

Target:
protected void onLogin(final LoginModel loginModel) { ReportInit.getInstance().init(); ReportInit.getInstance().getReportsInitEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { updateReportsAvailability(); } }); performLogin(loginModel); }
Source:
<code><START> protected Collection<Worker> getWorkerFromZK(Collection<ZkWorker> workers) <END> { return Collections2.transform( workers, new Function<ZkWorker, Worker>() { @Override public Worker apply(ZkWorker input) { return input.getWorker(); } } ); }</code><technical_language>this private? RTR subclasses I</technical_language>

Target:
public static Collection<Worker> getWorkerFromZK(Collection<ZkWorker> workers) { return Collections2.transform( workers, new Function<ZkWorker, Worker>() { @Override public Worker apply(ZkWorker input) { return input.getWorker(); } } ); }
Source:
<code>public List<NearestNeighborsResult> search() { INDArray input = points.slice(record.getInputIndex()); List<NearestNeighborsResult> results = new ArrayList<>(); if (input.isVector()) { List<DataPoint> add = new ArrayList<>(); List<Double> distances = new ArrayList<>(); tree.search(input, record.getK(), add, distances); if (add.size() != distances.size()) { throw new IllegalStateException( <START> String.format("add.size(%d) != distances.size(%d)", <END> add.size(), distances.size())); } for (int i=0; i<add.size(); i++) { results.add(new NearestNeighborsResult(add.get(i).getIndex(), distances.get(i))); } } return results; }</code><technical_language>While I applaud of format, this syntax lead readers of add.size() is argument size. "add.size == %d != %d == distances.size"</technical_language>

Target:
public List<NearestNeighborsResult> search() { INDArray input = points.slice(record.getInputIndex()); List<NearestNeighborsResult> results = new ArrayList<>(); if (input.isVector()) { List<DataPoint> add = new ArrayList<>(); List<Double> distances = new ArrayList<>(); tree.search(input, record.getK(), add, distances); if (add.size() != distances.size()) { throw new IllegalStateException( String.format("add.size == %d != %d == distances.size", add.size(), distances.size())); } for (int i=0; i<add.size(); i++) { results.add(new NearestNeighborsResult(add.get(i).getIndex(), distances.get(i))); } } return results; }
Source:
<code><START> public Map<String, List<String>> getRequestMetadata(URI uri) throws IOException { <END> if (uri == null) { if (defaultAudience != null) { uri = defaultAudience; } else { throw new IOException("JwtAccess requires Audience uri to be passed in or the " + "defaultAudience to be specified"); } } try { JwtCredentials.Claims defaultClaims = JwtCredentials.Claims.newBuilder() .setAudience(uri.toString()) .setIssuer(clientEmail) .setSubject(clientEmail) .build(); JwtCredentials credentials = credentialsCache.get(defaultClaims); return credentials.getRequestMetadata(uri); } catch (ExecutionException e) { Throwables.propagateIfPossible(e.getCause(), IOException.class); throw new IllegalStateException("generateJwtAccess threw an unexpected checked exception", e.getCause()); } catch (UncheckedExecutionException e) { Throwables.propagateIfPossible(e); throw new IllegalStateException("generateJwtAccess threw an unchecked exception that couldn't be rethrown", e); } }</code><technical_language>Assuming this is ok google-auth-library-java version is < 1.x.x, wanted highlight in case :)</technical_language>

Target:
public Map<String, List<String>> getRequestMetadata(URI uri) throws IOException { if (uri == null) { if (defaultAudience != null) { uri = defaultAudience; } else { throw new IOException( "JwtAccess requires Audience uri to be passed in or the " + "defaultAudience to be specified"); } } try { JwtClaims defaultClaims = JwtClaims.newBuilder() .setAudience(uri.toString()) .setIssuer(clientEmail) .setSubject(clientEmail) .build(); JwtCredentials credentials = credentialsCache.get(defaultClaims); return credentials.getRequestMetadata(uri); } catch (ExecutionException e) { Throwables.propagateIfPossible(e.getCause(), IOException.class); throw new IllegalStateException( "generateJwtAccess threw an unexpected checked exception", e.getCause()); } catch (UncheckedExecutionException e) { Throwables.throwIfUnchecked(e); throw new IllegalStateException( "generateJwtAccess threw an unchecked exception that couldn't be rethrown", e); } }
Source:
<code><START> public void setUp() throws Exception { <END> tested = new CaseManagementSwitchViewServiceImpl(factoryManager, definitionSetServiceInstances); }</code><technical_language>Exception is thrown</technical_language>

Target:
public void setUp() { tested = new CaseManagementSwitchViewServiceImpl(factoryManager, definitionSetServiceInstances); }
Source:
<code>public MITIENERecogniser(String modelPath) { try { if(!(new File(modelPath)).exists()) { LOG.warn("{} does not exist", modelPath); }else { Class<?> namedEntityExtractorClass = Class.forName(NamedEntityExtractor_Class); <START> extractorInstance = namedEntityExtractorClass.getDeclaredConstructor(new Class[]{String.class}).newInstance("/Users/manali/cs599_dr/MITIE/MITIE-models/english/ner_model.dat"); <END> this.available = true; } } catch (Exception e) { LOG.warn("{} while trying to load the model from {}", e.getMessage(), modelPath); } LOG.info("Available for service ? {}", available); }</code><technical_language>@manalishah Please path function parameter instead of hardcoded string. forgot modify in moment ;-)</technical_language>

Target:
public MITIENERecogniser(String modelPath) { try { if(!(new File(modelPath)).exists()) { LOG.warn("{} does not exist", modelPath); }else { Class<?> namedEntityExtractorClass = Class.forName(NamedEntityExtractor_Class); extractorInstance = namedEntityExtractorClass.getDeclaredConstructor(new Class[]{String.class}).newInstance(modelPath); this.available = true; } } catch (Exception e) { LOG.warn("{} while trying to load the model from {}", e.getMessage(), modelPath); } LOG.info("Available for service ? {}", available); }
Source:
<code>private void endInput() { <START> stats.setNumBytesRead(this.streamPosition()); <END> in = null; }</code><technical_language>s/this.//</technical_language>

Target:
private void endInput() { stats.setNumBytesRead(streamPosition()); in = null; }
Source:
<code>public void testHistoryGet() throws Exception { final String path = "git"; Response response = target("history") .queryParam("path", path) .request() .get(); HistoryDTO history = response.readEntity(new GenericType<HistoryDTO>() {}); History repoHistory = HistoryGuru.getInstance().getHistory(new File(repository.getSourceRoot(), path)); <START> assertEquals(history, getHistoryDTO(repoHistory.getHistoryEntries())); <END> }</code><technical_language>assert more - contanins some string, minimal length? relies serialization broken catch it</technical_language>

Target:
public void testHistoryGet() throws Exception { final String path = "git"; int size = 5; int start = 2; Response response = target("history") .queryParam("path", path) .queryParam("max", size) .queryParam("start", start) .request() .get(); HistoryDTO history = response.readEntity(new GenericType<HistoryDTO>() {}); assertEquals(size, history.getEntries().size()); assertEquals("Kryštof Tulinger <krystof.tulinger@oracle.com>", history.getEntries().get(0).getAuthor()); History repoHistory = HistoryGuru.getInstance().getHistory(new File(repository.getSourceRoot(), path)); assertEquals(history, getHistoryDTO(repoHistory.getHistoryEntries(size, start), start, size, repoHistory.getHistoryEntries().size())); }
Source:
<code>public void commitAssignExternalId(ExternalIdentifier externalId) { if (externalId != null) { try { mapper.save(externalId, getHealthCodeAssignedExpression(false)); } catch(ConditionalCheckFailedException e) { throw new EntityAlreadyExistsException(ExternalIdentifier.class, IDENTIFIER, externalId.getIdentifier()); } <START> } <END> }</code><technical_language>Deleting this logic means if caller submits arbitrarily large list of external IDs, this arbitrarily large amount of DDB capacity time. continue enforce add size limit</technical_language>

Target:
public void commitAssignExternalId(ExternalIdentifier externalId) { if (externalId != null) { DynamoExternalIdentifier key = new DynamoExternalIdentifier( externalId.getStudyId(), externalId.getIdentifier()); if (externalId.getHealthCode() == null || mapper.load(key) == null) { throw new ConcurrentModificationException("External ID was concurrently deleted or assigned"); } try { mapper.save(externalId, getHealthCodeAssignedExpression(false)); } catch(ConditionalCheckFailedException e) { throw new EntityAlreadyExistsException(ExternalIdentifier.class, IDENTIFIER, externalId.getIdentifier()); } } }
Source:
<code>private SamInputResource getRemoteResource(String objectId) { metaQuery.setObjectId(objectId); URL bamFileUrl = downloader.getUrl(objectId, 0, -1); Optional<String> indexFileId = metaQuery.getAssociatedIndexObjectId(); <START> if (!indexFileId.isPresent()) { <END> throw new RuntimeException(String.format("No index file associated with BAM file (object_id = {})", objectId)); } URL indexFileUrl = downloader.getUrl(indexFileId.get()); NullSourceSeekableHTTPStream bamFileHttpStream = new NullSourceSeekableHTTPStream(bamFileUrl); NullSourceSeekableHTTPStream indexFileHttpStream = new NullSourceSeekableHTTPStream(indexFileUrl); SamInputResource resource = SamInputResource.of(bamFileHttpStream).index(indexFileHttpStream); return resource; }</code><technical_language>import static guava.Preconditions.checkState checkState(indexFileId.isPresent(), "No index file BAM file (object_id = %s)", objectId)</technical_language>

Target:
private SamInputResource getRemoteResource(String objectId) { metaQuery.setObjectId(objectId); URL bamFileUrl = downloader.getUrl(objectId, 0, -1); Optional<String> indexFileId = metaQuery.getAssociatedIndexObjectId(); checkState(indexFileId.isPresent(), "No index file associated with BAM file (object_id = %s)", objectId); URL indexFileUrl = downloader.getUrl(indexFileId.get()); NullSourceSeekableHTTPStream bamFileHttpStream = new NullSourceSeekableHTTPStream(bamFileUrl); NullSourceSeekableHTTPStream indexFileHttpStream = new NullSourceSeekableHTTPStream(indexFileUrl); SamInputResource resource = SamInputResource.of(bamFileHttpStream).index(indexFileHttpStream); return resource; }
Source:
<code>RotatingFileOutputStreamSupplier( LongSupplier currentTimeSupplier, FileSystemAbstraction fileSystem, File outputFile, long rotationThresholdBytes, long rotationDelay, int maxArchives, Executor rotationExecutor, RotationListener rotationListener ) throws IOException { this.currentTimeSupplier = currentTimeSupplier; this.fileSystem = fileSystem; this.outputFile = outputFile; this.rotationThresholdBytes = rotationThresholdBytes; this.rotationDelay = rotationDelay; this.maxArchives = maxArchives; this.rotationListener = rotationListener; this.rotationExecutor = rotationExecutor; this.outRef.set( openOutputFile() ); this.streamWrapper = new OutputStream() { @Override public void write( int i ) throws IOException { <START> synchronized ( outRef ) <END> { outRef.get().write( i ); } } @Override public void write( byte[] bytes ) throws IOException { synchronized ( outRef ) { outRef.get().write( bytes ); } } @Override public void write( byte[] bytes, int off, int len ) throws IOException { synchronized ( outRef ) { outRef.get().write( bytes, off, len ); } } @Override public void flush() throws IOException { synchronized ( outRef ) { outRef.get().flush(); } } }; }</code><technical_language>synchronize outRef. Do need AtomicReference</technical_language>

Target:
RotatingFileOutputStreamSupplier( LongSupplier currentTimeSupplier, FileSystemAbstraction fileSystem, File outputFile, long rotationThresholdBytes, long rotationDelay, int maxArchives, Executor rotationExecutor, RotationListener rotationListener ) throws IOException { this.currentTimeSupplier = currentTimeSupplier; this.fileSystem = fileSystem; this.outputFile = outputFile; this.rotationThresholdBytes = rotationThresholdBytes; this.rotationDelay = rotationDelay; this.maxArchives = maxArchives; this.rotationListener = rotationListener; this.rotationExecutor = rotationExecutor; this.outRef = openOutputFile(); this.streamWrapper = new OutputStream() { @Override public void write( int i ) throws IOException { logFileLock.readLock().lock(); try { outRef.write( i ); } finally { logFileLock.readLock().unlock(); } } @Override public void write( byte[] bytes ) throws IOException { logFileLock.readLock().lock(); try { outRef.write( bytes ); } finally { logFileLock.readLock().unlock(); } } @Override public void write( byte[] bytes, int off, int len ) throws IOException { logFileLock.readLock().lock(); try { outRef.write( bytes, off, len ); } finally { logFileLock.readLock().unlock(); } } @Override public void flush() throws IOException { logFileLock.readLock().lock(); try { outRef.flush(); } finally { logFileLock.readLock().unlock(); } } }; }
Source:
<code>public void start(BundleContext context) throws Exception { Thread t = new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(500); } catch (InterruptedException e) { } setUpJena(); } }); t.start(); <START> } <END></code><technical_language>is a thread is local get classloader</technical_language>

Target:
public void start(BundleContext context) throws Exception { JenaSubsystemRegistry r = new JenaSubsystemRegistryBasic() { @Override public void load() { super.load(); } }; JenaSystem.setSubsystemRegistry(r); JenaSystem.DEBUG_INIT = true; JenaSystem.init(); System.out.println("Jena-OSGi bundle configuration done!"); }
Source:
<code>public DimFilter optimize() { if (this.getExtractionFn() instanceof LookupExtractionFn && ((LookupExtractionFn) this.getExtractionFn()).isOptimize()) { LookupExtractor lookup = ((LookupExtractionFn) this.getExtractionFn()).getLookup(); final List<String> keys = lookup.unapply(this.getValue()); final String dimensionName = this.getDimension(); if (!keys.isEmpty()) { <START> return new OrDimFilter(Lists.transform(keys, new Function<String, DimFilter>() <END> { @Override public DimFilter apply(String input) { return new SelectorDimFilter(dimensionName, input, null); } })); } } return this; }</code><technical_language>This InDimFilter (it copied this ExtractionDimFilter, updated that)</technical_language>

Target:
public DimFilter optimize() { if (this.getExtractionFn() instanceof LookupExtractionFn && ((LookupExtractionFn) this.getExtractionFn()).isOptimize()) { LookupExtractionFn exFn = (LookupExtractionFn) this.getExtractionFn(); LookupExtractor lookup = exFn.getLookup(); final String convertedValue = Strings.emptyToNull(value); if (!exFn.isRetainMissingValue() && Objects.equals(convertedValue, exFn.getReplaceMissingValueWith())) { return this; } final String mappingForValue = lookup.apply(convertedValue); final List<String> keys = new ArrayList<>(); keys.addAll(lookup.unapply(convertedValue)); if (exFn.isRetainMissingValue() && mappingForValue == null) { keys.add(convertedValue); } if (keys.isEmpty()) { return this; } else if (keys.size() == 1) { return new SelectorDimFilter(dimension, keys.get(0), null); } else { return new InDimFilter(dimension, keys, null); } } return this; }
Source:
<code>public void addAdditionalListeners() { super.addAdditionalListeners(); ActivityPartition lifeline = getUMLElement(); if (lifeline == null) { return; } getDiagramEventBroker().addNotificationListener(lifeline, this); if (!(lifeline.getRepresents() instanceof ConnectableElement)) { return; } <START> ConnectableElement ce = (ConnectableElement) lifeline.getRepresents(); <END> if (ce != null) { getDiagramEventBroker().addNotificationListener(ce, this); if (ce.getType() != null) { getDiagramEventBroker().addNotificationListener(ce.getType(), this); } } }</code><technical_language>assumed represents is a ConnectableElement here</technical_language>

Target:
public void addAdditionalListeners() { super.addAdditionalListeners(); ActivityPartition activityPartition = getUMLElement(); if (activityPartition == null) { return; } getDiagramEventBroker().addNotificationListener(activityPartition, this); if (!(activityPartition.getRepresents() instanceof ConnectableElement)) { return; } Element el = (Element) activityPartition.getRepresents(); if (el != null) { getDiagramEventBroker().addNotificationListener(el, this); } }
Source:
<code>public File getLastThreadScreenshot() { List<File> screenshots = threadScreenshots.get(); return screenshots.isEmpty() <START> ? null <END> : screenshots.get(screenshots.size() - 1); }</code><technical_language>return Optional instead of null</technical_language>

Target:
public Optional<File> getLastThreadScreenshot() { List<File> screenshots = threadScreenshots.get(); return getLastScreenshot(screenshots); }
Source:
<code>public void unselectsSelection() throws Exception { bot.radio("SWT.MULTI").click(); bot.checkBox("Listen").select(); bot.button("Clear").click(); table = bot.tableInGroup("Table"); table.select(new int[] {1, 2, 3}); SWTBotText text = bot.textInGroup("Listeners"); bot.button("Clear").click(); table.unselect(1); assertEquals(2, table.selectionCount()); <START> assertEventMatches(text, "Selection [13]: SelectionEvent{Table time=-550222256 data=null item=TableItem {Index:1} detail=0 x=0 y=0 width=0 height=0 stateMask=0xc0000 text=null doit=true}"); <END> assertEventMatches(text, "MouseDown [3]: MouseEvent{Table time=-550222259 data=null button=1 stateMask=0x40000 x=0 y=0 count=1}"); assertEventMatches(text, "MouseUp [4]: MouseEvent{Table time=-550222255 data=null button=1 stateMask=0xc0000 x=0 y=0 count=1}"); table.unselect(); assertEquals(0, table.selectionCount()); }</code><technical_language>Selection MouseDown</technical_language>

Target:
public void unselectsSelection() throws Exception { bot.radio("SWT.MULTI").click(); bot.checkBox("Listen").select(); bot.button("Clear").click(); table = bot.tableInGroup("Table"); table.select(new int[] { 1, 2, 3 }); SWTBotText text = bot.textInGroup("Listeners"); bot.button("Clear").click(); table.unselect(1); assertEquals(2, table.selectionCount()); assertEventMatches(text, "MouseDown [3]: MouseEvent{Table time=-550222259 data=null button=1 stateMask=0x40000 x=0 y=0 count=1}"); assertEventMatches(text, "Selection [13]: SelectionEvent{Table time=-550222256 data=null item=TableItem {Index:1} detail=0 x=0 y=0 width=0 height=0 stateMask=0xc0000 text=null doit=true}"); assertEventMatches(text, "MouseUp [4]: MouseEvent{Table time=-550222255 data=null button=1 stateMask=0xc0000 x=0 y=0 count=1}"); table.unselect(); assertEquals(0, table.selectionCount()); table.select(new int[] { 1, 2, 3 }); assertEquals(3, table.selectionCount()); table.select(new int[] {}); assertEquals(0, table.selectionCount()); }
Source:
<code><START> public List<IEventDeclaration> getEventDeclarations() { <END> ArrayList<IEventDeclaration> retVal = new ArrayList<>(fEvents); retVal.removeAll(Collections.singletonList(null)); return retVal; }</code><technical_language>Is this needed? do this do get(int id) ? If answer is: "Well iterate them, dingus!", return Iterable instead, expose underlying data structure (this allow change underlying implementation TreeMap etc. breaking this API)</technical_language>

Target:
public Collection<IEventDeclaration> getEventDeclarations() { ArrayList<IEventDeclaration> retVal = new ArrayList<>(fEvents); retVal.removeAll(Collections.singletonList(null)); return retVal; }
Source:
<code>private String argAdditionalConf( File backupTarget ) { if ( additionalConfig == null ) { return ""; } <START> File configFile = neo4jHomeFromTarget( backupTarget ).resolve( "../additional_neo4j.conf" ).toFile(); <END> writeConfigToFile( additionalConfig, configFile ); return String.format( "--additional-config=%s", configFile ); }</code><technical_language>is additional_neo4j.conf do need it? correlate other tools behavior</technical_language>

Target:
private String argAdditionalConf( File backupTarget ) throws IOException { if ( additionalConfig == null ) { return ""; } File configFile = neo4jHomeFromTarget( backupTarget ).resolve( "../additional_neo4j.conf" ).toFile(); writeConfigToFile( additionalConfig, configFile ); return String.format( "--additional-config=%s", configFile ); }
Source:
<code>public void setup() throws Exception { clock = new ManualClock(); slotPool = new SlotPoolBuilder(mainThreadExecutor).build(); bulkSlotProvider = new BulkSlotProviderImpl(LocationPreferenceSlotSelectionStrategy.createDefault(), slotPool); bulkSlotProvider.start(mainThreadExecutor); <START> slotOwner = new TestingSlotOwner(); <END> slotOwner.setReturnAllocatedSlotConsumer( logicalSlot -> slotPool.releaseSlot( logicalSlot.getSlotRequestId(), new FlinkException("Slot is being returned to the SlotPool."))); }</code><technical_language>slotOwner a local variable</technical_language>

Target:
public void setup() throws Exception { clock = new ManualClock(); slotPool = new SlotPoolBuilder(mainThreadExecutor).build(); bulkSlotProvider = new BulkSlotProviderImpl(LocationPreferenceSlotSelectionStrategy.createDefault(), slotPool); bulkSlotProvider.start(mainThreadExecutor); }
Source:
<code>private List<String> getKerberosNamedNodeList(Map<String, Object> hdfsSettings) { kerberosNamedNodes = getString(hdfsSettings, "kerberosNamedNodes", kerberosNamedNodes); <START> return Arrays.stream(kerberosNamedNodes.split(",")).distinct().collect(Collectors.toList()); <END> }</code><technical_language>This return null in some tests</technical_language>

Target:
private List<String> getKerberosNamedNodeList(Map<String, Object> hdfsSettings) { kerberosNamedNodes = getString(hdfsSettings, "kerberosNamedNodes", kerberosNamedNodes); if (isNotEmpty(kerberosNamedNodes)) { return Arrays.stream(kerberosNamedNodes.split(",")).distinct().collect(Collectors.toList()); } return Collections.emptyList(); }
Source:
<code>public static List<CigarElement> clipEndOfRead(final int clipFrom, final List<CigarElement> oldCigar, final CigarOperator clippingOperator) { <START> ValidationUtils.validateArg(clippingOperator.isClipping(), "Clipping operator should be SOFT or HARD clip, found " + clippingOperator.toString()); <END> final int clippedBases = (int)CoordMath.getLength(clipFrom, Cigar.getReadLength(oldCigar)); List<CigarElement> newCigar = new LinkedList<CigarElement>(); int pos = 1; for (CigarElement c : oldCigar) { final CigarOperator op = c.getOperator(); final int length = op.consumesReadBases()? c.getLength() : 0; final int endPos = pos + length - 1; if (endPos < (clipFrom - 1)) { newCigar.add(c); } else if (endPos >= (clipFrom - 1)) { elementStraddlesClippedRead(newCigar, c, (clipFrom -1) - (pos -1) , clippedBases, clippingOperator); break; } pos = endPos + 1; } return newCigar; }</code><technical_language>() -> form avoid constructing string operation</technical_language>

Target:
public static List<CigarElement> clipEndOfRead(final int clipFrom, final List<CigarElement> oldCigar, final CigarOperator clippingOperator) { ValidationUtils.validateArg(clippingOperator.isClipping(), () -> "Clipping operator should be SOFT or HARD clip, found " + clippingOperator.toString()); final int clippedBases = (int)CoordMath.getLength(clipFrom, Cigar.getReadLength(oldCigar)); List<CigarElement> newCigar = new LinkedList<CigarElement>(); int pos = 1; for (CigarElement c : oldCigar) { final CigarOperator op = c.getOperator(); final int length = op.consumesReadBases()? c.getLength() : 0; final int endPos = pos + length - 1; if (endPos < (clipFrom - 1)) { newCigar.add(c); } else if (endPos >= (clipFrom - 1)) { addClippingCigarElement(newCigar, c, (clipFrom - 1) - (pos - 1) , clippedBases, clippingOperator); break; } pos = endPos + 1; } return newCigar; }
Source:
<code>public Location newLocationFromString(Map locationFlags, String spec, LocationRegistry registry) { String id = spec.substring(NAME.length()+1); CatalogItem<?, ?> item = CatalogUtils.getCatalogItemOptionalVersion(managementContext, id); if (item.isDeprecated()) { log.warn("Use of deprecated catalog item "+item.getSymbolicName()+":"+item.getVersion()); <START> } else if (item.isDisabled()) { <END> throw new IllegalStateException("Illegal use of disabled catalog item "+item.getSymbolicName()+":"+item.getVersion()); } LocationSpec<?> origLocSpec = managementContext.getCatalog().createSpec((CatalogItem<Location, LocationSpec<?>>)item); LocationSpec<?> locSpec = LocationSpec.create(origLocSpec) .configure(locationFlags); return managementContext.getLocationManager().createLocation(locSpec); }</code><technical_language>need check disabled</technical_language>

Target:
public Location newLocationFromString(Map locationFlags, String spec, LocationRegistry registry) { String id = spec.substring(NAME.length()+1); CatalogItem<?, ?> item = CatalogUtils.getCatalogItemOptionalVersion(managementContext, id); if (item.isDisabled()) { throw new IllegalStateException("Illegal use of disabled catalog item "+item.getSymbolicName()+":"+item.getVersion()); } else if (item.isDeprecated()) { log.warn("Use of deprecated catalog item "+item.getSymbolicName()+":"+item.getVersion()); } LocationSpec<?> origLocSpec = managementContext.getCatalog().createSpec((CatalogItem<Location, LocationSpec<?>>)item); LocationSpec<?> locSpec = LocationSpec.create(origLocSpec) .configure(locationFlags); return managementContext.getLocationManager().createLocation(locSpec); }
Source:
<code>public void testWatermarkBeforeRecords() { final TestingWatermarkOutput output = new TestingWatermarkOutput(); <START> final WatermarkGenerator<Object> watermarks = <END> WatermarkStrategy .forBoundedOutOfOrderness(Duration.ofMillis(10)) .createWatermarkGenerator(() -> null); watermarks.onPeriodicEmit(output); assertNotNull(output.lastWatermark()); assertEquals(Long.MIN_VALUE, output.lastWatermark().getTimestamp()); }</code><technical_language>above, do need change here</technical_language>

Target:
public void testWatermarkBeforeRecords() { final TestingWatermarkOutput output = new TestingWatermarkOutput(); final BoundedOutOfOrdernessWatermarks<Object> watermarks = new BoundedOutOfOrdernessWatermarks<>(Duration.ofMillis(10)); watermarks.onPeriodicEmit(output); assertNotNull(output.lastWatermark()); assertEquals(Long.MIN_VALUE, output.lastWatermark().getTimestamp()); }
Source:
<code><START> public void setSearchTweets(boolean flag) { <END> searchtweets = flag; }</code><technical_language>remove</technical_language>

Target:
public void setSearchTweets(boolean flag) { this.searchtweets = flag; this.analyzer = flag? new TweetAnalyzer(true) : new EnglishAnalyzer(); }
Source:
<code>public void testResultsUri() { final String expected = "<LINK_1>"; <START> assertEquals(expected, engine.resultsUriForQuery("query")); <END> }</code><technical_language>If url params change order, this create a false negative. I .equals method of Uri insulate param order: <LINK_0></technical_language>

Target:
public void testResultsUri() { final String query = "test query"; final Uri uri = Uri.parse(engine.resultsUriForQuery(query)); assertEquals("www.google.com", uri.getAuthority()); assertEquals(query, uri.getQueryParameter("q")); assertEquals("utf-8", uri.getQueryParameter("ie")); }
Source:
<code>private boolean containsCompileDirectiveWithOption(@NotNull String option) { for (ErlangExpression expression : getCompileDirectiveExpressions()) { if (expression instanceof ErlangListExpression) { for (ErlangExpression e : ((ErlangListExpression) expression).getExpressionList()) { if (e instanceof ErlangMaxExpression && option.equals(ErlangPsiImplUtil.getAtomName((ErlangMaxExpression) e))) return true; } } else if (expression instanceof ErlangMaxExpression <START> && option.equals(ErlangPsiImplUtil.getAtomName((ErlangMaxExpression) expression))) <END> return true; } return false; }</code><technical_language>Please braces for line if statements</technical_language>

Target:
private boolean containsCompileDirectiveWithOption(@NotNull String option) { for (ErlangExpression expression : getCompileDirectiveExpressions()) { if (expression instanceof ErlangListExpression) { for (ErlangExpression e : ((ErlangListExpression) expression).getExpressionList()) { if (e instanceof ErlangMaxExpression && option.equals(ErlangPsiImplUtil.getAtomName((ErlangMaxExpression) e))) { return true; } } } else if (expression instanceof ErlangMaxExpression && option.equals(ErlangPsiImplUtil.getAtomName((ErlangMaxExpression) expression))) { return true; } } return false; }