auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Image getImage(Object element) { Image toReturn = null; if (element instanceof FakeArtifactParent) { toReturn = ImageManager.getImage(FrameworkImage.FOLDER); } else if (element instanceof AttributeLineElement) { toReturn = ImageManager.getImage(FrameworkImage.LINE_MATCH); } else if (element instanceof Artifact) { Image artImage = ArtifactImageManager.getImage((Artifact) element); int matchCount = getMatchCount(element); if (matchCount > 0) { toReturn = artImage; } else { Image disabledImage = disabledImageMap.get(artImage); if (disabledImage == null) { disabledImage = new Image(artImage.getDevice(), artImage, SWT.IMAGE_DISABLE); disabledImageMap.put(artImage, disabledImage); } toReturn = disabledImage; } } return toReturn; }

Target:
public Image getImage(Object element) { Image toReturn = null; if (element instanceof FakeArtifactParent) { toReturn = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER); } else if (element instanceof AttributeLineElement) { toReturn = ImageManager.getImage(FrameworkImage.LINE_MATCH); } else if (element instanceof Artifact) { Image artImage = ArtifactImageManager.getImage((Artifact) element); int matchCount = getMatchCount(element); if (matchCount > 0) { toReturn = artImage; } else { Image disabledImage = disabledImageMap.get(artImage); if (disabledImage == null) { disabledImage = new Image(artImage.getDevice(), artImage, SWT.IMAGE_DISABLE); disabledImageMap.put(artImage, disabledImage); } toReturn = disabledImage; } } return toReturn; }
Source:
public void bookmarkPage() { new BookmarkPageTask(getActivity(), title) { @Override public void onBeforeExecute() { Toast.makeText(getActivity(), R.string.toast_saving_page, Toast.LENGTH_LONG).show(); } @Override public void onFinish(Void result) { Toast.makeText(getActivity(), R.string.toast_saved_page, Toast.LENGTH_LONG).show(); } }.execute(); }

Target:
public void bookmarkPage() { new BookmarkPageTask(getActivity(), title) { @Override public void onFinish(Void result) { Toast.makeText(getActivity(), R.string.toast_saved_page, Toast.LENGTH_LONG).show(); } }.execute(); }
Source:
public Consumer<OutputWriter> toJSON(T scmMaterialConfig) { return jsonWriter -> { if (!(scmMaterialConfig instanceof P4MaterialConfig)) { jsonWriter.add("url", scmMaterialConfig.getUrl()); } jsonWriter.add("destination", scmMaterialConfig.getFolder()); if (scmMaterialConfig.filter().isEmpty()) { jsonWriter.renderNull("filter"); } else { jsonWriter.addChild("filter", FilterRepresenter.toJSON(scmMaterialConfig.filter())); } jsonWriter.add("invert_filter", scmMaterialConfig.isInvertFilter()); jsonWriter.add("name", scmMaterialConfig.getName()); jsonWriter.add("auto_update", scmMaterialConfig.isAutoUpdate()); jsonWriter.addIfNotNull("username", scmMaterialConfig.getUserName()); jsonWriter.addIfNotNull("encrypted_password", scmMaterialConfig.getEncryptedPassword()); }; }

Target:
public Consumer<OutputWriter> toJSON(T scmMaterialConfig) { return jsonWriter -> { if (!(scmMaterialConfig instanceof P4MaterialConfig)) { jsonWriter.add("url", scmMaterialConfig.getUrl()); } jsonWriter.add("name", scmMaterialConfig.getName()); jsonWriter.add("auto_update", scmMaterialConfig.isAutoUpdate()); }; }
Source:
public <T> T getAdapter(Class<T> key) { Object adpater = super.getAdapter(key); if (adpater == null) { IConsole console = getConsole(); if (console != null) { ListenerList<IConsolePageParticipant> listeners = getParticipants(console); if (listeners != null) { for (IConsolePageParticipant iConsolePageParticipant : listeners) { IConsolePageParticipant participant = iConsolePageParticipant; adpater = participant.getAdapter(key); if (adpater != null) { return (T) adpater; } } } } } return (T) adpater; }

Target:
public <T> T getAdapter(Class<T> key) { Object adpater = super.getAdapter(key); if (adpater == null) { IDebuggerConsole console = getCurrentConsole(); if (console != null) { ListenerList<IConsolePageParticipant> listeners = getParticipants(console); if (listeners != null) { for (IConsolePageParticipant iConsolePageParticipant : listeners) { IConsolePageParticipant participant = iConsolePageParticipant; adpater = participant.getAdapter(key); if (adpater != null) { return (T) adpater; } } } } } return (T) adpater; }
Source:
public HslProvider(String user, String pass) { super(NetworkId.HSL); apiBase = String.format("<LINK_0>", SERVER_VERSION, user, pass); try { parserFactory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); } catch (final XmlPullParserException x) { throw new RuntimeException(x); } }

Target:
public HslProvider(String user, String pass) { super(NetworkId.HSL); this.user = user; this.pass = pass; try { parserFactory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); } catch (final XmlPullParserException x) { throw new RuntimeException(x); } }
Source:
public boolean startDeleteRoleFlow(String userStoreDomain, String roleName) throws WorkflowException { WorkflowService workflowService = IdentityWorkflowDataHolder.getInstance().getWorkflowService(); String tenant = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); String nameWithTenant = UserCoreUtil.addTenantDomainToEntry(roleName, tenant); String fullyQualifiedName = UserCoreUtil.addDomainToName(nameWithTenant, userStoreDomain); Map<String, Object> wfParams = new HashMap<>(); Map<String, Object> nonWfParams = new HashMap<>(); wfParams.put(ROLENAME, roleName); wfParams.put(USER_STORE_DOMAIN, userStoreDomain); String uuid = UUID.randomUUID().toString(); boolean state = startWorkFlow(wfParams, nonWfParams, uuid); if (!Boolean.TRUE.equals(getWorkFlowCompleted()) && !state) { try { workflowService.addRequestEntityRelationships(uuid, new Entity[]{new Entity(fullyQualifiedName, "ROLE")}); } catch (InternalWorkflowException e) { log.info("No workflow associated with the operation."); } } return state; }

