auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
static void initializeServer(Injector injector, Lifecycle lifecycle, final Server server) { JettyServerInitializer initializer = injector.getInstance(JettyServerInitializer.class); try { initializer.initialize(server, injector); } catch (Exception e) { throw new ProvisionException(e.getMessage()); } lifecycle.addHandler( new Lifecycle.Handler() { @Override public void start() throws Exception { server.start(); } @Override public void stop() { try { server.stop(); } catch (Exception e) { log.warn(e, "Unable to stop Jetty server."); } } } ); }

Target:
static void initializeServer(Injector injector, Lifecycle lifecycle, final Server server) { JettyServerInitializer initializer = injector.getInstance(JettyServerInitializer.class); try { initializer.initialize(server, injector); } catch (Exception e) { throw new RE(e, "server initialization exception"); } lifecycle.addHandler( new Lifecycle.Handler() { @Override public void start() throws Exception { server.start(); } @Override public void stop() { try { server.stop(); } catch (Exception e) { log.warn(e, "Unable to stop Jetty server."); } } } ); }
Source:
public String toString() { return String.format("Info{ containers = %d, images = %d, storageDriver = %s, " + "driverStatus = %s, systemStatus = %s, cpus = %d, memTotal = %d, " + "name = %s, executionDriver = %s, kernelVersion = %s, debug = %b, " + "fileDescriptors = %d, goroutines = %d, eventsListener = %d, " + "initPath = %s, initSha1 = %s, indexServerAddress = %s, " + "memoryLimit = %b, swapLimit = %b", containers, images, storageDriver, driverStatus, systemStatus, cpus, memTotal, name, executionDriver, kernelVersion, debug, fileDescriptors, goroutines, eventsListener, initPath, initSha1, indexServerAddress, memoryLimit, swapLimit); }

Target:
public String toString() { return MoreObjects.toStringHelper(this).add("containers", containers).add("images", images) .add("storageDriver", storageDriver).add("driverStatus", driverStatus) .add("systemStatus", systemStatus).add("cpus", cpus).add("memTotal", memTotal) .add("name", name).add("executionDriver", executionDriver) .add("kernelVersion", kernelVersion).add("debug", debug) .add("fileDescriptors", fileDescriptors).add("goroutines", goroutines) .add("eventsListener", eventsListener).add("initPath", initPath).add("initSha1", initSha1) .add("indexServerAddress", indexServerAddress).add("memoryLimit", memoryLimit) .add("swapLimit", swapLimit).toString(); }
Source:
public ArtifactDelta getDelta(InputStream baseline, InputStream reactor) throws IOException { TreeMap<String, ArtifactDelta> result = new TreeMap<String, ArtifactDelta>(); Properties props = new Properties(); props.load(baseline); Properties props2 = new Properties(); props2.load(reactor); Set<String> names = new LinkedHashSet<String>(); names.addAll(props.stringPropertyNames()); names.addAll(props2.stringPropertyNames()); for (String name : names) { String value = props.getProperty(name); if (value == null) { result.put(name, new SimpleArtifactDelta("not present in baseline version")); continue; } String value2 = props2.getProperty(name); if (value2 == null) { result.put(name, new SimpleArtifactDelta("present in baseline version only")); continue; } if (value != null ? !value.equals(value2) : value2 != null) { result.put(name, new SimpleArtifactDelta("baseline='" + value + "' != reactor='" + value2 + "'")); } } return !result.isEmpty() ? new CompoundArtifactDelta("properties files differ", result) : null; }

Target:
public ArtifactDelta getDelta(InputStream baseline, InputStream reactor) throws IOException { TreeMap<String, ArtifactDelta> result = new TreeMap<String, ArtifactDelta>(); Properties props = new Properties(); props.load(baseline); Properties props2 = new Properties(); props2.load(reactor); Set<String> names = new LinkedHashSet<String>(); addAll(names, props); addAll(names, props2); for (String name : names) { String value = props.getProperty(name); if (value == null) { result.put(name, new SimpleArtifactDelta("not present in baseline version")); continue; } String value2 = props2.getProperty(name); if (value2 == null) { result.put(name, new SimpleArtifactDelta("present in baseline version only")); continue; } if (value != null ? !value.equals(value2) : value2 != null) { result.put(name, new SimpleArtifactDelta("baseline='" + value + "' != reactor='" + value2 + "'")); } } return !result.isEmpty() ? new CompoundArtifactDelta("properties files differ", result) : null; }
Source:
public static int resolveTextDirection (String text) { return 0; }

Target:
public static int resolveTextDirection (String text) { return SWT.NONE; }
Source:
public byte[] zip(Map<String, byte[]> dataMap) throws BridgeServiceException { if (dataMap == null) { throw new BadRequestException(String.format(Validate.CANNOT_BE_NULL, "dataMap")); } try (final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ZipOutputStream zos = new ZipOutputStream(baos)) { for (Map.Entry<String, byte[]> oneData : dataMap.entrySet()) { ZipEntry zipEntry = new ZipEntry(oneData.getKey()); zos.putNextEntry(zipEntry); zos.write(oneData.getValue()); zos.closeEntry(); } zos.flush(); return baos.toByteArray(); } catch (IOException ex) { throw new BridgeServiceException(ex); } }

Target:
public byte[] zip(Map<String, byte[]> dataMap) throws BridgeServiceException { checkNotNull(dataMap); try (final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ZipOutputStream zos = new ZipOutputStream(baos)) { for (Map.Entry<String, byte[]> oneData : dataMap.entrySet()) { ZipEntry zipEntry = new ZipEntry(oneData.getKey()); zos.putNextEntry(zipEntry); zos.write(oneData.getValue()); zos.closeEntry(); } zos.flush(); return baos.toByteArray(); } catch (IOException ex) { throw new BridgeServiceException(ex); } }
Source:
public void updateIdentifiersDoNotOverwriteExistingIdentifiers() { mockHealthCodeAndAccountRetrieval(); account.setEmailVerified(Boolean.TRUE); account.setPhone(TestConstants.PHONE); account.setPhoneVerified(Boolean.TRUE); account.setExternalId(EXTERNAL_ID); when(accountDao.authenticate(STUDY, PHONE_PASSWORD_SIGN_IN)).thenReturn(account); when(accountDao.getAccount(any())).thenReturn(account); IdentifierUpdate update = new IdentifierUpdate(PHONE_PASSWORD_SIGN_IN, "updated@email.com", new Phone("4082588569", "US"), EXTERNAL_ID); participantService.updateIdentifiers(STUDY, CONTEXT, update); assertEquals(EMAIL, account.getEmail()); assertEquals(Boolean.TRUE, account.getEmailVerified()); assertEquals(TestConstants.PHONE, account.getPhone()); assertEquals(Boolean.TRUE, account.getPhoneVerified()); assertEquals(EXTERNAL_ID, account.getExternalId()); verify(accountDao, never()).updateAccount(any(), eq(false)); verify(accountWorkflowService, never()).sendEmailVerificationToken(any(), any(), any()); }

