auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected PageRec doCreatePage(IWorkbenchPart dummyPart) { DebuggerConsoleWorkbenchPart part = (DebuggerConsoleWorkbenchPart)dummyPart; IDebuggerConsole console = fPartToConsole.get(part); IPageBookViewPage page = console.createDebuggerPage(this); initPage(page); page.createControl(getPageBook()); console.addPropertyChangeListener(this); IConsolePageParticipant[] consoleParticipants = ((DebuggerConsoleManager)getConsoleManager()).getPageParticipants(console); final ListenerList<IConsolePageParticipant> participants = new ListenerList<>(); for (int i = 0; i < consoleParticipants.length; i++) { participants.add(consoleParticipants[i]); } fConsoleToPageParticipants.put(console, participants); for (IConsolePageParticipant iConsolePageParticipant : participants) { final IConsolePageParticipant participant = iConsolePageParticipant; SafeRunner.run(new ISafeRunnable() { @Override public void run() throws Exception { participant.init(page, console); } @Override public void handleException(Throwable exception) { CDebugUIPlugin.log(exception); participants.remove(participant); } }); } return new PageRec(dummyPart, page); }

Target:
protected PageRec doCreatePage(IWorkbenchPart dummyPart) { DebuggerConsoleWorkbenchPart part = (DebuggerConsoleWorkbenchPart)dummyPart; IDebuggerConsole console = fPartToConsole.get(part); IPageBookViewPage page = console.createDebuggerPage(this); initPage(page); page.createControl(getPageBook()); console.addPropertyChangeListener(this); IConsolePageParticipant[] consoleParticipants = ((DebuggerConsoleManager)getConsoleManager()).getPageParticipants(console); final ListenerList<IConsolePageParticipant> participants = new ListenerList<>(); for (int i = 0; i < consoleParticipants.length; i++) { participants.add(consoleParticipants[i]); } fConsoleToPageParticipants.put(console, participants); for (IConsolePageParticipant participant : participants) { SafeRunner.run(new ISafeRunnable() { @Override public void run() throws Exception { participant.init(page, console); } @Override public void handleException(Throwable exception) { CDebugUIPlugin.log(exception); participants.remove(participant); } }); } return new PageRec(dummyPart, page); }
Source:
@Override public boolean isPlayer() { return false; }

Target:
public boolean isPlayer() { return false; }
Source:
void recordIoException(String serviceName, String hostname, int port) { try { hostMetrics.getUnchecked(ImmutableServiceHostAndPort.of(serviceName, hostname, port)).recordIoException(); } catch (Exception e) { log.warn("Unable to record IO exception for host and url", UnsafeArg.of("hostname", hostname), UnsafeArg.of("url", port)); } }

Target:
void recordIoException(String serviceName, String hostname, int port) { try { hostMetrics.getUnchecked(ImmutableServiceHostAndPort.of(serviceName, hostname, port)).recordIoException(); } catch (Exception e) { log.warn("Unable to record IO exception for host and port", UnsafeArg.of("hostname", hostname), SafeArg.of("port", port)); } }
Source:
public List<SymbolicValue> peekValues(int n) { if (n > stack.size()) { throw new IllegalStateException("At least " + n + " values were expected on the stack!"); } final ArrayList<SymbolicValue> result = new ArrayList<>(stack); return result.subList(0, n); }

Target:
public List<SymbolicValue> peekValues(int n) { if (n > stack.size()) { throw new IllegalStateException("At least " + n + " values were expected on the stack!"); } return ImmutableList.copyOf(stack).subList(0, n); }
Source:
public List<Failure> getFailures() { return failures.stream().collect(Collectors.toList()); }

Target:
public List<TestExecutionSummary.Failure> getFailures() { return new ArrayList<>(failures); }
Source:
public SelectionWizardDescription createSelectionWizardDescription() { SelectionWizardDescriptionImpl selectionWizardDescription = new SelectionWizardDescriptionImpl(); return selectionWizardDescription; }

Target:
public SelectionWizardDescription createSelectionWizardDescription() { SelectionWizardDescriptionImpl selectionWizardDescription = new SelectionWizardDescriptionImpl(); ElementSelectVariable elementSelectVariable = this.createElementSelectVariable(); elementSelectVariable.setName("element"); ContainerViewVariable containerViewVariable = this.createContainerViewVariable(); containerViewVariable.setName("containerView"); SelectContainerVariable selectContainerVariable = this.createSelectContainerVariable(); selectContainerVariable.setName("container"); selectionWizardDescription.setElement(elementSelectVariable); selectionWizardDescription.setContainer(selectContainerVariable); selectionWizardDescription.setContainerView(containerViewVariable); InitialOperation initialOperation = this.createInitialOperation(); selectionWizardDescription.setInitialOperation(initialOperation); return selectionWizardDescription; }
Source:
void checkMismatch(Object expectedReceiver, List<String> expectedMethodNames) { String expectedMethodName = expectedMethodNames.get(0); if (expectedReceiver instanceof MetaClass && expectedMethodName.equals("invokeMethod")) { return; } if (expectedReceiver instanceof GroovyShell && expectedMethodName.equals("evaluate")) { return; } if(methodName.equals("methodMissing")){ return; } if (!expectedMethodNames.contains(methodName)) { MismatchHandler handler = handlers.get(); if (handler != null) { handler.handle(expectedReceiver, expectedMethodName, receiver, methodName); } } }

Target:
void checkMismatch(Object expectedReceiver, List<String> expectedMethodNames) { String expectedMethodName = expectedMethodNames.get(0); if (expectedReceiver instanceof MetaClass && expectedMethodName.equals("invokeMethod")) { return; } if(methodName.equals("methodMissing")){ return; } if (!expectedMethodNames.contains(methodName)) { MismatchHandler handler = handlers.get(); if (handler != null) { handler.handle(expectedReceiver, expectedMethodName, receiver, methodName); } } }
Source:
public void ignore_other_resolutions() { Multimap<String, NotificationChannel> recipients = HashMultimap.create(); recipients.put("simon", emailChannel); recipients.put("freddy", twitterChannel); when(notifications.findSubscribedRecipientsForDispatcher(underTest, "struts")).thenReturn(recipients); Notification fixedNotif = new IssueChangeNotification().setFieldValue("projectKey", "struts") .setFieldValue("changeAuthor", "godin") .setFieldValue("new.resolution", Issue.RESOLUTION_FIXED) .setFieldValue("assignee", "freddy"); underTest.performDispatch(fixedNotif, context); verifyZeroInteractions(context); }

