auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public JAXRS2Contract() { <START> super.registerParameterAnnotation(Suspended.class, (ann, data, i) -> true); <END> super.registerParameterAnnotation(Context.class, (ann, data, i) -> true); }</code><technical_language>If supported, do need register them</technical_language>

Target:
public JAXRS2Contract() { super.registerParameterAnnotation(Suspended.class, (ann, data, i) -> data.ignoreParamater(i)); super.registerParameterAnnotation(Context.class, (ann, data, i) -> data.ignoreParamater(i)); }
Source:
<code>public <VELEMENT extends VElement> AbstractSWTRenderer<VElement> getRendererInstance(VELEMENT vElement, ViewModelContext viewModelContext) throws EMFFormsNoRendererException { if (rendererServices.isEmpty()) { throw new EMFFormsNoRendererException("No EMFFormsRendererService available!"); } double highestPriority = -1; EMFFormsRendererService<VElement> bestService = null; for (final EMFFormsRendererService<VElement> rendererService : rendererServices) { final double priority = rendererService.isApplicable(vElement, viewModelContext); if (priority > highestPriority) { highestPriority = priority; bestService = rendererService; } } if (bestService == null) { throw new EMFFormsNoRendererException(String.format( "No fitting EMFFormsRendererService for %1$s available!", vElement.eClass().getName())); } final AbstractSWTRenderer<VElement> rendererInstance = bestService.getRendererInstance(vElement, viewModelContext); if (rendererInstance == null) { throw new EMFFormsNoRendererException(String.format( "No fitting EMFFormsRendererService for %1$s available!", vElement.eClass().getName())); } try { rendererInstance.init(); } catch (final <START> IllegalStateException e) <END> { throw new EMFFormsNoRendererException(e); } return rendererInstance; }</code><technical_language>catch runtime exceptions</technical_language>

Target:
public <VELEMENT extends VElement> AbstractSWTRenderer<VElement> getRendererInstance(VELEMENT vElement, ViewModelContext viewModelContext) throws EMFFormsNoRendererException { if (rendererServices.isEmpty()) { throw new EMFFormsNoRendererException("No EMFFormsRendererService available!"); } double highestPriority = -1; EMFFormsRendererService<VElement> bestService = null; for (final EMFFormsRendererService<VElement> rendererService : rendererServices) { final double priority = rendererService.isApplicable(vElement, viewModelContext); if (priority > highestPriority) { highestPriority = priority; bestService = rendererService; } } if (bestService == null) { throw new EMFFormsNoRendererException(String.format( "No fitting EMFFormsRendererService for %1$s available!", vElement.eClass().getName())); } final AbstractSWTRenderer<VElement> rendererInstance = bestService.getRendererInstance(vElement, viewModelContext); if (rendererInstance == null) { throw new EMFFormsNoRendererException(String.format( "No fitting EMFFormsRendererService for %1$s available!", vElement.eClass().getName())); } try { rendererInstance.init(); } catch (final RuntimeException e) { throw new EMFFormsNoRendererException(e); } END SUPRESS CATCH EXCEPTION return rendererInstance; }
Source:
<code>public void shouldConvertAllFieldsInVariant() throws Exception { <START> DBObject dbo = constructDbo(VariantData.getVariantWithoutAnnotation()); <END> ItemProcessor<DBObject, VariantWrapper> processor = new AnnotationProcessor(); VariantWrapper variant = processor.process(dbo); assertEquals("+", variant.getStrand()); assertEquals("20", variant.getChr()); assertEquals("G/A", variant.getRefAlt()); assertEquals(60343, variant.getEnd()); assertEquals(60343, variant.getStart()); }</code><technical_language>Renaming this method constructDbObject improve readability (I still)</technical_language>

Target:
public void shouldConvertAllFieldsInVariant() throws Exception { DBObject dbo = constructDbObject(VariantData.getVariantWithoutAnnotation()); ItemProcessor<DBObject, VariantWrapper> processor = new AnnotationProcessor(); VariantWrapper variant = processor.process(dbo); assertEquals("+", variant.getStrand()); assertEquals("20", variant.getChr()); assertEquals("G/A", variant.getRefAlt()); assertEquals(60343, variant.getEnd()); assertEquals(60343, variant.getStart()); }
Source:
<code>public String toString(){ StringBuilder sb = new StringBuilder(); sb.append("{ regEx=\"").append(regExString). append("\", className=\"").append(someClass.getCanonicalName()). <START> append("}"); <END> return sb.toString(); }</code><technical_language>This done more cleanly a stringformatter, this is fine too</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); return "{ regEx=\"" + regExString + "\", className=\"" + someClass.getCanonicalName() + "}"; }
Source:
<code>public void testMaxSpillPerNodeLimit() throws Exception { Map<String, String> properties = ImmutableMap.<String, String>builder() .put("experimental.spiller-spill-path", spillPath.getAbsolutePath()) .put("experimental.spill-enabled", "true") .put("experimental.operator-memory-limit-before-spill", "1B") .put("experimental.max-spill-per-node", "10B") .put("experimental.spiller-max-used-space-threshold", "1.0") .build(); try (QueryRunner queryRunner = createLocalQueryRunner( <START> new NodeSpillConfig().setMaxSpillPerNode(DataSize.succinctBytes(10)))) { <END> queryRunner.execute(queryRunner.getDefaultSession(), "SELECT COUNT(DISTINCT clerk) as count, orderdate FROM orders GROUP BY orderdate ORDER BY count, orderdate"); } }</code><technical_language>Do validate spill happens</technical_language>

Target:
public void testMaxSpillPerNodeLimit() throws Exception { Map<String, String> properties = ImmutableMap.<String, String>builder() .put("experimental.spiller-spill-path", spillPath.getAbsolutePath()) .put("experimental.spill-enabled", "true") .put("experimental.aggregation-operator-unspill-memory-limit", "1B") .put("experimental.max-spill-per-node", "10B") .put("experimental.spiller-max-used-space-threshold", "1.0") .build(); try (QueryRunner queryRunner = createLocalQueryRunner(new NodeSpillConfig().setMaxSpillPerNode(DataSize.succinctBytes(10)))) { queryRunner.execute(queryRunner.getDefaultSession(), "SELECT COUNT(DISTINCT clerk) as count, orderdate FROM orders GROUP BY orderdate ORDER BY count, orderdate"); } }
Source:
<code>private void create(String projectName, OpenShiftClient client) throws InfrastructureException { try { client .projectrequests() .createNew() .withNewMetadata() .withName(projectName) .endMetadata() .done(); <START> waitServiceAccountReadiness(projectName, client); <END> } catch (KubernetesClientException e) { throw new InfrastructureException(e.getMessage(), e); } }</code><technical_language>this case is covered unit tests. WDYT</technical_language>