Target:
public void updateIdentifiersDoNotOverwriteExistingIdentifiers() { mockHealthCodeAndAccountRetrieval(); account.setEmailVerified(Boolean.TRUE); account.setPhone(TestConstants.PHONE); account.setPhoneVerified(Boolean.TRUE); account.setExternalId(EXTERNAL_ID); when(accountDao.authenticate(STUDY, PHONE_PASSWORD_SIGN_IN)).thenReturn(account); when(accountDao.getAccount(any())).thenReturn(account); IdentifierUpdate update = new IdentifierUpdate(PHONE_PASSWORD_SIGN_IN, "updated@email.com", new Phone("4082588569", "US"), "newExternalId"); participantService.updateIdentifiers(STUDY, CONTEXT, update); assertEquals(EMAIL, account.getEmail()); assertEquals(Boolean.TRUE, account.getEmailVerified()); assertEquals(TestConstants.PHONE, account.getPhone()); assertEquals(Boolean.TRUE, account.getPhoneVerified()); assertEquals(EXTERNAL_ID, account.getExternalId()); verify(accountDao, never()).updateAccount(any(), Mockito.anyBoolean()); verify(accountWorkflowService, never()).sendEmailVerificationToken(any(), any(), any()); verify(externalIdService, never()).assignExternalId(STUDY, account.getExternalId(), account.getHealthCode()); }
Source:
private void checkWeakProtocol(ExpressionTree expressionTree, String functionName) { Stream<ExpressionTree> expressionTrees = expressionTree.is(Tree.Kind.BITWISE_OR) ? getOperands((BinaryExpressionTree) expressionTree) : Stream.of(expressionTree); expressionTrees.forEach(value -> { if (value.is(Tree.Kind.NAMESPACE_NAME)) { NamespaceNameTree cryptoMethod = (NamespaceNameTree) value; List<String> weakProtocols = WEAK_PROTOCOLS.get(functionName); if (weakProtocols != null && weakProtocols.contains(cryptoMethod.name().text())) { context().newIssue(this, cryptoMethod, MESSAGE); } } }); }

Target:
private void checkWeakProtocol(ExpressionTree expressionTree, String functionName) { Stream<ExpressionTree> protocols = expressionTree.is(Tree.Kind.BITWISE_OR) ? getOperands((BinaryExpressionTree) expressionTree) : Stream.of(expressionTree); List<String> weakProtocols = WEAK_PROTOCOLS.get(functionName); if (weakProtocols != null) { protocols.forEach(protocol -> { if (protocol.is(Tree.Kind.NAMESPACE_NAME)) { NamespaceNameTree cryptoMethod = (NamespaceNameTree) protocol; if (weakProtocols.contains(cryptoMethod.name().text())) { context().newIssue(this, cryptoMethod, MESSAGE); } } }); } }
Source:
protected void InitDetailModels() { super.InitDetailModels(); ObservableCollection<EntityModel> list = new ObservableCollection<EntityModel>(); list.add(new ClusterGeneralModel()); list.add(new ClusterNetworkListModel()); list.add(new ClusterHostListModel()); list.add(new ClusterVmListModel()); list.add(new ClusterServiceModel()); list.add(new PermissionListModel()); setDetailModels(list); }

Target:
protected void InitDetailModels() { super.InitDetailModels(); setClusterServiceModel(new ClusterServiceModel()); ObservableCollection<EntityModel> list = new ObservableCollection<EntityModel>(); list.add(new ClusterGeneralModel()); list.add(new ClusterNetworkListModel()); list.add(new ClusterHostListModel()); list.add(new ClusterVmListModel()); list.add(getClusterServiceModel()); list.add(new PermissionListModel()); setDetailModels(list); }
Source:
protected void computeChildren(final ChildObserver<MultiBranchProject<?,?>> observer, final TaskListener listener) throws IOException, InterruptedException { long start = System.currentTimeMillis(); listener.getLogger().format("[%tc] Starting organization scan...%n", start); try { listener.getLogger().format("[%tc] Updating actions...%n", System.currentTimeMillis()); Map<Class<? extends Action>, Action> persistentActions = new HashMap<>(); for (ListIterator<SCMNavigator> iterator = navigators.listIterator(navigators.size()); iterator.hasPrevious(); ) { SCMNavigator navigator = iterator.previous(); persistentActions.putAll(navigator.fetchActions(this, listener)); } if (!persistentActions.isEmpty()) { BulkChange bc = new BulkChange(this); try { for (Map.Entry<Class<? extends Action>, Action> entry : persistentActions.entrySet()) { if (entry.getValue() == null) { removeActions(entry.getKey()); } else { replaceActions(entry.getKey(), entry.getValue()); } } bc.commit(); } finally { bc.abort(); } } for (SCMNavigator navigator : navigators) { if (Thread.interrupted()) { throw new InterruptedException(); } listener.getLogger().format("[%tc] Consulting %s%n", System.currentTimeMillis(), navigator.getDescriptor().getDisplayName()); navigator.visitSources(new SCMSourceObserverImpl(listener, observer)); } } finally { long end = System.currentTimeMillis(); listener.getLogger().format("[%tc] Finished organization scan. Scan took %s%n", end, Util.getTimeSpanString(end - start)); } }

