auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void createControl(Composite parent) { initializeDialogUnits(parent); toolkit = new FormToolkit(TasksUiPlugin.getDefault().getFormColors(parent.getDisplay())); innerComposite = new SectionComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).span(3, 1).applyTo(innerComposite); innerComposite.setMinSize(40, 40); innerComposite.setExpandHorizontal(true); innerComposite.setExpandVertical(true); GridLayout layout = new GridLayout(3, false); innerComposite.getContent().setLayout(layout); createSettingControls(innerComposite.getContent()); createValidationControls(innerComposite.getContent()); if (needsValidateOnFinish()) { validateOnFinishButton = new Button(innerComposite, SWT.CHECK); validateOnFinishButton.setText(Messages.AbstractRepositorySettingsPage_Validate_on_Finish); validateOnFinishButton.setSelection(true); } Point p = innerComposite.getContent().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); innerComposite.setMinSize(p); Dialog.applyDialogFont(innerComposite); setControl(innerComposite); }

Target:
public void createControl(Composite parent) { initializeDialogUnits(parent); toolkit = new FormToolkit(TasksUiPlugin.getDefault().getFormColors(parent.getDisplay())); innerComposite = new SectionComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); createSettingControls(innerComposite.getContent()); createValidationControls(innerComposite.getContent()); if (needsValidateOnFinish()) { validateOnFinishButton = new Button(innerComposite, SWT.CHECK); validateOnFinishButton.setText(Messages.AbstractRepositorySettingsPage_Validate_on_Finish); validateOnFinishButton.setSelection(true); } Point p = innerComposite.getContent().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); innerComposite.setMinSize(p); Dialog.applyDialogFont(innerComposite); setControl(innerComposite); }
Source:
long estimateSize(Path directoryPath) { final AtomicLong size = new AtomicLong(0); try { Files.walkFileTree(directoryPath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { size.addAndGet(attrs.size()); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException { log.error("skipped: {}", file, exc); return FileVisitResult.CONTINUE; } }); return size.get(); } catch (IOException ioe) { throw new IllegalStateException(ioe); } }

Target:
long estimateSize(Path directoryPath) { final AtomicLong size = new AtomicLong(0); try { Files.walkFileTree(directoryPath, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { size.addAndGet(attrs.size()); return FileVisitResult.CONTINUE; } @Override public FileVisitResult visitFileFailed(Path file, IOException exc) { log.error("skipped: {}", file, exc); return FileVisitResult.CONTINUE; } }); return size.get(); } catch (IOException ioe) { throw new IllegalStateException(ioe); } }
Source:
public SoulBurnEffect() { super(Outcome.Damage); staticText = "Soul Burn deals X damage to target creature or player for each black or red mana spent on X. You gain life equal to the damage dealt for each black mana spent; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness."; }

Target:
public SoulBurnEffect() { super(Outcome.Damage); staticText = "{this} deals X damage to target creature or player for each black or red mana spent on X. You gain life equal to the damage dealt for each black mana spent; not more life than the player's life total before Soul Burn dealt damage, or the creature's toughness."; }
Source:
private static String contentBetweenBrackets(StringTokenizer tokenizer, final String pattern) { StringBuilder bracketContent = new StringBuilder(); boolean foundClosingBracket = false; while (tokenizer.hasMoreTokens() && !foundClosingBracket) { String token = tokenizer.nextToken(); switch (token) { case "\"" -> appendQuote(bracketContent, tokenizer); case "]" -> foundClosingBracket = true; default -> bracketContent.append(token); } } if (!foundClosingBracket) { LOGGER.warn("Missing closing bracket ']' in '" + pattern + "'"); } else if (bracketContent.length() == 0) { LOGGER.warn("Found empty brackets \"[]\" in '" + pattern + "'"); } return bracketContent.toString(); }

Target:
private static String contentBetweenBrackets(StringTokenizer tokenizer, final String pattern) { StringBuilder bracketContent = new StringBuilder(); boolean foundClosingBracket = false; while (tokenizer.hasMoreTokens() && !foundClosingBracket) { String token = tokenizer.nextToken(); switch (token) { case "\"" -> appendQuote(bracketContent, tokenizer); case "]" -> foundClosingBracket = true; default -> bracketContent.append(token); } } if (!foundClosingBracket) { LOGGER.warn("Missing closing bracket ']' in '{}'", pattern); } else if (bracketContent.length() == 0) { LOGGER.warn("Found empty brackets \"[]\" in '{}'", pattern); } return bracketContent.toString(); }
Source:
public void stop(Duration timeout) { Objects.requireNonNull(timeout); LOG.warning("Stopping " + getId()); String seconds = String.valueOf(timeout.toMillis() / 1000); HttpRequest request = new HttpRequest(POST, String.format("/containers/%s/stop", id)) .addQueryParameter("t", seconds); HttpResponse res = client.execute(request); if (!res.isSuccessful()) { throw new WebDriverException("Unable to stop container: " + Contents.string(res)); } }

Target:
public void stop(Duration timeout) { Objects.requireNonNull(timeout); LOG.info("Stopping " + getId()); String seconds = String.valueOf(timeout.toMillis() / 1000); HttpRequest request = new HttpRequest(POST, String.format("/containers/%s/stop", id)) .addQueryParameter("t", seconds); HttpResponse res = client.execute(request); if (!res.isSuccessful()) { throw new WebDriverException("Unable to stop container: " + Contents.string(res)); } }
Source:
public HDPath extend(List<ChildNumber> path2) { List<ChildNumber> mutable = new ArrayList<>(this.unmodifiableList); mutable.addAll(path2); return new HDPath(mutable); }

Target:
public HDPath extend(List<ChildNumber> path2) { return this.extend(HDPath.of(path2)); }
Source:
public void addUser(String username, String password) { throw new RuntimeException("Adding a user is not supporting in LDAP"); }