Target:
public boolean startDeleteRoleFlow(String userStoreDomain, String roleName) throws WorkflowException { WorkflowService workflowService = IdentityWorkflowDataHolder.getInstance().getWorkflowService(); String tenant = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); String fullyQualifiedName = UserCoreUtil.addDomainToName(roleName, userStoreDomain); Map<String, Object> wfParams = new HashMap<>(); Map<String, Object> nonWfParams = new HashMap<>(); wfParams.put(ROLENAME, roleName); wfParams.put(USER_STORE_DOMAIN, userStoreDomain); String uuid = UUID.randomUUID().toString(); Entity roleEntity = new Entity(fullyQualifiedName, UserStoreWFConstants.ENTITY_TYPE_ROLE, tenant); if (workflowService.eventEngagedWithWorkflows(UserStoreWFConstants.DELETE_ROLE_EVENT) && !Boolean.TRUE.equals (getWorkFlowCompleted()) && !isValidOperation(new Entity[]{roleEntity})) { throw new WorkflowException("Operation is not valid."); } boolean state = startWorkFlow(wfParams, nonWfParams, uuid); if (!Boolean.TRUE.equals(getWorkFlowCompleted()) && !state) { try { workflowService.addRequestEntityRelationships(uuid, new Entity[]{roleEntity}); } catch (InternalWorkflowException e) { if (log.isDebugEnabled()) { log.debug("No workflow associated with the operation.", e); } } } return state; }
Source:
private static boolean isBlinkPlanner(Table table) { TableEnvironment tableEnv = ((TableImpl) table).getTableEnvironment(); if (tableEnv instanceof BatchTableEnvironment || tableEnv instanceof TableEnvImpl) { return false; } else if (tableEnv instanceof TableEnvironmentImpl) { Planner planner = ((TableEnvironmentImpl) tableEnv).getPlanner(); return planner instanceof PlannerBase; } else { throw new RuntimeException(String.format( "Could not determine the planner type for table environment class %s", tableEnv.getClass())); } }

Target:
private static boolean isBlinkPlanner(Table table) { TableEnvironment tableEnv = ((TableImpl) table).getTableEnvironment(); if (tableEnv instanceof TableEnvImpl) { return false; } else if (tableEnv instanceof TableEnvironmentImpl) { Planner planner = ((TableEnvironmentImpl) tableEnv).getPlanner(); return planner instanceof PlannerBase; } else { throw new RuntimeException(String.format( "Could not determine the planner type for table environment class %s", tableEnv.getClass())); } }
Source:
public final synchronized void step() { if (random.nextDouble() < COINCHANCE) { addEntity(new Coin(new Point3D(-1, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(0, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(1, 1.0 / 2, LENGTH))); } else if (random.nextDouble() < OBSTACLECHANCE) { addEntity(new Obstacle( new Point3D(0, 1.0 / 2, LENGTH), new Point3D(WIDTH, 1, 1)) ); } getPlayer().step(); distance++; moveTrack(UNITS_PER_TICK); }

Target:
public final synchronized void step() { if (random.nextDouble() < COINCHANCE) { addEntity(new Coin(new Point3D(-1, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(0, 1.0 / 2, LENGTH))); addEntity(new Coin(new Point3D(1, 1.0 / 2, LENGTH))); } else if (random.nextDouble() < OBSTACLECHANCE) { addEntity(new Obstacle( new Point3D(0, 1.0 / 2, LENGTH), new Point3D(WIDTH, 1, 1)) ); } getPlayer().step(); distance += UNITS_PER_TICK; moveTrack(UNITS_PER_TICK); }
Source:
public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (fMonitor.isCanceled()) { return; } if (entry == null) { break; } zoom(entry, fMonitor); } List<ILinkEvent> events = getLinkList(fZoomStartTime, fZoomEndTime, fResolution, fMonitor); fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); redraw(); }

Target:
public void run() { for (TimeGraphEntry entry : fZoomEntryList) { if (fMonitor.isCanceled()) { return; } if (entry == null) { break; } zoom(entry, fMonitor); } List<ILinkEvent> events = getLinkList(fZoomStartTime, fZoomEndTime, fResolution, fMonitor); if (events != null) { fTimeGraphWrapper.getTimeGraphViewer().setLinks(events); redraw(); } }
Source:
private void extractContainerProperties() { String repoRelativePath = makeRepoRelative(resource) + "/"; Set<String> ignoredFiles = indexDiffData.getIgnoredNotInIndex(); Set<String> untrackedFolders = indexDiffData.getUntrackedFolders(); ignored = containsPrefixPath(ignoredFiles, repoRelativePath) || !hasContainerAnyFiles(resource); if (ignored) tracked = false; else tracked = !containsPrefixPath(untrackedFolders, repoRelativePath); if (ResourceUtil.isSymbolicLink(repository, repoRelativePath)) { extractResourceProperties(); return; } Set<String> changed = new HashSet<String>(indexDiffData.getChanged()); changed.addAll(indexDiffData.getAdded()); changed.addAll(indexDiffData.getRemoved()); if (containsPrefix(changed, repoRelativePath)) staged = Staged.MODIFIED; else staged = Staged.NOT_STAGED; Set<String> conflicting = indexDiffData.getConflicting(); conflicts = containsPrefix(conflicting, repoRelativePath); Set<String> modified = indexDiffData.getModified(); Set<String> untracked = indexDiffData.getUntracked(); Set<String> missing = indexDiffData.getMissing(); dirty = containsPrefix(modified, repoRelativePath) || containsPrefix(untracked, repoRelativePath) || containsPrefix(missing, repoRelativePath); }