Target:
protected void computeChildren(final ChildObserver<MultiBranchProject<?,?>> observer, final TaskListener listener) throws IOException, InterruptedException { long start = System.currentTimeMillis(); listener.getLogger().format("[%tc] Starting organization scan...%n", start); try { listener.getLogger().format("[%tc] Updating actions...%n", System.currentTimeMillis()); Map<SCMNavigator, List<Action>> navigatorActions = new HashMap<>(); for (SCMNavigator navigator : navigators) { List<Action> actions; try { actions = navigator.fetchActions(this, null, listener); } catch (IOException e) { e.printStackTrace(listener.error("Could not refresh actions for navigator")); actions = Util.fixNull(state.getActions().get(navigator)); } navigatorActions.put(navigator, actions); } if (!navigatorActions.equals(state.getActions())) { boolean saveProject = false; for (List<Action> actions : navigatorActions.values()) { for (Action a : actions) { saveProject = removeActions(a.getClass()) || saveProject; } } BulkChange bc = new BulkChange(state); try { state.setActions(navigatorActions); bc.commit(); if (saveProject) { save(); } } finally { bc.abort(); } } for (SCMNavigator navigator : navigators) { if (Thread.interrupted()) { throw new InterruptedException(); } listener.getLogger().format("[%tc] Consulting %s%n", System.currentTimeMillis(), navigator.getDescriptor().getDisplayName()); navigator.visitSources(new SCMSourceObserverImpl(listener, observer)); } } finally { long end = System.currentTimeMillis(); listener.getLogger().format("[%tc] Finished organization scan. Scan took %s%n", end, Util.getTimeSpanString(end - start)); } }
Source:
public void setup_shouldInstallServerWithGivenJdkAndCreateSdkPropertiesFileIfNotExist() throws Exception{ String serverId = UUID.randomUUID().toString(); addTaskParam("serverId", serverId); executeTask("setup"); assertSuccess(); assertServerInstalled(serverId); assertFilePresent("/sdk.properties"); }

Target:
public void setup_shouldInstallServerWithGivenJdkAndCreateSdkPropertiesFileIfNotExist() throws Exception{ String serverId = UUID.randomUUID().toString(); addTaskParam("serverId", serverId); executeTask("setup"); assertSuccess(); assertServerInstalled(serverId); assertFilePresent(serverId + File.separator + "openmrs-server.properties"); File serverPropertiesFile = new File(testDirectory.getAbsolutePath() + File.separator + serverId, "openmrs-server.properties"); String javaHomeServerProperty = readValueFromPropertyKey(serverPropertiesFile, "java.home"); String defaultJavaHome = System.getProperty("java.home"); assertThat(defaultJavaHome, is(javaHomeServerProperty)); assertFilePresent("/sdk.properties"); }
Source:
public boolean provides(String pageId) { if (DefaultSessionEditorPage.PAGE_ID.equals(pageId)) { return true; } return false; }

Target:
public boolean provides(String pageId) { return DefaultSessionEditorPage.PAGE_ID.equals(pageId); }
Source:
protected void doAsyncAddEntry(final PendingAddOp op) { if (throttler != null) { throttler.acquire(); } boolean wasClosed = false; synchronized (this) { if (metadata.isClosed()) { wasClosed = true; } else { long currentLength = addToLength(op.payload.readableBytes()); op.setLedgerLength(currentLength); pendingAddOps.add(op); } } if (wasClosed) { try { bk.getMainWorkerPool().submit(new SafeRunnable() { @Override public void safeRun() { LOG.warn("Attempt to add to closed ledger: {}", ledgerId); op.cb.addComplete(BKException.Code.LedgerClosedException, LedgerHandleAdv.this, op.getEntryId(), op.ctx); } @Override public String toString() { return String.format("AsyncAddEntryToClosedLedger(lid=%d)", ledgerId); } }); } catch (RejectedExecutionException e) { op.cb.addComplete(bk.getReturnRc(BKException.Code.InterruptedException), LedgerHandleAdv.this, op.getEntryId(), op.ctx); } return; } if (!waitForWritable(distributionSchedule.getWriteSet(op.getEntryId()), op.getEntryId(), 0, waitForWriteSetMs)) { op.allowFastFailOnBlockedServer(); } try { bk.getMainWorkerPool().submitOrdered(ledgerId, op); } catch (RejectedExecutionException e) { op.cb.addComplete(bk.getReturnRc(BKException.Code.InterruptedException), LedgerHandleAdv.this, op.getEntryId(), op.ctx); } }

Target:
protected void doAsyncAddEntry(final PendingAddOp op) { if (throttler != null) { throttler.acquire(); } boolean wasClosed = false; synchronized (this) { if (metadata.isClosed()) { wasClosed = true; } else { long currentLength = addToLength(op.payload.readableBytes()); op.setLedgerLength(currentLength); pendingAddOps.add(op); } } if (wasClosed) { try { bk.getMainWorkerPool().submit(new SafeRunnable() { @Override public void safeRun() { LOG.warn("Attempt to add to closed ledger: {}", ledgerId); op.cb.addCompleteWithLatency(BKException.Code.LedgerClosedException, LedgerHandleAdv.this, op.getEntryId(), 0, op.ctx); } @Override public String toString() { return String.format("AsyncAddEntryToClosedLedger(lid=%d)", ledgerId); } }); } catch (RejectedExecutionException e) { op.cb.addCompleteWithLatency(bk.getReturnRc(BKException.Code.InterruptedException), LedgerHandleAdv.this, op.getEntryId(), 0, op.ctx); } return; } if (!waitForWritable(distributionSchedule.getWriteSet(op.getEntryId()), op.getEntryId(), 0, waitForWriteSetMs)) { op.allowFailFastOnUnwritableChannel(); } try { bk.getMainWorkerPool().executeOrdered(ledgerId, op); } catch (RejectedExecutionException e) { op.cb.addCompleteWithLatency(bk.getReturnRc(BKException.Code.InterruptedException), LedgerHandleAdv.this, op.getEntryId(), 0, op.ctx); } }
Source:
public void doRun() { final List<ILinkEvent> links = new ArrayList<>(); final List<IMarkerEvent> markers = new ArrayList<>(); if (fClearZoomedLists) { clearZoomedLists(); } for (ITmfStateSystem ss : fZoomSSList) { List<TimeGraphEntry> entryList = null; synchronized (fSSEntryListMap) { entryList = fSSEntryListMap.get(ss); } if (entryList != null) { zoomByTime(ss, entryList, links, markers, getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); } } if (!getMonitor().isCanceled()) { markers.addAll(getTraceMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor())); applyResults(() -> { getTimeGraphViewer().setLinks(links); getTimeGraphViewer().setMarkers(markers); }); } else { getLogger().info(() -> "[zoom thread canceled]"); } }

