auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void init() { initMocks(this); parentPid = PIDs.get(UUID.randomUUID().toString()); memberPid = PIDs.get(UUID.randomUUID().toString()); memberUuid = memberPid.getId(); parentUuid = parentPid.getId(); <START> testDate = new Date(System.currentTimeMillis() + ONE_DAY); <END> objPrincRoles = new HashMap<>(); addPrincipalRoles(objPrincRoles, MANAGE_PRINC, canManage); addPrincipalRoles(objPrincRoles, PATRON_PRINC, canViewMetadata); aclRetrievalService = new AccessControlRetrievalService(); aclRetrievalService.setAclFactory(aclFactory); aclRetrievalService.setAclService(aclService); aclRetrievalService.setRepoObjLoader(repoObjLoader); }</code><technical_language>I curious this work java 8 api: Date.from(LocalDateTime.now().plusDays(1).atZone(ZoneId.systemDefault()).toInstant()) nice plusDays part..</technical_language>

Target:
public void init() { initMocks(this); parentPid = PIDs.get(UUID.randomUUID().toString()); memberPid = PIDs.get(UUID.randomUUID().toString()); memberUuid = memberPid.getId(); parentUuid = parentPid.getId(); testDate = new Date(System.currentTimeMillis() + ONE_DAY); objPrincRoles = new HashMap<>(); addPrincipalRoles(objPrincRoles, MANAGE_PRINC, canManage); addPrincipalRoles(objPrincRoles, PATRON_PRINC, canViewMetadata); aclRetrievalService = new AccessControlRetrievalService(); aclRetrievalService.setObjectAclFactory(objAclFactory); aclRetrievalService.setInheritedAclFactory(inheritedAclFactory); aclRetrievalService.setAclService(aclService); aclRetrievalService.setRepoObjLoader(repoObjLoader); when(objAclFactory.isMarkedForDeletion(any(PID.class))).thenReturn(false); when(objAclFactory.getPrincipalRoles(any(PID.class))).thenReturn(objPrincRoles); when(objAclFactory.getEmbargoUntil(any(PID.class))).thenReturn(testDate); when(objAclFactory.getPatronAccess(any(PID.class))).thenReturn(PatronAccess.authenticated); when(inheritedAclFactory.isMarkedForDeletion(any(PID.class))).thenReturn(false); when(inheritedAclFactory.getPrincipalRoles(any(PID.class))).thenReturn(objPrincRoles); when(inheritedAclFactory.getEmbargoUntil(any(PID.class))).thenReturn(testDate); when(inheritedAclFactory.getPatronAccess(any(PID.class))).thenReturn(PatronAccess.authenticated); }
Source:
<code>private void loadChildEntities(LibraryDilution dilution) throws IOException { if (dilution.getLibrary() != null) { dilution.setLibrary(libraryDao.get(dilution.getLibrary().getId())); } if (dilution.getTargetedSequencing() != null) { dilution.setTargetedSequencing(targetedSequencingDao.get(dilution.getTargetedSequencing().getId())); } <START> dilution.setDilutionCreator(authorizationManager.getCurrentUsername()); <END> }</code><technical_language>This creator change update</technical_language>

Target:
private void loadChildEntities(LibraryDilution dilution) throws IOException { if (dilution.getLibrary() != null) { dilution.setLibrary(libraryDao.get(dilution.getLibrary().getId())); } if (dilution.getTargetedSequencing() != null) { dilution.setTargetedSequencing(targetedSequencingDao.get(dilution.getTargetedSequencing().getId())); } }
Source:
<code>private void evaluateGeoRepSessionStatus(CommandBase<?> rootCommand) { GlusterStorageSyncCommandParameters parameters = (GlusterStorageSyncCommandParameters) rootCommand.getParameters(); GlusterGeoRepSession session = geoRepDao.getById(parameters.getGeoRepSessionId()); if (session == null) { rootCommand.setCommandStatus(CommandStatus.FAILED); return; } <START> session.setSessionDetails( (ArrayList<GlusterGeoRepSessionDetails>) geoRepDao.getGeoRepSessionDetails(session.getId())); <END> switch (session.getStatus()) { case ACTIVE: if (session.isCheckPointCompleted()) { stopGeoRepSessionCommand(rootCommand, session); rootCommand.setCommandStatus(CommandStatus.SUCCEEDED); } case FAULTY: rootCommand.setCommandStatus(CommandStatus.FAILED); default: break; } }</code><technical_language>call GlusterStorageSyncCommand.getSession() get session session details</technical_language>

Target:
private void evaluateGeoRepSessionStatus(CommandBase<?> rootCommand) { GlusterStorageSyncCommandParameters parameters = (GlusterStorageSyncCommandParameters) rootCommand.getParameters(); GlusterGeoRepSession session = geoRepDao.getById(parameters.getGeoRepSessionId()); if (session == null) { rootCommand.setCommandStatus(CommandStatus.FAILED); return; } session.setSessionDetails( (ArrayList<GlusterGeoRepSessionDetails>) geoRepDao.getGeoRepSessionDetails(session.getId())); switch (session.getStatus()) { case ACTIVE: if (session.isCheckPointCompleted()) { stopGeoRepSessionCommand(rootCommand, session); rootCommand.setCommandStatus(CommandStatus.SUCCEEDED); } break; case FAULTY: rootCommand.setCommandStatus(CommandStatus.FAILED); default: break; } }
Source:
<code>public static WanPublisherState getByType(final byte id) { <START> for (WanPublisherState state : values()) { <END> if (state.id == id) { return state; } } return null; }</code><technical_language>cache result of values() create array access</technical_language>

Target:
public static WanPublisherState getByType(final byte id) { for (WanPublisherState state : STATE_VALUES) { if (state.id == id) { return state; } } return null; }
Source:
<code><START> public void handle(Request request, Response response) { <END> userSession.checkLoggedIn(); try (DbSession dbSession = dbClient.openSession(false)) { QualityProfileDto qualityProfile = qProfileWsSupport.getProfile(dbSession, QProfileReference.from(request)); userSession.checkPermission(ADMINISTER_QUALITY_PROFILES, qualityProfile.getOrganizationUuid()); setDefault(dbSession, qualityProfile); dbSession.commit(); } response.noContent(); }</code><technical_language>I fail new organization parameter is in this handle method. Currently, organization of new default QP. works, I point of adding a new organization parameter. algorithm been: 1. retrieve key of organization param default organization key 2. ensure user permission organization 3. retrieve QP 4. ensure QP belongs organization 5. if QP is default QP, unmake current default QP default If this algorithm, "organization" parameter dropped</technical_language>