Target:
public void addUser(String username, String password) { throw new UnsupportedOperationException("Adding a user is not supporting in LDAP"); }
Source:
public CompletableFuture<Boolean> processStatusUpdateAsync(Protos.TaskStatus status) { return statusUpdatesSemaphore.call(() -> CompletableFuture.supplyAsync(() -> { long insideLock = 0; final String taskId = status.getTaskId().getValue(); final Optional<SingularityTaskId> maybeTaskId = getTaskId(taskId); if (!maybeTaskId.isPresent()) { return false; } final long start = schedulerLock.lock(maybeTaskId.get().getRequestId(), "statusUpdate"); try { insideLock = System.currentTimeMillis(); unsafeProcessStatusUpdate(status, maybeTaskId.get()); } finally { schedulerLock.unlock(maybeTaskId.get().getRequestId(), "statusUpdate", start); LOG.info("Processed status update for ({}) in (waited for lock)", status.getTaskId() .getValue(), status.getState(), JavaUtils.duration(start), JavaUtils.durationFromMillis(insideLock - start)); } return true; }, statusUpdatesExecutor) ); }

Target:
public CompletableFuture<Boolean> processStatusUpdateAsync(Protos.TaskStatus status) { return statusUpdatesSemaphore.call(() -> CompletableFuture.supplyAsync(() -> { final String taskId = status.getTaskId().getValue(); final Optional<SingularityTaskId> maybeTaskId = getTaskId(taskId); if (!maybeTaskId.isPresent()) { return false; } schedulerLock.runWithRequestLock( () -> unsafeProcessStatusUpdate(status, maybeTaskId.get()), maybeTaskId.get().getRequestId(), getClass().getSimpleName()); unsafeProcessStatusUpdate(status, maybeTaskId.get()); return true; }, statusUpdatesExecutor) ); }
Source:
private AbstractPlanNode applyOptimization(WindowFunctionPlanNode plan) { AbstractPlanNode child = (plan.getChildCount() > 0) ? plan.getChild(0) : null; if (child == null) { return plan; } if ( ! ( child instanceof OrderByPlanNode ) ) { return plan; } OrderByPlanNode onode = (OrderByPlanNode)child; child = onode.getChild(0); if ( ! ( child instanceof ReceivePlanNode) ) { return plan; } ReceivePlanNode receiveNode = (ReceivePlanNode)child; assert(plan.getChildCount() == 1); assert(receiveNode.getChildCount() == 1); child = receiveNode.getChild(0); if (! ( child instanceof SendPlanNode) ) { return plan; } SendPlanNode sendNode = (SendPlanNode)child; child = sendNode.getChild(0); if (child.getWindowFunctionUsesIndex() != 0) { return plan; } plan.clearChildren(); receiveNode.removeFromGraph(); MergeReceivePlanNode mrnode = new MergeReceivePlanNode(); mrnode.addInlinePlanNode(onode); mrnode.addAndLinkChild(sendNode); plan.addAndLinkChild(mrnode); return plan; }

Target:
private AbstractPlanNode applyOptimization(WindowFunctionPlanNode plan) { assert(plan.getChildCount() == 1); assert(plan.getChild(0) != null); AbstractPlanNode child = plan.getChild(0); assert(child != null); if ( ! ( child instanceof OrderByPlanNode ) ) { return plan; } OrderByPlanNode onode = (OrderByPlanNode)child; child = onode.getChild(0); if ( ! ( child instanceof ReceivePlanNode)) { return plan; } ReceivePlanNode receiveNode = (ReceivePlanNode)child; assert(receiveNode.getChildCount() == 1); child = receiveNode.getChild(0); assert( child instanceof SendPlanNode ); SendPlanNode sendNode = (SendPlanNode)child; child = sendNode.getChild(0); if ( ! ( child instanceof IndexSortablePlanNode)) { return plan; } IndexSortablePlanNode indexed = (IndexSortablePlanNode)child; if (indexed.indexUse().getWindowFunctionUsesIndex() != 0) { return plan; } plan.clearChildren(); receiveNode.removeFromGraph(); MergeReceivePlanNode mrnode = new MergeReceivePlanNode(); mrnode.addInlinePlanNode(onode); mrnode.addAndLinkChild(sendNode); plan.addAndLinkChild(mrnode); return plan; }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (isEnabled()) { HttpServletRequest httpServletRequest = (HttpServletRequest) request; if (httpServletRequest.getRequestURI().contains("web/wicket") || httpServletRequest.getRequestURI().contains("geoserver/web")) { chain.doFilter(request, response); return; } UrlTransform urlTransform = new UrlTransform( httpServletRequest.getRequestURI(), httpServletRequest.getParameterMap()); String originalRequest = urlTransform.toString(); rules.forEach(rule -> rule.apply(urlTransform)); if (urlTransform.haveChanged()) { Utils.info( LOGGER, "Request '%s' transformed to '%s'.", originalRequest, urlTransform.toString()); chain.doFilter(new RequestWrapper(urlTransform, httpServletRequest), response); } else { chain.doFilter(request, response); } } else { chain.doFilter(request, response); } }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if (isEnabled()) { HttpServletRequest httpServletRequest = (HttpServletRequest) request; if (!httpServletRequest.getRequestURI().contains("web/wicket") && !httpServletRequest.getRequestURI().contains("geoserver/web")) { UrlTransform urlTransform = new UrlTransform( httpServletRequest.getRequestURI(), httpServletRequest.getParameterMap()); String originalRequest = urlTransform.toString(); rules.forEach(rule -> rule.apply(urlTransform)); if (urlTransform.haveChanged()) { Utils.info( LOGGER, "Request '%s' transformed to '%s'.", originalRequest, urlTransform.toString()); request = new RequestWrapper(urlTransform, httpServletRequest); } } } chain.doFilter(request, response); }
Source:
public Authentication attemptAuthentication(final HttpServletRequest request, final HttpServletResponse response) throws AuthenticationException, IOException, ServletException { if (proxyReceptorRequest(request)) { logger.debug("Responding to proxy receptor request"); CommonUtils.readAndRespondToProxyReceptorRequest(request, response, this.proxyGrantingTicketStorage); return null; } final boolean serviceTicketRequest = serviceTicketRequest(request, response); final String username = serviceTicketRequest ? CAS_STATEFUL_IDENTIFIER : CAS_STATELESS_IDENTIFIER; String password = obtainArtifact(request); if (password == null) { logger.debug("Failed to obtain an artifact (cas ticket)"); password = ""; } final UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken( username, password); authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); return this.getAuthenticationManager().authenticate(authRequest); }