Target:
public void doRun() { final List<ILinkEvent> links = new ArrayList<>(); final List<IMarkerEvent> markers = new ArrayList<>(); if (fClearZoomedLists) { clearZoomedLists(); } for (ITmfStateSystem ss : fZoomSSList) { List<TimeGraphEntry> entryList = null; synchronized (fSSEntryListMap) { entryList = fSSEntryListMap.get(ss); } if (entryList != null) { zoomByTime(ss, entryList, links, markers, getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); } } if (!getMonitor().isCanceled()) { markers.addAll(getTraceMarkerList(getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor())); applyResults(() -> { getTimeGraphViewer().setLinks(links); getTimeGraphViewer().setMarkers(markers); }); } else { LOGGER.info(() -> "[ZoomThreadCanceled]"); } }
Source:
public void testConnectionLossWhileCreateEphemeral() throws Exception { final String methodName = TestHelper.getTestMethodName(); final ZkClient zkClient = new ZkClient.Builder() .setZkServer(ZK_ADDR) .setOperationRetryTimeout(3000L) .build(); final String expectedSessionId = zkClient.getHexSessionId(); final String path = "/" + methodName; final String data = "data"; Assert.assertFalse(zkClient.exists(path)); TestHelper.stopZkServer(_zkServer); try { final CountDownLatch countDownLatch = new CountDownLatch(1); final AtomicBoolean running = new AtomicBoolean(true); final Thread creationThread = new Thread(() -> { while (running.get()) { try { zkClient.createEphemeral(path, data, expectedSessionId); } catch (ZkTimeoutException e) { if (e.getMessage().endsWith("Retry was caused by " + KeeperException.ConnectionLossException.Code.CONNECTIONLOSS)) { running.set(false); } } } countDownLatch.countDown(); }); creationThread.start(); final boolean creationThreadTerminated = countDownLatch.await(10L, TimeUnit.SECONDS); if (!creationThreadTerminated) { running.set(false); creationThread.join(5000L); Assert.fail("Failed to receive a ConnectionLossException after zookeeper has shutdown."); } } finally { zkClient.close(); _zkServer.start(); } }

Target:
public void testConnectionLossWhileCreateEphemeral() throws Exception { final String methodName = TestHelper.getTestMethodName(); final ZkClient zkClient = new ZkClient.Builder() .setZkServer(ZK_ADDR) .setOperationRetryTimeout(3000L) .build(); final String expectedSessionId = ZKUtil.toHexSessionId(zkClient.getSessionId()); final String path = "/" + methodName; final String data = "data"; Assert.assertFalse(zkClient.exists(path)); TestHelper.stopZkServer(_zkServer); try { final CountDownLatch countDownLatch = new CountDownLatch(1); final AtomicBoolean running = new AtomicBoolean(true); final Thread creationThread = new Thread(() -> { while (running.get()) { try { zkClient.createEphemeral(path, data, expectedSessionId); } catch (ZkTimeoutException e) { if (e.getMessage().endsWith("Retry was caused by " + KeeperException.ConnectionLossException.Code.CONNECTIONLOSS)) { running.set(false); } } } countDownLatch.countDown(); }); creationThread.start(); final boolean creationThreadTerminated = countDownLatch.await(10L, TimeUnit.SECONDS); if (!creationThreadTerminated) { running.set(false); creationThread.join(5000L); Assert.fail("Failed to receive a ConnectionLossException after zookeeper has shutdown."); } } finally { zkClient.close(); _zkServer.start(); } }
Source:
public void removeFile(final String fileName) { fParentFiles.remove(fileName); startUpdateTask(Messages.BatchImportTraceWizard_remove + " " + fileName, null); }

Target:
public void removeFile(final String fileName) { fParentFiles.remove(fileName); fParentFilesToScan.remove(fileName); startUpdateTask(Messages.BatchImportTraceWizard_remove + " " + fileName, null); }
Source:
public void someDataPointsTest() { final Long surveyId = 100L; final List<SurveyedLocale> dataPoints = createDataPoints(surveyId, 10); final SurveyedLocale dataPoint = dataPoints.get(7); assertEquals("7", dataPoint.getIdentifier()); final List<Long> selectedDataPointIds = Arrays.asList(dataPoints.get(5).getKey().getId(), dataPoints.get(6).getKey().getId()); final Long assignmentId = 20L; final Long deviceId = 1L; createDataPointAssignment(assignmentId, deviceId, selectedDataPointIds, surveyId); final DataPointServlet servlet = new DataPointServlet(); final List<SurveyedLocale> someDataPoints = servlet.getDataPointList(surveyId, deviceId); final Set<Long> selectedIds = new HashSet<>(selectedDataPointIds); final Set<Long> foundIds = getEntityIds(someDataPoints); assertEquals(selectedIds, foundIds); }

Target:
public void someDataPointsTest() { final Long surveyId = randomId(); final List<SurveyedLocale> dataPoints = createDataPoints(surveyId, 10); final List<Long> selectedDataPointIds = dataPoints.stream() .filter(surveyedLocale -> surveyedLocale.getKey().getId() % 2 == 0) .map(surveyedLocale -> surveyedLocale.getKey().getId()) .collect(Collectors.toList()); final Long assignmentId = randomId(); final Long deviceId = randomId(); createDataPointAssignment(assignmentId, deviceId, selectedDataPointIds, surveyId); final DataPointServlet servlet = new DataPointServlet(); final List<SurveyedLocale> someDataPoints = servlet.getDataPointList(surveyId, deviceId); final Set<Long> selectedIds = new HashSet<>(selectedDataPointIds); final Set<Long> foundIds = getEntityIds(someDataPoints); assertEquals(selectedIds, foundIds); }
Source:
private Byte[] removeCommentsFromTemplate(Byte[] data) { byte[] bytes = new byte[data.length]; int i = 0; for (Byte b : data) { bytes[i++] = b.byteValue(); } String templateString = new String(bytes); Pattern regex = Pattern.compile("(?s)<!--.*?-->", Pattern.DOTALL); Matcher regexMatcher = regex.matcher(templateString); templateString = regexMatcher.replaceAll(""); templateString.replaceAll("(?s)<!--.*?-->", ""); bytes = templateString.getBytes(); Byte[] byteObjects = new Byte[bytes.length]; i = 0; for (byte b : bytes) { byteObjects[i++] = new Byte(b); } return byteObjects; }