Target:
private void create(String projectName, OpenShiftClient client) throws InfrastructureException { try { client .projectrequests() .createNew() .withNewMetadata() .withName(projectName) .endMetadata() .done(); waitDefaultServiceAccount(projectName, client); } catch (KubernetesClientException e) { throw new InfrastructureException(e.getMessage(), e); } }
Source:
<code>public void shouldRightProjectionOrElseRightProjectionFromSupplier() { <START> final RightProjection<Object, Integer> rightRight = Either.right(1).right(); <END> final RightProjection<Object, Integer> leftRight = Either.<Object, Integer>left(1).right(); final Supplier<RightProjection<Object, Integer>> rightProjectionSupplier = () -> Either.right(2).right(); assertThat(rightRight.orElse(rightProjectionSupplier).get()).isEqualTo(1); assertThat(leftRight.orElse(rightProjectionSupplier).get()).isEqualTo(2); }</code><technical_language>same, simplified inlined</technical_language>

Target:
public void shouldRightProjectionOrElseRightProjectionFromSupplier() { final RightProjection<Integer, Integer> elseProjection = API.<Integer, Integer>Right(2).right(); assertThat(Right(1).right().orElse(() -> elseProjection).get()).isEqualTo(1); assertThat(Left(1).right().orElse(() -> elseProjection).get()).isEqualTo(2); }
Source:
<code><START> private void ensureProgramWorkflowIsSet(ProgramWorkflowState state, ProgramWorkflow workflow) throws APIException { <END> if (state.getConcept() == null || state.getInitial() == null || state.getTerminal() == null) { throw new APIException("ProgramWorkflowState.requires", (Object[]) null); } if (state.getProgramWorkflow() == null) { state.setProgramWorkflow(workflow); } else if (!state.getProgramWorkflow().equals(workflow)) { throw new APIException("ProgramWorkflow.error.contains.state", new Object[] { workflow.getProgram() }); } }</code><technical_language>else if clause APIException("Program.error.contains.ProgramWorkflow" in here. remember ensureProgramIsSet method is Program, else if (!workflow.getProgram().equals(program)) needs in</technical_language>

Target:
private void ensureProgramWorkflowIsSet(ProgramWorkflowState state, ProgramWorkflow workflow) { if (state.getProgramWorkflow() == null) { state.setProgramWorkflow(workflow); } else if (!state.getProgramWorkflow().equals(workflow)) { throw new APIException("ProgramWorkflow.error.contains.state", new Object[] { workflow.getProgram() }); } }
Source:
<code>private Get toGet(final Mutation mutation) throws IOException { <START> assert mutation instanceof Increment || mutation instanceof Append; <END> Get get = new Get(mutation.getRow()); CellScanner cellScanner = mutation.cellScanner(); while (!cellScanner.advance()) { Cell cell = cellScanner.current(); get.addColumn(CellUtil.cloneFamily(cell), CellUtil.cloneQualifier(cell)); } if (mutation instanceof Increment) { Increment increment = (Increment) mutation; get.setTimeRange(increment.getTimeRange().getMin(), increment.getTimeRange().getMax()); } else { Append append = (Append) mutation; get.setTimeRange(append.getTimeRange().getMin(), append.getTimeRange().getMax()); } for (Entry<String, byte[]> entry : mutation.getAttributesMap().entrySet()) { get.setAttribute(entry.getKey(), entry.getValue()); } return get; }</code><technical_language>Instead of assert statement, throw AssertionError if condition? assert enabled server side</technical_language>

Target:
private static Get toGet(final Mutation mutation) throws IOException { if(!(mutation instanceof Increment) && !(mutation instanceof Append)) { throw new AssertionError("mutation must be a instance of Increment or Append"); } Get get = new Get(mutation.getRow()); CellScanner cellScanner = mutation.cellScanner(); while (!cellScanner.advance()) { Cell cell = cellScanner.current(); get.addColumn(CellUtil.cloneFamily(cell), CellUtil.cloneQualifier(cell)); } if (mutation instanceof Increment) { Increment increment = (Increment) mutation; get.setTimeRange(increment.getTimeRange().getMin(), increment.getTimeRange().getMax()); } else { Append append = (Append) mutation; get.setTimeRange(append.getTimeRange().getMin(), append.getTimeRange().getMax()); } for (Entry<String, byte[]> entry : mutation.getAttributesMap().entrySet()) { get.setAttribute(entry.getKey(), entry.getValue()); } return get; }
Source:
<code>public static RecordWriter createParquetWriter(Path target, JobConf conf, Properties properties, boolean compress) throws IOException, ReflectiveOperationException { <START> Object outputFormat = MapredParquetOutputFormat.class.getConstructor().newInstance(); <END> RecordWriter recordWriter = ((HiveOutputFormat<?, ?>) outputFormat) .getHiveRecordWriter(conf, target, Text.class, compress, properties, Reporter.NULL); Object realWriter = REAL_WRITER_FIELD.get(recordWriter); Object internalWriter = INTERNAL_WRITER_FIELD.get(realWriter); ParquetFileWriter fileWriter = (ParquetFileWriter) FILE_WRITER_FIELD.get(internalWriter); return new ExtendedRecordWriter() { private long length; @Override public long getWrittenBytes() { return length; } @Override public void write(Writable value) throws IOException { recordWriter.write(value); length = fileWriter.getPos(); } @Override public void close(boolean abort) throws IOException { recordWriter.close(abort); if (!abort) { length = target.getFileSystem(conf).getFileStatus(target).getLen(); } } }; }</code><technical_language>MapredParquetOutputFormat outputFormat = new MapredParquetOutputFormat()? method is public</technical_language>

Target:
public static RecordWriter createParquetWriter(Path target, JobConf conf, Properties properties, boolean compress) throws IOException, ReflectiveOperationException { RecordWriter recordWriter = new MapredParquetOutputFormat() .getHiveRecordWriter(conf, target, Text.class, compress, properties, Reporter.NULL); Object realWriter = REAL_WRITER_FIELD.get(recordWriter); Object internalWriter = INTERNAL_WRITER_FIELD.get(realWriter); ParquetFileWriter fileWriter = (ParquetFileWriter) FILE_WRITER_FIELD.get(internalWriter); return new ExtendedRecordWriter() { private long length; @Override public long getWrittenBytes() { return length; } @Override public void write(Writable value) throws IOException { recordWriter.write(value); length = fileWriter.getPos(); } @Override public void close(boolean abort) throws IOException { recordWriter.close(abort); if (!abort) { length = target.getFileSystem(conf).getFileStatus(target).getLen(); } } }; }
Source:
<code>private String getColumnText(Object element, int columnIndex) { TaskReview reviewContainer = (TaskReview) element; switch (columnIndex) { case 0: return reviewContainer.getSummary(); case 1: <START> return reviewContainer.getCrString(); <END> case 2: return reviewContainer.getVString(); case 3: return reviewContainer.getIncomingChanges(); default: return ""; } }</code><technical_language>If this is reason a getCrString user store integer internally (it's true representation) a call out Integer.toString create representation</technical_language>

Target:
private String getColumnText(Object element, int columnIndex) { TaskReview reviewContainer = (TaskReview) element; switch (columnIndex) { case 0: return reviewContainer.getSummary(); case 3: return reviewContainer.getIncomingChanges(); default: return ""; } }
Source:
<code>protected static void createEmbeddedNode() throws IOException { ElasticSearchEmbeddedServerConfig config = new ElasticSearchEmbeddedServerConfig(); config.setHttpEnabled(true); config.setClusterName("nuxeoESClientCluster"); config.setIndexStorageType("mmapfs"); config.setNodeName("nuxeoESClientTestNode"); config.setDataPath(folder.newFolder().getAbsolutePath()); config.setHomePath(folder.newFolder().getAbsolutePath()); <START> System.out.println(config); <END> embeddedNode = new ElasticSearchEmbeddedNode(config); embeddedNode.start(); }</code><technical_language>a logger</technical_language>

Target:
protected static void createEmbeddedNode() throws IOException { ElasticSearchEmbeddedServerConfig config = new ElasticSearchEmbeddedServerConfig(); config.setHttpEnabled(true); config.setClusterName("nuxeoESClientCluster"); config.setIndexStorageType("mmapfs"); config.setNodeName("nuxeoESClientTestNode"); config.setDataPath(folder.newFolder().getAbsolutePath()); config.setHomePath(folder.newFolder().getAbsolutePath()); embeddedNode = new ElasticSearchEmbeddedNode(config); embeddedNode.start(); }
Source:
<code>public TestCassandraDistributed() { <START> super(CassandraQueryRunner::createCassandraQueryRunner, FeatureSelection.all().excludes(VIEW)); <END> }</code><technical_language>if rename allFeatures shortcut to: allFeatures().excludes(VIEW)</technical_language>

Target:
public TestCassandraDistributed() { super(allFeatures().excluding( ADD_COLUMN, DROP_COLUMN, RENAME_COLUMN, RENAME_TABLE, VIEW, DELETE_DATA, CREATE_TABLE, DATE_TYPE), CassandraQueryRunner::createCassandraQueryRunner); }
Source:
<code>private void runFirehose(Firehose firehose) { final Period intermediatePersistPeriod = config.getIntermediatePersistPeriod(); long nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); while (firehose.hasMore()) { InputRow inputRow = null; try { try { inputRow = firehose.nextRow(); } catch (Exception e) { log.debug(e, "thrown away line due to exception, considering unparseable"); metrics.incrementUnparseable(); continue; } boolean lateEvent = false; boolean indexLimitExceeded = false; try { lateEvent = plumber.add(inputRow) == -1; } catch (IndexSizeExceededException e) { <START> log.info("Index limit exceeded: %s", e.getMessage()); <END> indexLimitExceeded = true; } if (indexLimitExceeded || lateEvent) { metrics.incrementThrownAway(); log.debug("Throwing away event[%s]", inputRow); if (indexLimitExceeded || System.currentTimeMillis() > nextFlush) { plumber.persist(firehose.commit()); nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); } continue; } final Sink sink = plumber.getSink(inputRow.getTimestampFromEpoch()); if ((sink != null && !sink.canAppendRow()) || System.currentTimeMillis() > nextFlush) { plumber.persist(firehose.commit()); nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); } metrics.incrementProcessed(); } catch (ParseException e) { if (inputRow != null) { log.error(e, "unparseable line: %s", inputRow); } metrics.incrementUnparseable(); } } }</code><technical_language>this error</technical_language>

