auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public int hashCode() { return Objects.hash(buildConfiguration, <START> Arrays.asList(requestedBuilt), <END> Arrays.asList(buildOrder)); }</code><technical_language>before. is pointless "improve performance" code decreases it. Please revert changes this file</technical_language>

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + buildConfiguration.hashCode(); result = prime * result + Arrays.hashCode(requestedBuilt); result = prime * result + Arrays.hashCode(buildOrder); return result; }
Source:
<code>public List<CurrencyPair> getExchangeSymbols() throws IOException { try { List<CurrencyPair> currencyPairs = new ArrayList<>(); for (String symbol : bitfinex.getSymbols()) { currencyPairs.add(BitfinexAdapters.adaptCurrencyPair(symbol)); } return currencyPairs; <START> } catch (BitfinexException e) { <END> throw BitfinexErrorAdapter.adapt(e); } }</code><technical_language>this try / catch done in generic methods in *Raw methods <LINK_0></technical_language>

Target:
public List<CurrencyPair> getExchangeSymbols() throws IOException { List<CurrencyPair> currencyPairs = new ArrayList<>(); for (String symbol : bitfinex.getSymbols()) { currencyPairs.add(BitfinexAdapters.adaptCurrencyPair(symbol)); } return currencyPairs; }
Source:
<code>public void testObtainThenSuspendThenResumeMachine() throws Exception { MachineLocation machine = obtainMachine(ImmutableMap.of( "imageId", EUWEST_IMAGE_ID)); <START> assertTrue(machine instanceof JcloudsSshMachineLocation); <END> JcloudsSshMachineLocation sshMachine = (JcloudsSshMachineLocation) machine; assertTrue(sshMachine.isSshable(), "Cannot SSH to " + sshMachine); suspendMachine(machine); assertFalse(sshMachine.isSshable(), "Should not be able to SSH to suspended machine"); MachineLocation machine2 = resumeMachine(ImmutableMap.of("id", sshMachine.getJcloudsId())); assertTrue(machine2 instanceof JcloudsSshMachineLocation); assertTrue(((JcloudsSshMachineLocation) machine2).isSshable(), "Cannot SSH to " + machine2); }</code><technical_language>I personal preference for cast, asserting. cast fail exception type was. However, assertTrue a message "false"</technical_language>

Target:
public void testObtainThenSuspendThenResumeMachine() throws Exception { MachineLocation machine = obtainMachine(ImmutableMap.of( "imageId", EUWEST_IMAGE_ID)); JcloudsSshMachineLocation sshMachine = (JcloudsSshMachineLocation) machine; assertTrue(sshMachine.isSshable(), "Cannot SSH to " + sshMachine); suspendMachine(machine); assertFalse(sshMachine.isSshable(), "Should not be able to SSH to suspended machine"); MachineLocation machine2 = resumeMachine(ImmutableMap.of("id", sshMachine.getJcloudsId())); assertTrue(machine2 instanceof JcloudsSshMachineLocation); assertTrue(((JcloudsSshMachineLocation) machine2).isSshable(), "Cannot SSH to " + machine2); }
Source:
<code>public void registerCachedFile(String filePath, String name) { <START> this.cacheFile.put(name, filePath); <END> }</code><technical_language>Check if entry key (name) exists throw in case exception</technical_language>

Target:
public void registerCachedFile(String filePath, String name) throws RuntimeException{ if (!this.cacheFile.containsKey(name)) { this.cacheFile.put(name, filePath); } else { throw new RuntimeException("cache file " + name + "already exists!"); } }
Source:
<code>public void parsingOnlineFile(final int configurationIndex, final String predictionFileName) throws PerfEnforceException { try { BufferedReader streamReader = new BufferedReader(new FileReader(predictionFileName)); String currentLine = ""; double nextQueryPrediction = 0; while ((currentLine = streamReader.readLine()) != null) { nextQueryPrediction = Double.parseDouble((currentLine.split(",")[0]).split(":")[1]); } <START> streamReader.close(); <END> queryPredictions[configurationIndex] = nextQueryPrediction; } catch (Exception e) { throw new PerfEnforceException("Error parsing online predictions file"); } }</code><technical_language>Put in finally is safer. (Also places similar issue.)</technical_language>

Target:
public void parsingOnlineFile(final int configurationIndex, final String predictionFileName) throws PerfEnforceException { try (BufferedReader streamReader = new BufferedReader(new FileReader(predictionFileName))) { String currentLine = ""; double nextQueryPrediction = 0; while ((currentLine = streamReader.readLine()) != null) { nextQueryPrediction = Double.parseDouble((currentLine.split(",")[0]).split(":")[1]); } queryPredictions[configurationIndex] = nextQueryPrediction; } catch (Exception e) { throw new PerfEnforceException("Error parsing online predictions file"); } }
Source:
<code>public void init() { get("/transformers/metacard", (req, res) -> GSON.toJson(metacardTransformers)); get( "/transformers/metacard/:id", (req, res) -> { String id = req.params(":id"); Map<String, String> descriptor = getTransformerDescriptor(metacardTransformers, id); if (descriptor == null) { res.status(404); return GSON.toJson(NOT_FOUND_RESPONSE); } return GSON.toJson(descriptor); }); get("/transformers/query", (req, res) -> GSON.toJson(queryResponseTransformers)); <START> get( <END> "/transformers/query/:id", (req, res) -> { String id = req.params(":id"); Map<String, String> descriptor = getTransformerDescriptor(queryResponseTransformers, id); if (descriptor == null) { res.status(404); return GSON.toJson(NOT_FOUND_RESPONSE); } return GSON.toJson(descriptor); }); }</code><technical_language>This action /transformers/query/:id identical save for transformers pass getTransformerDescriptor. encapsulate this functionality a method takes transformers a parameter</technical_language>