Target:
private Byte[] removeCommentsFromTemplate(Byte[] data) { byte[] bytes = new byte[data.length]; int i = 0; for (Byte b : data) { bytes[i++] = b; } String templateString = new String(bytes); Pattern regex = Pattern.compile("(?s)<!--.*?-->", Pattern.DOTALL); Matcher regexMatcher = regex.matcher(templateString); templateString = regexMatcher.replaceAll(""); bytes = templateString.getBytes(); Byte[] byteObjects = new Byte[bytes.length]; i = 0; for (byte b : bytes) { byteObjects[i++] = b; } return byteObjects; }
Source:
public double scoreSplit(ClassificationCounter a, ClassificationCounter b) { Pair pair = Pair.with(a, b); Double score = scores.get(pair); if (score == null) { score = scorer.scoreSplit(a, b); scores.put(pair, score); if (scores.size() > maxEntries) { scores.clear(); } } return score; }

Target:
public double scoreSplit(ClassificationCounter a, ClassificationCounter b) { Pair pair = Pair.with(a, b); try { return scores.get(pair); } catch (ExecutionException e) { return Double.MIN_VALUE; } }
Source:
private static String testUpdateClientAssociations(Client client) throws MambuApiException { String methodName = new Object() {}.getClass().getEnclosingMethod().getName(); System.out.println("\nIn " + methodName); client.setAssignedBranchKey(DemoUtil.getDemoClient().getAssignedBranchKey()); client.setAssignedCentreKey(DemoUtil.getDemoClient().getAssignedCentreKey()); client.setAssignedUserKey(DemoUtil.getDemoClient().getAssignedUserKey()); client.setFirstName(null); client.setLastName(null); client.setMiddleName(null); client.setEmailAddress(null); client.setMobilePhone1(null); client.setHomePhone(null); client.setState(null); client.setClientRole(null); client.setId(null); client.setPreferredLanguage(null); client.setBirthDate(null); ClientsService clientService = MambuAPIFactory.getClientService(); boolean status = clientService.patchClient(client); System.out.println("Update status=" + status); Client updatedClient = clientService.getClient(client.getEncodedKey()); String updatedId = updatedClient.getId(); System.out.println("\tUpdate AssignedBranchKey=" + updatedClient.getAssignedBranchKey() + "\tAssignedCentreKey=" + updatedClient.getAssignedCentreKey() + "\tAssignedUserKey=" + updatedClient.getAssignedUserKey()); return updatedId; }

Target:
private static void testUpdateClientAssociations(Client client) throws MambuApiException { String methodName = new Object() {}.getClass().getEnclosingMethod().getName(); System.out.println("\nIn " + methodName); client.setAssignedBranchKey(DemoUtil.getDemoClient().getAssignedBranchKey()); client.setAssignedCentreKey(DemoUtil.getDemoClient().getAssignedCentreKey()); client.setAssignedUserKey(DemoUtil.getDemoClient().getAssignedUserKey()); client.setFirstName(null); client.setLastName(null); client.setMiddleName(null); client.setEmailAddress(null); client.setMobilePhone1(null); client.setHomePhone(null); client.setState(null); client.setClientRole(null); client.setId(null); client.setPreferredLanguage(null); client.setBirthDate(null); ClientsService clientService = MambuAPIFactory.getClientService(); boolean status = clientService.patchClient(client); System.out.println("Update status=" + status); Client updatedClient = clientService.getClient(client.getEncodedKey()); System.out.println("\tUpdate AssignedBranchKey=" + updatedClient.getAssignedBranchKey() + "\tAssignedCentreKey=" + updatedClient.getAssignedCentreKey() + "\tAssignedUserKey=" + updatedClient.getAssignedUserKey()); }
Source:
public void testEAPStandaloneHornetQCollocatedXml() throws Exception { for (Version version : EAP_VERSIONS) { switch (version) { case EAP_6_0_0: case EAP_6_1_0: case EAP_6_2_0: case EAP_6_3_0: ModelNode model = standaloneXmlTest(getLegacyConfigFile("standalone", version, "hornetq-colocated")); validateWebSubsystem(model, version); validateJsfSubsystem(model, version); validateMessagingSubsystem(model, version); validateThreadsSubsystem(model, version); validateJacordSubsystem(model, version); break; default: } } }

Target:
public void testEAPStandaloneHornetQCollocatedXml() throws Exception { for (Version version : EAP_VERSIONS) { if (version.is6x()) { ModelNode model = standaloneXmlTest(getLegacyConfigFile("standalone", version, "hornetq-colocated")); validateWebSubsystem(model, version); validateJsfSubsystem(model, version); validateMessagingSubsystem(model, version); validateThreadsSubsystem(model, version); validateJacordSubsystem(model, version); } } }
Source:
public void addProcessorEntity(String jmVersion, String pid, boolean isLeader) { ProcessorEntity entity = new ProcessorEntity(jmVersion, pid); entity.setIsLeader(isLeader); Random rand = new Random(); entity.setLiveness(rand.nextInt(10000) + 2); TableOperation add = TableOperation.insert(entity); try { table.execute(add); } catch (StorageException e) { LOG.error("Azure storage exception while adding processor entity with job model version: " + jmVersion + "and pid: " + pid, e); throw new AzureException(e); } }