Target:
private void runFirehose(Firehose firehose) { final Period intermediatePersistPeriod = config.getIntermediatePersistPeriod(); long nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); while (firehose.hasMore()) { InputRow inputRow = null; try { try { inputRow = firehose.nextRow(); if (inputRow == null) { log.debug("thrown away null input row, considering unparseable"); log.info("thrown away null input row, considering unparseable"); metrics.incrementUnparseable(); continue; } } catch (Exception e) { log.debug(e, "thrown away line due to exception, considering unparseable"); metrics.incrementUnparseable(); continue; } boolean lateEvent = false; boolean indexLimitExceeded = false; try { lateEvent = plumber.add(inputRow) == -1; } catch (IndexSizeExceededException e) { log.info("Index limit exceeded: %s", e.getMessage()); indexLimitExceeded = true; } if (indexLimitExceeded || lateEvent) { metrics.incrementThrownAway(); log.debug("Throwing away event[%s]", inputRow); if (indexLimitExceeded || System.currentTimeMillis() > nextFlush) { plumber.persist(firehose.commit()); nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); } continue; } final Sink sink = plumber.getSink(inputRow.getTimestampFromEpoch()); if ((sink != null && !sink.canAppendRow()) || System.currentTimeMillis() > nextFlush) { plumber.persist(firehose.commit()); nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis(); } metrics.incrementProcessed(); } catch (ParseException e) { if (inputRow != null) { log.error(e, "unparseable line: %s", inputRow); } metrics.incrementUnparseable(); } } }
Source:
<code>public ExtensionJobList getExtensionJobs( @PathParam("extension-name") String extensionName, @DefaultValue(ASCENDING_SORT_ORDER) @QueryParam("sortOrder") String sortOrder, @DefaultValue("") @QueryParam("doAs") String doAsUser) { checkIfExtensionServiceIsEnabled(); <START> if (extensionName != null) { <END> getExtensionIfExists(extensionName); } try { return super.getExtensionJobs(extensionName, sortOrder, doAsUser); } catch (Throwable e) { LOG.error("Failed to get extension job list of " + extensionName + ": ", e); throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } }</code><technical_language>StringUtils.isNotBlank instead</technical_language>