Target:
public void init() { get( "/transformers/metacard", (req, res) -> { res.type("application/json"); return descriptors.getMetacardTransformers(); }, GSON::toJson); get( "/transformers/query", (req, res) -> { res.type("application/json"); return descriptors.getQueryResponseTransformers(); }, GSON::toJson); get( "/transformers/:type/:id", (req, res) -> { String id = req.params(":id"); String type = req.params(":type").toLowerCase(); Map<String, String> descriptor; res.type("application/json"); if (METACARD_TRANSFORMER.equals(type)) { descriptor = descriptors.getMetacardTransformer(id); } else if (QUERY_RESPONSE_TRANSFORMER.equals(type)) { descriptor = descriptors.getQueryResponseTransformer(id); } else { res.status(404); return GSON.toJson(TRANSFORMER_TYPE_NOT_FOUND_RESPONSE); } if (descriptor == null) { res.status(404); return GSON.toJson(TRANSFORMER_NOT_FOUND_RESPONSE); } return GSON.toJson(descriptor); }); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } KafkaTuningConfig that = (KafkaTuningConfig) o; return maxRowsInMemory == that.maxRowsInMemory && maxRowsPerSegment == that.maxRowsPerSegment && <START> maxBytesInMemory == this.maxBytesInMemory && <END> maxPendingPersists == that.maxPendingPersists && reportParseExceptions == that.reportParseExceptions && handoffConditionTimeout == that.handoffConditionTimeout && resetOffsetAutomatically == that.resetOffsetAutomatically && Objects.equals(intermediatePersistPeriod, that.intermediatePersistPeriod) && Objects.equals(basePersistDirectory, that.basePersistDirectory) && Objects.equals(indexSpec, that.indexSpec) && Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory) && Objects.equals(intermediateHandoffPeriod, that.intermediateHandoffPeriod); }</code><technical_language>that.maxBytesInMemory</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } KafkaTuningConfig that = (KafkaTuningConfig) o; return maxRowsInMemory == that.maxRowsInMemory && maxRowsPerSegment == that.maxRowsPerSegment && maxBytesInMemory == that.maxBytesInMemory && maxPendingPersists == that.maxPendingPersists && reportParseExceptions == that.reportParseExceptions && handoffConditionTimeout == that.handoffConditionTimeout && resetOffsetAutomatically == that.resetOffsetAutomatically && Objects.equals(intermediatePersistPeriod, that.intermediatePersistPeriod) && Objects.equals(basePersistDirectory, that.basePersistDirectory) && Objects.equals(indexSpec, that.indexSpec) && Objects.equals(segmentWriteOutMediumFactory, that.segmentWriteOutMediumFactory) && Objects.equals(intermediateHandoffPeriod, that.intermediateHandoffPeriod) && logParseExceptions == that.logParseExceptions && maxParseExceptions == that.maxParseExceptions && maxSavedParseExceptions == that.maxSavedParseExceptions; }
Source:
<code>public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if (selection instanceof IStructuredSelection) { Object structSelection = ((IStructuredSelection) selection).getFirstElement(); if (structSelection instanceof KernelMemoryUsageEntry) { KernelMemoryUsageEntry entry = (KernelMemoryUsageEntry) structSelection; fTreeViewerReference.setSelectedThread(entry.getTid()); ((KernelMemoryUsageViewer) getChartViewer()).setSelectedThread(entry.getTid()); <START> ITmfTrace trace = fTreeViewerReference.getTrace(); <END> if (trace == null) { return; } TmfTraceManager.getInstance().updateTraceContext(trace, builder -> builder.setData(KERNEL_MEMORY, checkNotNull(entry.getTid()))); } } }</code><technical_language>fTreeViewerReference null</technical_language>

Target:
public void selectionChanged(SelectionChangedEvent event) { KernelMemoryUsageTreeViewer treeViewer = fTreeViewerReference; KernelMemoryUsageViewer chartViewer = (KernelMemoryUsageViewer) getChartViewer(); if (treeViewer == null || chartViewer == null) { return; } ITmfTrace trace = treeViewer.getTrace(); if (trace == null) { return; } ISelection selection = event.getSelection(); if (selection instanceof IStructuredSelection) { Object structSelection = ((IStructuredSelection) selection).getFirstElement(); if (structSelection instanceof KernelMemoryUsageEntry) { KernelMemoryUsageEntry entry = (KernelMemoryUsageEntry) structSelection; String tid = entry.getTid(); if (tid == null) { return; } treeViewer.setSelectedThread(tid); chartViewer.setSelectedThread(tid); TmfTraceManager.getInstance().updateTraceContext(trace, builder -> builder.setData(KERNEL_MEMORY, tid)); } } }
Source:
<code>private BigtableOptions( InetAddress clusterAdminHost, InetAddress tableAdminHost, InetAddress dataHost, int port, String projectId, String zone, String cluster, EventLoopGroup customEventLoopGroup, ChannelOptions channelOptions) { Preconditions.checkArgument( !Strings.isNullOrEmpty(projectId), "ProjectId must not be empty or null."); Preconditions.checkArgument( !Strings.isNullOrEmpty(zone), "Zone must not be empty or null."); Preconditions.checkArgument( !Strings.isNullOrEmpty(cluster), "Cluster must not be empty or null."); Preconditions.checkNotNull(channelOptions, "ChannelCoptions must not be empty or null."); Preconditions.checkArgument(!Strings.isNullOrEmpty(channelOptions.getUserAgent()), <START> "UserAgent must not be empty or null"); <END> this.tableAdminHost = Preconditions.checkNotNull(tableAdminHost); this.clusterAdminHost = Preconditions.checkNotNull(clusterAdminHost); this.dataHost = Preconditions.checkNotNull(dataHost); this.port = port; this.projectId = projectId; this.zone = zone; this.cluster = cluster; this.customEventLoopGroup = customEventLoopGroup; this.channelOptions = channelOptions; LOG.debug("Connection Configuration: project: %s, cluster: %s, data host %s, " + "table admin host %s, cluster admin host %s using transport %s.", projectId, cluster, dataHost, tableAdminHost, clusterAdminHost, TransportOptions.BigtableTransports.HTTP2_NETTY_TLS); }</code><technical_language>"UserAgent in ChannelOptions"</technical_language>