Target:
public void addProcessorEntity(String jmVersion, String pid, boolean isLeader) { ProcessorEntity entity = new ProcessorEntity(jmVersion, pid); entity.setIsLeader(isLeader); entity.updateLiveness(); TableOperation add = TableOperation.insert(entity); try { table.execute(add); } catch (StorageException e) { LOG.error("Azure storage exception while adding processor entity with job model version: " + jmVersion + "and pid: " + pid, e); throw new AzureException(e); } }
Source:
protected final void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { if (!acceptsJson(req)) { handleError(new InvalidTokenException(), req, res); return; } JsonParser parser = new JsonParser(); JsonObject json = (JsonObject) parser.parse(req.getReader()); String tokenString = json.get("token").getAsString(); ParsedToken token; try { token = verifier.decode(tokenString); } catch (InvalidTokenException err) { handleError(err, req, res); return; } CurrentUser user = currentUser.get(); if (user instanceof IdentifiedUser) { Account.Id userId = ((IdentifiedUser) user).getAccountId(); if (!token.getAccountId().equals(userId) || !token.getUrl().equals(getReqUrl(req))) { handleError(new InvalidTokenException(), req, res); return; } doRequest(req, res); } else { res.sendError(HttpServletResponse.SC_UNAUTHORIZED); } }

Target:
protected final void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException { JsonParser parser = new JsonParser(); JsonObject json = (JsonObject) parser.parse(req.getReader()); String tokenString = json.get("_authKey").getAsString(); CurrentUser user = currentUser.get(); Account.Id userId; if (user instanceof IdentifiedUser) { userId = ((IdentifiedUser) user).getAccountId(); } else { res.sendError(HttpServletResponse.SC_UNAUTHORIZED); return; } try { verifier.verify(userId, getReqUrl(req), tokenString); } catch (InvalidTokenException err) { handleError(err, req, res); return; } doRequest(req, res, json); }
Source:
private static Object getColumnValue(String columnName, com.datastax.driver.core.Row row) { ColumnDefinitions columns = row.getColumnDefinitions(); DataType columnType = columns.getType(columnName); switch (columnType.getName()) { case BIGINT: return row.getVarint(columnName); case BOOLEAN: return row.getBool(columnName); case DECIMAL: return row.getDecimal(columnName); case DOUBLE: return row.getDouble(columnName); case FLOAT: return row.getFloat(columnName); case INET: return row.getInet(columnName); case INT: return row.getInt(columnName); case UUID: return row.getUUID(columnName); case TIMESTAMP: return row.getDate(columnName); case LIST: return row.getList(columnName, String.class); case SET: return row.getSet(columnName, String.class); case MAP: return row.getMap(columnName, String.class, String.class); default: return row.getString(columnName); } }

Target:
private static Object getColumnValue(String columnName, com.datastax.driver.core.Row row) { ColumnDefinitions columns = row.getColumnDefinitions(); DataType columnType = columns.getType(columnName); switch (columnType.getName()) { case BIGINT: return row.getVarint(columnName); case BLOB: return row.getBytes(columnName); case BOOLEAN: return row.getBool(columnName); case DECIMAL: return row.getDecimal(columnName); case DOUBLE: return row.getDouble(columnName); case FLOAT: return row.getFloat(columnName); case INT: return row.getInt(columnName); case TEXT: return row.getString(columnName); case TIMESTAMP: return row.getDate(columnName); case UUID: return row.getUUID(columnName); case VARCHAR: return row.getString(columnName); case VARINT: return row.getVarint(columnName); case LIST: return row.getList(columnName, List.class); case MAP: return row.getMap(columnName, Map.class, String.class); case SET: return row.getSet(columnName, Set.class); case INET: return row.getInet(columnName); default: return row.getString(columnName); } }
Source:
private int getClassPriority(IMethodInstance mi) { int result = 0; Method method = mi.getMethod().getMethod(); Class<?> cls = method.getDeclaringClass(); Priority classPriority = cls.getAnnotation(Priority.class); if (classPriority != null) { result = classPriority.value(); } return result; }

Target:
private int getClassPriority(IMethodInstance mi) { Class<?> cls = getDeclaringClassOfMethod(mi); Priority classPriority = cls.getAnnotation(Priority.class); if (classPriority != null) { return classPriority.value(); } return 0; }
Source:
public <I> void hear(TypeLiteral<I> iTypeLiteral, TypeEncounter<I> iTypeEncounter) { GuiceInjectionMonitor gim = new GuiceInjectionMonitor(); for (Class<?> c = iTypeLiteral.getRawType(); c!= Object.class; c = c.getSuperclass()) { if( !gim.isWorthInjecting(c)) { return; } for (Method method : c.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); for( Class<?> interfaceClass : c.getInterfaces()) for (Method method : interfaceClass.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); } }

Target:
public <I> void hear(TypeLiteral<I> iTypeLiteral, TypeEncounter<I> iTypeEncounter) { GuiceInjectionMonitor gim = new GuiceInjectionMonitor(); for (Class<?> c = iTypeLiteral.getRawType(); gim.isWorthInjecting(c); c = c.getSuperclass()) { for (Method method : c.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); for( Class<?> interfaceClass : c.getInterfaces()) for (Method method : interfaceClass.getDeclaredMethods()) findContextObserver(method, iTypeEncounter); } }
Source:
public int getIndexOfCriteria(FilterCriteria tm) { int pos = -1; if (tm != null && mFilterValues != null){ for (int i = 0; i < mFilterValues.length; i++) { FilterCriteria obj = mFilterValues[i]; if (obj.equals(tm)) { pos = i; return pos; } } } return pos; }

Target:
public int getIndexOfCriteria(FilterCriteria tm) { if (tm != null && mFilterValues != null){ for (int i = 0; i < mFilterValues.length; i++) { if (mFilterValues[i].equals(tm)) { return i; } } } return -1; }
Source:
public void mercury_search_searchNoResultsPageDisplayed() { init(); SearchResultsPage searchResults = new SearchResultsPage().openForQuery(SEARCH_PHRASE_NO_RESULTS); Assertion.assertTrue(searchResults.isNoResultsPagePresent()); }