Target:
public Authentication attemptAuthentication(final HttpServletRequest request, final HttpServletResponse response) throws AuthenticationException, IOException { if (proxyReceptorRequest(request)) { logger.debug("Responding to proxy receptor request"); CommonUtils.readAndRespondToProxyReceptorRequest(request, response, this.proxyGrantingTicketStorage); return null; } final boolean serviceTicketRequest = serviceTicketRequest(request, response); final String username = serviceTicketRequest ? CAS_STATEFUL_IDENTIFIER : CAS_STATELESS_IDENTIFIER; String password = obtainArtifact(request); if (password == null) { logger.debug("Failed to obtain an artifact (cas ticket)"); password = ""; } final UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken( username, password); authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); return this.getAuthenticationManager().authenticate(authRequest); }
Source:
public void testRecoverReadJobThrowsJobRecoveryExceptionForWrongRequestType() throws SignatureException, IOException, XmlProcessingException { final Ds3Client ds3Client = buildDs3ClientForBulk(); final ModifyJobResponse modifyWriteJobResponse = buildModifyWriteJobResponse(); Mockito.when(ds3Client.modifyJob(Mockito.any(ModifyJobRequest.class))).thenReturn(modifyWriteJobResponse); try { Ds3ClientHelpers.wrap(ds3Client).recoverReadJob(jobId); Assert.fail("Should have failed with a JobRecoveryException before we got here."); } catch (final JobRecoveryException e) { } }

Target:
public void testRecoverReadJobThrowsJobRecoveryExceptionForWrongRequestType() throws SignatureException, IOException, XmlProcessingException, JobRecoveryException { final Ds3Client ds3Client = buildDs3ClientForBulk(); final ModifyJobResponse modifyWriteJobResponse = buildModifyWriteJobResponse(); Mockito.when(ds3Client.modifyJob(Mockito.any(ModifyJobRequest.class))).thenReturn(modifyWriteJobResponse); Ds3ClientHelpers.wrap(ds3Client).recoverReadJob(jobId); }
Source:
private LinkedHashMap<String, U> retrieveAll(final boolean readFromSession) { final LinkedHashMap<String, U> profiles = new LinkedHashMap<>(); final Object request = this.context.getRequestAttribute(Pac4jConstants.USER_PROFILES); if (request != null) { if (request instanceof LinkedHashMap) { profiles.putAll((LinkedHashMap<String, U>) request); } if (request instanceof CommonProfile) { profiles.put(((CommonProfile) request).getClientName(), (U) request); } } if (readFromSession) { final Object sessionAttribute = this.context.getSessionAttribute(Pac4jConstants.USER_PROFILES); if (sessionAttribute instanceof LinkedHashMap) { profiles.putAll((LinkedHashMap<String, U>) sessionAttribute); } if (sessionAttribute instanceof CommonProfile) { profiles.put(((CommonProfile) request).getClientName(), (U) sessionAttribute); } } return profiles; }

Target:
private LinkedHashMap<String, U> retrieveAll(final boolean readFromSession) { final LinkedHashMap<String, U> profiles = new LinkedHashMap<>(); final Object request = this.context.getRequestAttribute(Pac4jConstants.USER_PROFILES); if (request != null) { if (request instanceof LinkedHashMap) { profiles.putAll((LinkedHashMap<String, U>) request); } if (request instanceof CommonProfile) { profiles.put(retrieveClientName((U) request), (U) request); } } if (readFromSession) { final Object sessionAttribute = this.context.getSessionAttribute(Pac4jConstants.USER_PROFILES); if (sessionAttribute instanceof LinkedHashMap) { profiles.putAll((LinkedHashMap<String, U>) sessionAttribute); } if (sessionAttribute instanceof CommonProfile) { profiles.put(retrieveClientName((U) sessionAttribute), (U) sessionAttribute); } } return profiles; }
Source:
public void createUtilityProject() { UtilityProjectWizard uw = new UtilityProjectWizard(); uw.open(); UtilityProjectFirstPage up = new UtilityProjectFirstPage(uw); up.setProjectName(PROJECT_NAME); if (isJavaLE8() || CDIVersion.equals("1.0")) { up.activateFacet("1.8", "Java"); } else { up.activateFacet("11", "Java"); } uw.finish(); new WaitUntil(new JobIsRunning(), TimePeriod.DEFAULT, false); new WaitWhile(new JobIsRunning(), TimePeriod.LONG); setWorkspaceDefaultJREForJava8(); }

Target:
public void createUtilityProject() { NewMenuWizard pw = new UtilityProjectWizard(); DataModelFacetCreationWizardPage fp = new UtilityProjectFirstPage(pw); createProject(pw, fp); }
Source:
public void waitForNotificationsLoaded() { waitForElementNotPresent("#WallNotifications .subnav > li.notifications-empty"); }

Target:
public void waitForNotificationsLoaded() { waitForElementNotPresent(emptyNumberOfUnreadNotifications); }
Source:
public void updateStartingAddress(long newStartingAddress) { dataStore.put(newStartingAddress, STARTING_ADDRESS_RECORD); startingAddress.set(newStartingAddress); }

Target:
public void updateStartingAddress(long newStartingAddress) { log.info("Update starting address to: {}", newStartingAddress); dataStore.put(STARTING_ADDRESS_RECORD, newStartingAddress); startingAddress.set(newStartingAddress); }
Source:
private void sendNotification() { if (!RCDevice.isServiceAttached && !RCDevice.messageReceivingInProgress){ Log.d(TAG, "service is not attached"); Intent intent = new Intent(this, RCDevice.class); intent.setAction(RCDevice.ACTION_FCM); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O){ startForegroundService(intent); } else{ startService(intent); } } Log.d(TAG, "sendNotification is called"); }