Target:
public void ignore_other_resolutions() { Notification fixedNotif = new IssueChangeNotification().setFieldValue("projectKey", "struts") .setFieldValue("changeAuthor", "godin") .setFieldValue("new.resolution", Issue.RESOLUTION_FIXED) .setFieldValue("assignee", "freddy"); underTest.performDispatch(fixedNotif, context); verifyZeroInteractions(context); }
Source:
public void loadXmlFromBase64(String responseStr) throws Exception { Base64 base64 = new Base64(); byte[] decodedB = base64.decode(responseStr); this.response = new String(decodedB); this.document = Utils.loadXML(this.response); if(this.document == null){ } }

Target:
public void loadXmlFromBase64(String responseStr) throws Exception { Base64 base64 = new Base64(); byte[] decodedB = base64.decode(responseStr); this.response = new String(decodedB); this.document = Utils.loadXML(this.response); if(this.document == null){ throw new Exception("SAML Response could not be processed"); } }
Source:
public static AbstractTopology updateTopologyToZK(ZooKeeper zk, AbstractTopology topology) { try { Stat stat = new Stat(); zk.getData(VoltZK.topology, false, stat); byte[] payload = topology.topologyToJSON().toString().getBytes(Charsets.UTF_8); zk.setData(VoltZK.topology, payload, stat.getVersion()); return readTopologyFromZK(zk); } catch (Exception e) { VoltDB.crashLocalVoltDB("Unable to read topology from ZK, dying", true, e); } return topology; }

Target:
public static void updateTopologyToZK(ZooKeeper zk, AbstractTopology topology) { Stat stat = new Stat(); try { zk.getData(VoltZK.topology, false, stat); byte[] payload = topology.topologyToJSON().toString().getBytes(Charsets.UTF_8); zk.setData(VoltZK.topology, payload, stat.getVersion()); } catch (KeeperException | InterruptedException | JSONException e) { VoltDB.crashLocalVoltDB("Unable to update topology to ZK, dying", true, e); } }
Source:
public Status read( final String table, final String key, final Set<String> fields, final Map<String, ByteIterator> result) { try { final Response searchResponse = search(table, key); final int statusCode = searchResponse.getStatusLine().getStatusCode(); if (statusCode == 404) { return Status.NOT_FOUND; } else if (statusCode != 200) { return Status.ERROR; } final Map<String, Object> map = map(searchResponse); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>)map.get("hits"); final int total = (int)hits.get("total"); if (total == 0) { return Status.NOT_FOUND; } @SuppressWarnings("unchecked") final Map<String, Object> hit = (Map<String, Object>)((List<Object>)hits.get("hits")).get(0); @SuppressWarnings("unchecked") final Map<String, Object> source = (Map<String, Object>)hit.get("_source"); if (fields != null) { for (final String field : fields) { result.put(field, new StringByteIterator((String) source.get(field))); } } else { for (final Map.Entry<String, Object> e : source.entrySet()) { if (KEY.equals(e.getKey())) { continue; } result.put(e.getKey(), new StringByteIterator((String) e.getValue())); } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } }

Target:
public Status read( final String table, final String key, final Set<String> fields, final Map<String, ByteIterator> result) { try { final Response searchResponse = search(table, key); final int statusCode = searchResponse.getStatusLine().getStatusCode(); if (statusCode == 404) { return Status.NOT_FOUND; } else if (statusCode != HttpStatus.SC_OK) { return Status.ERROR; } final Map<String, Object> map = map(searchResponse); @SuppressWarnings("unchecked") final Map<String, Object> hits = (Map<String, Object>)map.get("hits"); final int total = (int)hits.get("total"); if (total == 0) { return Status.NOT_FOUND; } @SuppressWarnings("unchecked") final Map<String, Object> hit = (Map<String, Object>)((List<Object>)hits.get("hits")).get(0); @SuppressWarnings("unchecked") final Map<String, Object> source = (Map<String, Object>)hit.get("_source"); if (fields != null) { for (final String field : fields) { result.put(field, new StringByteIterator((String) source.get(field))); } } else { for (final Map.Entry<String, Object> e : source.entrySet()) { if (KEY.equals(e.getKey())) { continue; } result.put(e.getKey(), new StringByteIterator((String) e.getValue())); } } return Status.OK; } catch (final Exception e) { e.printStackTrace(); return Status.ERROR; } }
Source:
private void loadSegments(File[] segmentFiles, long totalCapacity) throws IOException { long totalSegments = -1; for (File segmentFile : segmentFiles) { String name = LogSegmentNameHelper.nameFromFilename(segmentFile.getName()); LogSegment segment; if (name.isEmpty()) { totalSegments = 1; segment = new LogSegment(name, segmentFile, totalCapacity, metrics, false); } else { segment = new LogSegment(name, segmentFile, metrics); totalSegments = totalSegments == -1 ? totalCapacity / segment.getCapacityInBytes() : totalSegments; } segmentsByName.put(segment.getName(), segment); } remainingUnallocatedSegments = totalSegments - segmentsByName.size(); }

Target:
private void loadSegments(File[] segmentFiles, long totalCapacity) throws IOException { long totalSegments = -1; for (File segmentFile : segmentFiles) { String name = LogSegmentNameHelper.nameFromFilename(segmentFile.getName()); logger.info("Loading segment with name [{}]", name); LogSegment segment; if (name.isEmpty()) { totalSegments = 1; segment = new LogSegment(name, segmentFile, totalCapacity, metrics, false); } else { segment = new LogSegment(name, segmentFile, metrics); totalSegments = totalSegments == -1 ? totalCapacity / segment.getCapacityInBytes() : totalSegments; } logger.info("Segment has capacity of bytes", name, segment.getCapacityInBytes()); segmentsByName.put(segment.getName(), segment); } remainingUnallocatedSegments = totalSegments - segmentsByName.size(); }
Source:
public FeatureIterator(final File inputFile, final FeatureCodec<FEATURE_TYPE, SOURCE> codec) { if (inputFile == null) { throw new IllegalArgumentException("FeatureIterator input file cannot be null"); } this.codec = codec; final String file_path = codec.getPathToDataFile(inputFile.getAbsolutePath()); this.inputFile = new File(file_path.replaceFirst("^file://", "")); try { if (IOUtil.hasBlockCompressedExtension(this.inputFile)) { final BlockCompressedInputStream bcs = initIndexableBlockCompressedStream(this.inputFile); source = (SOURCE) codec.makeIndexableSourceFromStream(bcs); } else { final PositionalBufferedStream ps = initIndexablePositionalStream(this.inputFile); source = (SOURCE) codec.makeIndexableSourceFromStream(ps); } this.codec.readHeader(source); readNextFeature(); } catch (final IOException e) { throw new TribbleException.InvalidHeader("Error reading header " + e.getMessage()); } }

