auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public int build(OutputStream out, OutputStream err, IProgressMonitor monitor) { int status = STATUS_ERROR_LAUNCH; try { if (monitor == null) { monitor = new NullProgressMonitor(); } SubMonitor progress = SubMonitor.convert(monitor, getNumCommands()); progress.subTask(ManagedMakeMessages.getResourceString("MakeBuilder.Invoking_Command") + getCommandLine()); ICommandLauncher launcher = createLauncher(); launcher.showCommand(true); fProcess = launcher.execute(fCmd.getCommand(), fCmd.getArgs(), mapToStringArray(fCmd.getEnvironment()), fCmd.getCWD(), monitor); if (fProcess != null) { try { fProcess.getOutputStream().close(); } catch (IOException e) { } int st = launcher.waitAndRead(wrap(out), wrap(err), progress.split(getNumCommands())); switch (st) { case ICommandLauncher.OK: status = fProcess.exitValue() == 0 ? STATUS_OK : STATUS_ERROR_BUILD; break; case ICommandLauncher.COMMAND_CANCELED: status = STATUS_CANCELLED; break; case ICommandLauncher.ILLEGAL_COMMAND: default: status = STATUS_ERROR_LAUNCH; break; } } fErrMsg = launcher.getErrorMessage(); if (fErrMsg != null && !fErrMsg.isEmpty()) { printMessage(fErrMsg, err); } } catch (CoreException e) { ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Error launching command [" + fCmd.getCommand() + "]", e)); status = STATUS_ERROR_LAUNCH; } finally { monitor.done(); } return status; }

Target:
public int build(OutputStream out, OutputStream err, IProgressMonitor monitor) { int status = STATUS_ERROR_LAUNCH; try { SubMonitor progress = SubMonitor.convert(monitor, ManagedMakeMessages.getResourceString("MakeBuilder.Invoking_Command") + getCommandLine(), getNumCommands()); ICommandLauncher launcher = createLauncher(); launcher.showCommand(true); fProcess = launcher.execute(fCmd.getCommand(), fCmd.getArgs(), mapToStringArray(fCmd.getEnvironment()), fCmd.getCWD(), progress); if (fProcess != null) { try { fProcess.getOutputStream().close(); } catch (IOException e) { } int st = launcher.waitAndRead(wrap(out), wrap(err), progress.split(getNumCommands())); switch (st) { case ICommandLauncher.OK: status = fProcess.exitValue() == 0 ? STATUS_OK : STATUS_ERROR_BUILD; break; case ICommandLauncher.COMMAND_CANCELED: status = STATUS_CANCELLED; break; case ICommandLauncher.ILLEGAL_COMMAND: default: status = STATUS_ERROR_LAUNCH; break; } } fErrMsg = launcher.getErrorMessage(); if (fErrMsg != null && !fErrMsg.isEmpty()) { printMessage(fErrMsg, err); } } catch (CoreException e) { ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Error launching command [" + fCmd.getCommand() + "]", e)); status = STATUS_ERROR_LAUNCH; } finally { monitor.done(); } return status; }
Source:
private GraphTraversal<Vertex, Vertex> traversalFromIndex(Collection collection, QuickSearch quickSearch) { Index<Node> index = indexManager().forNodes(getIndexName(collection)); IndexHits<Node> hits = index.query(QUICK_SEARCH, createQuery(quickSearch)); List<Long> ids = StreamSupport.stream(hits.spliterator(), false).map(h -> h.getId()).collect(toList()); return ids.isEmpty() ? EmptyGraphTraversal.instance() : traversal.V(ids); }

Target:
private GraphTraversal<Vertex, Vertex> traversalFromIndex(Collection collection, QuickSearch quickSearch) { Index<Node> index = getQuickSearchIndex(collection); IndexHits<Node> hits = index.query(QUICK_SEARCH, createQuery(quickSearch)); List<Long> ids = StreamIterator.stream(hits.iterator()).map(h -> h.getId()).collect(toList()); return ids.isEmpty() ? EmptyGraphTraversal.instance() : traversal().V(ids); }
Source:
public void close(IProject project) throws RemoteSyncException { JGitRepo repo = getLocalJGitRepo(project, null); if (repo != null) { repo.close(); } Iterator<Map.Entry<IPath, JGitRepo>> it = localDirectoryToJGitRepoMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry<IPath, JGitRepo> entry = it.next(); if (entry.getValue() == repo) { it.remove(); } } }

Target:
public synchronized void close(IProject project) throws RemoteSyncException { JGitRepo repo = getLocalJGitRepo(project, null); if (repo != null) { repo.close(); } Iterator<Map.Entry<IPath, JGitRepo>> it = localDirectoryToJGitRepoMap.entrySet().iterator(); while (it.hasNext()) { Map.Entry<IPath, JGitRepo> entry = it.next(); if (entry.getValue() == repo) { it.remove(); } } }
Source:
protected String getNamespaceId() { try { return Tables.getNamespaceId(inst, tableId); } catch (TableNotFoundException e) { return null; } }

Target:
protected String getNamespaceId() { try { return Tables.getNamespaceId(inst, tableId); } catch (TableNotFoundException e) { throw new RuntimeException(e); } }
Source:
public static void execute(final InformationModel informationModel, final IVortoCodeGenerator codeGenerator, final InvocationContext invocationContext) { MessageDisplayFactory.getMessageDisplay().display( "Generating code using " + codeGenerator.getServiceKey()); Job job = new Job("Generating Code using " + codeGenerator.getServiceKey()) { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask( "Invoking generator [" + codeGenerator.getServiceKey() + "]", 1); IGenerationResult generatedResult = null; try { generatedResult = ((IVortoCodeGenerator) codeGenerator).generate(informationModel,invocationContext); } catch (Exception e) { GenerationResultZip output = new GenerationResultZip(informationModel,codeGenerator.getServiceKey()); Generated generated = new Generated("generation_error.log", "/generated", e.getMessage()); output.write(generated); generatedResult = output; } CodeGenerationHelper.createEclipseProject(ModelIdFactory.newInstance(informationModel), codeGenerator.getServiceKey(), generatedResult); monitor.worked(1); if (monitor.isCanceled()) { monitor.done(); return Status.CANCEL_STATUS; } monitor.done(); return Status.OK_STATUS; } @Override public boolean belongsTo(Object family) { return family == CODE_GEN_JOBFAMILY; } }; job.setUser(true); job.schedule(); }

Target:
public static void execute(final InformationModel informationModel, final IVortoCodeGenerator codeGenerator, final InvocationContext invocationContext) { MessageDisplayFactory.getMessageDisplay().display( "Generating code using " + codeGenerator.getServiceKey()); Job job = new Job("Generating Code using " + codeGenerator.getServiceKey()) { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask( "Invoking generator [" + codeGenerator.getServiceKey() + "]", 1); IGenerationResult generatedResult = null; try { generatedResult = ((IVortoCodeGenerator) codeGenerator).generate(informationModel,invocationContext); } catch (Exception e) { MessageDisplayFactory.getMessageDisplay().displayError(e); return Status.CANCEL_STATUS; } CodeGenerationHelper.createEclipseProject(ModelIdFactory.newInstance(informationModel), codeGenerator.getServiceKey(), generatedResult); monitor.worked(1); if (monitor.isCanceled()) { monitor.done(); return Status.CANCEL_STATUS; } monitor.done(); return Status.OK_STATUS; } @Override public boolean belongsTo(Object family) { return family == CODE_GEN_JOBFAMILY; } }; job.setUser(true); job.schedule(); }
Source:
private boolean showView(String viewId) { IWorkbench workbench = PlatformUI.getWorkbench(); if (workbench != null) { IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow(); if (activeWorkbenchWindow != null) { try { activeWorkbenchWindow.getActivePage().showView(viewId, null, IWorkbenchPage.VIEW_ACTIVATE); return true; } catch (PartInitException e) { CheatSheetPlugin.logError("Error while activating view: " + viewId, e); } } } return false; }

Target:
private boolean showView(String viewId) { IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow(); if (activeWorkbenchWindow != null) { try { activeWorkbenchWindow.getActivePage().showView(viewId, null, IWorkbenchPage.VIEW_ACTIVATE); return true; } catch (PartInitException e) { CheatSheetPlugin.logError("Error while activating view: " + viewId, e); } } return false; }
Source:
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { try { switch (response.getStatusCode()) { case 401: Multimap<String, String> headers = command.getCurrentRequest().getHeaders(); if (headers != null && headers.containsKey("X-Auth-User") && headers.containsKey("X-Auth-Key") && !headers.containsKey("X-Auth-Token")) { return false; } else { closeClientButKeepContentStream(response); Integer count = retryCountMap.getIfPresent(command); if(count!=null) { if(count.intValue() >= 4 ) { logger.debug("too many 401s - giving up after: " + count.intValue()); return false; } else { logger.debug("invalidating authentication token - retry " + count.intValue()); retryCountMap.put(command, new Integer(count.intValue()+1)); Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS); authenticationResponseCache.invalidateAll(); return true; } } else { logger.debug("invalidating authentication token - first time"); retryCountMap.put(command, new Integer(1)); authenticationResponseCache.invalidateAll(); return true; } } } return false; } finally { releasePayload(response); } }