Target:
private BigtableOptions( InetAddress clusterAdminHost, InetAddress tableAdminHost, InetAddress dataHost, int port, String projectId, String zone, String cluster, EventLoopGroup customEventLoopGroup, ChannelOptions channelOptions) { Preconditions.checkArgument( !Strings.isNullOrEmpty(projectId), "ProjectId must not be empty or null."); Preconditions.checkArgument( !Strings.isNullOrEmpty(zone), "Zone must not be empty or null."); Preconditions.checkArgument( !Strings.isNullOrEmpty(cluster), "Cluster must not be empty or null."); Preconditions.checkNotNull(channelOptions, "ChannelCoptions must not be empty or null."); this.tableAdminHost = Preconditions.checkNotNull(tableAdminHost); this.clusterAdminHost = Preconditions.checkNotNull(clusterAdminHost); this.dataHost = Preconditions.checkNotNull(dataHost); this.port = port; this.projectId = projectId; this.zone = zone; this.cluster = cluster; this.customEventLoopGroup = customEventLoopGroup; this.channelOptions = channelOptions; LOG.debug("Connection Configuration: project: %s, cluster: %s, data host %s, " + "table admin host %s, cluster admin host %s using transport %s.", projectId, cluster, dataHost, tableAdminHost, clusterAdminHost, TransportOptions.BigtableTransports.HTTP2_NETTY_TLS); }
Source:
<code>public void testParFragment() { SequenceParValid diagValid = new SequenceParValid(); SequenceDiagramExecutor executor = SequenceDiagramExecutor.create(); executor.setDiagram(diagValid).run(); Assert.assertEquals(0, executor.getErrors().size()); SequenceParErr diagErr = new SequenceParErr(); executor = SequenceDiagramExecutor.create(); <START> executor.setDiagram(diagErr).run();; <END> Assert.assertEquals(3, executor.getErrors().size()); }</code><technical_language>Please remove unnecessary semicolon. suggestion executor.setDiagram(diagErr).run();</technical_language>

Target:
public void testParFragment() { SequenceParValid diagValid = new SequenceParValid(); SequenceDiagramExecutor executor = SequenceDiagramExecutor.create(); executor.setDiagram(diagValid).run(); Assert.assertEquals(0, executor.getErrors().size()); SequenceParErr diagErr = new SequenceParErr(); executor = SequenceDiagramExecutor.create(); executor.setDiagram(diagErr).run(); Assert.assertEquals(3, executor.getErrors().size()); }
Source:
<code>public int hashCode(){ <START> return (int)id; <END> }</code><technical_language>Guava hashCode function</technical_language>