Target:
public ExtensionJobList getExtensionJobs( @PathParam("extension-name") String extensionName, @DefaultValue(ASCENDING_SORT_ORDER) @QueryParam("sortOrder") String sortOrder, @DefaultValue("") @QueryParam("doAs") String doAsUser) { checkIfExtensionServiceIsEnabled(); if (StringUtils.isNotBlank(extensionName)) { getExtensionIfExists(extensionName); } try { return super.getExtensionJobs(extensionName, sortOrder, doAsUser); } catch (Throwable e) { LOG.error("Failed to get extension job list of " + extensionName + ": ", e); throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } }
Source:
<code>protected Agent doGetRemoteAgent(URL url) throws AgentException { File agent = null; try { agent = downloadFile(new File(System.getProperty("java.io.tmpdir")), "agent", ".tmp", url); String json = readAndCloseQuietly(new FileInputStream(agent)); return DtoFactory.getInstance().createDtoFromJson(json, AgentDto.class); } catch (IOException | IllegalArgumentException e) { throw new AgentException("Can't fetch agent configuration", e); } finally { if (agent != null) { <START> FileCleaner.addFile(agent); <END> } } }</code><technical_language>remove agent now. Is reason postpone it</technical_language>

Target:
protected Agent doGetRemoteAgent(URL url) throws AgentException { File agent = null; try { agent = downloadFile(new File(System.getProperty("java.io.tmpdir")), "agent", ".tmp", url); String json = readAndCloseQuietly(new FileInputStream(agent)); return DtoFactory.getInstance().createDtoFromJson(json, AgentDto.class); } catch (IOException | IllegalArgumentException e) { throw new AgentException("Can't fetch agent configuration", e); } finally { if (agent != null) { try { Files.delete(agent.toPath()); } catch (IOException e) { FileCleaner.addFile(agent); } } } }
Source:
<code>public void deleteAllOldNonConformityStatistics() throws EntityRetrievalException { String hql = "UPDATE NonconformityTypeStatisticsEntity SET deleted = true WHERE deleted = false"; <START> Query query = entityManager.createQuery(hql); <END> query.executeUpdate(); }</code><technical_language>I setting deleted individually updating modified user. Is necessary well</technical_language>

Target:
public void deleteAllOldNonConformityStatistics() throws EntityRetrievalException { String hql = "UPDATE NonconformityTypeStatisticsEntity SET deleted = true, lastModifiedUser = " + getUserId(SYSTEM_USER_ID) + " WHERE deleted = false"; Query query = entityManager.createQuery(hql); query.executeUpdate(); }
Source:
<code>public void testAssistForUnknownButConnectedType() throws CoreException, InvocationTargetException, IOException, InterruptedException { List<CompletionItem> items = new ArrayList<>(); items.add(createCompletionItem("FirstClass", CompletionItemKind.Class)); MockLanguageServer.INSTANCE.setCompletionList(new CompletionList(true, items)); IFile testFile = TestUtils.createUniqueTestFileOfUnknownType(project, ""); ITextViewer viewer = TestUtils.openTextViewer(testFile); LanguageServerDefinition serverDefinition = LanguageServersRegistry.getInstance().getDefinition("org.eclipse.lsp4e.test.server"); assertNotNull(serverDefinition); IPath fileLocation = testFile.getLocation(); <START> LanguageServerWrapper lsWrapperForConnection = LanguageServiceAccessor <END> .getLSWrapperForConnection(testFile.getProject(), serverDefinition, fileLocation); lsWrapperForConnection.connect(testFile, null); new DisplayHelper() { @Override protected boolean condition() { return lsWrapperForConnection.isConnectedTo(fileLocation); } }.waitForCondition(Display.getCurrent(), 3000); ICompletionProposal[] proposals = contentAssistProcessor.computeCompletionProposals(viewer, 0); assertEquals(items.size(), proposals.length); LSIncompleteCompletionProposal LSIncompleteCompletionProposal = (LSIncompleteCompletionProposal) proposals[0]; LSIncompleteCompletionProposal.apply(viewer.getDocument()); assertEquals(new Point("FirstClass".length(), 0), LSIncompleteCompletionProposal.getSelection(viewer.getDocument())); }</code><technical_language>This change necessary</technical_language>

Target:
public void testAssistForUnknownButConnectedType() throws CoreException, InvocationTargetException, IOException, InterruptedException { List<CompletionItem> items = new ArrayList<>(); items.add(createCompletionItem("FirstClass", CompletionItemKind.Class)); MockLanguageServer.INSTANCE.setCompletionList(new CompletionList(true, items)); IFile testFile = TestUtils.createUniqueTestFileOfUnknownType(project, ""); ITextViewer viewer = TestUtils.openTextViewer(testFile); LanguageServerDefinition serverDefinition = LanguageServersRegistry.getInstance().getDefinition("org.eclipse.lsp4e.test.server"); assertNotNull(serverDefinition); IPath fileLocation = testFile.getLocation(); LanguageServerWrapper lsWrapperForConnection = LanguageServiceAccessor .getLSWrapperForConnection(testFile.getProject(), serverDefinition); lsWrapperForConnection.connect(testFile, null); new DisplayHelper() { @Override protected boolean condition() { return lsWrapperForConnection.isConnectedTo(fileLocation); } }.waitForCondition(Display.getCurrent(), 3000); ICompletionProposal[] proposals = contentAssistProcessor.computeCompletionProposals(viewer, 0); assertEquals(items.size(), proposals.length); LSIncompleteCompletionProposal LSIncompleteCompletionProposal = (LSIncompleteCompletionProposal) proposals[0]; LSIncompleteCompletionProposal.apply(viewer.getDocument()); assertEquals(new Point("FirstClass".length(), 0), LSIncompleteCompletionProposal.getSelection(viewer.getDocument())); }
Source:
<code>private void trySleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { <START> Thread.currentThread().interrupt(); <END> } }</code><technical_language>need figure out propagate interruptions, this a problem this method is called tryUpdate is recursive propagating means next attempts fail for reasons. need figure out retain fact interrupted propagate interruptions thing</technical_language>