Target:
public boolean shouldRetryRequest(HttpCommand command, HttpResponse response) { try { switch (response.getStatusCode()) { case 401: Multimap<String, String> headers = command.getCurrentRequest().getHeaders(); if (headers != null && headers.containsKey(AuthHeaders.AUTH_USER) && headers.containsKey(AuthHeaders.AUTH_KEY) && !headers.containsKey(AuthHeaders.AUTH_TOKEN)) { return false; } else { closeClientButKeepContentStream(response); Integer count = retryCountMap.getUnchecked(command); if (count >= AUTH_RETRIES) { logger.debug("too many 401s - giving up after: %s for %s", count, command); return false; } else { logger.debug("invalidating authentication token - retry %s for %s", count, command); retryCountMap.put(command, count + 1); authenticationResponseCache.invalidateAll(); Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS); return true; } } } return false; } finally { releasePayload(response); } }
Source:
public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = new ArrayList<PermissionSubject>(); permissionList.add(new PermissionSubject(MultiLevelAdministrationHandler.SYSTEM_OBJECT_ID, VdcObjectType.System, ActionGroup.INJECT_EXTERNAL_TASKS)); return permissionList; }

Target:
public List<PermissionSubject> getPermissionCheckSubjects() { List<PermissionSubject> permissionList = new ArrayList<PermissionSubject>(); permissionList.add(new PermissionSubject(MultiLevelAdministrationHandler.SYSTEM_OBJECT_ID, VdcObjectType.System, getParameters().getActionType().getActionGroup())); return permissionList; }
Source:
public Queue(String name, boolean durable, boolean exclusive, boolean autoDelete, Map<String, Object> arguments) { Assert.notNull(name, "'name' cannot be null"); this.name = name; this.actualName = StringUtils.hasText(name) ? name : (AnonymousQueue.Base64UrlNamingStrategy.DEFAULT.generateName() + "_awaiting_declaration"); this.durable = durable; this.exclusive = exclusive; this.autoDelete = autoDelete; this.arguments = arguments; }

Target:
public Queue(String name, boolean durable, boolean exclusive, boolean autoDelete, Map<String, Object> arguments) { Assert.notNull(name, "'name' cannot be null"); this.name = name; this.actualName = StringUtils.hasText(name) ? name : (Base64UrlNamingStrategy.DEFAULT.generateName() + "_awaiting_declaration"); this.durable = durable; this.exclusive = exclusive; this.autoDelete = autoDelete; this.arguments = arguments; }
Source:
public TransformerDescriptors( List<ServiceReference> metacardTransformers, List<ServiceReference> queryResponseTransformers) { this.metacardTransformers = getTransformerDescriptors(metacardTransformers); this.queryResponseTransformers = getTransformerDescriptors(queryResponseTransformers); }