Target:
public int hashCode(){ return Objects.hashCode(this.id); }
Source:
<code>public Response previewSnapshot(Action action) { validateParameters(action, "snapshot.id"); TryBackToAllSnapshotsOfVmParameters tryBackParams = new TryBackToAllSnapshotsOfVmParameters(guid, asGuid(action.getSnapshot().getId())); if (action.isSetRestoreMemory()) { tryBackParams.setRestoreMemory(action.isRestoreMemory()); } if (action.isSetDisks()) { tryBackParams.setDisks(getParent().mapDisks(action.getDisks())); } if (action.isSetLease()) { tryBackParams.setRestoreLease(action.getLease().isSetStorageDomain()); } <START> if (action.isSetLease() && action.getLease().isSetStorageDomain()) { <END> tryBackParams.setDstLeaseDomainId(asGuid(action.getLease().getStorageDomain().getId())); } Response response = doAction(ActionType.TryBackToAllSnapshotsOfVm, tryBackParams, action); return response; }</code><technical_language>I clearer previous 'if' clause. I.e. if (action.isSetLease()) { ... if (action.getLease().isSetStorageDomain()) {</technical_language>

Target:
public Response previewSnapshot(Action action) { validateParameters(action, "snapshot.id"); TryBackToAllSnapshotsOfVmParameters tryBackParams = new TryBackToAllSnapshotsOfVmParameters(guid, asGuid(action.getSnapshot().getId())); if (action.isSetRestoreMemory()) { tryBackParams.setRestoreMemory(action.isRestoreMemory()); } if (action.isSetDisks()) { tryBackParams.setDisks(getParent().mapDisks(action.getDisks())); } if (action.isSetLease()) { tryBackParams.setRestoreLease(action.getLease().isSetStorageDomain()); if (action.getLease().isSetStorageDomain()) { tryBackParams.setDstLeaseDomainId(asGuid(action.getLease().getStorageDomain().getId())); } } Response response = doAction(ActionType.TryBackToAllSnapshotsOfVm, tryBackParams, action); return response; }
Source:
<code>private int getColumnWidth(final Pattern52 pattern) { <START> if (pattern.getBoundName() == null || pattern.getBoundName().trim().isEmpty()) { <END> return 1; } else { return pattern.getChildColumns().size(); } }</code><technical_language>StringUtils I thinking if is good idea bring dependency for class</technical_language>

Target:
private int getColumnWidth(final Pattern52 pattern) { if (StringUtils.isEmpty(pattern.getBoundName())) { return 1; } else { return pattern.getChildColumns().size(); } }
Source:
<code>public void save(Patient patient) { try { XWikiDocument doc = (XWikiDocument) this.documentAccessBridge.getDocument(patient.getDocument()); BaseObject data = doc.getXObject(Patient.CLASS_REFERENCE); if (data == null) { throw new NullPointerException(ERROR_MESSAGE_NO_PATIENT_CLASS); } PatientData<String> lifeStatus = patient.getData(DATA_NAME); PatientData<Date> dates = patient.getData("dates"); Integer deathDateUnknown = 0; <START> if (lifeStatus != null && lifeStatus.getValue().equals(DECEASED)) { <END> deathDateUnknown = 1; } if (dates != null && dates.isNamed()) { Date deathDate = dates.get(PATIENT_DATEOFDEATH_FIELDNAME); if (deathDate != null) { deathDateUnknown = 0; } return; } data.setIntValue(PATIENT_UNKNOWN_DATEOFDEATH_FIELDNAME, deathDateUnknown); this.xcontext.get().getWiki().saveDocument(doc, "Updated life status from JSON", true, this.xcontext.get()); } catch (Exception e) { this.logger.error("Failed to save life status: [{}]", e.getMessage()); } }</code><technical_language>Put other around: DECEASED.equals(lifeStatus.getValue())</technical_language>

Target:
public void save(Patient patient) { try { XWikiDocument doc = (XWikiDocument) this.documentAccessBridge.getDocument(patient.getDocument()); BaseObject data = doc.getXObject(Patient.CLASS_REFERENCE); if (data == null) { throw new NullPointerException(ERROR_MESSAGE_NO_PATIENT_CLASS); } PatientData<String> lifeStatus = patient.getData(DATA_NAME); PatientData<Date> dates = patient.getData("dates"); Integer deathDateUnknown = 0; if (lifeStatus != null && DECEASED.equals(lifeStatus.getValue())) { deathDateUnknown = 1; } if (dates != null && dates.isNamed()) { Date deathDate = dates.get(PATIENT_DATEOFDEATH_FIELDNAME); if (deathDate != null) { deathDateUnknown = 0; } return; } data.setIntValue(PATIENT_UNKNOWN_DATEOFDEATH_FIELDNAME, deathDateUnknown); this.xcontext.get().getWiki().saveDocument(doc, "Updated life status from JSON", true, this.xcontext.get()); } catch (Exception e) { this.logger.error("Failed to save life status: [{}]", e.getMessage()); } }
Source:
<code>private void onGetDiagramByPathSuccess(MarshallingResponse<ProjectDiagram> response, Path path, PlaceRequest place) { if (response.isSuccess()) { <START> final Command doMigrate = () -> fromJBPMDesignerToStunner(response.getResult().get(), path, place); <END> if (!response.getMessages().isEmpty()) { showResultSuccessful(response.getMessages(), doMigrate); } else { doMigrate.execute(); } } else { showResultWithErrors(response.getMessages()); } }</code><technical_language>optional.get() is isPresent()</technical_language>

Target:
private void onGetDiagramByPathSuccess(MarshallingResponse<ProjectDiagram> response, Path path, PlaceRequest place) { if (response.isSuccess()) { final ProjectDiagram diagram = response.getResult().orElse(null); if (diagram == null) { errorPopup.showMessage(translationService.getValue(IntegrationClientConstants.MigrateToStunnerNoDiagramHasBeenReturned)); } else { final Command doMigrate = () -> fromJBPMDesignerToStunner(diagram, path, place); if (!response.getMessages().isEmpty()) { showResultSuccessful(response.getMessages(), doMigrate); } else { doMigrate.execute(); } } } else { showResultWithErrors(response.getMessages()); } }
Source:
<code>private void writeResourceToZip( ZipOutputStream zipOutputStream, String filename, Resource resource) { try { ZipEntry zipEntry = new ZipEntry(filename); zipOutputStream.putNextEntry(zipEntry); InputStream inputStream = resource.getInputStream(); IOUtils.copy(inputStream, zipOutputStream); <START> inputStream.close(); <END> } catch (IOException e) { LOGGER.debug("Failed to add resource with id to zip.", resource.getName(), e); } }</code><technical_language>put resource.getInputStream() of a try-with-resources block manually close copying</technical_language>

Target:
private void writeResourceToZip( ZipOutputStream zipOutputStream, String filename, Resource resource) { try (InputStream inputStream = resource.getInputStream()) { ZipEntry zipEntry = new ZipEntry(filename); zipOutputStream.putNextEntry(zipEntry); IOUtils.copy(inputStream, zipOutputStream); } catch (IOException e) { LOGGER.debug("Failed to add resource with id to zip.", resource.getName(), e); } }
Source:
<code>@Override public boolean value(VirtualFile virtualFile) { <START> return openedFiles.contains(virtualFile); <END> }</code><technical_language>![MAJOR](<LINK_0> this line start column 7. [![rule](<LINK_2>](<LINK_1></technical_language>

Target:
public boolean value(VirtualFile virtualFile) { return openedFiles.contains(virtualFile); }
Source:
<code>private String inputStreamToString(InputStream inputStream){ InputStreamReader isReader = new InputStreamReader(inputStream); BufferedReader reader = new BufferedReader(isReader); StringBuilder sb = new StringBuilder(); String str; <START> try{ <END> while((str = reader.readLine())!= null){ sb.append(str); } return sb.toString(); } catch (IOException e) { e.printStackTrace(); logger.trace("Failed to read InputStreap." + e.getMessage().toString() ); } return ""; }</code><technical_language>try {</technical_language>

Target:
private String inputStreamToString(InputStream inputStream) { InputStreamReader isReader = new InputStreamReader(inputStream); BufferedReader reader = new BufferedReader(isReader); StringBuilder sb = new StringBuilder(); String str; try { while ((str = reader.readLine()) != null) { sb.append(str); } } catch (IOException e) { logger.error("Failed to read InputStream: {}", e.getMessage()); logger.trace("Failed to read InputStream.", e); } return sb.toString(); }
Source:
<code>private static boolean isConstructor(FunctionTree tree) { if (tree.is(Kind.METHOD)) { MethodDeclarationTree constructor = (MethodDeclarationTree) tree; Tree nameTree = constructor.name(); if (nameTree.is(Kind.IDENTIFIER_NAME)) { String name = ((IdentifierTree) nameTree).name(); <START> if ("constructor".equals(name)) { <END> return true; } } } return false; }</code><technical_language>@ivandalbosco return "constructor".equals(name)</technical_language>

Target:
private static boolean isConstructor(FunctionTree tree) { if (tree.is(Kind.METHOD)) { MethodDeclarationTree constructor = (MethodDeclarationTree) tree; Tree nameTree = constructor.name(); if (nameTree.is(Kind.IDENTIFIER_NAME)) { String name = ((IdentifierTree) nameTree).name(); return "constructor".equals(name); } } return false; }
Source:
<code>public void onEventMainThread(MediaEvents.MediaUploadFailed event) { <START> ToastUtils.showToast(this, event.mErrorMessage, ToastUtils.Duration.SHORT); <END> }</code><technical_language>want Duration.LONG here</technical_language>

Target:
public void onEventMainThread(MediaEvents.MediaUploadFailed event) { ToastUtils.showToast(this, event.mErrorMessage, ToastUtils.Duration.LONG); }
Source:
<code>private static void verifyStateIntervals(String testId, @NonNull ITmfStateSystem ss, Integer quark, int[] expectedStarts, ITmfStateValue[] expectedValues) throws AttributeNotFoundException, StateSystemDisposedException { int expectedCount = expectedStarts.length - 1; <START> List<ITmfStateInterval> intervals = StateSystemUtils.queryHistoryRange(ss, quark, expectedStarts[0] * 1000000000L, expectedStarts[expectedCount] * 1000000000L); <END> assertEquals(testId + ": Interval count", expectedCount, intervals.size()); for (int i = 0; i < expectedCount; i++) { ITmfStateInterval interval = intervals.get(i); assertEquals(testId + ": Start time of interval " + i, expectedStarts[i] * 1000000000L, interval.getStartTime()); long actualEnd = (i == expectedCount - 1) ? (expectedStarts[i + 1] * 1000000000L) : (expectedStarts[i + 1] * 1000000000L) - 1; assertEquals(testId + ": End time of interval " + i, actualEnd, interval.getEndTime()); assertEquals(testId + ": Expected value of interval " + i, expectedValues[i], interval.getStateValue()); } }</code><technical_language>1000000000L -> extract constant</technical_language>

Target:
private static void verifyStateIntervals(String testId, @NonNull ITmfStateSystem ss, Integer quark, int[] expectedStarts, ITmfStateValue[] expectedValues) throws AttributeNotFoundException, StateSystemDisposedException { int expectedCount = expectedStarts.length - 1; List<ITmfStateInterval> intervals = StateSystemUtils.queryHistoryRange(ss, quark, expectedStarts[0] * TO_NS, expectedStarts[expectedCount] * TO_NS); assertEquals(testId + ": Interval count", expectedCount, intervals.size()); for (int i = 0; i < expectedCount; i++) { ITmfStateInterval interval = intervals.get(i); assertEquals(testId + ": Start time of interval " + i, expectedStarts[i] * TO_NS, interval.getStartTime()); long actualEnd = (i == expectedCount - 1) ? (expectedStarts[i + 1] * TO_NS) : (expectedStarts[i + 1] * TO_NS) - 1; assertEquals(testId + ": End time of interval " + i, actualEnd, interval.getEndTime()); assertEquals(testId + ": Expected value of interval " + i, expectedValues[i], interval.getStateValue()); } }
Source:
<code>public synchronized TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException { acl.checkPermission(Item.CREATE); Jenkins.getInstance().getProjectNamingStrategy().checkName(name); if (parent.getItem(name) != null) { throw new IllegalArgumentException(parent.getDisplayName() + " already contains an item '" + name + "'"); } File configXml = Items.getConfigFile(getRootDirFor(name)).getFile(); final File dir = configXml.getParentFile(); dir.mkdirs(); boolean success = false; try { <START> XMLUtils.safeTransform((Source)new StreamSource(xml), new StreamResult(new FileOutputStream(configXml))); <END> TopLevelItem result = Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<TopLevelItem,IOException>() { @Override public TopLevelItem call() throws IOException { return (TopLevelItem) Items.load(parent, dir); } }); success = acl.getACL().hasCreatePermission(Jenkins.getAuthentication(), parent, result.getDescriptor()) && result.getDescriptor().isApplicableIn(parent); add(result); ItemListener.fireOnCreated(result); Jenkins.getInstance().rebuildDependencyGraphAsync(); return result; } catch (TransformerException e) { success = false; throw new IOException("Failed to persist config.xml", e); } catch (SAXException e) { success = false; throw new IOException("Failed to persist config.xml", e); } catch (IOException e) { success = false; throw e; } catch (RuntimeException e) { success = false; throw e; } finally { if (!success) { Util.deleteRecursive(dir); } } }</code><technical_language>stream closed correctly in case</technical_language>

Target:
public synchronized TopLevelItem createProjectFromXML(String name, InputStream xml) throws IOException { acl.checkPermission(Item.CREATE); Jenkins.getInstance().getProjectNamingStrategy().checkName(name); if (parent.getItem(name) != null) { throw new IllegalArgumentException(parent.getDisplayName() + " already contains an item '" + name + "'"); } File configXml = Items.getConfigFile(getRootDirFor(name)).getFile(); final File dir = configXml.getParentFile(); dir.mkdirs(); boolean success = false; FileOutputStream fos = null; try { fos = new FileOutputStream(configXml); XMLUtils.safeTransform((Source)new StreamSource(xml), new StreamResult(fos)); TopLevelItem result = Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<TopLevelItem,IOException>() { @Override public TopLevelItem call() throws IOException { return (TopLevelItem) Items.load(parent, dir); } }); success = acl.getACL().hasCreatePermission(Jenkins.getAuthentication(), parent, result.getDescriptor()) && result.getDescriptor().isApplicableIn(parent); add(result); ItemListener.fireOnCreated(result); Jenkins.getInstance().rebuildDependencyGraphAsync(); return result; } catch (TransformerException e) { success = false; throw new IOException("Failed to persist config.xml", e); } catch (SAXException e) { success = false; throw new IOException("Failed to persist config.xml", e); } catch (IOException e) { success = false; throw e; } catch (RuntimeException e) { success = false; throw e; } finally { if (!success) { Util.deleteRecursive(dir); } if (fos != null) { fos.close(); } } }
Source:
<code>public void closeSessionsByIp(final InetAddress ip) { sessions.stream() .filter(Session::isOpen) .filter(s -> InetExtractor.extract(s.getUserProperties()).equals(ip)) .forEach( s -> { try { s.close(); } catch (final IOException e) { <START> log.warn("Could not close session (session is still open? {}", s.isOpen(), e); <END> } }); removeClosedSessions(); }</code><technical_language>suggestion log.warn("Could close session (session is open? {})", s.isOpen(), e);</technical_language>

Target:
public void closeSessionsByIp(final InetAddress ip) { sessions.stream() .filter(Session::isOpen) .filter(s -> InetExtractor.extract(s.getUserProperties()).equals(ip)) .forEach( s -> { try { s.close(); } catch (final IOException e) { log.warn("Could not close session (session is still open? {}", s.isOpen(), e); } }); }
Source:
<code>public List<String> listConsumers(Properties props, String topic) { List<String> ret = new ArrayList<>(); List<String> consumers = listAllConsumers(props); for (String consumer : consumers) { if (getConsumerTopics(props, consumer).contains(topic)) { ret.add(consumer); } } <START> return ret; <END> }</code><technical_language>return listAllConsumers(props).stream().filter(consumer -> getConsumerTopics(props, consumer).contains(topic)).collect(Collectors.toList())</technical_language>

Target:
public List<String> listConsumers(Properties props, String topic) { return listAllConsumers(props).stream() .filter(consumer -> getConsumerTopics(props, consumer).contains(topic)) .collect(Collectors.toList()); }
Source:
<code>public <T extends BaseDTO<Entity>> T getDtoByUniqueField(DetachedCriteria criteria) throws AppException { List<T> result = findAll(criteria, null); if (result.size() == 0) { return null; } else if (result.size() == 1) { return result.get(0); } else { <START> System.out.println(result.size()); <END> throw new AppException("the value is not unique."); } }</code><technical_language>remove</technical_language>

Target:
public <T extends BaseDTO<Entity>> T getDtoByUniqueField(DetachedCriteria criteria) throws AppException { List<T> result = findAll(criteria, null); if (result.size() == 0) { return null; } else if (result.size() == 1) { return result.get(0); } else { throw new AppException("the value is not unique."); } }
Source:
<code>public void testUsesCustomController() { <START> AbstractController controller = app.createAndManageChild(EntitySpec.create(AbstractControllerTest.TrackingAbstractController.class).displayName("mycustom")); <END> ControlledDynamicWebAppCluster cluster = app.createAndManageChild(EntitySpec.create(ControlledDynamicWebAppCluster.class) .configure("initialSize", 0) .configure(ControlledDynamicWebAppCluster.CONTROLLER, controller) .configure("memberSpec", EntitySpec.create(JBoss7Server.class).configure("war", warUrl.toString()))); app.start(locs); EntityTestUtils.assertAttributeEqualsEventually(controller, AbstractController.SERVICE_UP, true); assertEquals(cluster.getController(), controller); cluster.stop(); EntityTestUtils.assertAttributeEquals(controller, AbstractController.SERVICE_UP, true); }</code><technical_language>TrackingAbstractController is hidden class abstract controller test; suggest refactoring top-level, esp desire more widely</technical_language>

Target:
public void testUsesCustomController() { AbstractController controller = app.createAndManageChild(EntitySpec.create(TrackingAbstractController.class).displayName("mycustom")); ControlledDynamicWebAppCluster cluster = app.createAndManageChild(EntitySpec.create(ControlledDynamicWebAppCluster.class) .configure("initialSize", 0) .configure(ControlledDynamicWebAppCluster.CONTROLLER, controller) .configure("memberSpec", EntitySpec.create(JBoss7Server.class).configure("war", warUrl.toString()))); app.start(locs); EntityTestUtils.assertAttributeEqualsEventually(controller, AbstractController.SERVICE_UP, true); assertEquals(cluster.getController(), controller); cluster.stop(); EntityTestUtils.assertAttributeEquals(controller, AbstractController.SERVICE_UP, true); }
Source:
<code>protected String getBody() { <START> if (bodyContent == null) { <END> return ""; } else { if (doNotTrimBody == false && stripBodyLineBreaks == false) { return bodyContent.getString().trim(); } else { String whitespaceModifiedBodyContent = bodyContent.getString(); if (stripBodyLineBreaks) { whitespaceModifiedBodyContent = whitespaceModifiedBodyContent.replaceAll("[\r\n]+?", ""); } if (doNotTrimBody == false) { whitespaceModifiedBodyContent = whitespaceModifiedBodyContent.trim(); } return whitespaceModifiedBodyContent; } } }</code><technical_language>This rewritten super.getBody() instead of duplicating code here</technical_language>

Target:
protected String getBody() { if (trimBody) { return super.getBody(); } else { return (bodyContent == null ? "" : bodyContent.getString()); } }
Source:
<code>public void testBingTilesAround() { assertFunction("transform(bing_tiles_around(30.12, 60, 15), x -> bing_tile_quadkey(x))", new ArrayType(VARCHAR), ImmutableList.of( <START> "123030123010112", <END> "123030123010103", "123030123010130", "123030123010102", "123030123010121", "123030123010132", "123030123010120", "123030123010123", "123030123010122")); }</code><technical_language>Try zoom levels. Try max zoom min zoom</technical_language>

Target:
public void testBingTilesAround() { assertFunction("transform(bing_tiles_around(30.12, 60, 1), x -> bing_tile_quadkey(x))", new ArrayType(VARCHAR), ImmutableList.of("0", "3", "1", "2")); assertFunction("transform(bing_tiles_around(30.12, 60, 15), x -> bing_tile_quadkey(x))", new ArrayType(VARCHAR), ImmutableList.of( "123030123010112", "123030123010103", "123030123010130", "123030123010102", "123030123010121", "123030123010132", "123030123010120", "123030123010123", "123030123010122")); assertFunction("transform(bing_tiles_around(30.12, 60, 23), x -> bing_tile_quadkey(x))", new ArrayType(VARCHAR), ImmutableList.of( "12303012301012121210132", "12303012301012121210123", "12303012301012121210310", "12303012301012121210302", "12303012301012121210122", "12303012301012121210301", "12303012301012121210312", "12303012301012121210300", "12303012301012121210303")); }
Source:
<code>public void shouldCreateNewAutoGenerationOption() throws Exception { long originalCount = getAllCount(); boolean automaticGenerationEnabled = true; boolean manualEntryEnabled = true; SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", getUuid()); <START> autoGenerationOption.add("location", "8d6c993e-c2cc-11de-8d13-0010c6dffd0f"); <END> autoGenerationOption.add("source", "0d47284f-9e9b-4a81-a88b-8bb42bc0a901"); autoGenerationOption.add("automaticGenerationEnabled", automaticGenerationEnabled); autoGenerationOption.add("manualEntryEnabled", manualEntryEnabled); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject newAutoGenerationOption = deserialize(handle(req)); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "uuid")); assertEquals(originalCount + 1, getAllCount()); }</code><technical_language>declare constants top of class</technical_language>

Target:
public void shouldCreateNewAutoGenerationOption() throws Exception { long originalCount = getAllCount(); SimpleObject autoGenerationOption = new SimpleObject(); autoGenerationOption.add("identifierType", IDENTIFIER_TYPE_UUID); autoGenerationOption.add("location", LOCATION); autoGenerationOption.add("source", SOURCE); autoGenerationOption.add("automaticGenerationEnabled", true); autoGenerationOption.add("manualEntryEnabled", true); String json = new ObjectMapper().writeValueAsString(autoGenerationOption); MockHttpServletRequest req = request(RequestMethod.POST, getURI()); req.setContent(json.getBytes()); SimpleObject newAutoGenerationOption = deserialize(handle(req)); assertNotNull(PropertyUtils.getProperty(newAutoGenerationOption, "uuid")); assertEquals(originalCount + 1, getAllCount()); assertEquals(SOURCE, PropertyUtils.getProperty(newAutoGenerationOption, "source")); assertEquals(LOCATION, PropertyUtils.getProperty(newAutoGenerationOption, "location")); assertEquals(IDENTIFIER_TYPE_UUID, PropertyUtils.getProperty(newAutoGenerationOption, "identifierType")); assertEquals(true, PropertyUtils.getProperty(newAutoGenerationOption, "automaticGenerationEnabled")); assertEquals(true, PropertyUtils.getProperty(newAutoGenerationOption, "manualEntryEnabled")); }
Source:
<code>public void startPolling(AuthenticatedContext ac, AzureManagedImageCreationCheckerContext checkerContext) { PollTask<Boolean> managedImageCreationStatusCheckerTask = azurePollTaskFactory.managedImageCreationCheckerTask(ac, checkerContext); try { LOGGER.info("Start polling managed image creation: {}", checkerContext.getImageName()); syncPollingScheduler.schedule(managedImageCreationStatusCheckerTask, MANAGED_IMAGE_CREATION_CHECKING_INTERVAL, MANAGED_IMAGE_CREATION_CHECKING_MAX_ATTEMPT, MAX_FAILURE_TOLERANT); } catch (Exception e) { <START> LOGGER.debug("Managed image creation failed.", e); <END> } }</code><technical_language>throw this, instead of logging it</technical_language>

Target:
public void startPolling(AuthenticatedContext ac, AzureManagedImageCreationCheckerContext checkerContext) { PollTask<Boolean> managedImageCreationStatusCheckerTask = azurePollTaskFactory.managedImageCreationCheckerTask(ac, checkerContext); try { LOGGER.info("Start polling managed image creation: {}", checkerContext.getImageName()); syncPollingScheduler.schedule(managedImageCreationStatusCheckerTask, MANAGED_IMAGE_CREATION_CHECKING_INTERVAL, MANAGED_IMAGE_CREATION_CHECKING_MAX_ATTEMPT, MAX_FAILURE_TOLERANT); } catch (Exception e) { LOGGER.error("Managed image creation failed.", e); throw new CloudConnectorException(e); } }
Source:
<code>public void stop() { <START> LOG.debug("stop"); <END> }</code><technical_language>Add a proper log message</technical_language>

Target:
public void stop() { LOG.debug("stopping AxisToClientConnectorBridge"); }
Source:
<code>protected boolean validatePage() { <START> if (nattableConfigurationFileName != null) { <END> if (nattableConfigurationFileName.getText().equals("")) { this.setErrorMessage("Set nattable configuration file name"); return false; } } return super.validatePage(); }</code><technical_language>invert</technical_language>

Target:
protected boolean validatePage() { if (null != nattableConfigurationFileName) { if ("".equals(nattableConfigurationFileName.getText())) { this.setErrorMessage("Set nattable configuration file name"); return false; } } return super.validatePage(); }
Source:
<code>private TreeMap<Integer, Integer> generateColumnPositionList(String rawQuery, TreeMap<String, Integer> columnNames) { TreeMap<Integer, Integer> columnPositionList = new TreeMap<>(new Comparator<Integer>() { @Override public int compare(Integer val1, Integer val2) { return val1 - val2; } }); <START> <END> for (Entry<String, Integer> column : columnNames.entrySet()) { int lastIndex = 0; while (true) { int index = rawQuery.indexOf(":" + column.getKey(), lastIndex); if (index == -1) { break; } if (!columnPositionList.containsKey(index)) { columnPositionList.put(index, column.getValue()); } lastIndex = index + 2; } } return columnPositionList; }</code><technical_language>Comparator argument for TreeMap constructor is unnecessary Integer is originally Comparable</technical_language>

Target:
private TreeMap<Integer, Integer> generateColumnPositionList(String rawQuery, TreeMap<String, Integer> columnNames) { TreeMap<Integer, Integer> columnPositionList = new TreeMap<>(); for (Entry<String, Integer> column : columnNames.entrySet()) { int lastIndex = 0; while (true) { int index = rawQuery.indexOf(":" + column.getKey(), lastIndex); if (index == -1) { break; } if (!columnPositionList.containsKey(index)) { columnPositionList.put(index, column.getValue()); } lastIndex = index + 2; } } return columnPositionList; }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.recycler_view_demo); final String name = "Android User"; mSendButton = (Button) findViewById(R.id.sendButton); mMessageEdit = (EditText) findViewById(R.id.messageEdit); final RecyclerView messages = (RecyclerView) findViewById(R.id.messagesList); messages.setHasFixedSize(true); messages.setLayoutManager(new LinearLayoutManager(this)); <START> mRef = new Firebase("<LINK_1>"); <END> mSendButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Chat chat = new Chat(name, mMessageEdit.getText().toString()); mRef.push().setValue(chat, new Firebase.CompletionListener() { @Override public void onComplete(FirebaseError firebaseError, Firebase firebase) { if (firebaseError != null) { Log.e(TAG, firebaseError.toString()); } } }); mMessageEdit.setText(""); } }); Query recentMessages = mRef.limitToLast(50); FirebaseRecyclerViewAdapter<Chat, ChatHolder> adapter = new FirebaseRecyclerViewAdapter<Chat, ChatHolder>(Chat.class, android.R.layout.two_line_list_item, ChatHolder.class, recentMessages) { @Override public void populateViewHolder(ChatHolder chatView, Chat chat) { chatView.textView.setText(chat.getText()); chatView.textView.setPadding(10, 0, 10, 0); chatView.nameView.setText(chat.getName()); chatView.nameView.setPadding(10, 0, 10, 15); if (chat.getName().equals(name)) { chatView.textView.setGravity(Gravity.END); chatView.nameView.setGravity(Gravity.END); chatView.nameView.setTextColor(Color.parseColor("#8BC34A")); } else { chatView.nameView.setTextColor(Color.parseColor("#00BCD4")); } } }; messages.setAdapter(adapter); }</code><technical_language>Change firebaseui please</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.recycler_view_demo); mSendButton = (Button) findViewById(R.id.sendButton); mMessageEdit = (EditText) findViewById(R.id.messageEdit); mRef = new Firebase("<LINK_0>"); mChatRef = mRef.limitToLast(50); mSendButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Chat chat = new Chat(name, mAuthData.getUid(), mMessageEdit.getText().toString()); mRef.push().setValue(chat, new Firebase.CompletionListener() { @Override public void onComplete(FirebaseError firebaseError, Firebase firebase) { if (firebaseError != null) { Log.e(TAG, firebaseError.toString()); } } }); mMessageEdit.setText(""); } }); mMessages = (RecyclerView) findViewById(R.id.messagesList); LinearLayoutManager manager = new LinearLayoutManager(this); manager.setStackFromEnd(true); mMessages.setHasFixedSize(true); mMessages.setLayoutManager(manager); updateChat(); }
Source:
<code><START> public void bank() { <END> System.out.println("banking"); ctx.bank.open(); ctx.bank.depositAllExcept(tinder_id); ctx.bank.withdraw(logChoiceID, 27); ctx.bank.close(); }</code><technical_language>conditional waits</technical_language>