Target:
private void trySleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { } }
Source:
<code>public void patch( @NotNull(message = "json can't be NULL") final JsonObject json ) throws IOException { final Issue.Smart smart = new Issue.Smart(this); <START> final boolean wasopen = smart.isOpen(); <END> new JsonPatch(this.storage).patch(this.xpath(), json); final boolean nowopen = smart.isOpen(); if (nowopen != wasopen) { final String type; if (nowopen) { type = Event.REOPENED; } else { type = Event.CLOSED; } new MkIssueEvents(this.storage, this.self, this.coords) .create(type, this.num, this.self, Optional.<String>absent()); } }</code><technical_language>@cvrebert avoid complex variable names rename</technical_language>

Target:
public void patch( @NotNull(message = "json can't be NULL") final JsonObject json ) throws IOException { final Issue.Smart smart = new Issue.Smart(this); final boolean was = smart.isOpen(); new JsonPatch(this.storage).patch(this.xpath(), json); final boolean now = smart.isOpen(); if (now != was) { final String type; if (now) { type = Event.REOPENED; } else { type = Event.CLOSED; } new MkIssueEvents(this.storage, this.self, this.coords) .create(type, this.num, this.self, Optional.<String>absent()); } }
Source:
<code>public static final boolean isValid(Phone phone) { try { PhoneNumber phoneNumber = PHONE_UTIL.parse(phone.getNumber(), phone.getRegionCode()); return PHONE_UTIL.isValidNumber(phoneNumber); } catch (Exception e) { } <START> return false; <END> }</code><technical_language>Unit tests for isValid? Also, cases throw Exception? Do want catch exceptions specific exceptions NumberFormatException</technical_language>

Target:
public static final boolean isValid(Phone phone) { checkNotNull(phone); try { PhoneNumber phoneNumber = PHONE_UTIL.parse(phone.getNumber(), phone.getRegionCode()); return PHONE_UTIL.isValidNumber(phoneNumber); } catch (NumberParseException e) { } return false; }
Source:
<code>public void analyze() { Stack<Integer> ignoreBlockBeginStack = new Stack<>(); for (Token comment : singleLineComments) { int lineNumber = comment.getLine(); String trimmedComment = comment.getText().trim(); if (trimmedComment.equals(DISABLE_LINE_PATTERN)) { printer.ignoreRegion(lineNumber, lineNumber); } if (trimmedComment.equals(TAILOR_OFF)) { ignoreBlockBeginStack.push(lineNumber); } else if (trimmedComment.equals(TAILOR_ON)) { if (ignoreBlockBeginStack.empty()) { printer.warn(Messages.ON_OFF_MISMATCH, new Location(comment.getLine(), comment.getCharPositionInLine() + 1)); return; } printer.ignoreRegion(ignoreBlockBeginStack.pop(), lineNumber); } <START> } <END> }</code><technical_language>print a warning if stack is empty end of analyze</technical_language>

Target:
public void analyze() { Stack<Integer> ignoreBlockBeginStack = new Stack<>(); Token lastSuppressViolationComment = null; for (Token comment : singleLineComments) { int lineNumber = comment.getLine(); String trimmedComment = comment.getText().trim(); if (trimmedComment.equals(DISABLE_LINE_PATTERN)) { printer.ignoreRegion(lineNumber, lineNumber); } if (trimmedComment.equals(TAILOR_OFF)) { ignoreBlockBeginStack.push(lineNumber); lastSuppressViolationComment = comment; } else if (trimmedComment.equals(TAILOR_ON)) { if (ignoreBlockBeginStack.empty()) { printOnOffMismatchWarning(comment); return; } printer.ignoreRegion(ignoreBlockBeginStack.pop(), lineNumber); lastSuppressViolationComment = comment; } } if (!ignoreBlockBeginStack.isEmpty() && lastSuppressViolationComment != null) { printOnOffMismatchWarning(lastSuppressViolationComment); } }
Source:
<code>public QueryDetail(String modelName) { this.modelName = modelName; queryText = new ArrayList<String>(); <START> queryText.add("Default Select Statement"); <END> }</code><technical_language>Remove</technical_language>

Target:
public QueryDetail(String modelName) { this.modelName = modelName; queryText = new ArrayList<String>(); queryText.add(""); }
Source:
<code>public String getGitHttpUrl() throws UnknownHostException { String httpListenUrl = getHttpListenUrl(); if (httpListenUrl == null) { return ""; } if (downloadSchemes.length != 0){ <START> if (!Arrays.asList(downloadSchemes).contains("http")) { <END> return ""; } } String httpUrl = Objects.firstNonNull(canonicalWebUrlString, httpListenUrl); httpUrl = httpUrl.replace("://", "://" + GITBLIT_USER + "@"); httpUrl += (httpUrl.endsWith("/") ? "" : "/") + GITBLIT_REPO; return httpUrl; }</code><technical_language>here: if(!downloadSchemes.isEmpty() && !downloadSchemes.contains("http"))</technical_language>

Target:
public String getGitHttpUrl() throws UnknownHostException { String httpListenUrl = getHttpListenUrl(); if (httpListenUrl == null) { return ""; } if (!downloadSchemes.isEmpty() && !downloadSchemes.contains("http")) { return ""; } String httpUrl = Objects.firstNonNull(canonicalWebUrlString, httpListenUrl); httpUrl = httpUrl.replace("://", "://" + GITBLIT_USER + "@"); httpUrl += (httpUrl.endsWith("/") ? "" : "/") + GITBLIT_REPO; return httpUrl; }
Source:
<code>private void addArchetypesPerspective() { if (hasAccessToPerspective(PerspectiveIds.ARCHETYPE_MANAGEMENT)) { adminPage.addTool("root", constants.Archetypes(), new Sets.Builder().add("fa").add("fa-file-code-o").build(), <START> "advanced", <END> () -> { final Command accessArchetypeMgmt = () -> placeManager.goTo(PerspectiveIds.ARCHETYPE_MANAGEMENT); accessArchetypeMgmt.execute(); addAdminBreadcrumbs(PerspectiveIds.ARCHETYPE_MANAGEMENT, constants.Archetypes(), accessArchetypeMgmt); }); } }</code><technical_language>Define a constant for literal "advanced".It is 3 times in file</technical_language>