Target:
public TransformerDescriptors( List<ServiceReference> metacardTransformers, List<ServiceReference> queryResponseTransformers) { this.metacardTransformers = metacardTransformers; this.queryResponseTransformers = queryResponseTransformers; }
Source:
private Credentials translateUser(String user, String password) { Credentials credentials = null; int separator = user.lastIndexOf("@"); if (separator != -1) { credentials = new Credentials(); credentials.setPassword(password); credentials.setProfile(user.substring(separator + 1)); credentials.setUsername(user.substring(0, separator)); } return credentials; }

Target:
private Credentials translateUser(String user, String password) { Credentials credentials = null; int separator = user.lastIndexOf("@"); if (separator != -1) { String profile = user.substring(separator + 1); List<String> profiles = (List<String>) getServletContext().getAttribute(SSOUtils.SSO_PROFILES); if (StringUtils.isNotEmpty(profile) && profiles.contains(profile)) { credentials = new Credentials(); credentials.setPassword(password); credentials.setProfile(profile); credentials.setUsername(user.substring(0, separator)); } } return credentials; }
Source:
public String getAsStringForNonNumber() { return isBoolean() ? getAsBooleanWrapper().toString() : (String) value; }

Target:
private String getAsStringForNonNumber() { return isBoolean() ? getAsBooleanWrapper().toString() : (String) value; }
Source:
synchronized void removeTransferRecordFromDB(final int id) { S3ClientReference.remove(id); dbUtil.deleteTransferRecords(id); if (dbUtil.getTransferById(id).file.startsWith("aws-s3")) { String path = dbUtil.getRecordUri(id).getPath(); new File(path).delete(); } }

Target:
synchronized void removeTransferRecordFromDB(final int id) { TransferRecord transferRecord = dbUtil.getTransferById(id); if (transferRecord != null) { String path = transferRecord.file; String fileName = new File(path).getName(); if (fileName.startsWith(TEMP_FILE_PREFIX)) { new File(path).delete(); } } S3ClientReference.remove(id); dbUtil.deleteTransferRecords(id); }
Source:
public static @Nullable NavigableMap<Long, String> mapFromNmTextFile(File mappingFile) { NavigableMap<Long, String> map = new TreeMap<>(); try (FileReader fr = new FileReader(mappingFile); BufferedReader reader = new BufferedReader(fr);) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); String[] elems = line.split(" ", 3); if (elems.length == 3) { try { BigInteger bigInt = new BigInteger(stripLeadingZeros(elems[0]), 16); Long address = bigInt.longValue(); String name = elems[elems.length - 1]; map.put(address, name); } catch (NumberFormatException e) { } } } } catch (FileNotFoundException e) { return null; } catch (IOException e) { } if (map.isEmpty()) { return null; } return ImmutableSortedMap.copyOf(map); }

Target:
public static @Nullable NavigableMap<Long, String> mapFromNmTextFile(File mappingFile) { NavigableMap<Long, String> map = new TreeMap<>(); try (FileReader fr = new FileReader(mappingFile); BufferedReader reader = new BufferedReader(fr);) { for (String line = reader.readLine(); line != null; line = reader.readLine()) { line = line.trim(); String[] elems = line.split(" ", 3); if (elems.length == 3) { try { long address = Long.parseLong(stripLeadingZeros(elems[0]), 16); String name = elems[elems.length - 1]; map.put(address, name); } catch (NumberFormatException e) { } } } } catch (FileNotFoundException e) { return null; } catch (IOException e) { } if (map.isEmpty()) { return null; } return ImmutableSortedMap.copyOf(map); }
Source:
public MultiWriteResponse addExplicitEquivalence(HttpServletRequest req, HttpServletResponse resp) { try { PossibleApplication possibleApplication = validateApplicationConfiguration(req, resp); if (possibleApplication.getErrorSummary().isPresent()) { return multiWriteError(req, resp, possibleApplication.getErrorSummary().get()); } Application application = possibleApplication.getApplication().get(); List<String> uris = parseList(req.getParameter(URIS)); List<String> ids = parseList(req.getParameter(IDS)); if (uris.size() + ids.size() != 2) { throw new IllegalArgumentException("Must specify exactly two " + URIS + " or " + IDS); } List<Content> contents = resolveContent(uris, ids); if (contents.size() != 2 || contents.get(0).equals(contents.get(1))) { throw new IllegalArgumentException("Must specify exactly two pieces of content"); } for (Content content : contents) { validateApplicationForExplicitEquiv(content.getPublisher(), application); } Content firstContent = contents.get(0); Content secondContent = contents.get(1); List<String> updatedIds = new ArrayList<>(2); addExplicitEquivalence(firstContent, secondContent).ifPresent(updatedIds::add); addExplicitEquivalence(secondContent, firstContent).ifPresent(updatedIds::add); if (updatedIds.isEmpty()) { throw new IllegalArgumentException("Content is already explicitly equived"); } resp.setStatus(HttpServletResponse.SC_OK); return new MultiWriteResponse(updatedIds); } catch (Exception e) { return multiWriteError(req, resp, AtlasErrorSummary.forException(e)); } }