Target:
public void handle(Request request, Response response) { userSession.checkLoggedIn(); QProfileReference reference = QProfileReference.from(request); try (DbSession dbSession = dbClient.openSession(false)) { QualityProfileDto qualityProfile = qProfileWsSupport.getProfile(dbSession, reference); userSession.checkPermission(ADMINISTER_QUALITY_PROFILES, qualityProfile.getOrganizationUuid()); setDefault(dbSession, qualityProfile); dbSession.commit(); } response.noContent(); }
Source:
<code>private void handleUncommittedChanges(final RebaseOperation rebase, final Repository repository, final List<String> files) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); CleanupUncomittedChangesDialog cleanupUncomittedChangesDialog = new CleanupUncomittedChangesDialog( shell, UIText.AbstractRebaseCommandHandler_cleanupDialog_title, UIText.AbstractRebaseCommandHandler_cleanupDialog_text, repository, files); cleanupUncomittedChangesDialog.open(); <START> if (cleanupUncomittedChangesDialog.shouldContinue()) { <END> startRebaseJob(rebase, repository, rebase.getOperation()); } } }); }</code><technical_language>style nit: braces single line block</technical_language>

Target:
private void handleUncommittedChanges(final RebaseOperation rebase, final Repository repository, final List<String> files) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); CleanupUncomittedChangesDialog cleanupUncomittedChangesDialog = new CleanupUncomittedChangesDialog( shell, UIText.AbstractRebaseCommandHandler_cleanupDialog_title, UIText.AbstractRebaseCommandHandler_cleanupDialog_text, repository, files); cleanupUncomittedChangesDialog.open(); if (cleanupUncomittedChangesDialog.shouldContinue()) { try { execute(repository); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); } } } }); }
Source:
<code>public PartitionBoundaries(String... partitions) { if (partitions.length == 0) { delegate = Collections.emptyList(); return; } List<String> partitionBoundaries = Arrays.stream(partitions) .distinct() .collect(Collectors.toCollection(ArrayList::new)); partitionBoundaries.set(0, null); <START> partitionBoundaries.add(null); <END> delegate = Collections.unmodifiableList(partitionBoundaries); }</code><technical_language>Is a reason handle partition differently? partition (max, null) empty small</technical_language>

Target:
public PartitionBoundaries(String... partitions) { if (partitions.length == 0) { delegate = Collections.emptyList(); return; } List<String> partitionBoundaries = Arrays.stream(partitions) .distinct() .collect(Collectors.toCollection(ArrayList::new)); partitionBoundaries.set(0, null); if (partitionBoundaries.size() == 1) { partitionBoundaries.add(null); } else { partitionBoundaries.set(partitionBoundaries.size() - 1, null); } delegate = Collections.unmodifiableList(partitionBoundaries); }
Source:
<code>static ConfigurableApplicationContext createApplicationContext(final Properties properties) { String transport = properties.getProperty("XD_TRANSPORT"); if (properties.getProperty(RABBIT_ACKMODE_PROPERTY) != null) { properties.setProperty(RABBIT_ACKMODE_PROPERTY, "MANUAL"); <START> } <END> properties.setProperty("isKafkaAutoCommitEnabled", "false"); SpringApplicationBuilder application = new SpringApplicationBuilder() .sources(MessageBusConfiguration.class) .listeners(new ApplicationListener<ApplicationEnvironmentPreparedEvent>() { @Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { event.getEnvironment().getPropertySources().addFirst( new PropertiesPropertySource("executorEnvironment", properties)); } }) .web(false) .showBanner(false); if (transport.equals("rabbit")) { application.sources(RabbitAutoConfiguration.class); } else if (transport.equals("redis")) { application.sources(RedisAutoConfiguration.class); } application.run(); return application.context(); }</code><technical_language>allow override if MANUAL is required work? If not, abort deploy log a WARN</technical_language>

Target:
static ConfigurableApplicationContext createApplicationContext(final Properties properties) { String transport = properties.getProperty("XD_TRANSPORT"); properties.setProperty(RABBIT_ACKMODE_PROPERTY, "MANUAL"); properties.setProperty(KAFKA_AUTOCOMMIT_PROPERTY, "false"); SpringApplicationBuilder application = new SpringApplicationBuilder() .sources(MessageBusConfiguration.class) .listeners(new ApplicationListener<ApplicationEnvironmentPreparedEvent>() { @Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { event.getEnvironment().getPropertySources().addFirst( new PropertiesPropertySource("executorEnvironment", properties)); } }) .web(false) .showBanner(false); if (transport.equals("rabbit")) { application.sources(RabbitAutoConfiguration.class); } else if (transport.equals("redis")) { application.sources(RedisAutoConfiguration.class); } application.run(); return application.context(); }
Source:
<code>protected List<BusLine> doInBackground(Void... params) { try { <START> String jsonStr = BusTimetableLoader.downloadFromAvrisApi(HTTPLinks.BUS + "linie"); <END> JSONArray categories = new JSONObject(jsonStr).getJSONArray("categories"); List<BusLine> result = new ArrayList<>(); for (int i = 0; i < categories.length(); i++) { JSONObject category = categories.getJSONObject(i); String categoryName = category.getString("name"); if (!( "tram".equals(categoryName) || "bus".equals(categoryName) || "busp".equals(categoryName) )) { continue; } JSONArray lines = category.getJSONArray("lines"); for (int j = 0; j < lines.length(); j++) { JSONObject lineJson = lines.getJSONObject(j); result.add(new BusLine(lineJson.getInt("id"), lineJson.getString("line"))); } } return result; } catch (Exception e) { e.printStackTrace(); return null; } }</code><technical_language>If extracting this string HTTPLinks, extract url? (Same for "linia-%d" below)</technical_language>