Target:
public FeatureIterator(final File inputFile, final FeatureCodec<FEATURE_TYPE, SOURCE> codec) { if (inputFile == null) { throw new IllegalArgumentException("FeatureIterator input file cannot be null"); } this.codec = codec; final String filePath = codec.getPathToDataFile(inputFile.getAbsolutePath()); try { this.inputFile = IOUtil.getPath(filePath).toFile(); } catch (final IOException e) { throw new TribbleException("Failed while constructing a FeatureIterator due to a problem converting String to Path", e); } try { if (IOUtil.hasBlockCompressedExtension(this.inputFile)) { final BlockCompressedInputStream bcs = initIndexableBlockCompressedStream(this.inputFile); source = (SOURCE) codec.makeIndexableSourceFromStream(bcs); } else { final PositionalBufferedStream ps = initIndexablePositionalStream(this.inputFile); source = (SOURCE) codec.makeIndexableSourceFromStream(ps); } this.codec.readHeader(source); readNextFeature(); } catch (final IOException e) { throw new TribbleException.InvalidHeader("Error reading header " + e.getMessage()); } }
Source:
public void onError(List<KubernetesConfigMap> configMaps) { synchronized (lock) { if (running) { fatalErrorHandler.onFatalError(new Exception("Error while watching the ConfigMap " + configMapName)); } } }

Target:
public void onError(List<KubernetesConfigMap> configMaps) { fatalErrorHandler.onFatalError( new LeaderRetrievalException("Error while watching the ConfigMap " + configMapName)); }
Source:
public DAnalysis getDAnalysis() { DAnalysis dAnalysis = null; DRepresentation representation = getRepresentation().get(); if (representation != null) { DRepresentationDescriptor representationDescriptor = new DRepresentationQuery(representation).getRepresentationDescriptor(); EObject rootContainer = EcoreUtil.getRootContainer(representationDescriptor, false); if (rootContainer instanceof DAnalysis) { dAnalysis = (DAnalysis) rootContainer; } } return dAnalysis; }

Target:
public DAnalysis getDAnalysis() { DAnalysis dAnalysis = null; Option<DRepresentation> representation = getRepresentation(); if (representation.some()) { DRepresentationDescriptor representationDescriptor = new DRepresentationQuery(representation.get()).getRepresentationDescriptor(); EObject rootContainer = EcoreUtil.getRootContainer(representationDescriptor, false); if (rootContainer instanceof DAnalysis) { dAnalysis = (DAnalysis) rootContainer; } } return dAnalysis; }
Source:
default T findElementByCustom(String selector) { return findElement(MobileSelector.IMAGE.toString(), selector); }

Target:
default T findElementByCustom(String selector) { return findElement(MobileSelector.CUSTOM.toString(), selector); }
Source:
protected void rerunInternal() { Guid vdsId = getDestinationVds() != null ? getDestinationVds().getId() : getCurrentVdsId(); DecreasePendingVms(vdsId); setSucceeded(false); setVm(null); if (getRunVdssList().size() < Config.<Integer> GetValue(ConfigValues.MaxRerunVmOnVdsCount) && getVm().getstatus() != VMStatus.Paused) { _isRerun = true; getReturnValue().setCanDoAction(false); log(); Job job = getExecutionContext().getJob(); if (job != null) { JobRepositoryFactory.getJobRepository().closeCompletedJobSteps(job.getId(), JobExecutionStatus.FAILED); } ExecuteAction(); if (!getReturnValue().getCanDoAction()) { _isRerun = false; log(); FailedToRunVm(); } } else { Backend.getInstance().getResourceManager().RemoveAsyncRunningCommand(getVmId()); FailedToRunVm(); _isRerun = false; } }

Target:
protected void rerunInternal() { Guid vdsId = getDestinationVds() != null ? getDestinationVds().getId() : getCurrentVdsId(); DecreasePendingVms(vdsId); setSucceeded(false); setVm(null); if (getRunVdssList().size() < Config.<Integer> GetValue(ConfigValues.MaxRerunVmOnVdsCount) && getVm().getstatus() != VMStatus.Paused) { _isRerun = true; getReturnValue().setCanDoAction(false); log(); if (getExecutionContext() != null) { Job job = getExecutionContext().getJob(); if (job != null) { JobRepositoryFactory.getJobRepository().closeCompletedJobSteps(job.getId(), JobExecutionStatus.FAILED); } } ExecuteAction(); if (!getReturnValue().getCanDoAction()) { _isRerun = false; log(); FailedToRunVm(); } } else { Backend.getInstance().getResourceManager().RemoveAsyncRunningCommand(getVmId()); FailedToRunVm(); _isRerun = false; } }
Source:
public Message<?> receive() { Deque<ChannelInterceptor> interceptorStack = new ArrayDeque<ChannelInterceptor>(); try { if (!this.getInterceptors().preReceive(this, interceptorStack)) { return null; } Object object = this.getAmqpTemplate().receiveAndConvert(this.queueName); if (object == null) { return null; } Message<?> replyMessage = null; if (object instanceof Message<?>) { replyMessage = (Message<?>) object; } else { replyMessage = this.getMessageBuilderFactory().withPayload(object).build(); } replyMessage = this.getInterceptors().postReceive(replyMessage, this); this.getInterceptors().afterReceiveCompletion(replyMessage, this, null, interceptorStack); return replyMessage; } catch (RuntimeException e) { this.getInterceptors().afterReceiveCompletion(null, this, e, interceptorStack); throw e; } }