Target:
public ExplicitEquivalenceResponse addExplicitEquivalence(HttpServletRequest req, HttpServletResponse resp) { try { List<Content> contents = getContentForExplicitEquivFromRequest(req); Content firstContent = contents.get(0); Content secondContent = contents.get(1); List<ExplicitEquivalenceResponse.EquivalenceLink> equivLinksAdded = new ArrayList<>(2); addExplicitEquivalence(firstContent, secondContent).ifPresent(equivLinksAdded::add); addExplicitEquivalence(secondContent, firstContent).ifPresent(equivLinksAdded::add); if (equivLinksAdded.isEmpty()) { throw new IllegalArgumentException("Content is already explicitly equived"); } resp.setStatus(HttpServletResponse.SC_OK); return new ExplicitEquivalenceResponse(equivLinksAdded, null); } catch (Exception e) { return explicitEquivalenceWriteError(req, resp, AtlasErrorSummary.forException(e)); } }
Source:
protected Void visitParameterizedType(AnnotatedDeclaredType type, ParameterizedTypeTree tree) { if (TreeUtils.isDiamondTree(tree)) { return null; } final TypeElement element = (TypeElement) type.getUnderlyingType().asElement(); if (checker.shouldSkipUses(element)) { return null; } List<AnnotatedTypeParameterBounds> bounds = atypeFactory.typeVariablesFromUse(type, element); DeclaredType declType = type.getUnderlyingType(); TypeElement typeElt = (TypeElement) declType.asElement(); visitor.checkTypeArguments( tree, bounds, type.getTypeArguments(), tree.getTypeArguments(), typeElt.getSimpleName(), typeElt.getTypeParameters()); return null; }

Target:
protected Void visitParameterizedType(AnnotatedDeclaredType type, ParameterizedTypeTree tree) { if (TreeUtils.isDiamondTree(tree)) { return null; } final TypeElement element = (TypeElement) type.getUnderlyingType().asElement(); if (checker.shouldSkipUses(element)) { return null; } List<AnnotatedTypeParameterBounds> bounds = atypeFactory.typeVariablesFromUse(type, element); visitor.checkTypeArguments( tree, bounds, type.getTypeArguments(), tree.getTypeArguments(), element.getSimpleName(), element.getTypeParameters()); return null; }
Source:
public LabelMetadataBuilder setOrigin(String origin) { this.origin = origin; return this; }

Target:
public void setOrigin(String origin) { this.origin = origin; }
Source:
public ResponseEntity<?> create(@Valid @RequestBody final EventType eventType, final Errors errors, final NativeWebRequest request) { if (featureToggleService.isFeatureEnabled(DISABLE_EVENT_TYPE_CREATION)) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } ValidationUtils.invokeValidator(eventTypeOptionsValidator, eventType.getOptions(), errors); if (!applicationService.exists(eventType.getOwningApplication())) { return Responses.create(Problem.valueOf(MoreStatus.UNPROCESSABLE_ENTITY, "owning_application doesn't exist"), request); } if (errors.hasErrors()) { return Responses.create(new ValidationProblem(errors), request); } final Result<Void> result = eventTypeService.create(eventType); if (!result.isSuccessful()) { return Responses.create(result.getProblem(), request); } return status(HttpStatus.CREATED).build(); }

Target:
public ResponseEntity<?> create(@Valid @RequestBody final EventType eventType, final Errors errors, final NativeWebRequest request) { if (featureToggleService.isFeatureEnabled(DISABLE_EVENT_TYPE_CREATION)) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } ValidationUtils.invokeValidator(eventTypeOptionsValidator, eventType.getOptions(), errors); if (featureToggleService.isFeatureEnabled(CHECK_OWNING_APPLICATION) && !applicationService.exists(eventType.getOwningApplication())) { return Responses.create(Problem.valueOf(MoreStatus.UNPROCESSABLE_ENTITY, "owning_application doesn't exist"), request); } if (errors.hasErrors()) { return Responses.create(new ValidationProblem(errors), request); } setDefaultEventTypeOptions(eventType); final Result<Void> result = eventTypeService.create(eventType); if (!result.isSuccessful()) { return Responses.create(result.getProblem(), request); } return status(HttpStatus.CREATED).build(); }
Source:
public Builder(String nxqlQuery) { Objects.requireNonNull(nxqlQuery, "NXQL query cannot be null"); this.query = nxqlQuery; }

Target:
protected Builder(String nxqlQuery) { this.query = Objects.requireNonNull(nxqlQuery, "NXQL query cannot be null"); }
Source:
public static JSONObject toJsonObject(InputStream inputStream) throws ParseException { try { String inputStr = new String(ByteStreams.toByteArray(inputStream), Charsets.UTF_8); if (inputStr.isBlank()) { return new JSONObject(); } return new JSONObject(inputStr); } catch (IOException | JSONException e) { throw new ParseException(e); } }

Target:
public static JSONObject toJsonObject(InputStream inputStream) throws ParseException { try { String inputStr = new String((inputStream.readAllBytes()), Charsets.UTF_8); if (inputStr.isBlank()) { return new JSONObject(); } return new JSONObject(inputStr); } catch (IOException | JSONException e) { throw new ParseException(e); } }
Source:
private void setPlatformTextClassifier(@Nullable TextClassifier textClassifier) { android.view.textclassifier.TextClassificationManager textClassificationManager = (android.view.textclassifier.TextClassificationManager) mContext.getSystemService(Context.TEXT_CLASSIFICATION_SERVICE); android.view.textclassifier.TextClassifier platformTextClassifier = textClassifier == null ? null : new PlatformTextClassifier(mContext, textClassifier); textClassificationManager.setTextClassifier(platformTextClassifier); }

Target:
private void setPlatformTextClassifier(@Nullable TextClassifier textClassifier) { android.view.textclassifier.TextClassificationManager textClassificationManager = (android.view.textclassifier.TextClassificationManager) mContext.getSystemService(Context.TEXT_CLASSIFICATION_SERVICE); if (textClassificationManager == null) { return; } android.view.textclassifier.TextClassifier platformTextClassifier = textClassifier == null ? null : new PlatformTextClassifier(mContext, textClassifier); textClassificationManager.setTextClassifier(platformTextClassifier); }
Source:
public void searchByEncounter_shouldGetObsInAnEncounter() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("encounter", "6519d653-393b-4118-9c83-a3715b82d4ac")); SimpleObject result = deserialize(handle(req)); List<Object> results = Util.getResultsList(result); Assert.assertEquals(2, results.size()); List<Object> uuids = Arrays.asList(PropertyUtils.getProperty(results.get(0), "uuid"), PropertyUtils.getProperty( results.get(1), getUuid())); Assert.assertTrue(uuids.contains("39fb7f47-e80a-4056-9285-bd798be13c63")); Assert.assertTrue(uuids.contains("be48cdcb-6a76-47e3-9f2e-2635032f3a9a")); }