Target:
protected List<BusLine> doInBackground(Void... params) { try { String jsonStr = BusTimetableLoader.downloadFromAvrisApi(HTTPLinks.BUS_LINES); JSONArray categories = new JSONObject(jsonStr).getJSONArray("categories"); List<BusLine> result = new ArrayList<>(); for (int i = 0; i < categories.length(); i++) { JSONObject category = categories.getJSONObject(i); String categoryName = category.getString("name"); if (!( "tram".equals(categoryName) || "bus".equals(categoryName) || "busp".equals(categoryName) )) { continue; } JSONArray lines = category.getJSONArray("lines"); for (int j = 0; j < lines.length(); j++) { JSONObject lineJson = lines.getJSONObject(j); result.add(new BusLine(lineJson.getInt("id"), lineJson.getString("line"))); } } return result; } catch (Exception e) { e.printStackTrace(); return null; } }
Source:
<code>public void deserialize(MarshallerReaderContext inCtx, Timer timer) throws ClassNotFoundException { JBPMMessages.ProcessTimer ptimer = timer.getExtension(JBPMMessages.procTimer); TimerService ts = inCtx.wm.getTimerService(); long processInstanceId = ptimer.getTimer().getProcessInstanceId(); Trigger trigger = ProtobufInputMarshaller.readTrigger(inCtx, ptimer.getTrigger()); TimerInstance timerInstance = ProtobufProcessMarshaller.readTimer(inCtx, ptimer.getTimer()); TimerManager tm = ((InternalProcessRuntime) inCtx.wm.getProcessRuntime()).getTimerManager(); if (!tm.getTimerMap().containsKey(timerInstance.getId())) { ProcessJobContext pctx = new ProcessJobContext(timerInstance, trigger, processInstanceId, inCtx.wm.getKnowledgeRuntime(), false); Date date = trigger.hasNextFireTime(); if (date != null) { long then = date.getTime(); long now = pctx.getKnowledgeRuntime().getSessionClock().getCurrentTime(); if (then < now) { trigger = new OverdueTrigger(trigger); } } <START> trigger.initialize(pctx.getWorkingMemory().getKnowledgeRuntime()); <END> JobHandle jobHandle = ts.scheduleJob(processJob, pctx, trigger); timerInstance.setJobHandle(jobHandle); pctx.setJobHandle(jobHandle); tm.getTimerMap().put(timerInstance.getId(), timerInstance); } }</code><technical_language>Current version is kruntime pctx.getKnowledgeRuntime() method. retrieving in a pctx.getWorkingMemory().getKnowledgeRuntime()? If kruntime is instance of InternalWorkingMemory this return a null fail - this previous/current behavior. please clarify</technical_language>

Target:
public void deserialize(MarshallerReaderContext inCtx, Timer timer) throws ClassNotFoundException { JBPMMessages.ProcessTimer ptimer = timer.getExtension(JBPMMessages.procTimer); TimerService ts = inCtx.wm.getTimerService(); long processInstanceId = ptimer.getTimer().getProcessInstanceId(); Trigger trigger = ProtobufInputMarshaller.readTrigger(inCtx, ptimer.getTrigger()); TimerInstance timerInstance = ProtobufProcessMarshaller.readTimer(inCtx, ptimer.getTimer()); TimerManager tm = ((InternalProcessRuntime) inCtx.wm.getProcessRuntime()).getTimerManager(); if (!tm.getTimerMap().containsKey(timerInstance.getId())) { ProcessJobContext pctx = new ProcessJobContext(timerInstance, trigger, processInstanceId, inCtx.wm.getKnowledgeRuntime(), false); Date date = trigger.hasNextFireTime(); if (date != null) { long then = date.getTime(); long now = pctx.getKnowledgeRuntime().getSessionClock().getCurrentTime(); if (then < now) { trigger = new OverdueTrigger(trigger); } } trigger.initialize(pctx.getKnowledgeRuntime()); JobHandle jobHandle = ts.scheduleJob(processJob, pctx, trigger); timerInstance.setJobHandle(jobHandle); pctx.setJobHandle(jobHandle); tm.getTimerMap().put(timerInstance.getId(), timerInstance); } }
Source:
<code><START> public static List<String> split(String path) <END> { PathUtils.validatePath(path); if (path.length() == 1) { return Collections.emptyList(); } int lastPos = 1; List<String> parts = new ArrayList<String>(); while (true) { int nextPos = path.indexOf('/', lastPos); if (nextPos < 0) { parts.add(path.substring(lastPos)); break; } parts.add(path.substring(lastPos, nextPos)); lastPos = nextPos + 1; } return parts; }</code><technical_language>this fine, a guava splitter instead</technical_language>

Target:
public static List<String> split(String path) { PathUtils.validatePath(path); return PATH_SPLITTER.splitToList(path); }
Source:
<code>void setWaiting(int value) { <START> WAITING_UPDATER.lazySet(this, value); <END> }</code><technical_language>understand lazySet is safe here. want visibility of this next read, understanding of lazySet is guarantee that</technical_language>