Target:
private void sendNotification() { if (!RCDevice.isServiceAttached && !RCDevice.isServiceInitialized){ Log.d(TAG, "service is not attached"); Intent intent = new Intent(this, RCDevice.class); intent.setAction(RCDevice.ACTION_FCM); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O){ startForegroundService(intent); } else{ startService(intent); } } Log.d(TAG, "sendNotification is called"); }
Source:
public void validateIndices(Pool pool, Pool beforeChange, Collection<ValidationError> errors) throws IOException { refreshPoolElements(pool); Set<String> indices = getAllBadIndices(pool); Set<String> bcIndices = getAllBadIndices(beforeChange); if(indices.size() > bcIndices.size()){ String errorMessage = "Pools may not contain Library Aliquots with indices with 2 or fewer positions of " + "difference, please address the following conflicts: "; indices.removeAll(bcIndices); for (String index : indices){ errorMessage += index + " "; } errors.add(new ValidationError("poolElements", errorMessage)); } }

Target:
public void validateIndices(Pool pool, Pool beforeChange, Collection<ValidationError> errors) throws IOException { refreshPoolElements(pool); Set<String> indices = getAllBadIndices(pool); Set<String> bcIndices = getAllBadIndices(beforeChange); if(indices.size() > bcIndices.size()){ String errorMessage = String.format("Pools may not contain Library Aliquots with indices with %d or " + "fewer positions of difference, please address the following conflicts: ", indexChecker.getWarningMismatches()); indices.removeAll(bcIndices); for (String index : indices){ errorMessage += index + " "; } errors.add(new ValidationError("poolElements", errorMessage)); } }
Source:
public void testUnserializableResponseConvertedToNull() throws Exception { serializer = spy(new XStreamSerializer()); Object successResponse = new Object(); Exception failureResponse = new MockException("This cannot be serialized"); when(serializer.serialize(successResponse, byte[].class)).thenThrow(new SerializationException( "cannot serialize success")); when(serializer.serialize(failureResponse, byte[].class)).thenThrow(new SerializationException( "cannot serialize failure")); connector1 = JGroupsConnector.builder() .localSegment(mockCommandBus1) .channel(channel1) .clusterName(clusterName) .serializer(serializer) .routingStrategy(routingStrategy) .build(); dcb1 = DistributedCommandBus.builder() .commandRouter(connector1) .connector(connector1) .build(); dcb1.subscribe(String.class.getName(), c -> successResponse); dcb1.subscribe(Integer.class.getName(), c -> { throw failureResponse; }); connector1.connect(); FutureCallback<Object, Object> callback = new FutureCallback<>(); dcb1.dispatch(new GenericCommandMessage<>(1), callback); try { callback.getResult(); fail("Expected exception"); } catch (Exception e) { } verify(mockCommandBus1).dispatch(any(CommandMessage.class), isA(CommandCallback.class)); callback = new FutureCallback<>(); dcb1.dispatch(new GenericCommandMessage<>("string"), callback); assertNull(callback.getResult()); }

Target:
public void testUnserializableResponseConvertedToNull() throws Exception { serializer = spy(new XStreamSerializer()); Object successResponse = new Object(); Exception failureResponse = new MockException("This cannot be serialized"); when(serializer.serialize(successResponse, byte[].class)).thenThrow(new SerializationException( "cannot serialize success")); when(serializer.serialize(failureResponse, byte[].class)).thenThrow(new SerializationException( "cannot serialize failure")); connector1 = JGroupsConnector.builder() .localSegment(mockCommandBus1) .channel(channel1) .clusterName(clusterName) .serializer(serializer) .routingStrategy(routingStrategy) .build(); distributedCommandBus1 = DistributedCommandBus.builder() .commandRouter(connector1) .connector(connector1) .build(); distributedCommandBus1.subscribe(String.class.getName(), c -> successResponse); distributedCommandBus1.subscribe(Integer.class.getName(), c -> { throw failureResponse; }); connector1.connect(); FutureCallback<Object, Object> callback = new FutureCallback<>(); distributedCommandBus1.dispatch(new GenericCommandMessage<>(1), callback); try { callback.getResult(); fail("Expected exception"); } catch (Exception e) { } verify(mockCommandBus1).dispatch(any(CommandMessage.class), isA(CommandCallback.class)); callback = new FutureCallback<>(); distributedCommandBus1.dispatch(new GenericCommandMessage<>("string"), callback); assertNull(callback.getResult().getPayload()); }
Source:
private void writeHeadersFrame( final ChannelHandlerContext ctx, Http2HeadersFrame headersFrame, final ChannelPromise promise) { if (isStreamIdValid(headersFrame.stream().id())) { encoder().writeHeaders(ctx, headersFrame.stream().id(), headersFrame.headers(), headersFrame.padding(), headersFrame.isEndStream(), promise); } else { final DefaultHttp2FrameStream stream = (DefaultHttp2FrameStream) headersFrame.stream(); final Http2Connection connection = connection(); final int streamId = connection.local().incrementAndGetNextStreamId(); if (streamId < 0) { promise.setFailure(new Http2NoMoreStreamIdsException()); onHttp2Frame(ctx, new DefaultHttp2GoAwayFrame(connection.isServer() ? Integer.MAX_VALUE : Integer.MAX_VALUE - 1, NO_ERROR.code(), writeAscii(ctx.alloc(), "Stream IDs exhausted on local stream creation"))); return; } stream.id = streamId; Object old = frameStreamToInitializeMap.put(streamId, stream); assert old == null; encoder().writeHeaders(ctx, streamId, headersFrame.headers(), headersFrame.padding(), headersFrame.isEndStream(), promise); if (!promise.isDone()) { numBufferedStreams++; promise.addListener(bufferedStreamsListener); promise.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture channelFuture) { handleHeaderFuture(channelFuture, streamId); } }); } else { handleHeaderFuture(promise, streamId); } } }