Target:
public void searchByEncounter_shouldGetObsInAnEncounter() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("encounter", "6519d653-393b-4118-9c83-a3715b82d4ac")); SimpleObject result = deserialize(handle(req)); List<Object> results = Util.getResultsList(result); Assert.assertEquals(2, results.size()); List<Object> uuids = Arrays.asList(PropertyUtils.getProperty(results.get(0), "uuid"), PropertyUtils.getProperty( results.get(1), "uuid")); Assert.assertTrue(uuids.contains("39fb7f47-e80a-4056-9285-bd798be13c63")); Assert.assertTrue(uuids.contains("be48cdcb-6a76-47e3-9f2e-2635032f3a9a")); }
Source:
void execute() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); injectIntoAll(enabled); eventBroker.subscribe(UIEvents.TrimmedWindow.TOPIC_TRIMBARS, new EventHandler() { @Override public void handleEvent(Event event) { if (!UIEvents.isADD(event)) return; Object newValue = event.getProperty(UIEvents.EventTags.NEW_VALUE); if (newValue instanceof MTrimBar) { MTrimBar trimBar = (MTrimBar) newValue; if (trimBar.getSide() == SideValue.TOP) { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); injectLaunchBar(trimBar, enabled); } } } }); Activator.getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(Activator.PREF_ENABLE_LAUNCHBAR)) { boolean enabled = Boolean.parseBoolean(event.getNewValue().toString()); injectIntoAll(enabled); } if (event.getProperty().equals(Activator.PREF_ENABLE_TARGETSELECTOR)) { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); if (enabled){ injectIntoAll(false); injectIntoAll(true); } } if (event.getProperty().equals(Activator.PREF_ENABLE_BUILDBUTTON)) { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); if (enabled){ injectIntoAll(false); injectIntoAll(true); } } } }); }

Target:
void execute() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); injectIntoAll(enabled); eventBroker.subscribe(UIEvents.TrimmedWindow.TOPIC_TRIMBARS, new EventHandler() { @Override public void handleEvent(Event event) { if (!UIEvents.isADD(event)) return; Object newValue = event.getProperty(UIEvents.EventTags.NEW_VALUE); if (newValue instanceof MTrimBar) { MTrimBar trimBar = (MTrimBar) newValue; if (trimBar.getSide() == SideValue.TOP) { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); injectLaunchBar(trimBar, enabled); } } } }); Activator.getDefault().getPreferenceStore().addPropertyChangeListener(new IPropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(Activator.PREF_ENABLE_LAUNCHBAR)) { boolean enabled = Boolean.parseBoolean(event.getNewValue().toString()); injectIntoAll(enabled); } if (event.getProperty().equals(Activator.PREF_ENABLE_TARGETSELECTOR)|| event.getProperty().equals(Activator.PREF_ENABLE_BUILDBUTTON)) { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); if (enabled){ injectIntoAll(false); injectIntoAll(true); } } } }); }
Source:
private void initButtons() { mapCenterButton = findViewById(R.id.map_center_button); startGeocodeButton = findViewById(R.id.start_geocode_button); chooseCityButton = findViewById(R.id.choose_city_spinner_button); startGeocodeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (TextUtils.isEmpty(latEditText.getText().toString())) { latEditText.setError(getString(R.string.fill_in_a_value)); } else if (TextUtils.isEmpty(longEditText.getText().toString())) { longEditText.setError(getString(R.string.fill_in_a_value)); } else { if (latCoordinateIsValid(Double.valueOf(latEditText.getText().toString())) && longCoordinateIsValid(Double.valueOf(longEditText.getText().toString()))) { makeGeocodeSearch(new LatLng(Double.valueOf(latEditText.getText().toString()), Double.valueOf(longEditText.getText().toString()))); } else { Toast.makeText(GeocodingActivity.this, R.string.make_valid_lat, Toast.LENGTH_LONG).show(); } } } }); chooseCityButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showCityListMenu(); } }); mapCenterButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Double targetLat = mapboxMap.getCameraPosition().target.getLatitude(); Double targetLong = mapboxMap.getCameraPosition().target.getLongitude(); setCoordinateEditTexts(mapboxMap.getCameraPosition().target); makeGeocodeSearch(new LatLng(targetLat, targetLong)); } }); }

Target:
private void initButtons() { mapCenterButton = findViewById(R.id.map_center_button); startGeocodeButton = findViewById(R.id.start_geocode_button); chooseCityButton = findViewById(R.id.choose_city_spinner_button); startGeocodeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (TextUtils.isEmpty(latEditText.getText().toString())) { latEditText.setError(getString(R.string.fill_in_a_value)); } else if (TextUtils.isEmpty(longEditText.getText().toString())) { longEditText.setError(getString(R.string.fill_in_a_value)); } else { if (latCoordinateIsValid(Double.valueOf(latEditText.getText().toString())) && longCoordinateIsValid(Double.valueOf(longEditText.getText().toString()))) { makeGeocodeSearch(new LatLng(Double.valueOf(latEditText.getText().toString()), Double.valueOf(longEditText.getText().toString()))); } else { Toast.makeText(GeocodingActivity.this, R.string.make_valid_lat, Toast.LENGTH_LONG).show(); } } } }); chooseCityButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showCityListMenu(); } }); mapCenterButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { LatLng target = mapboxMap.getCameraPosition().target; setCoordinateEditTexts(target); makeGeocodeSearch(target); } }); }
Source:
public static AndroidSQLite createAndroidSQLite(String path) { SQLiteDatabase db = (path != null) ? SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.CREATE_IF_NECESSARY) : SQLiteDatabase.create(null); return new AndroidSQLite(db); }