Target:
public Message<?> receive() { ChannelInterceptorList interceptorList = getInterceptors(); Deque<ChannelInterceptor> interceptorStack = null; try { if (interceptorList.getInterceptors().size() > 0) { interceptorStack = new ArrayDeque<ChannelInterceptor>(); if (!interceptorList.preReceive(this, interceptorStack)) { return null; } } Object object = getAmqpTemplate().receiveAndConvert(this.queueName); if (object == null) { return null; } Message<?> message = null; if (object instanceof Message<?>) { message = (Message<?>) object; } else { message = getMessageBuilderFactory().withPayload(object).build(); } message = interceptorList.postReceive(message, this); if (interceptorStack != null) { interceptorList.afterReceiveCompletion(message, this, null, interceptorStack); } return message; } catch (RuntimeException e) { if (interceptorStack != null) { interceptorList.afterReceiveCompletion(null, this, e, interceptorStack); } throw e; } }
Source:
private void initNodeCommand(SensorContext context, File scriptFile) throws IOException { nodeCommandBuilder .outputConsumer(message -> { if (message.startsWith("DEBUG")) { LOG.debug(message.substring(5).trim()); } else if (message.startsWith("WARN")) { LOG.warn(message.substring(4).trim()); } else { LOG.info(message); } }) .pathResolver(bundle) .minNodeVersion(8) .configuration(context.config()) .script(scriptFile.getAbsolutePath()) .scriptArgs(String.valueOf(port)); context.config() .getInt(MAX_OLD_SPACE_SIZE_PROPERTY) .ifPresent(nodeCommandBuilder::maxOldSpaceSize); if (context.runtime().getProduct() == SonarProduct.SONARLINT || shouldDetectTypeScript(context.fileSystem())) { Optional<Path> typeScriptLocation = getTypeScriptLocation(context.fileSystem().baseDir()); if (typeScriptLocation.isPresent()) { LOG.info("Using TypeScript at: '{}'", typeScriptLocation.get()); nodeCommandBuilder.addToNodePath(typeScriptLocation.get().toAbsolutePath()); } else { LOG.info("TypeScript dependency was not found inside project directory, Node.js will search TypeScript using " + "module resolution algorithm; analysis will fail without TypeScript."); } } nodeCommand = nodeCommandBuilder.build(); }

Target:
private void initNodeCommand(SensorContext context, File scriptFile) throws IOException { nodeCommandBuilder .outputConsumer(message -> { if (message.startsWith("DEBUG")) { LOG.debug(message.substring(5).trim()); } else if (message.startsWith("WARN")) { LOG.warn(message.substring(4).trim()); } else { LOG.info(message); } }) .pathResolver(bundle) .minNodeVersion(8) .configuration(context.config()) .script(scriptFile.getAbsolutePath()) .scriptArgs(String.valueOf(port)); context.config() .getInt(MAX_OLD_SPACE_SIZE_PROPERTY) .ifPresent(nodeCommandBuilder::maxOldSpaceSize); if (shouldDetectTypeScript(context)) { Optional<Path> typeScriptLocation = getTypeScriptLocation(context.fileSystem().baseDir()); if (typeScriptLocation.isPresent()) { LOG.info("Using TypeScript at: '{}'", typeScriptLocation.get()); nodeCommandBuilder.addToNodePath(typeScriptLocation.get().toAbsolutePath()); } else { LOG.info("TypeScript dependency was not found inside project directory, Node.js will search TypeScript using " + "module resolution algorithm; analysis will fail without TypeScript."); } } nodeCommand = nodeCommandBuilder.build(); }
Source:
default ScannerHandler andThen(ScannerHandler then) { ScannerHandler thiz = this; return new ScannerHandler() { @Override public void handle(IgniteBiTuple<WALPointer, WALRecord> record) { thiz.handle(record); then.handle(record); } @Override public void finish() { thiz.finish(); then.finish(); } }; }

Target:
default ScannerHandler andThen(ScannerHandler then) { ScannerHandler thiz = this; return new ScannerHandler() { @Override public void handle(IgniteBiTuple<WALPointer, WALRecord> record) { try { thiz.handle(record); } finally { then.handle(record); } } @Override public void finish() { try { thiz.finish(); } finally { then.finish(); } } }; }
Source:
public void throwableSuppressingItselfShouldBeLoggable() { Throwable throwable = new Throwable("a exception"); throwable.addSuppressed(SuppressedException.from(throwable)); LoggerFactory.getLogger("AnnotatedCallable").error("Error", throwable); }

Target:
public void throwableSuppressingItselfShouldBeLoggable() { Throwable throwable = new Throwable("a exception"); throwable.addSuppressed(SuppressedException.from(throwable)); log.error("Error", throwable); }
Source:
protected String[] getCollectionName(Mutable<ILogicalOperator> opRef) throws AlgebricksException { AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue(); if (op.getOperatorTag() != LogicalOperatorTag.UNNEST) { return null; } UnnestOperator unnest = (UnnestOperator) op; AbstractLogicalOperator op2 = (AbstractLogicalOperator) unnest.getInputs().get(0).getValue(); if (op2.getOperatorTag() != LogicalOperatorTag.ASSIGN) { return null; } AssignOperator assign = (AssignOperator) op2; ILogicalExpression logicalExpression = (ILogicalExpression) assign.getExpressions().get(0).getValue(); if (logicalExpression.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) { return null; } AbstractFunctionCallExpression functionCall = (AbstractFunctionCallExpression) logicalExpression; if (!functionCall.getFunctionIdentifier().equals( BuiltinFunctions.FN_COLLECTIONWITHTAG_2.getFunctionIdentifier()) && !functionCall.getFunctionIdentifier().equals( BuiltinFunctions.FN_COLLECTION_1.getFunctionIdentifier())) { return null; } int size = functionCall.getArguments().size(); if (size > 0) { String args[] = new String[size]; for (int i = 0; i < size; i++) { args[i] = getArgument(functionCall, opRef, i); } return args; } return null; }