Target:
private void extractContainerProperties() { String repoRelativePath = makeRepoRelative(resource) + "/"; if (ResourceUtil.isSymbolicLink(repository, repoRelativePath)) { extractResourceProperties(); return; } Set<String> ignoredFiles = indexDiffData.getIgnoredNotInIndex(); Set<String> untrackedFolders = indexDiffData.getUntrackedFolders(); ignored = containsPrefixPath(ignoredFiles, repoRelativePath) || !hasContainerAnyFiles(resource); if (ignored) tracked = false; else tracked = !containsPrefixPath(untrackedFolders, repoRelativePath); Set<String> changed = new HashSet<String>(indexDiffData.getChanged()); changed.addAll(indexDiffData.getAdded()); changed.addAll(indexDiffData.getRemoved()); if (containsPrefix(changed, repoRelativePath)) staged = Staged.MODIFIED; else staged = Staged.NOT_STAGED; Set<String> conflicting = indexDiffData.getConflicting(); conflicts = containsPrefix(conflicting, repoRelativePath); Set<String> modified = indexDiffData.getModified(); Set<String> untracked = indexDiffData.getUntracked(); Set<String> missing = indexDiffData.getMissing(); dirty = containsPrefix(modified, repoRelativePath) || containsPrefix(untracked, repoRelativePath) || containsPrefix(missing, repoRelativePath); }
Source:
protected void migrateRealmCommon(RealmModel realm) { addAccountConsoleClient(realm); ClientModel accountClient = realm.getClientByClientId(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel viewAppRole = accountClient.addRole(AccountRoles.VIEW_APPLICATIONS); viewAppRole.setDescription("${role_" + AccountRoles.VIEW_APPLICATIONS + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.VIEW_APPLICATIONS, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel viewConsentRole = accountClient.addRole(AccountRoles.VIEW_CONSENT); viewConsentRole.setDescription("${role_" + AccountRoles.VIEW_CONSENT + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.VIEW_CONSENT, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); RoleModel manageConsentRole = accountClient.addRole(AccountRoles.MANAGE_CONSENT); manageConsentRole.setDescription("${role_" + AccountRoles.MANAGE_CONSENT + "}"); LOG.debugf("Added the role %s to the '%s' client.", AccountRoles.MANAGE_CONSENT, Constants.ACCOUNT_MANAGEMENT_CLIENT_ID); manageConsentRole.addCompositeRole(viewConsentRole); LOG.debugf("Added the %s role as a composite role to %s", AccountRoles.VIEW_CONSENT, AccountRoles.MANAGE_CONSENT); RoleModel manageAccountRole = accountClient.getRole(AccountRoles.MANAGE_ACCOUNT); manageAccountRole.addCompositeRole(manageConsentRole); }

Target:
protected void migrateRealmCommon(RealmModel realm) { addAccountConsoleClient(realm); addAccountApiRoles(realm); }
Source:
private static void checkType(Type type) { checkArgument(isAcceptedType(type), "Can't handle type: %s", type); }

Target:
private static void checkType(Type type) { checkArgument(isSupported(type), "Type not supported: %s", type); }
Source:
public boolean isMergerFor(Diff target) { final Conflict conflict = target.getConflict(); return conflict != null && conflict.getKind() == ConflictKind.PSEUDO; }

Target:
public boolean isMergerFor(Diff target) { return target.getConflict() != null && target.getConflict().getKind() == ConflictKind.PSEUDO; }
Source:
public boolean equals(Object other) { if (this == other) { return true; } if (other == null || getClass() != other.getClass()) { return false; } return Objects.equals(id, ((VirtualMachine) other).id); }

Target:
public boolean equals(Object other) { if (this == other) return true; if (other == null || getClass() != other.getClass()) return false; return Objects.equals(id, ((VirtualMachine) other).id); }
Source:
public CategoryInfo(Parcel source) { category = (Category) source.readSerializable(); visible = source.readInt() == 1 ? true : false; }

Target:
public CategoryInfo(Parcel source) { category = (Category) source.readSerializable(); visible = source.readInt() == 1; }
Source:
public static void write(OutputStream out, @Nullable AnyObjectId id) throws IOException { if (id != null) { out.write(NON_NULL_MARKER); id.copyRawTo(out); } else { out.write(NULL_MARKER); } }

Target:
public static void write(OutputStream out, @Nullable AnyObjectId id) throws IOException { if (id != null) { out.write(NON_NULL_MARKER); writeWithoutMarker(out, id); } else { out.write(NULL_MARKER); } }
Source:
protected List<ProjectNegotiationData> createProjectNegotiationDataList( final List<IProject> projectsToShare, final IProgressMonitor monitor) throws IOException, LocalCancellationException { final int scale = 1000; monitor .beginTask( "Creating file list and calculating file checksums. This may take a while...", projectsToShare.size() * scale); List<ProjectNegotiationData> negData = new ArrayList<ProjectNegotiationData>( projectsToShare.size()); for (IProject project : projectsToShare) { if (monitor.isCanceled()) throw new LocalCancellationException(null, CancelOption.DO_NOT_NOTIFY_PEER); try { if (editorManager != null) editorManager.saveEditors(project); FileList projectFileList = FileListFactory.createFileList( project, session.getSharedResources(project .getReferencePoint()), checksumCache, new SubProgressMonitor(monitor, 1 * scale, SubProgressMonitor.SUPPRESS_BEGINTASK | SubProgressMonitor.SUPPRESS_SETTASKNAME)); boolean partial = !session.isCompletelyShared(project .getReferencePoint()); String projectID = session.getReferencePointID(project .getReferencePoint()); projectFileList.setProjectID(projectID); ProjectNegotiationData data = new ProjectNegotiationData( projectID, project.getName(), partial, projectFileList); negData.add(data); } catch (IOException e) { localCancel(e.getMessage(), CancelOption.DO_NOT_NOTIFY_PEER); throw new IOException(e.getMessage(), e); } } monitor.done(); return negData; }

Target:
protected List<ProjectNegotiationData> createProjectNegotiationDataList( final List<IProject> projectsToShare, final IProgressMonitor monitor) throws IOException, LocalCancellationException { final int scale = 1000; monitor .beginTask( "Creating file list and calculating file checksums. This may take a while...", projectsToShare.size() * scale); List<ProjectNegotiationData> negData = new ArrayList<ProjectNegotiationData>( projectsToShare.size()); for (IProject project : projectsToShare) { if (monitor.isCanceled()) throw new LocalCancellationException(null, CancelOption.DO_NOT_NOTIFY_PEER); try { if (editorManager != null) editorManager.saveEditors(project); FileList projectFileList = FileListFactory.createFileList( project, session.getSharedResources(project .getReferencePoint()), checksumCache, new SubProgressMonitor(monitor, 1 * scale, SubProgressMonitor.SUPPRESS_BEGINTASK | SubProgressMonitor.SUPPRESS_SETTASKNAME)); boolean partial = !session.isCompletelyShared(project .getReferencePoint()); String referencePointID = session.getReferencePointID(project .getReferencePoint()); projectFileList.setProjectID(referencePointID); ProjectNegotiationData data = new ProjectNegotiationData( referencePointID, project.getName(), partial, projectFileList); negData.add(data); } catch (IOException e) { localCancel(e.getMessage(), CancelOption.DO_NOT_NOTIFY_PEER); throw new IOException(e.getMessage(), e); } } monitor.done(); return negData; }
Source:
protected CompositeHeaderMatcher createHeaderMatcher(Collection<String> patterns) { Collection<HeaderMatcher> matchers = new ArrayList<HeaderMatcher>(); for (String pattern : patterns) { if (STANDARD_REQUEST_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.requestHeaderNames)); } else if (STANDARD_REPLY_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.replyHeaderNames)); } else if (NON_STANDARD_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new PrefixBasedMatcher(false, this.standardHeaderPrefix)); } else { matchers.add(new PatternBasedHeaderMatcher(Collections.singleton(pattern))); } } return new CompositeHeaderMatcher(matchers); }