Target:
void setWaiting(int value) { waiting = value; }
Source:
<code>public String getRegistryURL(IConnection connection) { IServer s = findServer(connection); if( s != null ) { ServiceManagerEnvironmentLoader type = ServiceManagerEnvironmentLoader.type(s); ServiceManagerEnvironment env = type.getOrLoadServiceManagerEnvironment(s, true); <START> String dockerReg = env.getDockerRegistry(); <END> return dockerReg; } return null; }</code><technical_language>![MINOR](<LINK_1> 'Severity: MINOR') Immediately return this expression instead of assigning temporary variable "dockerReg". [![rule](<LINK_0>](<LINK_2></technical_language>

Target:
public String getRegistryURL(IConnection connection) { IServer s = findServer(connection); if( s != null ) { ServiceManagerEnvironment env = getServiceManagerEnvironment(s); return env.getDockerRegistry(); } return null; }
Source:
<code>private Map<String, DbParameterAccessor> readIntoParams(String objname, String query) throws SQLException { DbParameterAccessorsMapBuilder params = new DbParameterAccessorsMapBuilder(); objname = objname.replaceAll("[^a-zA-Z0-9_.#$]", ""); String currentDatabaseName; try (Statement s = currentConnection.createStatement()) { ResultSet rs = s.executeQuery("SELECT DB_NAME() AS x"); rs.next(); currentDatabaseName = rs.getString(1); } String objectDatabaseName; String[] objnameParts = objname.split("\\."); if (objnameParts.length == 3) { objectDatabaseName = objnameParts[0]; } else { objectDatabaseName = currentDatabaseName; } String bracketedName = enquoteAndJoin(objname.split("\\."), ".", "[", "]"); try (Statement s = currentConnection.createStatement()) { <START> s.execute("USE " + objectDatabaseName); <END> } try (PreparedStatement dc = currentConnection.prepareStatement(query)) { dc.setString(1, bracketedName); ResultSet rs = dc.executeQuery(); while (rs.next()) { String paramName = defaultIfNull(rs.getString(1), ""); params.add(paramName, getParameterDirection(rs.getInt(4), paramName), getSqlType(rs.getString(2)), getJavaClass(rs.getString(2))); } } try (Statement s = currentConnection.createStatement()) { s.execute("USE " + currentDatabaseName); } return params.toMap(); }</code><technical_language>Hmm, I this side effect: current database is changed; if dies - remain in new database. modifying query sys.columns objectDatabaseName.sys.columns</technical_language>

Target:
private Map<String, DbParameterAccessor> readIntoParams(String objname, String query) throws SQLException { DbParameterAccessorsMapBuilder params = new DbParameterAccessorsMapBuilder(); objname = objname.replaceAll("[^a-zA-Z0-9_.#$]", ""); String bracketedName = enquoteAndJoin(objname.split("\\."), ".", "[", "]"); try (PreparedStatement dc = currentConnection.prepareStatement(query)) { dc.setString(1, bracketedName); ResultSet rs = dc.executeQuery(); while (rs.next()) { String paramName = defaultIfNull(rs.getString(1), ""); params.add(paramName, getParameterDirection(rs.getInt(4), paramName), getSqlType(rs.getString(2)), getJavaClass(rs.getString(2))); } } return params.toMap(); }
Source:
<code>protected List<?> mergeLists(List<?> source, List<?> values) { List<Object> data = new ArrayList<Object>(); <START> for (Object value : values) { <END> data.add(value); } if (source != null ) { for (Object value : source) { data.add(value); } } return data; }</code><technical_language>addAll</technical_language>

Target:
protected List<?> mergeLists(List<?> source, List<?> values) { List<Object> data = new ArrayList<Object>(); data.addAll(values); if (source != null) { data.addAll(source); } return data; }
Source:
<code><START> public static <P extends IProperty, V>IUnlistedProperty toUnlisted(P property) <END> { return new PropertyAdapter(property); }</code><technical_language>is this needed? other places added/removed casts/generics</technical_language>

Target:
public static <P extends IProperty, V>IUnlistedProperty<V> toUnlisted(P property) { return new PropertyAdapter(property); }
Source:
<code>public void close() { closePort(); <START> } <END></code><technical_language>is this method meant enhancement somehow? If yes, please give idea else done here. If not, please remove this delegation closePort()</technical_language>

Target:
public void close() { synchronized (portLock) { logger.info("Closing DSMR port"); isOpen = false; if (reader != null) { try { reader.close(); } catch (IOException ioe) { logger.debug("Failed to close reader", ioe); } } if (serialPort != null) { serialPort.close(); } reader = null; serialPort = null; } }
Source:
<code>public Boolean call() { try { CallContext callContext = bulkInputCallerImpl.getCallContexts().poll(); if(callContext != null) bulkInputCallerImpl.processInput(callContext); if(getPhase() == WorkPhase.COMPLETED && bulkInputCallerImpl.getCallContexts().isEmpty()) { getCallerThreadPoolExecutor().shutdown(); } else if(callContext != null) { bulkInputCallerImpl.getCallContexts().put(callContext); <START> submitTask(this); <END> } } catch(Exception ex) { logger.error("Error occurred while processing CallContext - "+ex.getMessage()); return false; } return true; }</code><technical_language>contrast output case, input case is driven application adding input. So, callable resubmit but, instead, shutdown thread pool if thread pool is awaiting termination task queue is empty</technical_language>

Target:
public Boolean call() { try { CallContext callContext = bulkInputCallerImpl.getCallContextQueue().poll(); if(callContext != null) bulkInputCallerImpl.processInput(callContext, inputBatch); if(getPhase() == WorkPhase.COMPLETED && bulkInputCallerImpl.getCallContextQueue().isEmpty()) { getCallerThreadPoolExecutor().shutdown(); } else if(callContext != null) { bulkInputCallerImpl.getCallContextQueue().put(callContext); } } catch(Exception ex) { throw new InternalError("Error occurred while processing CallContext - "+ex.getMessage()); } return true; }
Source:
<code>public Optional<DyeableData> from(DataHolder dataHolder) { if (supports(dataHolder)) { <START> return Optional.ofNullable(((IMixinTileEntityShulkerBox) dataHolder).getColor()) <END> .map(enumType -> (DyeColor) (Object) enumType) .map(SpongeDyeableData::new); } return Optional.empty(); }</code><technical_language>Yeah.... this is functionally ok, wasteful. traditional if (color != null) logic. reads better</technical_language>

Target:
public Optional<DyeableData> from(DataHolder dataHolder) { EnumDyeColor enumType = ((IMixinTileEntityShulkerBox) dataHolder).getColor(); if (enumType != null) { return Optional.of(new SpongeDyeableData((DyeColor) (Object) enumType)); } return Optional.empty(); }
Source:
<code>protected void executeCommand() { <START> VDSGroup vdsGroup = getVdsGroupDao().get(vds.getVdsGroupId()); <END> if (vdsGroup != null) { getReturnValue().setSucceeded(runUpdateMomPolicy(vds, vdsGroup.isEnableBallooning())); } }</code><technical_language>simply getVdsGroup() if extend VdsCommand</technical_language>

Target:
protected void executeCommand() { getReturnValue().setSucceeded(runUpdateMomPolicy(vds, getVdsGroup().isEnableBallooning())); }
Source:
<code>protected final void onOpen(final SocketSession conn) { if (getConnectionToId().size() >= MAX_CONNECTIONS) { LOG.info("FULL SERVER"); conn.close(STATE_SERVER_FULL, FULL_SERVER_MESSAGE); } final MultiConnectionState uniqueState = getUniqueState(); connectionToId.put(conn, uniqueState); idToConnection.put(uniqueState, conn); <START> LOG.info("Session Key {}", uniqueState.getKey()); <END> idToState.put(uniqueState.getKey(), uniqueState); LOG.info("ID ASSIGNED"); LOG.info("Recieving connection {}", getConnectionToId().size()); openSession(conn); }</code><technical_language>change debug</technical_language>

Target:
protected final void onOpen(final SocketSession conn) { if (getConnectionToId().size() >= MAX_CONNECTIONS) { LOG.info("FULL SERVER"); conn.close(STATE_SERVER_FULL, FULL_SERVER_MESSAGE); } final MultiConnectionState uniqueState = getUniqueState(); connectionToId.put(conn, uniqueState); idToConnection.put(uniqueState, conn); LOG.debug("Session Key {}", uniqueState.getKey()); idToState.put(uniqueState.getKey(), uniqueState); LOG.info("ID ASSIGNED"); LOG.info("Recieving connection {}", getConnectionToId().size()); openSession(conn); }
Source:
<code>public void search_users_filter_by_organization_uuid() { esTester.putDocuments(INDEX_TYPE_USER.getIndex(), INDEX_TYPE_USER.getType(), newUser(USER1_LOGIN, asList("user_1", "u1")).setEmail("email1") .setOrganizationUuids(newArrayList("O1", "O2"))); esTester.putDocuments(INDEX_TYPE_USER.getIndex(), INDEX_TYPE_USER.getType(), newUser(USER2_LOGIN, emptyList()).setEmail("email2") .setOrganizationUuids(newArrayList("O2"))); assertThat(underTest.search(userQuery.setOrganizationUuid("O42").build(), new SearchOptions()).getDocs()).isEmpty(); <START> assertThat(underTest.search(userQuery.setOrganizationUuid("O2").build(), new SearchOptions()).getDocs()).hasSize(2); <END> assertThat(underTest.search(userQuery.setOrganizationUuid("O1").build(), new SearchOptions()).getDocs()).hasSize(1); }</code><technical_language>tests clearer replace check size of list checking elements in list : assertThat(underTest.search(userQuery.setOrganizationUuid("O2").build(), new SearchOptions()).getDocs()).extracting(UserLogin).containsOnly(USER1_LOGIN, USER2_LOGIN);</technical_language>

Target:
public void search_users_filter_by_organization_uuid() { esTester.putDocuments(INDEX_TYPE_USER.getIndex(), INDEX_TYPE_USER.getType(), newUser(USER1_LOGIN, asList("user_1", "u1")).setEmail("email1") .setOrganizationUuids(newArrayList("O1", "O2"))); esTester.putDocuments(INDEX_TYPE_USER.getIndex(), INDEX_TYPE_USER.getType(), newUser(USER2_LOGIN, emptyList()).setEmail("email2") .setOrganizationUuids(newArrayList("O2"))); assertThat(underTest.search(userQuery.setOrganizationUuid("O42").build(), new SearchOptions()).getDocs()).isEmpty(); assertThat(underTest.search(userQuery.setOrganizationUuid("O2").build(), new SearchOptions()).getDocs()).extracting(UserDoc::login).containsOnly(USER1_LOGIN, USER2_LOGIN); assertThat(underTest.search(userQuery.setOrganizationUuid("O1").build(), new SearchOptions()).getDocs()).extracting(UserDoc::login).containsOnly(USER1_LOGIN); }
Source:
<code>private Coords getEjectPosition(Entity abandoned) { Coords pos = abandoned.getPosition(); Entity crew = new EjectedCrew(); crew.setId(clientgui.getClient().getGame().getNextEntityId()); crew.setGame(clientgui.getClient().getGame()); int elev = clientgui.getClient().getGame().getBoard().getHex(pos).getLevel() + abandoned.getElevation(); ArrayList<Coords> ring = Compute.coordsAtRange(pos, 1); if (abandoned instanceof Dropship) { ring = Compute.coordsAtRange(pos, 2); } ring = Compute.getAcceptableUnloadPositions(ring, crew, clientgui .getClient().getGame(), elev); if (ring.size() < 1) { String title = Messages .getString("MovementDisplay.NoPlaceToEject.title"); String body = Messages .getString("MovementDisplay.NoPlaceToEject.message"); clientgui.doAlertDialog(title, body); return null; } String[] choices = new String[ring.size()]; int i = 0; for (Coords c : ring) { choices[i++] = c.toString(); } String selected = (String) JOptionPane.showInputDialog(clientgui, Messages.getString( <START> "MovementDisplay.ChooseEjectHex" + ".message", new Object[]{ END> abandoned.getShortName(), abandoned.getUnusedString()}), Messages .getString("MovementDisplay.ChooseHex.title"), JOptionPane.QUESTION_MESSAGE, null, choices, null); Coords choice = null; if (selected == null) { return choice; } for (Coords c : ring) { if (selected.equals(c.toString())) { choice = c; break; } } return choice; }</code><technical_language>Gotta ask, adding strings here</technical_language>

Target:
private Coords getEjectPosition(Entity abandoned) { Coords pos = abandoned.getPosition(); Entity crew = new EjectedCrew(); crew.setId(clientgui.getClient().getGame().getNextEntityId()); crew.setGame(clientgui.getClient().getGame()); int elev = clientgui.getClient().getGame().getBoard().getHex(pos).getLevel() + abandoned.getElevation(); ArrayList<Coords> ring = Compute.coordsAtRange(pos, 1); if (abandoned instanceof Dropship) { ring = Compute.coordsAtRange(pos, 2); } ring = Compute.getAcceptableUnloadPositions(ring, crew, clientgui .getClient().getGame(), elev); if (ring.size() < 1) { String title = Messages .getString("MovementDisplay.NoPlaceToEject.title"); String body = Messages .getString("MovementDisplay.NoPlaceToEject.message"); clientgui.doAlertDialog(title, body); return null; } String[] choices = new String[ring.size()]; int i = 0; for (Coords c : ring) { choices[i++] = c.toString(); } String selected = (String) JOptionPane.showInputDialog(clientgui, Messages.getString( "MovementDisplay.ChooseEjectHex.message", new Object[]{ abandoned.getShortName(), abandoned.getUnusedString()}), Messages .getString("MovementDisplay.ChooseHex.title"), JOptionPane.QUESTION_MESSAGE, null, choices, null); Coords choice = null; if (selected == null) { return choice; } for (Coords c : ring) { if (selected.equals(c.toString())) { choice = c; break; } } return choice; }
Source:
<code>public void start() throws IOException { logger.info("Starting Communication Channel on " + address + " at " + port); socket = socketFactory.createSocket(address, port); socket.setSoTimeout(blockingReadTimeout); reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), Charset.forName("UTF-8"))); writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), Charset.forName("UTF-8"))); <START> if (authToken != null) { <END> writer.write(authToken); writer.write("\n"); writer.flush(); String reply = reader.readLine(); if (reply == null || !reply.equals(Protocol.getOutputSuccessCommand().trim())) { shutdown(true); throw new IOException("Authentication with callback server unsuccessful."); } } }</code><technical_language>extract in a private method</technical_language>