Target:
private void addArchetypesPerspective() { if (hasAccessToPerspective(PerspectiveIds.ARCHETYPE_MANAGEMENT)) { adminPage.addTool("root", constants.Archetypes(), new Sets.Builder().add("fa").add("fa-file-code-o").build(), ADVANCED_CATEGORY, () -> { final Command accessArchetypeMgmt = () -> placeManager.goTo(PerspectiveIds.ARCHETYPE_MANAGEMENT); accessArchetypeMgmt.execute(); addAdminBreadcrumbs(PerspectiveIds.ARCHETYPE_MANAGEMENT, constants.Archetypes(), accessArchetypeMgmt); }); } }
Source:
<code>public CanonicalizeExpressions() { <START> super((expression, context) -> ExpressionTreeRewriter.rewriteWith(new CanonicalizeExpressionRewriter(), expression)); <END> }</code><technical_language>simply canonicalizeExpression here? If do a method deprecated class, expose rewriter class separate entity</technical_language>

Target:
public CanonicalizeExpressions() { super((expression, context) -> CanonicalizeExpressionRewriter.rewrite(expression)); }
Source:
<code><START> public synchronized void mark(int readlimit) { <END> if (mark >= 0) { discardMark(); } this.mark = position; this.markLimit = mark + readlimit + 1; if (current != null) { markBuffers.add(current.duplicate()); } }</code><technical_language>This class is thread safe. synchronized is unnecessary I is misleading</technical_language>

Target:
public void mark(int readlimit) { if (mark >= 0) { discardMark(); } this.mark = position; this.markLimit = mark + readlimit + 1; if (current != null) { markBuffers.add(current.duplicate()); } }
Source:
<code>public void onRecipientChange(Recipient recipientToReplace, Recipient alternateAddress) { alternatesPopup.dismiss(); List<Recipient> currentRecipients = getObjects(); <START> int indexOfRecipient = currentRecipients.indexOf(alternateAddress); <END> if (indexOfRecipient == -1) { Log.e(K9.LOG_TAG, "Tried to refresh invalid view token!"); return; } Recipient currentRecipient = currentRecipients.get(indexOfRecipient); currentRecipient.address = alternateAddress.address; currentRecipient.addressLabel = alternateAddress.addressLabel; currentRecipient.cryptoStatus = alternateAddress.cryptoStatus; View recipientTokenView = getTokenViewForRecipient(currentRecipient); if (recipientTokenView == null) { Log.e(K9.LOG_TAG, "Tried to refresh invalid view token!"); return; } bindObjectView(currentRecipient, recipientTokenView); if (listener != null) { listener.onTokenChanged(currentRecipient); } invalidate(); }</code><technical_language>alternateAddress new address? indexOf() return -1 address in recipient list</technical_language>

Target:
public void onRecipientChange(Recipient recipientToReplace, Recipient alternateAddress) { alternatesPopup.dismiss(); List<Recipient> currentRecipients = getObjects(); int indexOfRecipient = currentRecipients.indexOf(recipientToReplace); if (indexOfRecipient == -1) { Log.e(K9.LOG_TAG, "Tried to refresh invalid view token!"); return; } Recipient currentRecipient = currentRecipients.get(indexOfRecipient); currentRecipient.address = alternateAddress.address; currentRecipient.addressLabel = alternateAddress.addressLabel; currentRecipient.cryptoStatus = alternateAddress.cryptoStatus; View recipientTokenView = getTokenViewForRecipient(currentRecipient); if (recipientTokenView == null) { Log.e(K9.LOG_TAG, "Tried to refresh invalid view token!"); return; } bindObjectView(currentRecipient, recipientTokenView); if (listener != null) { listener.onTokenChanged(currentRecipient); } invalidate(); }
Source:
<code>public void adjustAttributes(String tag, Map attributes) { if (tag.equals("body") && attributes.get(XMLLump.ID_ATTRIBUTE) == null) { attributes.put(XMLLump.ID_ATTRIBUTE, XMLLump.SCR_PREFIX + SAKAI_BODY); } <START> else if (tag.equals(SCRIPT) && attributes.get(SRC)!=null && !((String)attributes.get(SRC)).contains(VERSION)) { <END> attributes.put(SRC, attributes.get(SRC) + PortalUtils.getCDNQuery()); } else if (tag.equals(LINK) && attributes.get(HREF)!=null && !((String)attributes.get(HREF)).contains(VERSION)) { attributes.put(HREF, attributes.get(HREF) + PortalUtils.getCDNQuery()); } }</code><technical_language>check is if contains query parameters getCDNQuery() append ?expire=1234. if URL contains query parameters URL bad (question marks)</technical_language>