Target:
public void bank() { System.out.println("banking"); ctx.bank.open(); Condition.wait(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return ctx.bank.opened(); } }); ctx.bank.depositAllExcept(tinder_id); Condition.wait(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return ctx.inventory.count() == 1; } }); boolean successfulWithdraw = ctx.bank.withdraw(logChoiceID, 27); if (!successfulWithdraw) { boolean tryAgain = ctx.bank.withdraw(logChoiceID, 27); if (!tryAgain) { System.out.println("failed withdraw twice"); stop(); } } Condition.wait(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return ctx.inventory.count() > 1; } }); ctx.bank.close(); }
Source:
<code>public String getTitle() { <START> return isSameDay(date, new Date()) ? "Today Messages" : "Messages"; <END> }</code><technical_language>User displayed strings in strings.xml</technical_language>

Target:
public String getTitle() { return isSameDay(date, new Date()) ? ZulipApp.get().getString(R.string.today_messages) : ZulipApp.get().getString(R.string.messages); }
Source:
<code><START> public List<String> getConflictList() { <END> return conflictList; }</code><technical_language>return List<File></technical_language>

Target:
public List<File> getConflictList() { return conflictList; }
Source:
<code>static boolean initializeUnityAds(Activity activity, String gameId) { if (!UnityAds.isSupported()) { Log.w(UnityAdapter.TAG, "The current device is not supported by Unity Ads."); return false; } if (UnityAds.isInitialized()) { return true; } UnitySingleton.activity = new WeakReference<>(activity); MediationMetaData mediationMetaData = new MediationMetaData(activity); mediationMetaData.setName("AdMob"); mediationMetaData.setVersion(BuildConfig.VERSION_NAME); mediationMetaData.set("adapter_version", "3.1.0"); mediationMetaData.commit(); UnitySingletonListener unitySingleton = UnitySingleton.getInstance(); UnityBanners.setBannerListener(unitySingleton); <START> bool testMode = false; <END> bool enablePerPlacementLoad = true; initialize(activity, gameId, UnitySingleton.getInstance(), testMode, enablePerPlacementLoad); return true; }</code><technical_language>Is test mode false</technical_language>