Target:
protected String[] getCollectionName(Mutable<ILogicalOperator> opRef) throws AlgebricksException { VXQueryConstantValue constantValue; AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue(); if (op.getOperatorTag() != LogicalOperatorTag.UNNEST) { return null; } UnnestOperator unnest = (UnnestOperator) op; AbstractLogicalOperator op2 = (AbstractLogicalOperator) unnest.getInputs().get(0).getValue(); if (op2.getOperatorTag() != LogicalOperatorTag.ASSIGN) { return null; } AssignOperator assign = (AssignOperator) op2; ILogicalExpression logicalExpression = (ILogicalExpression) assign.getExpressions().get(0).getValue(); if (logicalExpression.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) { return null; } AbstractFunctionCallExpression functionCall = (AbstractFunctionCallExpression) logicalExpression; if (!functionCall.getFunctionIdentifier() .equals(BuiltinFunctions.FN_COLLECTIONWITHTAG_2.getFunctionIdentifier()) && !functionCall.getFunctionIdentifier() .equals(BuiltinFunctions.FN_COLLECTION_1.getFunctionIdentifier())) { return null; } int size = functionCall.getArguments().size(); if (size > 0) { String args[] = new String[size]; for (int i = 0; i < size; i++) { args[i] = getArgument(functionCall, opRef, i); } return args; } return null; }
Source:
public EventsManager() throws NotificationServiceException { try { ds = new StandaloneDataSource(); } catch (SQLException e) { throw new NotificationServiceException("Failed to obtain database connectivity", e); } }

Target:
public EventsManager() { try { ds = new StandaloneDataSource(); } catch (SQLException e) { throw new NotificationServiceException("Failed to obtain database connectivity", e); } }
Source:
public void afterCompletion(int status) { log.infof("afterCompletion called with status '%s'", status); boolean isCommitted = status == javax.transaction.Status.STATUS_COMMITTED ? true : false; checker.setSynchronizedAfter(isCommitted); }

Target:
public void afterCompletion(int status) { log.tracef("afterCompletion called with status '%s'", status); boolean isCommitted = status == javax.transaction.Status.STATUS_COMMITTED ? true : false; checker.setSynchronizedAfter(isCommitted); }
Source:
private void testAddResponse() throws Exception { ______TS("test new response"); submitPage.fillResponseTextBox(2, 0, "4"); submitPage.chooseMcqOption(3, 0, "It's good"); submitPage.clickSubmitButton(); submitPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); FeedbackQuestionAttributes fqMcq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 6); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); FeedbackResponseAttributes frMcq = BackDoor.getFeedbackResponse(fqMcq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertEquals("4", fr.getResponseDetails().getAnswerString()); assertNotNull(frMcq); submitPage.verifyHtmlMainContent("/instructorEditStudentFeedbackPageModified.html"); submitPage.verifyAndCloseSuccessfulSubmissionModal(""); }

Target:
private void testAddResponse() throws Exception { ______TS("test new response"); submitPage.fillResponseTextBox(2, 0, "4"); submitPage.clickSubmitButton(); submitPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_RESPONSES_SAVED); FeedbackQuestionAttributes fq = BackDoor.getFeedbackQuestion("IESFPTCourse", "First feedback session", 2); FeedbackResponseAttributes fr = BackDoor.getFeedbackResponse(fq.getId(), "student1InIESFPTCourse@gmail.tmt", "student1InIESFPTCourse@gmail.tmt"); assertEquals("4", fr.getResponseDetails().getAnswerString()); submitPage.verifyHtmlMainContent("/instructorEditStudentFeedbackPageModified.html"); submitPage.verifyAndCloseSuccessfulSubmissionModal(""); }
Source:
public SimpleFeature next() { SimpleFeature next = super.next(); if (attributeName == null) { String fid = next.getID(); if (fid.startsWith(fidPrefix)) { fid = fid.substring(fidPrefix.length()); } return new FidAndFtOverrideFeature(next, fid, featureType); } else { Object value = next.getAttribute(attributeName); if (value == null) { String fid = (next).getID().substring(fidPrefix.length()); return new FidAndFtOverrideFeature(next, fid, featureType); } else { return new FidAndFtOverrideFeature(next, value.toString(), featureType); } } }

Target:
public SimpleFeature next() { SimpleFeature next = super.next(); if (attributeName == null) { String fid = next.getID(); if (fid.startsWith(fidPrefix)) { fid = fid.substring(fidPrefix.length()); } return new FidAndFtOverrideFeature(next, fid, featureType); } else { Object value = next.getAttribute(attributeName); Preconditions.checkNotNull(value); return new FidAndFtOverrideFeature(next, value.toString(), featureType); } }
Source:
private NetworkReceive read(SelectionKey key, Transmission transmission) throws IOException { long startTimeToReadInMs = time.milliseconds(); try { boolean readComplete = transmission.read(); NetworkReceive networkReceive = transmission.getNetworkReceive(); if (readComplete) { transmission.onReceiveComplete(); transmission.clearReceive(); } return networkReceive; } catch (IOException e) { handleReadWriteIOException(e, key); return null; } finally { long readTime = time.milliseconds() - startTimeToReadInMs; logger.trace("SocketServer time spent on read per key = {}", transmission.getConnectionId(), readTime); } }

Target:
private NetworkReceive read(SelectionKey key, Transmission transmission) { long startTimeToReadInMs = time.milliseconds(); try { boolean readComplete = transmission.read(); NetworkReceive networkReceive = transmission.getNetworkReceive(); if (readComplete) { transmission.onReceiveComplete(); transmission.clearReceive(); } return networkReceive; } catch (IOException e) { handleReadWriteIOException(e, key); return null; } finally { long readTime = time.milliseconds() - startTimeToReadInMs; logger.trace("SocketServer time spent on read per key = {}", transmission.getConnectionId(), readTime); } }
Source:
public InfinispanExtension() { InfinispanExtensionEmbedded e; try { e = new InfinispanExtensionEmbedded(); } catch (Throwable t) { e = null; } embeddedExtension = e; InfinispanExtensionRemote r; try { r = new InfinispanExtensionRemote(); } catch (Throwable t) { r = null; } remoteExtension = r; }

Target:
public InfinispanExtension() { InfinispanExtensionEmbedded e; try { e = new InfinispanExtensionEmbedded(); log.debug("Enabling support for embedded CDI"); } catch (Throwable t) { e = null; log.debug("Disabling support for embedded CDI"); } embeddedExtension = e; InfinispanExtensionRemote r; try { r = new InfinispanExtensionRemote(); log.debug("Enabling support for remote CDI"); } catch (Throwable t) { r = null; log.debug("Disabling support for remote CDI"); } remoteExtension = r; }
Source:
long getProlepticMonth() { return getProlepticYear() * lengthOfYearInMonths() + getMonth() - 1; }