Target:
protected HeaderMatcher createHeaderMatcher(Collection<String> patterns) { Collection<HeaderMatcher> matchers = new ArrayList<HeaderMatcher>(); for (String pattern : patterns) { if (STANDARD_REQUEST_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.requestHeaderNames)); } else if (STANDARD_REPLY_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new ContentBasedHeaderMatcher(true, this.replyHeaderNames)); } else if (NON_STANDARD_HEADER_NAME_PATTERN.equals(pattern)) { matchers.add(new PrefixBasedMatcher(false, this.standardHeaderPrefix)); } else { matchers.add(new PatternBasedHeaderMatcher(Collections.singleton(pattern))); } } return new CompositeHeaderMatcher(matchers); }
Source:
protected final void handleMessageInternal(Message<?> message) { MailMessage mailMessage = convertMessageToMailMessage(message); if (mailMessage instanceof SimpleMailMessage) { this.mailSender.send((SimpleMailMessage) mailMessage); } else if (mailMessage instanceof MimeMailMessage) { Assert.state(this.mailSender instanceof JavaMailSender, "'mailSender' [" + this.mailSender + "] doesn't support 'MimeMailMessage' to send: " + mailMessage); ((JavaMailSender) this.mailSender).send(((MimeMailMessage) mailMessage).getMimeMessage()); } else { throw new IllegalArgumentException( "Unsupported MailMessage type [" + mailMessage.getClass().getName() + "]."); } }

Target:
protected final void handleMessageInternal(Message<?> message) { MailMessage mailMessage = convertMessageToMailMessage(message); if (mailMessage instanceof SimpleMailMessage) { this.mailSender.send((SimpleMailMessage) mailMessage); } else if (mailMessage instanceof MimeMailMessage) { Assert.state(this.mailSender instanceof JavaMailSender, "this adapter requires a 'JavaMailSender' to send a 'MimeMailMessage'"); ((JavaMailSender) this.mailSender).send(((MimeMailMessage) mailMessage).getMimeMessage()); } else { throw new IllegalArgumentException( "Unsupported MailMessage type [" + mailMessage.getClass().getName() + "]."); } }
Source:
public String rewriteFilterItem(FilterItem item) { Object operand = item.getOperand(); if (operand != null) { final SelectItem selectItem = item.getSelectItem(); if (operand instanceof String) { String str = (String) operand; if (str.indexOf('\'') != -1) { str = escapeQuotes(str); FilterItem replacementFilterItem = new FilterItem(selectItem, item.getOperator(), str); return super.rewriteFilterItem(replacementFilterItem); } } else if (operand instanceof Timestamp) { final OperatorType operator = item.getOperator(); StringBuilder sb = new StringBuilder(); sb.append(selectItem.getSameQueryAlias(false)); FilterItem.appendOperator(sb, operand, operator); sb.append("TIMESTAMP \'" + operand.toString() + "\'"); return sb.toString(); } else if (operand instanceof Iterable || operand.getClass().isArray()) { assert OperatorType.IN.equals(item.getOperator()); @SuppressWarnings("unchecked") final List<Object> elements = (List<Object>) CollectionUtils.toList(operand); for (ListIterator<Object> it = elements.listIterator(); it.hasNext();) { Object next = it.next(); if (next == null) { logger.warn( "element in IN list is NULL, which isn't supported by SQL. Stripping the element from the list: {}", item); it.remove(); } else if (next instanceof String) { String str = (String) next; if (str.indexOf('\'') != -1) { str = escapeQuotes(str); it.set(str); } } } FilterItem replacementFilterItem = new FilterItem(selectItem, item.getOperator(), elements); return super.rewriteFilterItem(replacementFilterItem); } } return super.rewriteFilterItem(item); }