Target:
public void adjustAttributes(String tag, Map attributes) { if (tag.equals("body") && attributes.get(XMLLump.ID_ATTRIBUTE) == null) { attributes.put(XMLLump.ID_ATTRIBUTE, XMLLump.SCR_PREFIX + SAKAI_BODY); } else if (tag.equals(SCRIPT) && attributes.get(SRC)!=null && !((String)attributes.get(SRC)).contains(QUESTION_MARK)) { attributes.put(SRC, attributes.get(SRC) + PortalUtils.getCDNQuery()); } else if (tag.equals(LINK) && attributes.get(HREF)!=null && !((String)attributes.get(HREF)).contains(QUESTION_MARK)) { attributes.put(HREF, attributes.get(HREF) + PortalUtils.getCDNQuery()); } }
Source:
<code>public HttpRequestBuilder withHeader(String header, String value) { if (headers == null) { headers = new Properties(); } <START> <END> headers.put(header, value); return this; }</code><technical_language>invariants (Objects#requireNonNull(..) JDT Annotations)</technical_language>

Target:
public HttpRequestBuilder withHeader(String header, String value) { Properties localHeaders = headers; if (localHeaders == null) { headers = new Properties(); localHeaders = headers; } localHeaders.put(header, value); return this; }
Source:
<code>protected CompiledPlan compileAdHocCalcitePlan(String sql, boolean inferPartitioning, boolean forcedSP, DeterminismMode detMode) { CompiledPlan cp = null; try { cp = m_aide.compileAdHocPlan(PlannerType.CALCITE, sql, inferPartitioning, forcedSP, detMode); <START> assertTrue(cp != null); <END> } catch (Exception ex) { ex.printStackTrace(); fail(); } return cp; }</code><technical_language>assertNotNull</technical_language>

Target:
protected CompiledPlan compileAdHocCalcitePlan(String sql, boolean inferPartitioning, boolean forcedSP, DeterminismMode detMode) { CompiledPlan cp = null; try { cp = m_aide.compileAdHocPlan(PlannerType.CALCITE, sql, inferPartitioning, forcedSP, detMode); assertNotNull(cp); } catch (Exception ex) { fail(ex.getMessage()); } return cp; }
Source:
<code>private int run0() throws InterruptedException, DockerException { Thread.sleep(delayMillis); final String containerId = createAndStartContainer(); listener.running(); serviceRegistrationHandle = Optional.fromNullable(registrar.register(config.registration())); final ContainerExit exit; try { exit = docker.waitContainer(containerId); } finally { <START> if (serviceRegistrationHandle.isPresent()) { <END> unregister(); } } log.info("container exited: {}: {}: {}", config, containerId, exit.statusCode()); listener.exited(exit.statusCode()); return exit.statusCode(); }</code><technical_language>unregister() isPresent() check, unconditionally call here</technical_language>

Target:
private int run0() throws InterruptedException, DockerException { Thread.sleep(delayMillis); final String containerId = createAndStartContainer(); listener.running(); serviceRegistrationHandle = Optional.fromNullable(registrar.register(config.registration())); final ContainerExit exit; try { exit = docker.waitContainer(containerId); } finally { unregister(); } log.info("container exited: {}: {}: {}", config, containerId, exit.statusCode()); listener.exited(exit.statusCode()); return exit.statusCode(); }
Source:
<code>public void createKeyRotationSchedule( String projectId, String locationId, String keyRingId, String id) throws IOException { try (KeyManagementServiceClient client = KeyManagementServiceClient.create()) { KeyRingName keyRingName = KeyRingName.of(projectId, locationId, keyRingId); long tomorrow = java.time.Instant.now().plus(24, ChronoUnit.HOURS).getEpochSecond(); CryptoKey key = CryptoKey.newBuilder() .setPurpose(CryptoKeyPurpose.ENCRYPT_DECRYPT) .setVersionTemplate( CryptoKeyVersionTemplate.newBuilder() .setAlgorithm(CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION)) .setRotationPeriod( <START> Duration.newBuilder().setSeconds(java.time.Duration.ofHours(24).getSeconds())) <END> .setNextRotationTime(Timestamp.newBuilder().setSeconds(tomorrow)) .build(); CryptoKey createdKey = client.createCryptoKey(keyRingName, id, key); System.out.printf("Created key with rotation schedule %s%n", createdKey.getName()); } }</code><technical_language>This "Rotate 30 days", a duration of 24 hours. Is correct</technical_language>

Target:
public void createKeyRotationSchedule( String projectId, String locationId, String keyRingId, String id) throws IOException { try (KeyManagementServiceClient client = KeyManagementServiceClient.create()) { KeyRingName keyRingName = KeyRingName.of(projectId, locationId, keyRingId); long tomorrow = java.time.Instant.now().plus(24, ChronoUnit.HOURS).getEpochSecond(); CryptoKey key = CryptoKey.newBuilder() .setPurpose(CryptoKeyPurpose.ENCRYPT_DECRYPT) .setVersionTemplate( CryptoKeyVersionTemplate.newBuilder() .setAlgorithm(CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION)) .setRotationPeriod( Duration.newBuilder().setSeconds(java.time.Duration.ofDays(30).getSeconds())) .setNextRotationTime(Timestamp.newBuilder().setSeconds(tomorrow)) .build(); CryptoKey createdKey = client.createCryptoKey(keyRingName, id, key); System.out.printf("Created key with rotation schedule %s%n", createdKey.getName()); } }
Source:
<code><START> public void init() { <END> if (dubboConfigBinder == null) { try { dubboConfigBinder = applicationContext.getBean(DubboConfigBinder.class); } catch (BeansException ignored) { if (log.isDebugEnabled()) { log.debug("DubboConfigBinder Bean can't be found in ApplicationContext."); } dubboConfigBinder = createDubboConfigBinder(applicationContext.getEnvironment()); } } dubboConfigBinder.setIgnoreUnknownFields(ignoreUnknownFields); dubboConfigBinder.setIgnoreInvalidFields(ignoreInvalidFields); }</code><technical_language>If allow create class of this **DubboConfigBindingBeanPostProcessor ** some **init method** get override issue. init final provide. do say</technical_language>

Target:
private void init() { if (dubboConfigBinder == null) { try { dubboConfigBinder = applicationContext.getBean(DubboConfigBinder.class); } catch (BeansException ignored) { if (log.isDebugEnabled()) { log.debug("DubboConfigBinder Bean can't be found in ApplicationContext."); } dubboConfigBinder = createDubboConfigBinder(applicationContext.getEnvironment()); } } dubboConfigBinder.setIgnoreUnknownFields(ignoreUnknownFields); dubboConfigBinder.setIgnoreInvalidFields(ignoreInvalidFields); }
Source:
<code>private boolean connectStorageServer(StorageType storageType, List<StorageServerConnections> connections, boolean sendNetworkEventOnFailure) { <START> if (connections == null) { <END> return true; } StorageServerConnectionManagementVDSParameters parameters = new StorageServerConnectionManagementVDSParameters(getVds().getId(), getStoragePool().getId(), storageType, connections); parameters.setSendNetworkEventOnFailure(sendNetworkEventOnFailure); Map<String, String> retValues = (Map<String, String>) runVdsCommand( VDSCommandType.ConnectStorageServer, parameters).getReturnValue(); return storageHelperDirector.getItem(storageType).isConnectSucceeded(retValues, connections); }</code><technical_language>want check connections is empty</technical_language>

Target:
private boolean connectStorageServer(StorageType storageType, List<StorageServerConnections> connections, boolean sendNetworkEventOnFailure) { if (connections == null || connections.isEmpty()) { return true; } StorageServerConnectionManagementVDSParameters parameters = new StorageServerConnectionManagementVDSParameters(getVds().getId(), getStoragePool().getId(), storageType, connections); parameters.setSendNetworkEventOnFailure(sendNetworkEventOnFailure); Map<String, String> retValues = (Map<String, String>) runVdsCommand( VDSCommandType.ConnectStorageServer, parameters).getReturnValue(); return storageHelperDirector.getItem(storageType).isConnectSucceeded(retValues, connections); }
Source:
<code>public static LimitOrder createLimitOrder(MarketOrder marketOrder, DSXExchangeInfo dsxExchangeInfo) { DSXPairInfo dsxPairInfo = dsxExchangeInfo.getPairs().get(getPair(marketOrder.getCurrencyPair())); BigDecimal limitPrice = marketOrder.getType() == OrderType.BID ? dsxPairInfo.getMaxPrice() : dsxPairInfo.getMinPrice(); <START> return LimitOrder.Builder.from(marketOrder).limitPrice(limitPrice).timestamp(new Date()).build(); <END> }</code><technical_language>timestamp null if is server. This standard convention in XChange day one</technical_language>

Target:
public static LimitOrder createLimitOrder(MarketOrder marketOrder, DSXExchangeInfo dsxExchangeInfo) { DSXPairInfo dsxPairInfo = dsxExchangeInfo.getPairs().get(getPair(marketOrder.getCurrencyPair())); BigDecimal limitPrice = marketOrder.getType() == OrderType.BID ? dsxPairInfo.getMaxPrice() : dsxPairInfo.getMinPrice(); return LimitOrder.Builder.from(marketOrder).limitPrice(limitPrice).build(); }
Source:
<code>public void verifyTheLocksAreClearedWhenMemberDepartsAfterTakingClearLockOnRemoteMembers() throws Exception { client1.invoke(this::initClientCache); client2.invoke(this::initClientCache); accessor.invoke(() -> feed(false)); verifyServerRegionSize(NUM_ENTRIES); dataStore2.invoke(() -> DistributionMessageObserver.setInstance( testHookToKillMemberCallingClearBeforeMessageProcessed())); AsyncInvocation ds1ClearAsync = dataStore1.invokeAsync(() -> getRegion(false).clear()); <START> getBlackboard().waitForGate("CacheClose", 30, SECONDS); <END> dataStore1.invoke(() -> getCache().close()); getBlackboard().signalGate("CacheClosed"); dataStore2.invoke(() -> feed(false)); dataStore3.invoke(() -> feed(false)); dataStore2.invoke(() -> verifyRegionSize(false, NUM_ENTRIES)); dataStore3.invoke(() -> verifyRegionSize(false, NUM_ENTRIES)); ds1ClearAsync.await(); }</code><technical_language>gate names "CacheClose" "CacheClosed" similar. extract strings constants names START_CACHE_CLOSE CACHE_CLOSE_COMPLETE similarly descriptive</technical_language>

Target:
public void verifyTheLocksAreClearedWhenMemberDepartsAfterTakingClearLockOnRemoteMembers() throws Exception { client1.invoke(this::initClientCache); client2.invoke(this::initClientCache); accessor.invoke(() -> feed(false)); verifyServerRegionSize(NUM_ENTRIES); dataStore2.invoke(() -> DistributionMessageObserver.setInstance( testHookToKillMemberCallingClearBeforeMessageProcessed())); AsyncInvocation ds1ClearAsync = dataStore1.invokeAsync(() -> getRegion(false).clear()); getBlackboard().waitForGate("CLOSE_CACHE", 30, SECONDS); dataStore1.invoke(() -> getCache().close()); getBlackboard().signalGate("CACHE_CLOSED"); dataStore2.invoke(() -> feed(false)); dataStore3.invoke(() -> feed(false)); dataStore2.invoke(() -> verifyRegionSize(false, NUM_ENTRIES)); dataStore3.invoke(() -> verifyRegionSize(false, NUM_ENTRIES)); ds1ClearAsync.await(); }
Source:
<code>public void invalidWhenOnly11Digits() { <START> final String actualNumber = new PhoneNumber("21234567890").getNumber(); <END> }</code><technical_language>need a variable again. do <code>new PhoneNumber("21234567890").getNumber()</code> :)</technical_language>