Target:
public void start() throws IOException { logger.info("Starting Communication Channel on " + address + " at " + port); socket = socketFactory.createSocket(address, port); socket.setSoTimeout(blockingReadTimeout); reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), Charset.forName("UTF-8"))); writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), Charset.forName("UTF-8"))); if (authToken != null) { try { NetworkUtil.authToServer(reader, writer, authToken); } catch (IOException ioe) { shutdown(true); throw ioe; } } }
Source:
<code>public String showProject(Model model, @ProjectIdentifier @PathVariable("ProjectUnixName") String unixName, Principal principal, @CheckAccess @InjectProject IProject project) throws QuadrigaStorageException { String projectId = project.getProjectId(); <START> Integer count = 1; <END> model.addAttribute("project_baseurl", env.getProperty("project.cite.baseurl")); List<IPublicPage> publicPages = publicPageManager.retrievePublicPageContent(project.getProjectId()); Collections.sort(publicPages, new Comparator<IPublicPage>() { @Override public int compare(IPublicPage o1, IPublicPage o2) { return o1.getOrder() - o2.getOrder(); } }); Map<String, String> linkToMap = getLinkTargetMap(); publicPages.forEach(item -> item.setLinkTo(linkToMap.get(item.getLinkTo()))); List<IProjectBlogEntry> latestProjectBlogEntryList = projectBlogEntryManager.getProjectBlogEntryList(projectId, count); if (latestProjectBlogEntryList.size() > 0 ) { model.addAttribute("latestProjectBlogEntry", latestProjectBlogEntryList.get(0)); model.addAttribute("latestProjectBlogEntrySnippet",latestProjectBlogEntryList.get(0).getSnippet(WORD_COUNT)); } model.addAttribute("blocks", publicPages); model.addAttribute("project", project); return "sites/website"; }</code><technical_language>I a variable for this. once, right? Also, variable declared it</technical_language>