Target:
private void writeHeadersFrame( final ChannelHandlerContext ctx, Http2HeadersFrame headersFrame, final ChannelPromise promise) { if (isStreamIdValid(headersFrame.stream().id())) { encoder().writeHeaders(ctx, headersFrame.stream().id(), headersFrame.headers(), headersFrame.padding(), headersFrame.isEndStream(), promise); } else { final DefaultHttp2FrameStream stream = (DefaultHttp2FrameStream) headersFrame.stream(); final Http2Connection connection = connection(); final int streamId = connection.local().incrementAndGetNextStreamId(); if (streamId < 0) { promise.setFailure(new Http2NoMoreStreamIdsException()); onHttp2Frame(ctx, new DefaultHttp2GoAwayFrame(connection.isServer() ? Integer.MAX_VALUE : Integer.MAX_VALUE - 1, NO_ERROR.code(), writeAscii(ctx.alloc(), "Stream IDs exhausted on local stream creation"))); return; } stream.id = streamId; Object old = frameStreamToInitializeMap.put(streamId, stream); assert old == null; encoder().writeHeaders(ctx, streamId, headersFrame.headers(), headersFrame.padding(), headersFrame.isEndStream(), promise); if (!promise.isDone()) { numBufferedStreams++; promise.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture channelFuture) { numBufferedStreams--; handleHeaderFuture(channelFuture, streamId); } }); } else { handleHeaderFuture(promise, streamId); } } }
Source:
public void markPullRequestNeedsWork(PullRequestRef pr ) throws StashClientException { String request = MessageFormat.format(API_ONE_PR_NEEDS_WORK, baseUrl, pr.project(), pr.repository(), pr.pullRequestId(), credentials.getUserSlug()); JsonObject json = new JsonObject(); json.put("status","NEEDS_WORK"); put(request, json, MessageFormat.format(PULL_REQUEST_APPROVAL_POST_ERROR_MESSAGE, pr.repository(), pr.pullRequestId())); }

Target:
public void markPullRequestNeedsWork(PullRequestRef pr ) throws StashClientException { String request = MessageFormat.format(API_ONE_PR_NEEDS_WORK, baseUrl, pr.project(), pr.repository(), pr.pullRequestId(), credentials.getUserSlug()); JsonObject json = new JsonObject(); json.put("status", "NEEDS_WORK"); put(request, json, MessageFormat .format(PULL_REQUEST_MARK_NEEDS_WORK_PUT_ERROR_MESSAGE, pr.repository(), pr.pullRequestId())); }
Source:
public void testParquetPageSourceSchemaEvolution(int rowCount) throws Exception { List<TestColumn> writeColumns = getTestColumnsSupportedByParquet(); boolean useParquetColumnNames = false; List<TestColumn> readColumns = writeColumns.stream() .map(column -> new TestColumn( column.getName() + "_new", column.getObjectInspector(), column.getWriteValue(), column.getExpectedValue(), column.isPartitionKey())) .collect(toList()); assertThatFileFormat(PARQUET) .withWriteColumns(writeColumns) .withReadColumns(readColumns) .withSession(parquetPageSourceSession) .withRowsCount(rowCount) .isReadableByPageSource(new ParquetPageSourceFactory(TYPE_MANAGER, useParquetColumnNames, HDFS_ENVIRONMENT, STATS)); useParquetColumnNames = true; readColumns = Lists.reverse(writeColumns); assertThatFileFormat(PARQUET) .withWriteColumns(writeColumns) .withReadColumns(readColumns) .withSession(parquetPageSourceSession) .isReadableByPageSource(new ParquetPageSourceFactory(TYPE_MANAGER, useParquetColumnNames, HDFS_ENVIRONMENT, STATS)); }

Target:
public void testParquetPageSourceSchemaEvolution(int rowCount) throws Exception { List<TestColumn> writeColumns = getTestColumnsSupportedByParquet(); List<TestColumn> readColumns = writeColumns.stream() .map(column -> new TestColumn( column.getName() + "_new", column.getObjectInspector(), column.getWriteValue(), column.getExpectedValue(), column.isPartitionKey())) .collect(toList()); assertThatFileFormat(PARQUET) .withWriteColumns(writeColumns) .withReadColumns(readColumns) .withSession(parquetPageSourceSession) .withRowsCount(rowCount) .isReadableByPageSource(new ParquetPageSourceFactory(TYPE_MANAGER, HDFS_ENVIRONMENT, STATS)); readColumns = Lists.reverse(writeColumns); assertThatFileFormat(PARQUET) .withWriteColumns(writeColumns) .withReadColumns(readColumns) .withSession(parquetPageSourceSessionUseName) .isReadableByPageSource(new ParquetPageSourceFactory(TYPE_MANAGER, HDFS_ENVIRONMENT, STATS)); }
Source:
public static List<ProjectRelationship<?, ?>> convertToDetachedRelationships( final Iterable<?> relationships ) { final List<ProjectRelationship<?, ?>> rels = new ArrayList<ProjectRelationship<?, ?>>(); Iterator<?> iterator = relationships.iterator(); while ( iterator.hasNext() ) { final AbstractNeoProjectRelationship<?, ?, ?> rel; Object next = iterator.next(); if ( next instanceof AbstractNeoProjectRelationship ) { rel = ( AbstractNeoProjectRelationship<?, ?, ?>) next; } else if ( next instanceof AbstractNeoProjectRelationship ) { rel = Conversions.toProjectRelationship( ( Relationship ) next ); } else { throw new IllegalArgumentException( "Relationship class " + next.getClass().getCanonicalName() + " cannot be converted to detached relationship." ); } if ( rel != null ) { rels.add( rel.detach() ); } } return rels; }