Target:
long getProlepticMonth() { return this.prolepticYear * lengthOfYearInMonths() + getInternalMonth() - 1; }
Source:
public void test() throws Exception { testSetSupportedClientInfo(); testSetUnsupportedClientInfo(); testGetUnsupportedClientInfo(); testSetSupportedClientInfoProperties(); testSetUnsupportedClientInfoProperties(); testSetInternalProperty(); testSetInternalPropertyToInitialValue(); testSetGetSchema(); testCommitOnAutoCommitSet(); testRollbackOnAutoCommitSet(); }

Target:
public void test() throws Exception { testSetSupportedClientInfo(); testSetUnsupportedClientInfo(); testGetUnsupportedClientInfo(); testSetSupportedClientInfoProperties(); testSetUnsupportedClientInfoProperties(); testSetInternalProperty(); testSetInternalPropertyToInitialValue(); testSetGetSchema(); testCommitOnAutoCommitSetRunner(); testRollbackOnAutoCommitSetRunner(); }
Source:
private void writeMatrix() { final NumberFormat format = NumberFormat.getInstance(); format.setMaximumFractionDigits(4); try (final OutputStream stream = new FileOutputStream(MATRIX_OUTPUT); final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stream))) { writer.write(CROSSCHECK_BY.name()); for (String rhsMatrixKey : rhsMatrixKeys) { writer.write('\t' + rhsMatrixKey); } writer.newLine(); for (int row = 0; row < lhsMatrixKeys.size(); row++) { writer.write(lhsMatrixKeys.get(row)); for (int col = 0; col < rhsMatrixKeys.size(); col++) { writer.write('\t' + format.format(crosscheckMatrix[col][row])); } writer.newLine(); } } catch (IOException e) { throw new RuntimeException(e); } }

Target:
private void writeMatrix() { final NumberFormat format = NumberFormat.getInstance(); format.setMaximumFractionDigits(4); try (final OutputStream stream = new FileOutputStream(MATRIX_OUTPUT); final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stream))) { writer.write(CROSSCHECK_BY.name()); for (String rhsMatrixKey : rhsMatrixKeys) { writer.write('\t' + rhsMatrixKey); } writer.newLine(); for (int row = 0; row < lhsMatrixKeys.size(); row++) { writer.write(lhsMatrixKeys.get(row)); for (final double lod : crosscheckMatrix[row]) { writer.write('\t' + format.format(lod)); } writer.newLine(); } } catch (IOException e) { throw new RuntimeException(e); } }
Source:
private void writeStandardResultsToXML(Run<?, ?> run, Collection<PerformanceReport> parsedReports) throws IOException { FileWriter fw = null; BufferedWriter bw = null; try { xmlDir = run.getRootDir().getAbsolutePath(); xmlDir += "/" + archive_directory; if (!new File(xmlDir).exists()) { new File(xmlDir).mkdirs(); } xmlfile = new File(xmlDir + "/standardResults.xml"); xmlfile.createNewFile(); fw = new FileWriter(xmlfile.getAbsoluteFile()); bw = new BufferedWriter(fw); xml = "<?xml version=\"1.0\"?>\n"; xml += "<results>\n"; appendStandardResultsStatsToXml(parsedReports); xml += "</results>"; bw.write(xml); } finally { if (bw != null) { bw.close(); } if (fw != null) { fw.close(); } } }