Target:
public static AndroidSQLite createAndroidSQLite(String path) { SQLiteDatabase db; if (path != null) { db = SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.CREATE_IF_NECESSARY); } else { db = SQLiteDatabase.create(null); } return new AndroidSQLite(db); }
Source:
private ServiceTemplateInstanceConfiguration getValidServiceTemplateInstanceConfiguration(AbstractTopologyTemplate topology, Map<String, Collection<Long>> nodeIds2situationIds) { QName situationPolicyType = new QName("<LINK_0>", "SituationPolicy_w1-wip1"); Collection<AbstractNodeTemplate> validNodes = new ArrayList<AbstractNodeTemplate>(); Collection<AbstractRelationshipTemplate> validRelations = new ArrayList<AbstractRelationshipTemplate>(); for (AbstractNodeTemplate nodeTemplate : topology.getNodeTemplates()) { Collection<AbstractPolicy> policies = this.getPolicies(situationPolicyType, nodeTemplate); if (policies.isEmpty()) { validNodes.add(nodeTemplate); } else { if (this.isValidUnderSituations(nodeTemplate, nodeIds2situationIds)) { validNodes.add(nodeTemplate); } } } Collection<AbstractNodeTemplate> deployableAndValidNodeSet = this.getDeployableSubgraph(validNodes, nodeIds2situationIds); for (AbstractRelationshipTemplate relations : topology.getRelationshipTemplates()) { if (deployableAndValidNodeSet.contains(relations.getSource()) & deployableAndValidNodeSet.contains(relations.getTarget())) { validRelations.add(relations); } } return new ServiceTemplateInstanceConfiguration(deployableAndValidNodeSet, validRelations); }

Target:
private ServiceTemplateInstanceConfiguration getValidServiceTemplateInstanceConfiguration(AbstractTopologyTemplate topology, Map<String, Collection<Long>> nodeIds2situationIds) { Collection<AbstractNodeTemplate> validNodes = new ArrayList<AbstractNodeTemplate>(); Collection<AbstractRelationshipTemplate> validRelations = new ArrayList<AbstractRelationshipTemplate>(); for (AbstractNodeTemplate nodeTemplate : topology.getNodeTemplates()) { Collection<AbstractPolicy> policies = this.getPolicies(Types.situationPolicyType, nodeTemplate); if (policies.isEmpty()) { validNodes.add(nodeTemplate); } else if (this.isValidUnderSituations(nodeTemplate, nodeIds2situationIds)) { validNodes.add(nodeTemplate); } } Collection<AbstractNodeTemplate> deployableAndValidNodeSet = this.getDeployableSubgraph(validNodes, nodeIds2situationIds); for (AbstractRelationshipTemplate relations : topology.getRelationshipTemplates()) { if (deployableAndValidNodeSet.contains(relations.getSource()) & deployableAndValidNodeSet.contains(relations.getTarget())) { validRelations.add(relations); } } return new ServiceTemplateInstanceConfiguration(deployableAndValidNodeSet, validRelations); }
Source:
protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { if (context.isBooting()) { populateHostControllerInfo(hostControllerInfo, context, operation, operation); } else { context.reloadRequired(); } }

Target:
protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { if (context.isBooting()) { populateHostControllerInfo(hostControllerInfo, context, operation); } else { context.reloadRequired(); } }
Source:
public static Pair<List<PartitionKey>, String> getPartitionKeyNamePair(String[] columns, String[] values) { Pair<List<PartitionKey>, String> pair = null; List<PartitionKey> partitionKeyList = TUtil.newList(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < columns.length; i++) { PartitionKey partitionKey = new PartitionKey(); partitionKey.setColumnName(columns[i]); partitionKey.setPartitionValue(values[i]); if (i > 0) { sb.append("/"); } sb.append(columns[i]).append("=").append(values[i]); partitionKeyList.add(partitionKey); } pair = new Pair<List<PartitionKey>, String>(partitionKeyList, sb.toString()); return pair; }

Target:
public static Pair<List<PartitionKeyProto>, String> getPartitionKeyNamePair(String[] columns, String[] values) { Pair<List<PartitionKeyProto>, String> pair = null; List<PartitionKeyProto> partitionKeyList = TUtil.newList(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < columns.length; i++) { PartitionKeyProto.Builder builder = PartitionKeyProto.newBuilder(); builder.setColumnName(columns[i]); builder.setPartitionValue(values[i]); if (i > 0) { sb.append("/"); } sb.append(columns[i]).append("=").append(values[i]); partitionKeyList.add(builder.build()); } pair = new Pair<List<PartitionKeyProto>, String>(partitionKeyList, sb.toString()); return pair; }
Source:
private void doLink(String res, String lnk) throws BuildException { final Path link = Paths.get(lnk); final Path target = Paths.get(res); final boolean alreadyExists = Files.exists(link); if (!alreadyExists) { try { Files.createSymbolicLink(link, target); } catch (IOException e) { if (failonerror) { throw new BuildException("Failed to create symlink " + lnk + " to target " + res, e); } log("Unable to create symlink " + lnk + " to target " + res, e, Project.MSG_INFO); } return; } if (!overwrite) { log("Skipping symlink creation, since file at " + lnk + " already exists and overwrite is set to false", Project.MSG_INFO); return; } if (!Files.isSymbolicLink(link)) { throw new BuildException("Cannot overwrite, as symlink, at " + lnk + " since the path already exists and isn't a symlink"); } try { Files.delete(link); } catch (IOException e) { log("Failed to delete existing symlink at " + lnk, e, Project.MSG_DEBUG); } try { Files.createSymbolicLink(link, target); } catch (IOException e) { if (failonerror) { throw new BuildException("Failed to create symlink " + lnk + " to target " + res, e); } log("Unable to create symlink " + lnk + " to target " + res, e, Project.MSG_INFO); } }