Target:
public static List<ProjectRelationship<?, ?>> convertToDetachedRelationships( final Iterable<?> relationships ) { final List<ProjectRelationship<?, ?>> rels = new ArrayList<ProjectRelationship<?, ?>>(); Iterator<?> iterator = relationships.iterator(); while ( iterator.hasNext() ) { final AbstractNeoProjectRelationship<?, ?, ?> rel; Object next = iterator.next(); if ( next instanceof AbstractNeoProjectRelationship ) { rel = ( AbstractNeoProjectRelationship<?, ?, ?>) next; } else if ( next instanceof Relationship ) { rel = Conversions.toProjectRelationship( ( Relationship ) next ); } else { throw new IllegalArgumentException( "Relationship class " + next.getClass().getCanonicalName() + " cannot be converted to detached relationship." ); } if ( rel != null ) { rels.add( rel.detach() ); } } return rels; }
Source:
public DefaultMockitoSession(Object testClassInstance, Strictness strictness, MockitoLogger logger) { this.testClassInstance = testClassInstance; listener = new UniversalTestListener(strictness, logger); try { Mockito.framework().addListener(listener); } catch (RedundantListenerException e) { Reporter.unfinishedMocking(); } MockitoAnnotations.initMocks(testClassInstance); }

Target:
public DefaultMockitoSession(Object testClassInstance, Strictness strictness, MockitoLogger logger) { this.testClassInstance = testClassInstance; listener = new UniversalTestListener(strictness, logger); try { Mockito.framework().addListener(listener); } catch (RedundantListenerException e) { Reporter.unfinishedMockingSession(); } MockitoAnnotations.initMocks(testClassInstance); }
Source:
public boolean isEnableForComponent(Component invoker) { getHttpSessionsPanel(); if (invoker.getName() != null && invoker.getName().equals(HttpSessionsPanel.PANEL_NAME) && (httpSessionsPanel.getSelectedSession() != null)) { this.setEnabled(true); return true; } this.setEnabled(false); return false; }

Target:
public boolean isEnableForComponent(Component invoker) { if (HttpSessionsPanel.PANEL_NAME.equals(invoker.getName())) { this.setEnabled(httpSessionsPanel.getSelectedSession() != null); return true; } return false; }
Source:
private static void assertEquals(ICVSFolder mFolder1, ICVSFolder mFolder2) throws CVSException { assertEquals(mFolder1.isCVSFolder(),mFolder2.isCVSFolder()); if (mFolder1.isCVSFolder()) { String root1 = removePassword(mFolder1.getFolderSyncInfo().getRoot()); String root2 = removePassword(mFolder2.getFolderSyncInfo().getRoot()); root1 = root1.substring(0,root1.lastIndexOf("@")); root2 = root2.substring(0,root2.lastIndexOf("@")); assertEquals(root1,root2); assertEquals(mFolder1.getFolderSyncInfo().getRepository(),mFolder2.getFolderSyncInfo().getRepository()); assertEquals(mFolder1.getFolderSyncInfo().getIsStatic(),mFolder2.getFolderSyncInfo().getIsStatic()); assertEquals(mFolder1.getFolderSyncInfo().getTag(),mFolder2.getFolderSyncInfo().getTag()); } ICVSResource[] resourceList1 = mFolder1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS); ICVSResource[] resourceList2 = mFolder2.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS); assertEquals(resourceList1.length, resourceList2.length); for (ICVSResource resourceList11 : resourceList1) { boolean resourceFound = false; for (ICVSResource resourceList21 : resourceList2) { if (resourceList11.getName().equals(resourceList21.getName())) { assertEquals(resourceList11, resourceList21); resourceFound = true; break; } } assertTrue("Resource " + resourceList11.getName() + " not found in the list", resourceFound); } }

Target:
private static void assertEquals(ICVSFolder mFolder1, ICVSFolder mFolder2) throws CVSException { assertEquals(mFolder1.isCVSFolder(),mFolder2.isCVSFolder()); if (mFolder1.isCVSFolder()) { String root1 = removePassword(mFolder1.getFolderSyncInfo().getRoot()); String root2 = removePassword(mFolder2.getFolderSyncInfo().getRoot()); root1 = root1.substring(0,root1.lastIndexOf("@")); root2 = root2.substring(0,root2.lastIndexOf("@")); assertEquals(root1,root2); assertEquals(mFolder1.getFolderSyncInfo().getRepository(),mFolder2.getFolderSyncInfo().getRepository()); assertEquals(mFolder1.getFolderSyncInfo().getIsStatic(),mFolder2.getFolderSyncInfo().getIsStatic()); assertEquals(mFolder1.getFolderSyncInfo().getTag(),mFolder2.getFolderSyncInfo().getTag()); } ICVSResource[] resourceList1 = mFolder1.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS); ICVSResource[] resourceList2 = mFolder2.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.FOLDER_MEMBERS); assertEquals(resourceList1.length, resourceList2.length); for (ICVSResource r : resourceList1) { boolean resourceFound = false; for (ICVSResource _r : resourceList2) { if (r.getName().equals(_r.getName())) { assertEquals(r, _r); resourceFound = true; break; } } assertTrue("Resource " + r.getName() + " not found in the list", resourceFound); } }
Source:
protected Collection<String> defaultSuppressionAnnotations() { Collection defaultValues = new ArrayList<String>(); defaultValues.add("java.lang.Deprecated"); return defaultValues; }

Target:
protected Collection<String> defaultSuppressionAnnotations() { Collection<String> defaultValues = new ArrayList<>(); defaultValues.add("java.lang.Deprecated"); return defaultValues; }
Source:
public String getLineContent(Repository repository, int lineNumber) throws IOException { Line line = getLine(lineNumber); if (line == null) return null; ObjectLoader loader = repository.open(getBlob(), Constants.OBJ_BLOB); RawText text = new RawText(loader.getCachedBytes()); return text.getString(lineNumber); }

Target:
public String getLineContent(Repository repository, int lineNumber) throws IOException { Line line = getLine(lineNumber); if (line == null) return null; ObjectLoader loader = repository.open(blob, Constants.OBJ_BLOB); byte[] contents; if (loader.isLarge()) contents = IO.readWholeStream(loader.openStream(), (int) loader.getSize()).array(); else contents = loader.getCachedBytes(); return new RawText(contents).getString(lineNumber); }
Source:
public int getModuleState(IModule[] module, IProgressMonitor monitor) { return 0; }