Target:
public String rewriteFilterItem(FilterItem item) { Object operand = item.getOperand(); if (operand != null) { final SelectItem selectItem = item.getSelectItem(); if (operand instanceof String) { String str = (String) operand; if (str.indexOf('\'') != -1) { str = escapeQuotes(str); FilterItem replacementFilterItem = new FilterItem(selectItem, item.getOperator(), str); return super.rewriteFilterItem(replacementFilterItem); } } else if (operand instanceof Timestamp) { final OperatorType operator = item.getOperator(); StringBuilder sb = new StringBuilder(); sb.append(selectItem.getSameQueryAlias(false)); FilterItem.appendOperator(sb, operand, operator); sb.append(rewriteTimestamp((Timestamp) operand)); return sb.toString(); } else if (operand instanceof Iterable || operand.getClass().isArray()) { assert OperatorType.IN.equals(item.getOperator()); @SuppressWarnings("unchecked") final List<Object> elements = (List<Object>) CollectionUtils.toList(operand); for (ListIterator<Object> it = elements.listIterator(); it.hasNext();) { Object next = it.next(); if (next == null) { logger.warn( "element in IN list is NULL, which isn't supported by SQL. Stripping the element from the list: {}", item); it.remove(); } else if (next instanceof String) { String str = (String) next; if (str.indexOf('\'') != -1) { str = escapeQuotes(str); it.set(str); } } } FilterItem replacementFilterItem = new FilterItem(selectItem, item.getOperator(), elements); return super.rewriteFilterItem(replacementFilterItem); } } return super.rewriteFilterItem(item); }
Source:
protected MultiFieldQueryParser newMultipleFieldQueryParser(String[] fields) { Analyzer analyzer = getFullTextSession().getSearchFactory().getAnalyzer(getType()); return new MultiFieldQueryParser(fields, analyzer); }

Target:
protected MultiFieldQueryParser newMultipleFieldQueryParser(String[] fields) { Analyzer analyzer; if (getType().isAssignableFrom(PersonName.class)) { analyzer = getFullTextSession().getSearchFactory().getAnalyzer("PartialPersonNameQueryAnalyzer"); } else { analyzer = getFullTextSession().getSearchFactory().getAnalyzer(getType()); } MultiFieldQueryParser queryParser = new MultiFieldQueryParser(fields, analyzer); queryParser.setDefaultOperator(Operator.AND); return queryParser; }
Source:
protected boolean isOrganizationalUnitCreated(String orgName, DirContext initialDirContext) throws UserStoreException { String partitionDN = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ROOT_PARTITION); String organizationalObjectClass = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_OBJECT_CLASS); String organizationalAttribute = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_ATTRIBUTE); String searchFilter = "(&(objectClass=" + organizationalObjectClass + ")(" + organizationalAttribute + "=" + orgName + "))"; SearchControls userSearchControl = new SearchControls(); userSearchControl.setSearchScope(SearchControls.SUBTREE_SCOPE); NamingEnumeration<SearchResult> userSearchResults = null; try { userSearchResults = initialDirContext.search(partitionDN, searchFilter, userSearchControl); return userSearchResults.hasMore(); } catch (NamingException e) { String errorMessage = "Error occurred while searching in root partition."; if(logger.isDebugEnabled()){ logger.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } }

Target:
protected boolean isOrganizationalUnitCreated(String orgName, DirContext initialDirContext) throws UserStoreException { String partitionDN = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ROOT_PARTITION); String organizationalObjectClass = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_OBJECT_CLASS); String organizationalAttribute = tenantMgtConfig.getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.PROPERTY_ORGANIZATIONAL_ATTRIBUTE); String searchFilter = "(&(objectClass=" + organizationalObjectClass + ")(" + organizationalAttribute + "=" + orgName + "))"; SearchControls userSearchControl = new SearchControls(); userSearchControl.setSearchScope(SearchControls.SUBTREE_SCOPE); NamingEnumeration<SearchResult> userSearchResults = null; try { userSearchResults = initialDirContext.search(partitionDN, searchFilter, userSearchControl); return userSearchResults.hasMore(); } catch (NamingException e) { String errorMessage = "Error occurred while searching in root partition for organization : " + orgName; if (logger.isDebugEnabled()) { logger.debug(errorMessage, e); } throw new UserStoreException(errorMessage, e); } }
Source:
public void validate(Element element, ElementValidation validation) { super.validate(element, validation); restSpringValidatorHelper.hasHttpHeadersReturnType((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHavePartAnnotatedParameter((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHaveFieldAnnotatedParameter((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHaveBodyAnnotatedParameter((ExecutableElement) element, validation); }

Target:
public void validate(Element element, ElementValidation validation) { super.validate(element, validation); restSpringValidatorHelper.hasHttpHeadersReturnType((ExecutableElement) element, validation); restSpringValidatorHelper.doesNotHaveRequestEntityAnnotatedParameters((ExecutableElement) element, validation); }
Source:
public void metricIsOnlyRegisteredOnce() { TableLevelMetricsController memoizing = new MemoizingTableLevelMetricsController(delegate); Counter c1 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); Counter c2 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); assertThat(c1).isSameAs(c2); verify(delegate, times(1)).createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); }

Target:
public void metricIsOnlyRegisteredOnce() { Counter c1 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); Counter c2 = memoizing.createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); assertThat(c1).isSameAs(c2); verify(delegate, times(1)).createAndRegisterCounter(STRING_CLASS, METRIC_NAME, TABLE_REFERENCE); }
Source:
public void visitDecorator(PyDecoratorTree pyDecoratorTree) { PyNameTree nameTree = pyDecoratorTree.name().names().get(0); Scope scope = scopesByRootTree.get(currentScopeRootTree()); SymbolImpl symbol = scope.resolve(nameTree.name()); if (symbol != null && !symbol.usages().contains(nameTree)) { symbol.addUsage(nameTree); } super.visitDecorator(pyDecoratorTree); }

Target:
public void visitDecorator(PyDecoratorTree pyDecoratorTree) { PyNameTree nameTree = pyDecoratorTree.name().names().get(0); addSymbolUsage(nameTree); super.visitDecorator(pyDecoratorTree); }
Source:
public void testAutoMap_ReturnEmptyWhenNoPoolConfigured() { final CallActivity callActivity = CallActivityBuilder .aCallActivity() .build(); final CallActivityMapper mapper = callActivityHelper.automapSubProcess(callActivity); assertThat(mapper.getInputMappingToCreate()).isEmpty(); assertThat(mapper.getOutputMappingToCreate()).isEmpty(); }

Target:
public void testAutoMap_ReturnEmptyWhenNoPoolConfigured() { final CallActivity callActivity = CallActivityBuilder .aCallActivity() .build(); final CallActivityMapper mapper = callActivityHelper.findAutomapingCandidatesForContractInputsAndDataWithCalledProcess(callActivity); assertThat(mapper.getInputMappingToCreate()).isEmpty(); assertThat(mapper.getOutputMappingToCreate()).isEmpty(); }
Source:
public static CommandSource of(ICommandSender sender) { if (sender instanceof IMixinCommandSender) { return ((IMixinCommandSender) sender).asCommandSource(); } if (sender instanceof WrapperICommandSender) { return ((WrapperICommandSender) sender).source; } if (sender.getCommandSenderEntity() != null) { return new WithEntity(sender); } if (!new Vec3(0, 0, 0).equals(sender.getPositionVector())) { return new Located(sender); } return new WrapperCommandSource(sender); }

Target:
public static CommandSource of(ICommandSender sender) { if (sender instanceof IMixinCommandSender) { return ((IMixinCommandSender) sender).asCommandSource(); } if (sender instanceof WrapperICommandSender) { return ((WrapperICommandSender) sender).source; } if (sender.getCommandSenderEntity() != null || !VecHelper.VEC3_ORIGIN.equals(sender.getPositionVector())) { return new Located(sender); } return new WrapperCommandSource(sender); }
Source:
public Set<Resource> getEnumeration(final Resource type) { if (enumerations != null) { final Set<Resource> oneOfSet = enumerations.get(type); return oneOfSet; } return null; }

Target:
public Set<Resource> getEnumeration(final Resource type) { if (enumerations != null) { final Set<Resource> oneOfSet = enumerations.get(type); if (oneOfSet != null) { return oneOfSet; } } return new LinkedHashSet<>(); }
Source:
static void checkValidPositions(int[] positions, int offset, int length, int positionCount) { checkValidPositionsArray(positions, offset, length); for (int i = offset; i < offset + length; ++i) { int position = positions[i]; if (position > positionCount) { throw new IllegalArgumentException("Invalid position " + position + " in block with " + positionCount + " positions"); } } }

Target:
static void checkValidPositions(int[] positions, int offset, int length, int positionCount) { checkValidPositionsArray(positions, offset, length); for (int i = offset; i < offset + length; ++i) { int position = positions[i]; if (position > positionCount) { throw new IllegalArgumentException(String.format("Invalid position '%s' in block with '%s' positions", position, positionCount)); } } }
Source:
public void testLogErrorDoesntLogWhenLogLevelInactive() throws Exception { Log log = mock(Log.class); when(log.isWarnEnabled()).thenReturn(false); LoggedUtils.logError(log, "", new LoggedOverridingSubclass(), new Exception()); }

Target:
public void testLogErrorDoesntLogWhenLogLevelInactive() throws Exception { Log log = mock(Log.class); LoggedUtils.logError(log, "", new LoggedOverridingSubclass(), new Exception()); verify(log, never()).traceFormat(any(String.class), any()); verify(log, never()).debugFormat(any(String.class), any()); verify(log, never()).infoFormat(any(String.class), any()); verify(log, never()).warnFormat(any(String.class), any()); verify(log, never()).errorFormat(any(String.class), any()); verify(log, never()).fatalFormat(any(String.class), any()); }
Source:
public InfoboxBuilderPage addHeaderComponent() { wait.forElementVisible(componentsButtons.get(3)); componentsButtons.get(3).click(); return this; }

Target:
public InfoboxBuilderPage addHeaderComponent() { WebElement headerComponentButton = componentsButtons.get(3); wait.forElementVisible(headerComponentButton); headerComponentButton.click(); return this; }
Source:
public HadoopDruidIndexerConfig getHadoopDruidIndexerConfig() { try { if (argumentSpec.startsWith("{")) { return HadoopDruidIndexerConfig.fromString(argumentSpec); } else { URI argumentSpecUri = new URI(argumentSpec); String argumentSpecScheme = argumentSpecUri.getScheme(); if ((argumentSpecScheme == null) || argumentSpecScheme.equals("file")) { return HadoopDruidIndexerConfig.fromFile(new File(argumentSpec)); } else { return HadoopDruidIndexerConfig.fromDistributedFileSystem(argumentSpec); } } } catch (Exception e) { throw Throwables.propagate(e); } }

Target:
public HadoopDruidIndexerConfig getHadoopDruidIndexerConfig() { try { if (argumentSpec.startsWith("{")) { return HadoopDruidIndexerConfig.fromString(argumentSpec); } else { URI argumentSpecUri = new URI(argumentSpec); String argumentSpecScheme = argumentSpecUri.getScheme(); if ((argumentSpecScheme == null) || argumentSpecScheme.equals("file")) { return HadoopDruidIndexerConfig.fromFile(new File(argumentSpecUri.getPath())); } else { return HadoopDruidIndexerConfig.fromDistributedFileSystem(argumentSpec); } } } catch (Exception e) { throw Throwables.propagate(e); } }
Source:
private InitializationManager() { WatchDogGlobals.setLogDirectory( "watchdog" + File.separator + "logs" + File.separator); WatchDogGlobals.setPreferences(Preferences.getInstance()); File baseFolder = Activator.getDefault().getStateLocation().toFile(); File toTransferDatabaseFile = new File(baseFolder, "intervals.mapdb"); File statisticsDatabaseFile = new File(baseFolder, "intervalsStatistics.mapdb"); intervalsToTransferPersister = new IntervalPersisterBase( toTransferDatabaseFile); intervalsStatisticsPersister = new IntervalPersisterBase( statisticsDatabaseFile); new ClientVersionChecker(); intervalManager = new IntervalManager(intervalsToTransferPersister, intervalsStatisticsPersister); eventManager = new EventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, eventManager); WorkbenchListener workbenchListener = new WorkbenchListener( eventManager, new IntervalTransferManager(intervalsToTransferPersister, WatchDogUtils.getWorkspaceName())); workbenchListener.attachListeners(); DebugPlugin.getDefault() .addDebugEventListener(new DebuggerListener(eventManager)); }