Target:
private void doLink(String res, String lnk) throws BuildException { final Path link = Paths.get(lnk); final Path target = Paths.get(res); final boolean alreadyExists = Files.exists(link); if (!alreadyExists) { try { Files.createSymbolicLink(link, target); } catch (IOException e) { if (failonerror) { throw new BuildException("Failed to create symlink " + lnk + " to target " + res, e); } log("Unable to create symlink " + lnk + " to target " + res, e, Project.MSG_INFO); } return; } if (!overwrite) { log("Skipping symlink creation, since file at " + lnk + " already exists and overwrite is set to false", Project.MSG_INFO); return; } if (!Files.isSymbolicLink(link)) { final String errMessage = "Cannot overwrite " + lnk + " since the path already exists and isn't a symlink"; if (failonerror) { throw new BuildException(errMessage); } log(errMessage, Project.MSG_INFO); return; } try { deleteSymLink(link); } catch (IOException e) { log("Failed to delete existing symlink at " + lnk, e, Project.MSG_DEBUG); } try { Files.createSymbolicLink(link, target); } catch (IOException e) { if (failonerror) { throw new BuildException("Failed to create symlink " + lnk + " to target " + res, e); } log("Unable to create symlink " + lnk + " to target " + res, e, Project.MSG_INFO); } }
Source:
public RemoteIOSWebDriver(ServerSideSession session, ResponseFinder... finders) { this.session = session; connectionKey = UUID.randomUUID().toString(); sync = new WebKitSyncronizer(this); MessageListener notification = new WebKitNotificationListener(this, sync, session); if (session.getDevice() instanceof RealDevice) { if (!Configuration.BETA_FEATURE) { Configuration.off(); } protocol = new RealDeviceProtocolImpl(notification, finders); } else { protocol = new SimulatorProtocolImpl(notification, finders); } Log perfLog = session.getLogManager().getLog(IOSLogManager.PERFORMANCE_LOG_TYPE); if (perfLog !=null) { perfListener = new PerformanceListener(perfLog); protocol.addListener(perfListener); } protocol.register(); sync.waitForSimToRegister(); sync.waitForSimToSendApps(); if (applications.size() == 1) { connect(applications.get(0).getBundleId()); } else { log.warning("session created but application size=" + applications.size()); } }