Target:
static boolean initializeUnityAds(Activity activity, String gameId) { currentGameID = gameId; if (!UnityAds.isSupported()) { Log.w(UnityAdapter.TAG, "The current device is not supported by Unity Ads."); return false; } if (UnityAds.isInitialized()) { return true; } UnitySingleton.activity = new WeakReference<>(activity); MediationMetaData mediationMetaData = new MediationMetaData(activity); mediationMetaData.setName("AdMob"); mediationMetaData.setVersion(BuildConfig.VERSION_NAME); mediationMetaData.set("adapter_version", "3.2.0"); mediationMetaData.commit(); UnitySingletonListener unitySingleton = UnitySingleton.getInstance(); UnityBanners.setBannerListener(unitySingleton); UnityAds.initialize(activity, gameId, UnitySingleton.getInstance(), false, true); return true; }
Source:
<code>public void removeStream(int ssrc) <START> { <END> }</code><technical_language>In original bitrate_bps is a pointer. I handled (since is currently used)</technical_language>

Target:
public void removeStream(int ssrc) { synchronized (critSect) { try { ssrcs_.remove(ssrc & 0xFFFF_FFFFL); } catch (ArrayIndexOutOfBoundsException e) { logger.info("Cannot remove SSRC, " + "SSRC not found"); } } }
Source:
<code>private InternalDistributedMember readServerMember(DataInputStream p_dis) throws IOException { byte[] memberBytes = DataSerializer.readByteArray(p_dis); <START> final VersionOrdinal v = StaticSerialization.getVersionForDataStreamOrNull(p_dis); <END> ByteArrayDataInput dis = new ByteArrayDataInput(memberBytes, v); try { return DataSerializer.readObject(dis); } catch (EOFException e) { throw e; } catch (Exception e) { throw new InternalGemFireException( "Unable to deserialize member", e); } }</code><technical_language>This continue Version, VersionOrdinal. Version ensures create a datastream unknown ordinal. of serialization code do if happen</technical_language>

Target:
private InternalDistributedMember readServerMember(DataInputStream p_dis) throws IOException { byte[] memberBytes = DataSerializer.readByteArray(p_dis); Version v = StaticSerialization.getVersionForDataStreamOrNull(p_dis); ByteArrayDataInput dis = new ByteArrayDataInput(memberBytes, v); try { return DataSerializer.readObject(dis); } catch (EOFException e) { throw e; } catch (Exception e) { throw new InternalGemFireException( "Unable to deserialize member", e); } }