Target:
private InitializationManager() { WatchDogGlobals.setLogDirectory( "watchdog" + File.separator + "logs" + File.separator); WatchDogGlobals.setPreferences(Preferences.getInstance()); File baseFolder = Activator.getDefault().getStateLocation().toFile(); File toTransferDatabaseFile = new File(baseFolder, "intervals.mapdb"); File statisticsDatabaseFile = new File(baseFolder, "intervalsStatistics.mapdb"); intervalsToTransferPersister = new IntervalPersisterBase( toTransferDatabaseFile); intervalsStatisticsPersister = new IntervalPersisterBase( statisticsDatabaseFile); new ClientVersionChecker(); intervalManager = new IntervalManager(intervalsToTransferPersister, intervalsStatisticsPersister); eventManager = new EventManager(intervalManager, USER_ACTIVITY_TIMEOUT); new TimeSynchronityChecker(intervalManager, eventManager); WorkbenchListener workbenchListener = new WorkbenchListener( eventManager, new IntervalTransferManager(intervalsToTransferPersister, WatchDogUtils.getWorkspaceName())); workbenchListener.attachListeners(); }
Source:
public void compare(List<JsonObject> expectedEventList, List<JsonObject> currentEventList) { Boolean equals = false; for (JsonObject expectedEvent : expectedEventList) { for (JsonObject event : currentEventList) { PageObjectLogging.log("compare", "comparing clicktracked events to expected event \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+event.toString(), true); equals = event.equals(expectedEvent); if (equals) { break; } } if (!equals) { PageObjectLogging.log("compare", "didn't find match for expected event: "+expectedEvent.toString(), false); } Assertion.assertTrue(equals); equals = false; } }

Target:
public void compare(List<JsonObject> expectedEventList, List<JsonObject> currentEventList) { for (JsonObject expectedEvent : expectedEventList) { Boolean equals = false; for (JsonObject currentEvent : currentEventList) { PageObjectLogging.log("compare", "comparing clicktracked events to expected event: \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+currentEvent.toString(), true); equals = currentEvent.equals(expectedEvent); if (equals) { PageObjectLogging.log("compare", "match for expected event found: \n" + "expected event: "+expectedEvent.toString() + "\n" + "compared event: "+currentEvent.toString(), true); currentEventList.remove(currentEvent); break; } } if (!equals) { PageObjectLogging.log("compare", "didn't find match for expected event: "+expectedEvent.toString(), false); } Assertion.assertTrue(equals); } }
Source:
public Snapshot getSnapshot() { rescaleIfNeeded(); lockForRegularUsage(); try { Snapshot snapshot = new WeightedSnapshot(values.values()); values.clear(); return snapshot; } finally { unlockForRegularUsage(); } }

Target:
public Snapshot getSnapshot() { rescaleIfNeeded(); lockForRegularUsage(); try { Snapshot snapshot = new WeightedSnapshot(values.values()); values.clear(); count.set(0); return snapshot; } finally { unlockForRegularUsage(); } }
Source:
public Builder() { this.kernelSize = new int[] { 5, 1 }; this.stride = new int[] { 1, 1 }; this.padding = new int[] { 0, 0 }; }

Target:
public Builder() { this(0, 1, 0); this.kernelSize = null; }
Source:
public void populateRightDocks(String identifier) { if (dataManagementStrategy != null) { final PlaceRequest currentRightDockPlaceRequest = getCurrentRightDockPlaceRequest(identifier); switch (identifier) { case SettingsPresenter.IDENTIFIER: getSettingsPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setSettings(presenter); presenter.setCurrentPath(path); }); break; case TestToolsPresenter.IDENTIFIER: getTestToolsPresenter(currentRightDockPlaceRequest).ifPresent(this::setTestTools); break; case CheatSheetPresenter.IDENTIFIER: getCheatSheetPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { if (!presenter.isCurrentlyShow(path)) { setCheatSheet(presenter); presenter.setCurrentPath(path); } }); break; case CoverageReportPresenter.IDENTIFIER: getCoverageReportPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setCoverageReport(presenter); presenter.setCurrentPath(path); }); break; default: break; } } }

Target:
public void populateRightDocks(String identifier) { if (dataManagementStrategy != null) { final PlaceRequest currentRightDockPlaceRequest = getCurrentRightDockPlaceRequest(identifier); switch (identifier) { case SettingsPresenter.IDENTIFIER: getSettingsPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setSettings(presenter); presenter.setCurrentPath(path); }); break; case TestToolsPresenter.IDENTIFIER: getTestToolsPresenter(currentRightDockPlaceRequest).ifPresent(this::setTestTools); break; case CheatSheetPresenter.IDENTIFIER: getCheatSheetPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { if (!presenter.isCurrentlyShow(path)) { setCheatSheet(presenter); presenter.setCurrentPath(path); } }); break; case CoverageReportPresenter.IDENTIFIER: getCoverageReportPresenter(currentRightDockPlaceRequest).ifPresent(presenter -> { setCoverageReport(presenter); presenter.setCurrentPath(path); }); break; default: throw new IllegalArgumentException("Invalid identifier"); } } }
Source:
public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } long range = max - min + 1; if (range > Integer.MAX_VALUE || range < Integer.MIN_VALUE || (range / values.length) > 192) { return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); }

Target:
public static TupleDomainFilter toBigintValues(long[] values, boolean nullAllowed) { long min = values[0]; long max = values[0]; for (int i = 1; i < values.length; i++) { min = Math.min(min, values[i]); max = Math.max(max, values[i]); } BigInteger range = BigInteger.valueOf(max) .subtract(BigInteger.valueOf(min)) .add(BigInteger.valueOf(1)); if (range.compareTo(BigInteger.valueOf(Integer.MAX_VALUE)) == 1 || (range.intValueExact() / values.length) > 192) { return BigintValuesUsingHashTable.of(min, max, values, nullAllowed); } return BigintValuesUsingBitmask.of(min, max, values, nullAllowed); }
Source:
public void removeFactMapping(FactMapping toRemove) { factMappings.remove(toRemove); }

Target:
void removeFactMapping(FactMapping toRemove) { factMappings.remove(toRemove); }
Source:
private <T> T verifyBean(String beanName, Class<T> beanClass) { return verify(this.spring.getContext().getBean(beanName, beanClass), atLeastOnce()); }