Target:
public String showProject(Model model, @ProjectIdentifier @PathVariable("ProjectUnixName") String unixName, Principal principal, @CheckAccess @InjectProject IProject project) throws QuadrigaStorageException { model.addAttribute("project_baseurl", env.getProperty("project.cite.baseurl")); List<IPublicPage> publicPages = publicPageManager.retrievePublicPageContent(project.getProjectId()); Collections.sort(publicPages, new Comparator<IPublicPage>() { @Override public int compare(IPublicPage o1, IPublicPage o2) { return o1.getOrder() - o2.getOrder(); } }); Map<String, String> linkToMap = getLinkTargetMap(); publicPages.forEach(item -> item.setLinkTo(linkToMap.get(item.getLinkTo()))); List<IProjectBlogEntry> latestProjectBlogEntryList = projectBlogEntryManager.getProjectBlogEntryList(project.getProjectId(), 1); if (latestProjectBlogEntryList.size() > 0 ) { model.addAttribute("latestProjectBlogEntry", latestProjectBlogEntryList.get(0)); model.addAttribute("latestProjectBlogEntrySnippet",latestProjectBlogEntryList.get(0).getSnippet(WORD_COUNT)); } model.addAttribute("blocks", publicPages); model.addAttribute("project", project); return "sites/website"; }
Source:
<code>public String[] getIcons(String os) { String[] icons = defaults.getIcons(os); logger.debug("Getting the follwing icon <START> path from <END> defaults: " + Arrays.toString(icons)); for (int i = 0; i < icons.length; i++) { icons[i] = guessRealIconPath(icons[i]); } return icons; }</code><technical_language>paths</technical_language>

Target:
public String[] getIcons(String os) { String[] icons = defaults.getIcons(os); logger.debug("Getting the following icon paths from defaults: " + Arrays.toString(icons)); for (int i = 0; i < icons.length; i++) { icons[i] = guessRealIconPath(icons[i]); } return icons; }
Source:
<code>private void updateMtuSizeSettings(NetworkStateTracker nt) { <START> final String thisIface = nt.getLinkProperties().getInterfaceName(); <END> int mtu = mContext.getResources().getInteger( com.android.internal.R.integer.config_mtu_size); try { if (VDBG) log("Setting MTU size: " + thisIface + ", " + mtu); mNetd.setMtu(thisIface, mtu); } catch (Exception e) { Slog.e(TAG, "exception in setMtu()" + e); } }</code><technical_language>please add mtu LinkProperties. Set in MobileDataStateTracker code here. this code read LinkProperties set MTU</technical_language>

Target:
private void updateMtuSizeSettings(NetworkStateTracker nt) { final String iface = nt.getLinkProperties().getInterfaceName(); final int mtu = nt.getLinkProperties().getMtu(); try { if (VDBG) log("Setting MTU size: " + iface + ", " + mtu); mNetd.setMtu(iface, mtu); } catch (Exception e) { Slog.e(TAG, "exception in setMtu()" + e); } }
Source:
<code>public Observable<DeleteResult> asRxObservable() { throwExceptionIfRxJavaIsNotAvailable("asRxObservable()"); final Observable<DeleteResult> observable = Observable.create(OnSubscribeExecuteAsBlocking.newInstance(this)); <START> return RxJavaUtils.subscribeOn(observable, storIOContentResolver); <END> }</code><technical_language>create a function create Observable current operation apply scheduler? save 2 lines in operation. is applicable for Completable Single, I :)</technical_language>

Target:
public Observable<DeleteResult> asRxObservable() { return RxJavaUtils.createObservable(storIOContentResolver, this); }
Source:
<code>private void testSetUpForRunningFlows() throws Exception { this.loader = mock(ExecutorLoader.class); this.apiGateway = mock(ExecutorApiGateway.class); this.user = TestUtils.getTestUser(); this.props.put(ExecutorManager.AZKABAN_USE_MULTIPLE_EXECUTORS, "true"); this.props.put(ExecutorManager.AZKABAN_QUEUEPROCESSING_ENABLED, "true"); <START> this.props.put("azkaban.max.concurrent.runs.oneflow", 2); <END> final List<Executor> executors = new ArrayList<>(); final Executor executor1 = new Executor(1, "localhost", 12345, true); final Executor executor2 = new Executor(2, "localhost", 12346, true); executors.add(executor1); executors.add(executor2); when(this.loader.fetchActiveExecutors()).thenReturn(executors); this.manager = createExecutorManager(); this.flow1 = TestUtils.createTestExecutableFlow("exectest1", "exec1"); this.flow2 = TestUtils.createTestExecutableFlow("exectest1", "exec2"); this.flow1.setExecutionId(1); this.flow2.setExecutionId(2); final ExecutionReference ref1 = new ExecutionReference(this.flow1.getExecutionId(), executor1); final ExecutionReference ref2 = new ExecutionReference(this.flow2.getExecutionId(), executor2); this.activeFlows.put(this.flow1.getExecutionId(), new Pair<>(ref1, this.flow1)); this.activeFlows.put(this.flow2.getExecutionId(), new Pair<>(ref2, this.flow2)); when(this.loader.fetchActiveFlows()).thenReturn(this.activeFlows); }</code><technical_language>AZKABAN_MAX_CONCURRENT_RUNS_ONEFLOW instead of hard coded string</technical_language>