Target:
private void writeStandardResultsToXML(Run<?, ?> run, Collection<PerformanceReport> parsedReports) throws IOException { FileWriter fw = null; BufferedWriter bw = null; try { xmlDir = run.getRootDir().getAbsolutePath(); xmlDir += File.separator + archive_directory; xmlfile = new File(xmlDir + File.separator + "standardResults.xml"); FileUtils.touch(xmlfile); fw = new FileWriter(xmlfile); bw = new BufferedWriter(fw); xml = new StringBuilder("<?xml version=\"1.0\"?>\n") .append("<results>\n") .append(appendStandardResultsStatsToXml(parsedReports)) .append("</results>\n").toString(); bw.write(xml); } finally { if (bw != null) { bw.close(); } if (fw != null) { fw.close(); } } }
Source:
protected @Nonnull Set<String> loadPluginsFromWar(@Nonnull String fromPath, @CheckForNull FilenameFilter filter) { Set<String> names = new HashSet(); ServletContext context = Jenkins.getInstance().servletContext; Set<String> plugins = Util.fixNull((Set<String>) context.getResourcePaths(fromPath)); Set<URL> copiedPlugins = new HashSet<>(); Set<URL> dependencies = new HashSet<>(); for( String pluginPath : plugins) { String fileName = pluginPath.substring(pluginPath.lastIndexOf('/')+1); if(fileName.length()==0) { continue; } try { URL url = context.getResource(pluginPath); if (filter != null && url != null) { if (!filter.accept(new File(url.getFile()).getParentFile(), fileName)) { continue; } } names.add(fileName); copyBundledPlugin(url, fileName); copiedPlugins.add(url); try { addDependencies(url, fromPath, dependencies); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to resolve dependencies for the bundled plugin " + fileName, e); } } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to extract the bundled plugin "+fileName,e); } } for (URL dependency : dependencies) { if (copiedPlugins.contains(dependency)) { continue; } String fileName = new File(dependency.getFile()).getName(); try { names.add(fileName); copyBundledPlugin(dependency, fileName); copiedPlugins.add(dependency); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to extract the bundled dependency plugin " + fileName, e); } } return names; }

Target:
protected @Nonnull Set<String> loadPluginsFromWar(@Nonnull String fromPath, @CheckForNull FilenameFilter filter) { Set<String> names = new HashSet(); ServletContext context = Jenkins.getActiveInstance().servletContext; Set<String> plugins = Util.fixNull((Set<String>) context.getResourcePaths(fromPath)); Set<URL> copiedPlugins = new HashSet<>(); Set<URL> dependencies = new HashSet<>(); for( String pluginPath : plugins) { String fileName = pluginPath.substring(pluginPath.lastIndexOf('/')+1); if(fileName.length()==0) { continue; } try { URL url = context.getResource(pluginPath); if (filter != null && url != null) { if (!filter.accept(new File(url.getFile()).getParentFile(), fileName)) { continue; } } names.add(fileName); copyBundledPlugin(url, fileName); copiedPlugins.add(url); try { addDependencies(url, fromPath, dependencies); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to resolve dependencies for the bundled plugin " + fileName, e); } } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to extract the bundled plugin "+fileName,e); } } for (URL dependency : dependencies) { if (copiedPlugins.contains(dependency)) { continue; } String fileName = new File(dependency.getFile()).getName(); try { names.add(fileName); copyBundledPlugin(dependency, fileName); copiedPlugins.add(dependency); } catch (IOException e) { LOGGER.log(Level.SEVERE, "Failed to extract the bundled dependency plugin " + fileName, e); } } return names; }
Source:
public boolean indexInScope(FormIndex formIndex){ if(formIndex.isEndOfFormIndex()){ return false; } if(parentIndex.isBeginningOfFormIndex()){ return true; } return FormIndex.isSubElement(parentIndex, formIndex); }

Target:
private boolean indexInScope(FormIndex formIndex) { if (formIndex.isEndOfFormIndex()) { return false; } if (parentIndex.isBeginningOfFormIndex()) { return true; } return FormIndex.isSubElement(parentIndex, formIndex); }
Source:
private Pair<URI, Collection<String>> checkLockability(String user, URI uri, LockingMode requestedLock) { if (grantedPermissions.get(uri) == null) { return null; } Collection<String> conflictingUsers = grantedPermissions.get(uri).checkLockability(user, requestedLock); return conflictingUsers.isEmpty() ? null : Pair.of(uri, conflictingUsers); }

Target:
private Collection<String> checkLockability(String user, URI uri, LockingMode requestedLock) { if (grantedPermissions.get(uri) == null) { return Collections.emptyList(); } return grantedPermissions.get(uri).checkLockability(user, requestedLock); }
Source:
protected Object processResponseBeforeSending(Object response) { ReplicatedMapService replicatedMapService = getService(ReplicatedMapService.SERVICE_NAME); if (replicatedMapService.getReplicatedMapConfig(parameters.name).isStatisticsEnabled()) { LocalReplicatedMapStatsImpl stats = replicatedMapService.getLocalReplicatedMapStatsImpl(parameters.name); stats.incrementGets(Timer.elapsedSince(startTime)); } return response; }

Target:
protected Object processResponseBeforeSending(Object response) { ReplicatedMapService replicatedMapService = getService(ReplicatedMapService.SERVICE_NAME); if (replicatedMapService.getReplicatedMapConfig(parameters.name).isStatisticsEnabled()) { LocalReplicatedMapStatsImpl stats = replicatedMapService.getLocalReplicatedMapStatsImpl(parameters.name); stats.incrementGetsNanos(Timer.nanosElapsed(startTimeNanos)); } return response; }
Source:
public List<NodePropertyDescriptor> getNodePropertiesDescriptors() { DescriptorExtensionList<NodeProperty<?>, NodePropertyDescriptor> nodePropertyDescriptors = NodeProperty.all(); return nodePropertyDescriptors.stream() .filter(npd -> npd.isApplicable(vSphereCloudSlave.class)) .collect(Collectors.toList()); }

Target:
public List<NodePropertyDescriptor> getNodePropertiesDescriptors() { List<NodePropertyDescriptor> result = new ArrayList<>(); DescriptorExtensionList<NodeProperty<?>, NodePropertyDescriptor> list = NodeProperty.all(); for (NodePropertyDescriptor npd : list) { if (npd.isApplicable(vSphereCloudSlave.class)) { result.add(npd); } } return result; }
Source:
private Deferred<Object> addPointInternal(final long timestamp, final byte[] value, final short flags) throws IllegalDataException { final boolean ms_timestamp = (timestamp & Const.SECOND_MASK) != 0; if (timestamp < 0 || (ms_timestamp && timestamp > 9999999999999L)) { throw new IllegalArgumentException((timestamp < 0 ? "negative " : "bad") + " timestamp=" + timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } if ((ms_timestamp ? timestamp : timestamp * 1000) <= lastTimestamp) { throw new IllegalArgumentException("New timestamp=" + timestamp + " is less than or equal to previous=" + lastTimestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } lastTimestamp = (ms_timestamp ? timestamp : timestamp * 1000); long incomingBaseTime; if (ms_timestamp) { incomingBaseTime = ((timestamp / 1000) - ((timestamp / 1000) % Const.MAX_TIMESPAN)); } else { incomingBaseTime = (timestamp - (timestamp % Const.MAX_TIMESPAN)); } if (baseTime == Long.MIN_VALUE) { baseTime = incomingBaseTime; Bytes.setInt(rowKey, (int) baseTime, tsdb.metrics.width()); } if (incomingBaseTime - baseTime >= Const.MAX_TIMESPAN) { throw new IllegalDataException("The timestamp is beyond the boundary of this batch of data points"); } if (incomingBaseTime < baseTime) { throw new IllegalDataException("The timestamp is prior to the boundary of this batch of data points"); } final byte[] newQualifier = Internal.buildQualifier(timestamp, flags); append(newQualifier, value); size++; return Deferred.fromResult((Object) null); }

Target:
private Deferred<Object> addPointInternal(final long timestamp, final byte[] value, final short flags) throws IllegalDataException { final boolean ms_timestamp = (timestamp & Const.SECOND_MASK) != 0; if (timestamp < 0 || (ms_timestamp && timestamp > 9999999999999L)) { throw new IllegalArgumentException((timestamp < 0 ? "negative " : "bad") + " timestamp=" + timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } if ((ms_timestamp ? timestamp : timestamp * 1000) <= last_timestamp) { throw new IllegalArgumentException("New timestamp=" + timestamp + " is less than or equal to previous=" + last_timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } last_timestamp = (ms_timestamp ? timestamp : timestamp * 1000); long incomingBaseTime; if (ms_timestamp) { incomingBaseTime = ((timestamp / 1000) - ((timestamp / 1000) % Const.MAX_TIMESPAN)); } else { incomingBaseTime = (timestamp - (timestamp % Const.MAX_TIMESPAN)); } if (base_time == Long.MIN_VALUE) { base_time = incomingBaseTime; Bytes.setInt(row_key, (int) base_time, tsdb.metrics.width()); } if (incomingBaseTime - base_time >= Const.MAX_TIMESPAN) { throw new IllegalDataException( "The timestamp is beyond the boundary of this batch of data points"); } if (incomingBaseTime < base_time) { throw new IllegalDataException( "The timestamp is prior to the boundary of this batch of data points"); } final byte[] new_qualifier = Internal.buildQualifier(timestamp, flags); append(new_qualifier, value); size++; return Deferred.fromResult((Object) null); }
Source:
protected void ensureHashTableLoaded() { if (getHashTables() == null) { synchronized (this) { int[] offsets = getOffsets(); int elementCount = getRawKeyBlock().getPositionCount(); int mapCount = getPositionCount(); boolean[] mapIsNull = getMapIsNull(); if (getHashTables() == null) { int[] hashTables = new int[elementCount * HASH_MULTIPLIER]; Arrays.fill(hashTables, -1); for (int i = 0; i < mapCount; i++) { int keyOffset = offsets[i]; int keyCount = offsets[i + 1] - keyOffset; if (keyCount < 0) { throw new IllegalArgumentException(format("Offset is not monotonically ascending. offsets[%s]=%s, offsets[%s]=%s", i, offsets[i], i + 1, offsets[i + 1])); } if (mapIsNull != null && mapIsNull[i] && keyCount != 0) { throw new IllegalArgumentException("A null map must have zero entries"); } buildHashTable( getRawKeyBlock(), keyOffset, keyCount, keyBlockHashCode, hashTables, keyOffset * HASH_MULTIPLIER, keyCount * HASH_MULTIPLIER); } this.hashTables = hashTables; } } } }

Target:
protected void ensureHashTableLoaded() { if (this.hashTables != null) { return; } synchronized (this) { if (this.hashTables != null) { return; } int[] offsets = getOffsets(); int elementCount = getRawKeyBlock().getPositionCount(); int mapCount = getPositionCount(); boolean[] mapIsNull = getMapIsNull(); int[] hashTables = new int[elementCount * HASH_MULTIPLIER]; Arrays.fill(hashTables, -1); for (int i = 0; i < mapCount; i++) { int keyOffset = offsets[i]; int keyCount = offsets[i + 1] - keyOffset; if (keyCount < 0) { throw new IllegalArgumentException(format("Offset is not monotonically ascending. offsets[%s]=%s, offsets[%s]=%s", i, offsets[i], i + 1, offsets[i + 1])); } if (mapIsNull != null && mapIsNull[i] && keyCount != 0) { throw new IllegalArgumentException("A null map must have zero entries"); } buildHashTable( getRawKeyBlock(), keyOffset, keyCount, keyBlockHashCode, hashTables, keyOffset * HASH_MULTIPLIER, keyCount * HASH_MULTIPLIER); } this.hashTables = hashTables; } }
Source:
public DisksViewRadioGroup() { FlowPanel panel = new FlowPanel(); Label label = new Label(); label.setText(constants.diskType() + ":"); label.addStyleName("disk-storage-type-group-label"); panel.add(label); panel.add(getRadioGroupPanel()); initWidget(panel); }

Target:
public DisksViewRadioGroup() { Label label = new Label(); label.setText(constants.diskType() + ":"); label.addStyleName("disk-storage-type-group-label"); add(label); add(getRadioGroupPanel()); }
Source:
public void testRemove() throws Exception { setUriInfo(setUpBasicUriExpectations()); Network network = new Network(); network.setId(NETWORK_ID.toString()); setUpCreationExpectations(VdcActionType.EditIscsiBond, EditIscsiBondParameters.class, new String[] { "IscsiBond" }, new Object[] { getIscsiBondWithNoNetworks() }, true, true, null, VdcQueryType.GetIscsiBondById, IdQueryParameters.class, new String[] { "Id" }, new Object[] { ISCSI_BOND_ID }, getIscsiBondContainingNetwork()); Response response = collection.performRemove(network.getId()); assertEquals(200, response.getStatus()); }

Target:
public void testRemove() throws Exception { setUriInfo(setUpBasicUriExpectations()); Network network = new Network(); network.setId(NETWORK_ID.toString()); setUpGetEntityExpectations(VdcQueryType.GetIscsiBondById, IdQueryParameters.class, new String[] { "Id" }, new Object[] { ISCSI_BOND_ID }, getIscsiBondContainingNetwork()); setUpActionExpectations(VdcActionType.EditIscsiBond, EditIscsiBondParameters.class, new String[] { "IscsiBond" }, new Object[] { getIscsiBondWithNoNetworks() }, true, true, null); Response response = collection.performRemove(network.getId()); assertEquals(200, response.getStatus()); }
Source:
public void testList() throws StripeException { final OrderReturnCollection orderReturns = OrderReturn.list(null); assertNotNull(orderReturns); assertEquals(1, orderReturns.getData().size()); verifyRequest( APIResource.RequestMethod.GET, "/v1/order_returns" ); }

Target:
public void testList() throws StripeException { final Map<String, Object> params = new HashMap<String, Object>(); params.put("limit", 1); final OrderReturnCollection orderReturns = OrderReturn.list(params); assertNotNull(orderReturns); verifyRequest( APIResource.RequestMethod.GET, "/v1/order_returns", params ); }
Source:
public void theSetConfigurationObjectRequestIsReceived() throws Throwable { PROPERTIES_MAP.put(DEVICE_IDENTIFICATION_G_LABEL, this.deviceId.getDeviceIdG()); PROPERTIES_MAP.put(ORGANISATION_IDENTIFICATION_LABEL, this.organisationId.getOrganisationId()); this.RequestRunner(PROPERTIES_MAP, TEST_CASE_NAME_REQUEST, TEST_CASE_XML, TEST_SUITE_XML); }

Target:
public void theSetConfigurationObjectRequestIsReceived() throws Throwable { PROPERTIES_MAP.put(DEVICE_IDENTIFICATION_E_LABEL, this.deviceId.getDeviceIdE()); PROPERTIES_MAP.put(ORGANISATION_IDENTIFICATION_LABEL, this.organisationId.getOrganisationId()); this.RequestRunner(PROPERTIES_MAP, TEST_CASE_NAME_REQUEST, TEST_CASE_XML, TEST_SUITE_XML); }