Target:
private <T> T verifyBean(String beanName, Class<T> beanClass) { return verify(this.spring.getContext().getBean(beanName, beanClass)); }
Source:
public HorizontalPaneledChoiceDialog(Context context, String title) { super(context, title); view = LayoutInflater.from(context).inflate(R.layout.choice_dialog_three_panel, null); }

Target:
public HorizontalPaneledChoiceDialog(Context context, String title) { super(context, title); }
Source:
protected void executeCommand() { T parameters = getParameters(); final DbUser user = parameters.getUser(); if (user != null && user.getId() == null) { user.setId(Guid.newGuid()); getDbUserDAO().save(user); } final DbGroup group = parameters.getGroup(); if (group != null && group.getId() == null) { group.setId(Guid.newGuid()); getAdGroupDAO().save(group); } Guid ownerId = parameters.getPermission().getad_element_id(); if (ownerId == null) { if (user != null) { ownerId = user.getId(); } } if (ownerId == null) { if (group != null) { ownerId = group.getId(); } } final permissions paramPermission = parameters.getPermission(); permissions permission = getPermissionDAO().getForRoleAndAdElementAndObject( paramPermission.getrole_id(), ownerId, paramPermission.getObjectId() ); if (permission == null) { paramPermission.setId(Guid.newGuid()); paramPermission.setad_element_id(ownerId); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getPermissionDAO().save(paramPermission); getCompensationContext().snapshotNewEntity(paramPermission); getCompensationContext().stateChanged(); return null; } }); permission = paramPermission; } getReturnValue().setActionReturnValue(permission.getId()); if (user != null) { updateAdminStatus(permission); } setSucceeded(true); }

Target:
protected void executeCommand() { T parameters = getParameters(); final DbUser user = parameters.getUser(); if (user != null && user.getId() == null) { user.setId(Guid.newGuid()); getDbUserDAO().save(user); } final DbGroup group = parameters.getGroup(); if (group != null && group.getId() == null) { group.setId(Guid.newGuid()); getAdGroupDAO().save(group); } Guid ownerId = parameters.getPermission().getad_element_id(); if (ownerId == null) { if (user != null) { ownerId = user.getId(); } if (ownerId == null) { if (group != null) { ownerId = group.getId(); } } } final permissions paramPermission = parameters.getPermission(); permissions permission = getPermissionDAO().getForRoleAndAdElementAndObject( paramPermission.getrole_id(), ownerId, paramPermission.getObjectId() ); if (permission == null) { paramPermission.setId(Guid.newGuid()); paramPermission.setad_element_id(ownerId); TransactionSupport.executeInNewTransaction(new TransactionMethod<Void>() { @Override public Void runInTransaction() { getPermissionDAO().save(paramPermission); getCompensationContext().snapshotNewEntity(paramPermission); getCompensationContext().stateChanged(); return null; } }); permission = paramPermission; } getReturnValue().setActionReturnValue(permission.getId()); if (user != null) { updateAdminStatus(permission); } setSucceeded(true); }
Source:
public void markHostMissing(boolean isMissing) { if (isMissing) { this.isMissing = true; } }

Target:
public void markHostMissing(boolean isMissing) { this.isMissing = isMissing; }
Source:
JsonLayoutFormat(String contextName, Integer maxChunkLength) { this.jsonLayout = new CustomJsonLayout(contextName, maxChunkLength); jsonLayout.setIncludeMessage(true); jsonLayout.setAppendLineSeparator(true); jsonLayout.setJsonFormatter(m -> new ObjectMapper().writeValueAsString(m)); jsonLayout.setTimestampFormat(DATE_FORMAT); }

Target:
JsonLayoutFormat(String contextName, Integer maxChunkLength) { jsonLayout = new CustomJsonLayout(contextName, maxChunkLength); jsonLayout.setIncludeMessage(true); jsonLayout.setAppendLineSeparator(true); jsonLayout.setJsonFormatter(m -> new ObjectMapper().writeValueAsString(m)); jsonLayout.setTimestampFormat(DATE_FORMAT); }
Source:
protected void initServices() { this.marketDataService = new LatokenMarketDataService(this); this.tradeService = new LatokenTradeService(this); this.accountService = new LatokenAccountService(this); }

Target:
protected void initServices() { this.latoken = RestProxyFactory.createProxy( LatokenAuthenticated.class, getExchangeSpecification().getSslUri()); this.marketDataService = new LatokenMarketDataService(this); this.tradeService = new LatokenTradeService(this); this.accountService = new LatokenAccountService(this); }
Source:
private void removeSessionImpl(String sessionId, int reason, String message, Object... msgArgs) { AcctUtils.reportRecords(reason, getPrincipalName(sessionId), (ExtMap) getData(sessionId, AUTH_RECORD_PARAMETER_NAME, false), (ExtMap) getData(sessionId, PRINCIPAL_RECORD_PARAMETER_NAME, false), message, msgArgs ); sessionInfoMap.remove(sessionId); getDbFacade().getEngineSessionDao().removeBySessionId(sessionId); }

Target:
private void removeSessionImpl(String sessionId, int reason, String message, Object... msgArgs) { AcctUtils.reportRecords(reason, getPrincipalName(sessionId), (ExtMap) getData(sessionId, AUTH_RECORD_PARAMETER_NAME, false), (ExtMap) getData(sessionId, PRINCIPAL_RECORD_PARAMETER_NAME, false), message, msgArgs ); getDbFacade().getEngineSessionDao().removeBySessionId(sessionId); sessionInfoMap.remove(sessionId); }
Source:
public Duplicable getValueWithRequiredEvaluations(@Nonnull final String nodeKey) throws IllegalStateException, IllegalArgumentException { assertNodeExists(Utils.nonNull(nodeKey, "The key of the node can not be null.")); return accumulateEvaluationsForDepthSortedNodeList(cgs.getEvalStrategyByEvaluatedNode(nodeKey), true).get(nodeKey); }

Target:
public Duplicable getValueWithRequiredEvaluations(@Nonnull final String nodeKey) throws IllegalStateException, IllegalArgumentException { assertNodeExists(nodeKey); return evaluateInTopologicalOrder(cgs.getTopologicalOrderForNodeEvaluation(nodeKey)).get(nodeKey); }