Target:
private void testSetUpForRunningFlows() throws Exception { this.loader = mock(ExecutorLoader.class); this.apiGateway = mock(ExecutorApiGateway.class); this.user = TestUtils.getTestUser(); this.props.put(ExecutorManager.AZKABAN_USE_MULTIPLE_EXECUTORS, "true"); this.props.put(ExecutorManager.AZKABAN_QUEUEPROCESSING_ENABLED, "true"); this.props.put(ExecutorManager.AZKABAN_MAX_CONCURRENT_RUNS_ONEFLOW, 2); final List<Executor> executors = new ArrayList<>(); final Executor executor1 = new Executor(1, "localhost", 12345, true); final Executor executor2 = new Executor(2, "localhost", 12346, true); executors.add(executor1); executors.add(executor2); when(this.loader.fetchActiveExecutors()).thenReturn(executors); this.manager = createExecutorManager(); this.flow1 = TestUtils.createTestExecutableFlow("exectest1", "exec1"); this.flow2 = TestUtils.createTestExecutableFlow("exectest1", "exec2"); this.flow1.setExecutionId(1); this.flow2.setExecutionId(2); final ExecutionReference ref1 = new ExecutionReference(this.flow1.getExecutionId(), executor1); final ExecutionReference ref2 = new ExecutionReference(this.flow2.getExecutionId(), executor2); this.activeFlows.put(this.flow1.getExecutionId(), new Pair<>(ref1, this.flow1)); this.activeFlows.put(this.flow2.getExecutionId(), new Pair<>(ref2, this.flow2)); when(this.loader.fetchActiveFlows()).thenReturn(this.activeFlows); }
Source:
<code>public void run() { <START> Timer.Context docTimer = vcrMetrics.blobCompactionTime.time(); <END> try { compactPartitions(); } finally { docTimer.stop(); } }</code><technical_language>doc in docTimer refer to</technical_language>

Target:
public void run() { Timer.Context timer = vcrMetrics.blobCompactionTime.time(); try { compactPartitions(); } catch (Throwable th) { logger.error("Hit exception running compaction task", th); } finally { timer.stop(); } }
Source:
<code>private Answer executeRequest(ReserveVmInterfaceVspCommand cmd) { try { isNuageVspGuruLoaded(); _nuageVspGuruClient.reserve(cmd.getNicUuid(), cmd.getNicMacAddress(), cmd.getNetworkUuid(), cmd.isL3Network(), cmd.isSharedNetwork(), cmd.getVpcUuid(), cmd.getNetworkDomainUuid(), cmd.getNetworksAccountUuid(), cmd.isDomainRouter(), cmd.getDomainRouterIp(), cmd.getVmInstanceName(), cmd.getVmUuid(), cmd.useStaticIp(), cmd.getStaticIp(), cmd.getStaticNatIpUuid(), cmd.getStaticNatIpAddress(), cmd.isStaticNatIpAllocated(), cmd.isOneToOneNat(), cmd.getStaticNatVlanUuid(), cmd.getStaticNatVlanGateway(), cmd.getStaticNatVlanNetmask()); <START> return new ReserveVmInterfaceVspAnswer(cmd, "Created NIC in VSP that maps to nicUuid" + cmd.getNicUuid()); <END> } catch (Exception e) { s_logger.error("Failure during " + cmd, e); return new ReserveVmInterfaceVspAnswer(cmd, e); } }</code><technical_language>Please add identifying for Nuage VSP device assist operational debugging</technical_language>

Target:
private Answer executeRequest(ReserveVmInterfaceVspCommand cmd) { try { isNuageVspGuruLoaded(); _nuageVspGuruClient.reserve(cmd.getNicUuid(), cmd.getNicMacAddress(), cmd.getNetworkUuid(), cmd.isL3Network(), cmd.isSharedNetwork(), cmd.getVpcUuid(), cmd.getNetworkDomainUuid(), cmd.getNetworksAccountUuid(), cmd.isDomainRouter(), cmd.getDomainRouterIp(), cmd.getVmInstanceName(), cmd.getVmUuid(), cmd.useStaticIp(), cmd.getStaticIp(), cmd.getStaticNatIpUuid(), cmd.getStaticNatIpAddress(), cmd.isStaticNatIpAllocated(), cmd.isOneToOneNat(), cmd.getStaticNatVlanUuid(), cmd.getStaticNatVlanGateway(), cmd.getStaticNatVlanNetmask()); return new Answer(cmd, true, "Created NIC that maps to nicUuid" + cmd.getNicUuid() + " on Nuage VSD " + _hostName); } catch (ExecutionException | ConfigurationException e) { s_logger.error("Failure during " + cmd + " on Nuage VSD " + _hostName, e); return new Answer(cmd, e); } }
Source:
<code>public void testSTMin() throws Exception { assertQuery("select ST_XMin(ST_GeometryFromText('LineString(8 4, 5 7)'))", "select 5.0"); assertQuery("select ST_YMin(ST_GeometryFromText('LineString(8 4, 5 7)'))", "select 4.0"); assertQuery("select ST_XMin(ST_GeometryFromText('Polygon ((2 0, 2 1, 3 1))'))", "select 2.0"); <START> assertQuery("select ST_YMin(ST_GeometryFromText('Polygon ((2 0, 2 1, 3 1))'))", "select 0.0"); <END> }</code><technical_language>nit: tests a point multi-{point, linestring, polygon}</technical_language>