Target:
public void mercury_search_searchNoResultsPageDisplayed() { SearchResultsPage searchResults = new SearchResultsPage() .openForQuery(SEARCH_PHRASE_NO_RESULTS); Assertion.assertTrue(searchResults.isNoResultsPagePresent()); }
Source:
public static String getTestCaseJobTypeByPath(String itemPath) { if (itemPath.startsWith(JobType.BIGDATASTREAMING.repositoryObjectType.getFolder())) { return ConvertJobsUtil.JobType.BIGDATASTREAMING.getDisplayName(); } else if (itemPath.startsWith(JobType.BIGDATABATCH.repositoryObjectType.getFolder())) { return JobType.BIGDATABATCH.getDisplayName(); } return ConvertJobsUtil.JobType.STANDARD.getDisplayName(); }

Target:
public static String getTestCaseJobTypeByPath(String itemPath) { if (JobType.BIGDATASTREAMING.repositoryObjectType != null && itemPath.startsWith(JobType.BIGDATASTREAMING.repositoryObjectType.getFolder())) { return ConvertJobsUtil.JobType.BIGDATASTREAMING.getDisplayName(); } else if (JobType.BIGDATABATCH.repositoryObjectType != null && itemPath.startsWith(JobType.BIGDATABATCH.repositoryObjectType.getFolder())) { return JobType.BIGDATABATCH.getDisplayName(); } return ConvertJobsUtil.JobType.STANDARD.getDisplayName(); }
Source:
void should_return_cause_if_throwable_has_cause() { Throwable throwable = new Throwable("top level message", new Throwable("cause message")); new ThrowableAssertAlternative<>(throwable) .havingCause() .withMessage("cause message"); }

Target:
void should_return_cause_if_throwable_has_cause() { Throwable cause = new Throwable("cause message"); Throwable throwable = new Throwable("top level message", cause); assertThat(new ThrowableAssertAlternative<>(throwable) .havingCause().actual) .isSameAs(cause); }
Source:
private void removeOldBackups() { File fodlerWhereBackups = new File(destination); Stream.of(Objects.requireNonNull(fodlerWhereBackups.listFiles())) .filter(File::isFile) .filter(file -> file.getName().startsWith(PREFIX)) .sorted(Comparator.comparingLong(file -> { try { File f = (File) file; BasicFileAttributes attr = Files.readAttributes(f.toPath(), BasicFileAttributes.class); FileTime fileTime = attr.creationTime(); return fileTime.toMillis(); } catch (IOException e) { LOGGER.error(e); return 0l; } }).reversed()) .skip(windowSize - 1) .forEach(file -> { LOGGER.info("Removing old backup: " + file.getName()); file.delete(); }); }

Target:
private void removeOldBackups() { File fodlerWhereBackups = new File(destination); Stream.of(Objects.requireNonNull(fodlerWhereBackups.listFiles())) .filter(File::isFile) .filter(file -> file.getName().startsWith(PREFIX)) .sorted(Comparator.comparingLong(file -> getCreationTime((File) file)).reversed()) .skip(windowSize - 1) .forEach(file -> { LOGGER.info("Removing old backup: " + file.getName()); file.delete(); }); }
Source:
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TmfEvent)) { return false; } final TmfEvent other = (TmfEvent) obj; if (fTrace == null) { if (other.fTrace != null) { return false; } } else if (!getTrace().equals(other.getTrace())) { return false; } if (getRank() != other.getRank()) { return false; } if (!getTimestamp().equals(other.getTimestamp())) { return false; } if (getType() == null) { if (other.getType() != null) { return false; } } else if (!getType().equals(other.getType())) { return false; } if (getContent() == null) { if (other.getContent() != null) { return false; } } else if (!getContent().equals(other.getContent())) { return false; } return true; }

Target:
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TmfEvent)) { return false; } final TmfEvent other = (TmfEvent) obj; if (fTrace == null) { if (other.fTrace != null) { return false; } } else if (!getTrace().equals(other.getTrace())) { return false; } if (getRank() != other.getRank()) { return false; } if (!getTimestamp().equals(other.getTimestamp())) { return false; } if (!NonNullUtils.equalsNullable(getType(), other.getType())) { return false; } if (!NonNullUtils.equalsNullable(getContent(), other.getContent())) { return false; } return true; }
Source:
public BoundedAfterSubscriber(Subscriber<? super List<T>> actual, int capacityHint, Func1<? super T, Boolean> predicate, int prefetch) { this.actual = actual; this.capacityHint = capacityHint; this.predicate = predicate; Queue<Object> q; if (prefetch >= 10 * 1000 * 1000) { q = new SpscLinkedArrayQueue<Object>(RxRingBuffer.SIZE); } else { if (UnsafeAccess.isUnsafeAvailable()) { q = new SpscArrayQueue<Object>(prefetch); } else { q = new SpscAtomicArrayQueue<Object>(prefetch); } } queue = q; buffer = new ArrayList<T>(capacityHint); requested = new AtomicLong(); wip = new AtomicInteger(); nl = NotificationLite.instance(); limit = prefetch - (prefetch >> 2); if (prefetch == Integer.MAX_VALUE) { request(Long.MAX_VALUE); } else { request(prefetch); } }

Target:
public BoundedAfterSubscriber(Subscriber<? super List<T>> actual, int capacityHint, Func1<? super T, Boolean> predicate, int prefetch) { super(actual, capacityHint, predicate, prefetch); }
Source:
public boolean addEdge(final V v1, final V v2, final I i) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } if (adjEdges.put(v2, i) == null) { final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree + 1); if (inDegree == 0) { rootVertices.remove(v2); } return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} already exists", new Object[]{v1, v2}); return false; } }

Target:
public boolean addEdge(final V v1, final V v2, final I i) { final Map<V, I> adjEdges = getEdges(v1); if (adjEdges == null) { throw new NoSuchElementException("No src vertex " + v1); } if (!adjEdges.containsKey(v2)) { adjEdges.put(v2, i); final int inDegree = inDegrees.get(v2); inDegrees.put(v2, inDegree + 1); if (inDegree == 0) { rootVertices.remove(v2); } return true; } else { LOG.log(Level.WARNING, "The edge from {0} to {1} already exists", new Object[]{v1, v2}); return false; } }
Source:
void keywordNKeywordsSeparatedBySpace() { BibEntry entry = new BibEntry(); entry.setField(StandardField.KEYWORDS, "w1, w2a w2b, w3"); String result = generateKey(entry, "keyword1"); assertEquals("w1", result); result = generateKey(entry, "keyword2"); assertEquals("w2aw2b", result); result = generateKey(entry, "keyword4"); assertEquals("", result); }