Target:
public int getModuleState(IModule[] module, IProgressMonitor monitor) { return IServer.STATE_UNKNOWN; }
Source:
public void install() { DownloadResolver resolver = Entities.newDownloader(this); String saveAs = resolver.getFilename(); String expandedInstallDir = getInstallDir() + "/" + resolver.getUnpackedDirectoryName(format("riak-%s", getVersion())); setExpandedInstallDir(expandedInstallDir); OsDetails osDetails = getMachine().getMachineDetails().getOsDetails(); List<String> commands = Lists.newLinkedList(); if (osDetails.isLinux()) { commands.addAll(installLinux(expandedInstallDir)); } else if (osDetails.isMac()) { commands.addAll(installMac(saveAs)); } else if (osDetails.isWindows()) { throw new UnsupportedOperationException("RiakNode not supported on Windows instances"); } else { throw new IllegalStateException("Machine was not detected as linux, mac or windows! Installation does not know how to proceed with " + getMachine() + ". Details: " + getMachine().getMachineDetails().getOsDetails()); } newScript(INSTALLING) .failOnNonZeroResultCode() .body.append(commands) .execute(); }

Target:
public void install() { DownloadResolver resolver = Entities.newDownloader(this); String saveAs = resolver.getFilename(); String expandedInstallDir = getInstallDir() + "/" + resolver.getUnpackedDirectoryName(format("riak-%s", getVersion())); setExpandedInstallDir(expandedInstallDir); OsDetails osDetails = getMachine().getMachineDetails().getOsDetails(); List<String> commands = Lists.newLinkedList(); if (osDetails.isLinux()) { commands.addAll(installLinux(expandedInstallDir)); } else if (osDetails.isMac()) { commands.addAll(installMac(saveAs)); } else if (osDetails.isWindows()) { throw new UnsupportedOperationException("RiakNode not supported on Windows instances"); } else { throw new IllegalStateException("Machine was not detected as linux, mac or windows! Installation does not know how to proceed with " + getMachine() + ". Details: " + getMachine().getMachineDetails().getOsDetails()); } newScript(INSTALLING) .body.append(commands) .execute(); }
Source:
public List<CourseSignupDAO> findSignupByComponent(final String componentId, final Set<Status> statuses, final Integer year) { return getHibernateTemplate().executeFind(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query; LocalDate startYear = null; LocalDate endYear = null; if (null != year) { startYear = FIRST_DAY_OF_ACADEMIC_YEAR.toLocalDate(year); endYear = FIRST_DAY_OF_ACADEMIC_YEAR.toLocalDate(year+1); } StringBuffer querySQL = new StringBuffer(); querySQL.append("select cs from CourseSignupDAO cs " + "inner join fetch cs.components cc " + "where cc.presentationId = :componentId"); if (null != statuses && !statuses.isEmpty()) { querySQL.append(" and cs.status in (:statuses)"); } if (null != year) { querySQL.append(" and cc.starts between :starts and :ends"); } query = session.createQuery(querySQL.toString()); query.setString("componentId", componentId); if (null != statuses && !statuses.isEmpty()) { query.setParameterList("statuses", statuses); } if (null != year) { query.setDate("starts", startYear.toDate()); query.setDate("ends", endYear.toDate()); } return query.list(); } }); }

Target:
public List<CourseSignupDAO> findSignupByComponent(final String componentId, final Set<Status> statuses, final Integer year) { return getHibernateTemplate().executeFind(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query; LocalDate startYear = null; LocalDate endYear = null; StringBuffer querySQL = new StringBuffer(); querySQL.append("select cs from CourseSignupDAO cs " + "inner join fetch cs.components cc " + "where cc.presentationId = :componentId"); if (null != statuses && !statuses.isEmpty()) { querySQL.append(" and cs.status in (:statuses)"); } if (null != year) { startYear = FIRST_DAY_OF_ACADEMIC_YEAR.toLocalDate(year); endYear = FIRST_DAY_OF_ACADEMIC_YEAR.toLocalDate(year+1); querySQL.append(" and cc.starts between :starts and :ends"); } query = session.createQuery(querySQL.toString()); query.setString("componentId", componentId); if (null != statuses && !statuses.isEmpty()) { query.setParameterList("statuses", statuses); } if (null != year) { query.setDate("starts", startYear.toDate()); query.setDate("ends", endYear.toDate()); } return query.list(); } }); }
Source:
public void test01_03_redirectToExternalLink() { driver.findElement(By.id("listWithExternalPath")).click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat( getRedirectValue(), is("<LINK_0>")); screenCapture.save(driver); ApServerName apServerName = webDriverOperations.getApServerName(); String apServerVersion = webDriverOperations.getApServerVersion(); driver.findElement(By.id("btn1")).click(); if (apServerName == ApServerName.WEBSPHERELP && "16".equals(apServerVersion) || apServerName == ApServerName.WEBSPHERETR && "9".equals(apServerVersion)) { assertThat(driver.findElement(By.xpath("/html/body/div/h2")).getText(), is("System Error...")); } else { assertThat(driver.findElement(By.xpath("/html/body/div/h2")).getText(), is("Page Not Found")); } }

Target:
public void test01_03_redirectToExternalLink() { ApServerName apServerName = webDriverOperations.getApServerName(); driver.findElement(By.id("listWithExternalPath")).click(); driver.findElement(By.id("btn1")).click(); inputFieldAccessor.overrideValue(By.id("username"), "user1", driver); inputFieldAccessor.overrideValue(By.id("password"), "user1", driver); assertThat( getRedirectValue(), is("<LINK_0>")); screenCapture.save(driver); driver.findElement(By.id("btn1")).click(); String expectedErrorMessage; if (apServerName == ApServerName.WEBSPHERELP || apServerName == ApServerName.WEBSPHERETR) { expectedErrorMessage = "System Error..."; } else { expectedErrorMessage = "Page Not Found"; } assertThat(driver.findElement(By.xpath("/html/body/div/h2")).getText(), is(expectedErrorMessage)); }
Source:
public Mono<AccessToken> getToken(TokenRequestContext request) { return identityClient.authenticateWithSharedTokenCache(request, username); }