Target:
public void invalidWhenOnly11Digits() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Can only have 11 digits if number starts with '1'"); new PhoneNumber("21234567890").getNumber(); }
Source:
<code>public void onCreate(Bundle savedInstanceState) { <START> if (DEVELOPER_MODE) { <END> StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectDiskReads() .detectDiskWrites().detectNetwork().penaltyLog().build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectLeakedSqlLiteObjects() .detectAll().penaltyLog().penaltyDeath().build()); } super.onCreate(savedInstanceState); initData(); initUi(); }</code><technical_language>I set StrictMode in Application</technical_language>

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initData(); initUi(); }
Source:
<code><START> public static RyaStatement deserializeTriple(final Bytes row) { <END> final byte[] rowArray = removeTriplePrefixAndConvertToByteArray(row); RyaStatement rs = null; try { rs = tr.deserialize(TABLE_LAYOUT.SPO, new TripleRow(rowArray, new byte[0], new byte[0])); } catch (final TripleRowResolverException e) { e.printStackTrace(); } return rs; }</code><technical_language>requireNonNull(row);</technical_language>

Target:
public static RyaStatement deserializeTriple(final Bytes row) { checkNotNull(row); final byte[] rowArray = removeTriplePrefixAndConvertToByteArray(row); RyaStatement rs = null; try { rs = tr.deserialize(TABLE_LAYOUT.SPO, new TripleRow(rowArray, new byte[0], new byte[0])); } catch (final TripleRowResolverException e) { e.printStackTrace(); } return rs; }