Target:
void keywordNKeywordsSeparatedBySpace() { BibEntry entry = new BibEntry(); entry.setField(StandardField.KEYWORDS, "w1, w2a w2b, w3"); assertEquals("w1", generateKey(entry, "keyword1")); assertEquals("w2aw2b", generateKey(entry, "keyword2")); assertEquals("", generateKey(entry, "keyword4")); }
Source:
private void expandPreviousExpandedAndPaths(Object[] previous, TreeViewer viewer, Set<IPath> additionalPaths) { StagingViewContentProvider stagedContentProvider = getContentProvider( viewer); int count = stagedContentProvider.getCount(); updateAutoExpand(viewer, count); if (viewer.getAutoExpandLevel() == AbstractTreeViewer.ALL_LEVELS) { return; } if (getPresentation() == Presentation.LIST) return; Set<IPath> paths = new HashSet<>(additionalPaths); for (Object element : previous) { if (element instanceof StagingFolderEntry) addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } for (Object element : getVisibleExpandedElements(viewer)) { if (element instanceof StagingFolderEntry) addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } List<StagingFolderEntry> expand = new ArrayList<>(); calculateNodesToExpand(paths, stagedContentProvider.getElements(null), expand); viewer.setExpandedElements(expand.toArray()); }

Target:
private void expandPreviousExpandedAndPaths(Object[] previous, TreeViewer viewer, Set<IPath> additionalPaths) { StagingViewContentProvider stagedContentProvider = getContentProvider( viewer); int count = stagedContentProvider.getCount(); updateAutoExpand(viewer, count); if (viewer.getAutoExpandLevel() == AbstractTreeViewer.ALL_LEVELS) { return; } if (getPresentation() == Presentation.LIST) return; Set<IPath> paths = new HashSet<>(additionalPaths); for (Object element : previous) { if (element instanceof StagingFolderEntry) { addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } } for (Object element : getVisibleExpandedElements(viewer)) { if (element instanceof StagingFolderEntry) { addPathAndParentPaths(((StagingFolderEntry) element).getPath(), paths); } } List<StagingFolderEntry> expand = new ArrayList<>(); calculateNodesToExpand(paths, stagedContentProvider.getElements(null), expand); viewer.setExpandedElements(expand.toArray()); }
Source:
public Set<ClassOrInterfaceType> getImmediateSupertypes() { Set<ClassOrInterfaceType> supertypes = new HashSet<>(); if (this.isObject()) { return supertypes; } ClassOrInterfaceType superclass = this.getSuperclass(); if (superclass != null) { supertypes.add(superclass); } supertypes.addAll(this.getInterfaces()); return supertypes; }

Target:
public Set<ClassOrInterfaceType> getImmediateSupertypes() { Set<ClassOrInterfaceType> supertypes = new HashSet<>(); if (this.isObject()) { return supertypes; } ClassOrInterfaceType superclass = this.getSuperclass(); supertypes.add(superclass); supertypes.addAll(this.getInterfaces()); return supertypes; }
Source:
private void processEachPaymentWorksCustomFieldReceived(PaymentWorksVendor stgNewVendor, PaymentWorksNewVendorRequestDetailDTO pmwNewVendorDetailDTO, List<String> customFieldErrors) { if (paymentWorksFormModeService.shouldUseLegacyFormProcessingMode()) { Map<String, String> customFieldsDTOMap = createCustomFieldIdCustomFieldValueMapForReceivedPmwVendorData(pmwNewVendorDetailDTO.getCustom_fields()); for (String paymentWorksCustomFieldId : customFieldsDTOMap.keySet()) { String customFieldValueFromPaymentWorks = customFieldsDTOMap.get(paymentWorksCustomFieldId); PaymentWorksFieldMapping fieldMapping = findPaymentWorksFieldMapping(paymentWorksCustomFieldId); if (ObjectUtils.isNotNull(fieldMapping)) { setPaymentWorksVendorCustomFieldAttributeToReceivedValue(stgNewVendor, paymentWorksCustomFieldId, fieldMapping, customFieldsDTOMap, customFieldErrors); } else { stgNewVendor.setCustomFieldConversionErrors(true); customFieldErrors.add(MessageFormat.format(getConfigurationService().getPropertyValueAsString( PaymentWorksKeyConstants.NEW_VENDOR_REQUEST_CUSTOM_FIELD_MISSING_ERROR_MESSAGE), paymentWorksCustomFieldId)); LOG.error("processEachPaymentWorksCustomFieldReceived: Unable to find KFS staging table column for PaymentWorks custom field '" + paymentWorksCustomFieldId + "'"); } } } else if (paymentWorksFormModeService.shouldUseForeignFormProcessingMode()) { processEachCustomFIeldsTheNewWay(stgNewVendor, pmwNewVendorDetailDTO, customFieldErrors); } }

Target:
private void processEachPaymentWorksCustomFieldReceived(PaymentWorksVendor stgNewVendor, PaymentWorksNewVendorRequestDetailDTO pmwNewVendorDetailDTO, List<String> customFieldErrors) { for (PaymentWorksCustomFieldDTO customField : pmwNewVendorDetailDTO.getCustom_fields().getCustom_fields()) { String customFieldId = customField.getField_id(); PaymentWorksFieldMapping fieldMapping = findPaymentWorksFieldMapping(customFieldId); if (ObjectUtils.isNotNull(fieldMapping)) { String customFieldValue = findCustomFieldValue(customField, fieldMapping); setPaymentWorksVendorCustomFieldAttributeToReceivedValue(stgNewVendor, customFieldId, customFieldValue, fieldMapping, customFieldErrors); } else { stgNewVendor.setCustomFieldConversionErrors(true); customFieldErrors.add(MessageFormat.format(getConfigurationService().getPropertyValueAsString( PaymentWorksKeyConstants.NEW_VENDOR_REQUEST_CUSTOM_FIELD_MISSING_ERROR_MESSAGE), customFieldId)); LOG.error("processEachPaymentWorksCustomFieldReceived: Unable to find KFS staging table column for PaymentWorks custom field '" + customFieldId + "'"); } } }