Target:
public RemoteIOSWebDriver(ServerSideSession session, ResponseFinder... finders) { this.session = session; connectionKey = UUID.randomUUID().toString(); sync = new WebKitSyncronizer(this); MessageListener notification = new WebKitNotificationListener(this, sync, session); if (session.getDevice() instanceof RealDevice) { if (!Configuration.BETA_FEATURE) { Configuration.off(); } protocol = new RealDeviceProtocolImpl(notification, finders); } else { protocol = new SimulatorProtocolImpl(notification, finders); } session.getLogManager().onProtocolCreated(protocol); protocol.register(); sync.waitForSimToRegister(); sync.waitForSimToSendApps(); if (applications.size() == 1) { connect(applications.get(0).getBundleId()); } else { log.warning("session created but application size=" + applications.size()); } }
Source:
private static EntitlementManager newGlobalManager(ResourceUtils loader, BrooklynProperties brooklynProperties) { String type = brooklynProperties.getConfig(GLOBAL_ENTITLEMENT_MANAGER); if ("root".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(root()); if ("readonly".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(readOnly()); if ("minimal".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(minimal()); if (Strings.isNonBlank(type)) { try { Class<?> clazz = loader.getLoader().loadClass(type); if (clazz.getConstructor(BrooklynProperties.class)!=null) { return (EntitlementManager) clazz.getConstructor(BrooklynProperties.class).newInstance(brooklynProperties); } else { return (EntitlementManager) clazz.newInstance(); } } catch (Exception e) { throw Exceptions.propagate(e); } } throw new IllegalStateException("Invalid entitlement manager specified: '"+type+"'"); }

Target:
private static EntitlementManager newGlobalManager(ResourceUtils loader, BrooklynProperties brooklynProperties) { String type = brooklynProperties.getConfig(GLOBAL_ENTITLEMENT_MANAGER); if ("root".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(root()); if ("readonly".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(readOnly()); if ("minimal".equalsIgnoreCase(type)) return new PerUserEntitlementManagerWithDefault(minimal()); if (Strings.isNonBlank(type)) { try { Class<?> clazz = loader.getLoader().loadClass(type); Optional<?> result = Reflections.invokeConstructorWithArgs(clazz, brooklynProperties); if (result.isPresent()) return (EntitlementManager) result.get(); return (EntitlementManager) clazz.newInstance(); } catch (Exception e) { throw Exceptions.propagate(e); } } throw new IllegalStateException("Invalid entitlement manager specified: '"+type+"'"); }
Source:
synchronized Map<String, Long> getTimeCounts(long now) { Map<String, Long> ret = new ConcurrentHashMap<>(); long value = currentBucket.get(); long timeSpent = now - bucketStart; ret.put("600", readApproximateTime(value, timeSpent, tmTime, tmBuckets, 600 * 1000)); ret.put("10800", readApproximateTime(value, timeSpent, thTime, thBuckets, 10800 * 1000)); ret.put("86400", readApproximateTime(value, timeSpent, odTime, odBuckets, 86400 * 1000)); ret.put(":all-time", value + allTime); return ret; }

Target:
synchronized Map<String, Long> getTimeCounts(long now) { Map<String, Long> ret = new HashMap<>(); long value = currentBucket.get(); long timeSpent = now - bucketStart; ret.put("600", readApproximateTime(value, timeSpent, tmTime, tmBuckets, 600 * 1000)); ret.put("10800", readApproximateTime(value, timeSpent, thTime, thBuckets, 10800 * 1000)); ret.put("86400", readApproximateTime(value, timeSpent, odTime, odBuckets, 86400 * 1000)); ret.put(":all-time", value + allTime); return ret; }
Source:
public synchronized void addTrigger(Trigger t) throws TriggerLoaderException { logger.info("Inserting trigger " + t.toString() + " into db."); SQLTransaction<Long> insertAndGetLastID = transOperator -> { transOperator.update(ADD_TRIGGER, DateTime.now().getMillis()); transOperator.getConnection().commit(); return transOperator.getLastInsertId(); }; try { long id = dbOperator.transaction(insertAndGetLastID); t.setTriggerId((int) id); updateTrigger(t); logger.info("uploaded trigger " + t.getDescription()); } catch (SQLException ex) { throw new TriggerLoaderException("trigger id is not properly created."); } }

Target:
public synchronized void addTrigger(Trigger t) throws TriggerLoaderException { logger.info("Inserting trigger " + t.toString() + " into db."); SQLTransaction<Long> insertAndGetLastID = transOperator -> { transOperator.update(ADD_TRIGGER, DateTime.now().getMillis()); transOperator.getConnection().commit(); return transOperator.getLastInsertId(); }; try { long id = dbOperator.transaction(insertAndGetLastID); t.setTriggerId((int) id); updateTrigger(t); logger.info("uploaded trigger " + t.getDescription()); } catch (SQLException ex) { logger.error("Adding Trigger " + t.getTriggerId() + " failed." ); throw new TriggerLoaderException("trigger id is not properly created.",ex); } }
Source:
void validateConfiguration() { Configuration config = request.getConfiguration(); for (String type : NOT_ALLOWED_CONFIG_TYPES) { checkArgument(!config.getProperties().containsKey(type), "Cannot change '%s' configuration in Add Service request", type); } Configuration clusterConfig = getClusterDesiredConfigs(); if (request.getRecommendationStrategy().shouldUseStackDefaults()) { clusterConfig.setParentConfiguration(state.getStack().getDefaultConfig()); } config.setParentConfiguration(clusterConfig); UnitUpdater.removeUnits(config); state = state.with(config); }

Target:
void validateConfiguration() { Configuration config = request.getConfiguration(); if (strictValidation()) { for (String type : NOT_ALLOWED_CONFIG_TYPES) { CHECK.checkArgument(!config.getProperties().containsKey(type), "Cannot change '%s' configuration in Add Service request", type); } } Configuration clusterConfig = getClusterDesiredConfigs(); clusterConfig.setParentConfiguration(state.getStack().getDefaultConfig()); config.setParentConfiguration(clusterConfig); UnitUpdater.removeUnits(config, state.getStack()); state = state.with(config); }
Source:
public DropwizardResourceConfig(@Nullable MetricRegistry metricRegistry) { super(); if (metricRegistry == null) { metricRegistry = new MetricRegistry(); } property(ServerProperties.WADL_FEATURE_DISABLE, Boolean.TRUE); register(loggingListener); register(new InstrumentedResourceMethodApplicationListener(metricRegistry)); register(new CacheControlledResponseFeature()); register(new io.dropwizard.jersey.guava.OptionalMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalDoubleMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalIntMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalLongMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalParamBinder()); register(new AbstractParamConverterProvider()); register(new FuzzyEnumParamConverterProvider()); register(new SessionFactoryProvider.Binder()); if (isGuavaOnClassPath()) { register(new io.dropwizard.jersey.guava.OptionalParamBinder()); } }

Target:
public DropwizardResourceConfig(@Nullable MetricRegistry metricRegistry) { super(); if (metricRegistry == null) { metricRegistry = new MetricRegistry(); } property(ServerProperties.WADL_FEATURE_DISABLE, Boolean.TRUE); register(loggingListener); register(new InstrumentedResourceMethodApplicationListener(metricRegistry)); register(new CacheControlledResponseFeature()); register(new io.dropwizard.jersey.optional.OptionalMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalDoubleMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalIntMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalLongMessageBodyWriter()); register(new io.dropwizard.jersey.optional.OptionalParamBinder()); register(new AbstractParamConverterProvider()); register(new FuzzyEnumParamConverterProvider()); register(new SessionFactoryProvider.Binder()); if (isGuavaOnClassPath()) { register(new io.dropwizard.jersey.guava.OptionalMessageBodyWriter()); register(new io.dropwizard.jersey.guava.OptionalParamBinder()); } }
Source:
private void transmit(final BasicFileAttributes basicFileAttributes, final Object message) throws Exception { transmitterAction.execute(new Action<ResponseTransmitter>() { @Override public void execute(ResponseTransmitter responseTransmitter) { HttpHeaders httpHeaders = new DefaultHttpHeaders(false); MutableHeaders responseHeaders = new NettyHeadersBackedMutableHeaders(httpHeaders); responseTransmitter.transmit(HttpResponseStatus.OK, responseHeaders, basicFileAttributes.size(), message); } }); }

Target:
private void transmit(final BasicFileAttributes basicFileAttributes, final Object message) throws Exception { transmitterAction.execute(new Action<ResponseTransmitter>() { @Override public void execute(ResponseTransmitter responseTransmitter) { MutableHeaders responseHeaders = new NettyHeadersBackedMutableHeaders(httpHeaders); responseTransmitter.transmit(HttpResponseStatus.OK, responseHeaders, basicFileAttributes.size(), message); } }); }
Source:
public ControllerThread(String controllerThreadName) { super(controllerThreadName); readyList = new LinkedList<>(); semaphore = new Semaphore(0); }

Target:
public ControllerThread(String controllerThreadName) { super(controllerThreadName); semaphore = new Semaphore(0); }