Target:
public Mono<AccessToken> getToken(TokenRequestContext request) { return Mono.defer(() -> { if (cachedToken.get() != null) { return identityClient.authenticateWithMsalAccount(request, cachedToken.get().getAccount()) .onErrorResume(t -> Mono.empty()); } else { return Mono.empty(); } }).switchIfEmpty( Mono.defer(() -> identityClient.authenticateWithSharedTokenCache(request, username))) .map(msalToken -> { cachedToken.set(msalToken); return msalToken; }); }
Source:
public void testFailedReadAheadEviction() throws Exception { AbfsClient client = getMockAbfsClient(); AbfsRestOperation successOp = getMockRestOp(); ReadBufferManager.setThresholdAgeMilliseconds(INCREASED_READ_BUFFER_AGE_THRESHOLD); doThrow(new TimeoutException("Internal Server error")) .when(client) .read(any(String.class), any(Long.class), any(byte[].class), any(Integer.class), any(Integer.class), any(String.class), any(String.class)); AbfsInputStream inputStream = getAbfsInputStream(client, "testFailedReadAheadEviction.txt"); ReadBuffer buff = new ReadBuffer(); buff.setStatus( org.apache.hadoop.fs.azurebfs.contracts.services.ReadBufferStatus.READ_FAILED); ReadBufferManager.getBufferManager().testMimicFullUseAndAddFailedBuffer(buff); ReadBufferManager.getBufferManager().queueReadAhead(inputStream, 0, ONE_KB); }

Target:
public void testFailedReadAheadEviction() throws Exception { AbfsClient client = getMockAbfsClient(); AbfsRestOperation successOp = getMockRestOp(); ReadBufferManager.setThresholdAgeMilliseconds(INCREASED_READ_BUFFER_AGE_THRESHOLD); doThrow(new TimeoutException("Internal Server error")) .when(client) .read(any(String.class), any(Long.class), any(byte[].class), any(Integer.class), any(Integer.class), any(String.class), any(String.class)); AbfsInputStream inputStream = getAbfsInputStream(client, "testFailedReadAheadEviction.txt"); ReadBuffer buff = new ReadBuffer(); buff.setStatus(ReadBufferStatus.READ_FAILED); ReadBufferManager.getBufferManager().testMimicFullUseAndAddFailedBuffer(buff); ReadBufferManager.getBufferManager().queueReadAhead(inputStream, 0, ONE_KB); }
Source:
public CompletionStage<Void> close() { if ( closed.compareAndSet( false, true ) ) { try { for ( Map.Entry<BoltServerAddress,ChannelPool> entry : pools.entrySet() ) { BoltServerAddress address = entry.getKey(); ChannelPool pool = entry.getValue(); log.info( "Closing connection pool towards %s", address ); nettyChannelTracker.destructAllChannels(); pool.close(); } pools.clear(); } finally { eventLoopGroup().shutdownGracefully(); } } return Futures.asCompletionStage( eventLoopGroup().terminationFuture() ) .thenApply( ignore -> null ); }

Target:
public CompletionStage<Void> close() { if ( closed.compareAndSet( false, true ) ) { try { nettyChannelTracker.prepareToCloseChannels(); for ( Map.Entry<BoltServerAddress,ChannelPool> entry : pools.entrySet() ) { BoltServerAddress address = entry.getKey(); ChannelPool pool = entry.getValue(); log.info( "Closing connection pool towards %s", address ); pool.close(); } pools.clear(); } finally { eventLoopGroup().shutdownGracefully(); } } return Futures.asCompletionStage( eventLoopGroup().terminationFuture() ) .thenApply( ignore -> null ); }
Source:
public static void threadDumpStartup() throws Exception { if (!logStartupPerformanceIssues) return; final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); final File f = new File(getRootDirectory(), "/startup-threadDump" + dateFormat.format(new Date()) + ".txt"); if (!f.exists()) { try { f.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } Thread t = new Thread("Support core plugin startup diagnostics") { @Override public void run() { while (true) { final Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins == null || jenkins.getInitLevel() != InitMilestone.COMPLETED) { continue; } final FileOutputStream fileOutputStream; try { fileOutputStream = new FileOutputStream(f, true); } catch (FileNotFoundException e) { throw new UncheckedIOException(e); } try (PrintStream ps = new PrintStream(fileOutputStream, false, "UTF-8")) { ps.println("=== Thread dump at " + new Date() + " ==="); ThreadDumps.threadDump(fileOutputStream); ps.flush(); Thread.sleep(TimeUnit.SECONDS.toMillis(secondsPerThreadDump)); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); Thread.currentThread().interrupt(); } } } }; t.start(); }

Target:
public static void threadDumpStartup() throws Exception { if (!logStartupPerformanceIssues) return; final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss"); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); final File f = new File(getRootDirectory(), "/startup-threadDump" + dateFormat.format(new Date()) + ".txt"); if (!f.exists()) { try { f.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } Thread t = new Thread("Support core plugin startup diagnostics") { @Override public void run() { while (true) { final Jenkins jenkins = Jenkins.getInstanceOrNull(); if (jenkins == null || jenkins.getInitLevel() != InitMilestone.COMPLETED) { continue; } try (PrintStream ps = new PrintStream(new FileOutputStream(f, true), false, "UTF-8")) { ps.println("=== Thread dump at " + new Date() + " ==="); ThreadDumps.threadDump(ps); ps.flush(); TimeUnit.SECONDS.sleep(secondsPerThreadDump); } catch (FileNotFoundException | UnsupportedEncodingException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); Thread.currentThread().interrupt(); } } } }; t.start(); }
Source:
public static HaxeTarget matchOutputTarget(String compilerTargetArgument) { for (HaxeTarget t : HaxeTarget.values()) { if (t.getCompilerFlag().equals(compilerTargetArgument)) { return t; } } if ("-as3".equals(compilerTargetArgument)) { return HaxeTarget.JAVA_SCRIPT; } return null; }

Target:
public static HaxeTarget matchOutputTarget(String compilerTargetArgument) { for (HaxeTarget t : HaxeTarget.values()) { if (t.getCompilerFlag().equals(compilerTargetArgument)) { return t; } } if ("-as3".equals(compilerTargetArgument)) { return HaxeTarget.FLASH; } return null; }