Target:
public void testSTMin() throws Exception { assertFunction("ST_XMin(ST_GeometryFromText('POINT (1.5 2.5)'))", DOUBLE, 1.5); assertFunction("ST_YMin(ST_GeometryFromText('POINT (1.5 2.5)'))", DOUBLE, 2.5); assertFunction("ST_XMin(ST_GeometryFromText('MULTIPOINT (1 2, 2 4, 3 6, 4 8)'))", DOUBLE, 1.0); assertFunction("ST_YMin(ST_GeometryFromText('MULTIPOINT (1 2, 2 4, 3 6, 4 8)'))", DOUBLE, 2.0); assertFunction("ST_XMin(ST_GeometryFromText('LINESTRING (8 4, 5 7)'))", DOUBLE, 5.0); assertFunction("ST_YMin(ST_GeometryFromText('LINESTRING (8 4, 5 7)'))", DOUBLE, 4.0); assertFunction("ST_XMin(ST_GeometryFromText('MULTILINESTRING ((1 1, 5 1), (2 4, 4 4))'))", DOUBLE, 1.0); assertFunction("ST_YMin(ST_GeometryFromText('MULTILINESTRING ((1 2, 5 3), (2 4, 4 4))'))", DOUBLE, 2.0); assertFunction("ST_XMin(ST_GeometryFromText('POLYGON ((2 0, 2 1, 3 1))'))", DOUBLE, 2.0); assertFunction("ST_YMin(ST_GeometryFromText('POLYGON ((2 0, 2 1, 3 1))'))", DOUBLE, 0.0); assertFunction("ST_XMin(ST_GeometryFromText('MULTIPOLYGON (((1 10, 1 3, 3 3, 3 10)), ((2 4, 2 6, 6 6, 6 4)))'))", DOUBLE, 1.0); assertFunction("ST_YMin(ST_GeometryFromText('MULTIPOLYGON (((1 10, 1 3, 3 3, 3 10)), ((2 4, 2 6, 6 10, 6 4)))'))", DOUBLE, 3.0); }
Source:
<code>public void layoutTopRight(CTabFolder ctf) { Composite trComp = getTRComposite(ctf); if (trComp.getChildren().length > 0) { trComp.setVisible(true); ctf.setTopRight(trComp, SWT.RIGHT | SWT.WRAP); } else { ctf.setTopRight(null); trComp.setVisible(false); } trComp.pack(); <START> ctf.layout(true, true); <END> }</code><technical_language>if fix in this way. Removing CTabFolder.layout invocation is a part of optimization process is needed fix issue exposed "JRockit Mission Control " application. blocks similar applications migrated E4 (poor GUI rendering performance) Daniel</technical_language>

Target:
public void layoutTopRight(CTabFolder ctf) { Composite trComp = getTRComposite(ctf); if (trComp.getChildren().length > 0) { trComp.setVisible(true); ctf.setTopRight(trComp, SWT.RIGHT | SWT.WRAP); } else { ctf.setTopRight(null); trComp.setVisible(false); } trComp.pack(); trComp.layout(true, true); }
Source:
<code>protected void setOutput(String executionId, Serializable output) { if (isAsync(executionId)) { Serializable commandId = output instanceof AsyncStatus ? ((AsyncStatus) output).getCommandId() : output; getTransientStore().putParameter(executionId, TRANSIENT_STORE_COMMAND_ID, commandId); } else { if (output instanceof DocumentModel) { output = detach((DocumentModel) output); } else if (output instanceof DocumentModelList) { output = new DocumentModelListImpl( ((DocumentModelList) output).stream().map(this::detach).collect(Collectors.toList())); } if (output instanceof Blob) { getTransientStore().putParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB, true); getTransientStore().putBlobs(executionId, Collections.singletonList((Blob) output)); <START> } else if (output instanceof BlobList) { <END> getTransientStore().putParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB, false); getTransientStore().putBlobs(executionId, (BlobList) output); } else { getTransientStore().putParameter(executionId, TRANSIENT_STORE_OUTPUT, output); } } }</code><technical_language>Should'n isAssignableFrom</technical_language>

Target:
protected void setOutput(String executionId, Serializable output) { TransientStore ts = getTransientStore(); if (isAsync(executionId)) { Serializable taskId = output instanceof AsyncStatus ? ((AsyncStatus) output).getId() : output; ts.putParameter(executionId, TRANSIENT_STORE_TASK_ID, taskId); } else { if (output instanceof DocumentModel) { detach((DocumentModel) output); } else if (output instanceof DocumentModelList) { ((DocumentModelList) output).forEach(this::detach); } if (output instanceof Blob) { ts.putParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB, true); ts.putBlobs(executionId, Collections.singletonList((Blob) output)); } else if (output instanceof BlobList) { ts.putParameter(executionId, TRANSIENT_STORE_OUTPUT_BLOB, false); ts.putBlobs(executionId, (BlobList) output); } else { ts.putParameter(executionId, TRANSIENT_STORE_OUTPUT, output); } } }
Source:
<code>public String getSourceForUnaryTest(String packageName, String className, String input, DMNCompilerContext ctx, Type columntype) { Map<String, Type> variableTypes = new HashMap<>(); for ( Map.Entry<String, DMNType> entry : ctx.getVariables().entrySet() ) { variableTypes.put(entry.getKey(), dmnToFeelType((BaseDMNTypeImpl) entry.getValue())); } variableTypes.put( "?", columntype ); FEEL_1_1Parser parser = FEELParser.parse( null, input, variableTypes, Collections.emptyMap(), feel.getCustomFunctions(), <START> Collections.emptyList()); <END> FEEL_1_1Parser.ExpressionListContext tree = parser.expressionList(); DirectCompilerVisitor v = new DirectCompilerVisitor(variableTypes); DirectCompilerResult result = v.compileUnaryTests(tree); return new CompilerBytecodeLoader().getSourceForUnaryTest(packageName, className, input, result); }</code><technical_language>thinking:</technical_language>

Target:
public String getSourceForUnaryTest(String packageName, String className, String input, DMNCompilerContext ctx, Type columntype) { Map<String, Type> variableTypes = new HashMap<>(); for ( Map.Entry<String, DMNType> entry : ctx.getVariables().entrySet() ) { variableTypes.put(entry.getKey(), dmnToFeelType((BaseDMNTypeImpl) entry.getValue())); } variableTypes.put( "?", columntype ); FEEL_1_1Parser parser = FEELParser.parse(null, input, variableTypes, Collections.emptyMap(), feel.getCustomFunctions(), Collections.emptyList()); FEEL_1_1Parser.ExpressionListContext tree = parser.expressionList(); UnaryCompilerVisitor v = new UnaryCompilerVisitor(variableTypes); DirectCompilerResult result = v.compileUnaryTests(tree); return new CompilerBytecodeLoader().getSourceForUnaryTest(packageName, className, input, result); }