lang
stringclasses
10 values
seed
stringlengths
5
2.12k
java
@Inject protected Caller<SignupStorageService> entityDataService; @Inject @AutoBound protected DataBinder<Signup> binder; @Override public Signup getValue() { return binder.getModel();
java
return studentDAO.updateByStuId ( stuId,student ); } //根据学生id修改教育经历 @Override public int updateEducationByStuId(Integer stuId,Student student) { student.setStuUpdateTime ( new Date ( ) ); return studentDAO.updateEducationByStuId ( stuId,student ); } }
java
* @author zhenchao.wang 2016-09-06 09:18:08 * @version 1.0.0 */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD}) @Documented public @interface DatePattern { /** 日期模板 */ String value();
java
}if(iMin!=iPos){ int temp = intArray[iPos]; intArray[iPos] = intArray[iMin]; intArray[iMin] = temp; } }
java
/** * * @author Nick */
java
Intent i = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(i, RESULT_LOAD_IMAGE); } @Override
java
import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextStoppedEvent; public class StopEventHandler implements ApplicationListener<ContextStoppedEvent> { @Override
java
} else { lineWidth += childWidth; lineHeight = Math.max(lineHeight, childHeight); } if (i == cCount - 1) { width = Math.max(lineWidth, width); height += lineHeight; } } setMeasuredDimension( widthMode == MeasureSpec.EXACTLY ? widthSize : width + getPaddingLeft() + getPaddingRight(), heightMode == MeasureSpec.EXACTLY ? heightSize : height + getPaddingTop() + getPaddingBottom() ); }
java
@Test public void testGetText(){ String text = dgm.getText("LoginList[3][2]"); assertEquals("", text); text = dgm.getText("LoginList[3][3]");
java
* @see <a href='http://www.leveluplunch.com/java/examples/generate-sequential-numbers-from-range/'>Generate numbers from range</a> */ public class GenerateRangeOfSequentialNumbers { private static final Logger logger = Logger .getLogger(GenerateRangeOfSequentialNumbers.class); @Test public void range_sequential_numbers_java8() { Set<Integer> range = IntStream.rangeClosed(20, 30).boxed() .collect(Collectors.toSet()); logger.info(range);
java
*/ public void disconnect(); /** * Send an OSC bundle to connected end-point. * * @param oscBundle */ public void send(OSCBundle oscBundle);
java
public static final ErrorCode getErrorCode(byte code) { return map.get(code); } public byte getCode() { return this.code; }
java
import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import br.com.zupacademy.victor.mercadolivre.api.validation.validators.ExisteIdValidator; @Documented
java
new Index2View<>(this.storageId, this.fieldType, FieldTypeRegistry.OBJ_ID, this.keyFieldType)); } @Override CoreIndex<V, ObjId> getIndex(Transaction tx) {
java
public void setReferencedTableColumnName(String referencedTableColumnName) { this.referencedTableColumnName = referencedTableColumnName; } public String toString() { return String.format("%s -> %s.%s.%s", this.getName(), this.referencedSchemaName, this.referencedTableName, this.referencedTableColumnName); }
java
@Override public void update(Observable o, Object arg) { if(arg instanceof ObserverObjectWrapper){ ObserverObjectWrapper wrapper = (ObserverObjectWrapper)arg; switch(wrapper.getActionType()){ case MODIFICATION: try { if(wrapper.getObject()instanceof EmailServerData){ emailServerDao.update((EmailServerData)wrapper.getObject());
java
* @version 2015年2月4日 下午5:24:47 */ public class RemoveFileInfoRequest extends JdfsFileRequest { /** * 空白构造函数 */ public RemoveFileInfoRequest() {
java
* * @param propertyPath property name prefixed with an association alias * @return Criterion */ protected Criterion createIsNull(String propertyPath) { return Restrictions.isNull(propertyPath); } /** * Apply a "not equal" constraint to the named property. * * @param propertyPath property name prefixed with an association alias * @param argument value * @return Criterion */
java
{ index ++; // index is zero based, but in file it started with one MsilParameterAttributeList[] list = getStubOrPsiChildren(MsilStubElements.PARAMETER_ATTRIBUTE_LIST, MsilParameterAttributeList.ARRAY_FACTORY); for(MsilParameterAttributeList attributeList : list) { if(attributeList.getIndex() == index) { return attributeList; } } return null; } @RequiredReadAction
java
@Test @WithMockUser(authorities = {"caseworker-ia", "caseworker-ia-caseofficer"}) public void adds_a_case_note( @WiremockResolver.Wiremock(factory = StaticPortWiremockFactory.class) WireMockServer server) { addCaseWorkerUserDetailsStub(server);
java
} } return true; } }
java
.removeFileExtension().lastSegment(), ImageProvider.getImageDesc(EImage.KEY_ICON), null); this.file = file; } public IFile getFile() { return file; } /*
java
// // switch (ptiValue) { // case SIX_MONTHLY: // scheduledTests.add(new ScheduledLocationTest(location, scheduledTimeStep, ScheduledTestType.ROUTINE_SICCT_PTI_SIX_MONTHLY)); // break;
java
@Test public class MapBindsTest { private static final String DEFAULT_MAP_SHEET = "e2MapBinds"; public void _1() { executeForE2(DEFAULT_MAP_SHEET, e2 -> { Map<String, User> value = e2 .mapOf(String.class, User.class)
java
@Slf4j @EnableScheduling @EnableJpaAuditing //JPA Auditing 활성화 @SpringBootApplication public class DotoriApplication {
java
public SuitWall() { super(new Suit(), ColorConstants.COLOR_MAGENTA); } @Override public int getAttributeID() { return ObjectImageConstants.OBJECT_IMAGE_SUIT; }
java
import com.strategyobject.substrateclient.scale.ScaleSelfWritable; import lombok.NonNull; import lombok.var; import java.util.concurrent.atomic.AtomicReference; public class AccountId
java
result = 31 * result + quantity; result = 31 * result + product.hashCode(); result = 31 * result + urgency.hashCode(); return result; } public static Order matchingReceipt(OrderReceipt orderReceipt) { return new Order(orderReceipt.getClientId(), orderReceipt.getQuantity(), orderReceipt.getProduct()); } public void updateEtaTo(int etaInMinutes) { this.etaInMinutes = etaInMinutes; }
java
import org.springframework.web.bind.annotation.RequestMethod; /** * View controller. * */ @Controller public class ProcessInfoController { private static final String INDEX_VIEW_MAPPING = "process_info"; private static final String IMNDEX_VIEW_URL = "process_info"; @RequestMapping(value = INDEX_VIEW_MAPPING, method = RequestMethod.GET) public String index(Map<String, Object> model)
java
/** * @description: * @author: FuyunWang * @time: 2020/7/25 15:45 */ public class BadMobileCodeException extends AuthenticationException { // ~ Constructors // =================================================================================================== /** * Constructs a <code>BadCredentialsException</code> with the specified message. *
java
import org.proteored.miapeapi.xml.gi.autogenerated.ObjectFactory; import org.proteored.miapeapi.xml.util.MiapeXmlUtil; public class ExtractionInputImageAdapter implements Adapter<GIExtractionInputImage> { private final ImageGelInformatics image; private final String imageURI; private final ObjectFactory factory; public ExtractionInputImageAdapter(ImageGelInformatics image, ObjectFactory factory) { this.image = image; this.factory = factory; this.imageURI = null; } public ExtractionInputImageAdapter(String imageURI, ObjectFactory factory2) {
java
} else { mauiFilter.setWikipedia(wikipediaServer, wikipediaDatabase, cacheWikipediaData, wikipediaDataDirectory); } */ if (!vocabularyName.equals("none") && !vocabularyName.equals("wikipedia") ) {
java
package com.martinhaus.lecture_recorder.model.timetables; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor
java
getHandler(packageName).post(new OnGetSessionStatesTask(callback)); } @Override public void deferredInstall(String packageName, List<Bundle> moduleNames, Bundle versionCode, ISplitInstallServiceCallback callback) { getHandler(packageName).post(new OnDeferredInstallTask(callback, moduleNames)); }
java
* use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
java
if (target == 2) { return 2; }
java
// ).getCountSql(), "SELECT COUNT(1) AS __count FROM table WHERE ( foo LIKE ? )"); // } // // @Test // public void testAppendWhere() throws Exception { // assertEquals(StreamSelect.from("table", "_id").where( // Wheres.like("foo", "bar") // ).getPrepareSQL(), "SELECT _id FROM table WHERE ( foo LIKE ? )"); // } //
java
@RequestMapping(value = "/insert",method = RequestMethod.POST) @ApiOperation("训练课信息插入") public int insert(Training record){ record.setTrainingid(UUID.randomUUID().toString()); return trainingService.insert(record); } @ResponseBody @RequestMapping(value = "/update",method = RequestMethod.POST) @ApiOperation("更新") public int updateByPrimaryKeySelective(Training record){ return trainingService.updateByPrimaryKeySelective(record);
java
* @content 地形分析类,可以实现地形表面距离量算 */ public class JSTerrainAnalysis extends ReactContextBaseJavaModule { private static final String REACT_CLASS = "JSTerrainAnalysis"; private static String Tag = "JSTerrainAnalysis"; private static Map<String, TerrainAnalysis> terrainAnalysisList = new HashMap<>(); @NonNull
java
* 2) schedule that it be fetched from disk. * * @param intentionOffset The offset to fetch/return/await. * @return The intention, only if it was immediately available, in-memory (typically not committed). */ Intention mainClientFetchIntentionIfAvailable(long intentionOffset); void mainRequestConsequenceFetch(TopicName topic, long nextLocalConsequenceToFetch); /** * A testing method to force the node to start an election in response to a testing message.
java
public void setAction(String action) { this.action = action; } public String getBody() { return body; } public void setBody(String body) { this.body = body; }
java
*/ public static Builder custom(){ return new Builder(); }
java
package Jetstorm.Enterprise.Entities.Pokemon; public class Snorlax { }
java
import at.ac.tuwien.dsg.scaledom.parser.XmlParser; /** * The input to the <code>XmlParser</code> is a <code>Reader</code> created by a <code>ReaderFactory</code>, therefore * the parser is not aware of the actual underlying document source. The parser's outputted event locations ( * <code>XmlEventLocation</code>) are accordingly relative to the given reader object and not relative to the underlying * document source. Only the creator of the reader object is therefore able to convert the parser's output location into * a real <code>NodeLocation</code> object which can be used later on to re-obtain a reader from the reader factory in * case the node has to be reloaded. * * @author <NAME> * @see XmlParser * @see ReaderFactory
java
} public void paintComponrnt(Graphics g) { super.paintComponent(g); // erase background Graphics2D g2 = (Graphics2D )g;
java
*/ public static String format(final String format, final Object ... args) { return MessageFormatter.arrayFormat(format, args).getMessage(); } /** * Follows the same formatting rules but includes information from the input {@link Throwable}, including its * stacktrace. * * @param format Format string * @param throwable Throwable * @param args Arguments
java
TaskRun trun = this.getContext().getTaskRun(); UIInitialWork.this.transition(trun, FINIALIZE); } }); return this.EXPAND;
java
return this.isClosed; } public void removeSessionAdapter(SessionAdapter sessionToBeRemoved) { sessions.remove(sessionToBeRemoved); } public List getSessions() { return this.sessions; } public void setInvalid() { this.valid = false; }
java
import javax.swing.JFrame; public class CarViewer { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setSize(300, 400); frame.setTitle("Two Cars"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); CarComponent c = new CarComponent(); frame.add(c);
java
} @Nullable @Override public View onCreateView( LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
java
import org.junit.Before; import org.junit.Test; import outils.Temps; import java.time.LocalDate; import static org.assertj.core.api.Assertions.assertThat; public class ProgrammeTest { @Before public void before() throws Exception { temps = new StubTemps(LocalDate.of(2015, 5, 11)); }
java
package is.ru.honn.news.data; import is.ru.honn.news.domain.User; import is.ruframework.data.RuDataAccess; /** * Created by Snaebjorn on 10/22/2015. */ public interface UserDataGateway extends RuDataAccess { User getUserById(int id); User getUserByUsername(String username); int addUser(User user); void updateUser(User user); }
java
public interface OnItemClickListener { void onMessageClick(Message message); } private List<Message> messages = new ArrayList<>(); private OnItemClickListener onItemClickListener; public void bind(List<Message> messages) {
java
ValidationContextUrlMapping[] mappings = new ValidationContextUrlMapping[mappingLines.length]; for (int i=0; i<mappings.length; i++) { String mappingLine = mappingLines[i].trim(); int index = mappingLine.lastIndexOf(MAPPING_OPERATOR); String pattern = mappingLine.substring(0, index); String tokensString = mappingLine.substring(index+1, mappingLine.length());
java
import org.fuchss.objectcasket.sqltypes.objects.common.PK__Object; @Entity() @Table(name = "PK_INTEGER5") public final class PK_INTEGER5 implements PK__Object<PK_INTEGER5> { @Id public long tLong; public long attr1;
java
public DumpTag() { } @Override public void mergeTo(MergeStream stream, IGramarContext context) { try {
java
List<Future<Long>> results = exec.invokeAll(tasks); return results.stream().mapToLong(c -> { try { return c.get(); } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); return 0; } }).sum(); } catch (InterruptedException e) {
java
String userName = request.getParameter("userName"); String loginName = request.getParameter("loginName"); String password = request.getParameter("password"); String status = request.getParameter("status"); // 将得到的数据封装到对象中 User user = new User(); user.setCreatedate(new Date()); user.setUsername(userName); user.setLoginname(loginName); user.setStatus(Integer.parseInt(status)); user.setPassword(password);
java
buf.append(this.resultSetId); buf.append(","); buf.append(this.eventCreationPointDesc); buf.append("]"); return buf.toString(); }
java
ListNode list3_2 = new ListNode(0); print(mergeTwoLists(null, list3_2)); } /** * 递归或迭代 * 时间复杂度 O(N) N为长链表的长度 * 空间复杂度 O(1) */ public static ListNode mergeTwoLists(ListNode list1, ListNode list2) { if (list1 == null && list2 == null) return null; if (list1 == null) return list2; if (list2 == null) return list1;
java
/** * Set labels to each observation according passed model. * <p> * NOTE: In-place operation. * </p> * @param ds The given labeled dataset. * @param mdl The given model. * @return Dataset with predicted labels.
java
/** * Created by cc-man on 2018/2/27. */ @Controller @RequestMapping("/compose") public class ComposeManager { private String composeUrl; public static final String CREATURL ="/api/v1/create-project";
java
} public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public double getMoney() { return money; }
java
return super.hashCode(); } }); File root = new File("repository/");
java
import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; /** * Class to write logs to Rapid7 InsightOps asynchronously */ public class AsynchronousLogWriter implements LogWriter { private static final int SHUTDOWN_TIMEOUT_SECONDS = 10; private final ExecutorService executor; private final LogWriter logWriter; /**
java
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController;
java
return; } } HttpReturn ret = HttpCaller.invokeReturn(builder.build()); if (curlOnly) { System.out.println("---- curlString = " + ret.response); } else { if (isDebug) {
java
*/ com.microsoft.schemas.office.office.CTDiagram getDiagram(); /** * Sets the "diagram" element */ void setDiagram(com.microsoft.schemas.office.office.CTDiagram diagram);
java
this.userID = userID; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } @Id @GeneratedValue(strategy = GenerationType.AUTO) long rowID;
java
@Data @Entity @Table(name = "employee") public class EmployeeEntity { @Id @GeneratedValue(strategy = GenerationType.AUTO)
java
} @Override public String getEndpointUri() { return uri; } @Override public String getEndpointKey() { return null; // TODO: Customise this generated block } @Override public Exchange createExchange() {
java
/** * This code sample demonstrates how to add a custom tag to an EXIF package. */ public class SetCustomExifTag { public static void run() { try (Metadata metadata = new Metadata(Constants.TiffWithExif)) { IExif root = (IExif) metadata.getRootPackage(); // Set the EXIF package if it's missing if (root.getExifPackage() == null) {
java
@Override public void configure(BSActionPanel.ActionConfig<SInstance> config) { config.iconeModel(Model.of(DefaultIcons.EYE)); config.labelModel(Model.of("Visualizar")); } @Override public void onAction(AjaxRequestTarget target, IModel<SInstance> model, CrudShellManager crudShellManager) { CrudEditContent crudEditContent = this.crudShellManager .makeEditContent(this.crudShellManager.getCrudShellContent(), model); crudEditContent.setViewMode(ViewMode.READ_ONLY); this.crudShellManager.replaceContent(target, crudEditContent); } }
java
import org.uberfire.java.nio.file.FileSystem; import static org.kie.workbench.common.services.backend.healthcheck.ServiceStatus.HEALTHY; import static org.kie.workbench.common.services.backend.healthcheck.ServiceStatus.INCONCLUSIVE; import static org.kie.workbench.common.services.backend.healthcheck.ServiceStatus.UNHEALTHY; @ApplicationScoped public class IoServiceCheck implements ServiceCheck { private final IOService ioService; @Inject
java
{ forward = !forward; sub_activation = null; called_body = null; }
java
this.params.setId(id); return this; } public GroupSetMutedCommand setMuted(boolean muted) { this.params.setMute(muted); return this; } public class SetMutedParams extends SnapcastCommandParams { private boolean mute; public boolean isMute() { return mute;
java
* @param isCompiled create a continuation for a compiled or non-compiled script engine * @return the Continuation */ public Continuation createContinuation(Reader reader, Map env, OutputStream out, OutputStream err, HeaderParser headerParser, ResultProxy result, ILogger logger, boolean isCompiled); /** * Start the current continuation using a context-specific thread pool */ public void startContinuation(); /** * Get the context server associated with this context, usually a HttpServer (JavaBridgeRunner) or a ContextServer from a ContextLoaderListener
java
public class ViewHolder extends RecyclerView.ViewHolder{ @BindView(R.id.textview_wifi_level)TextView levelTextView; @BindView(R.id.textview_wifi_ssid)TextView ssidTextView; @BindView(R.id.textview_wifi_bssid)TextView bssidTextView;
java
a006 = a001 + a005; a002 -= a000; a008 = a009 - -4; a000 = a004 - a004; a009 = a004 - a003; cur -= a006; a004 += a002; a000 -= a001; a005 = a006 - a005; a001 = 2 - a000; a005 = a000 + a000; cur -= a003;
java
ExceptionResponse errorInfo = new ExceptionResponse(404, HttpStatus.NOT_FOUND, "Resource Not Found", webRequest.getRequestURI()); return new ResponseEntity<>(errorInfo, HttpStatus.NOT_FOUND); } /** * Custom Resource Not Found Exception Handler * @param exception * @param webRequest * @return */ @ResponseStatus(HttpStatus.CONFLICT) @ExceptionHandler({ResourceExistsException.class}) public ResponseEntity<Object> handleResourceExistsException(ResourceExistsException exception, HttpServletRequest webRequest) {
java
* Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two * rectangles. * * The first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2). * The second rectangle is defined by its bottom-left corner (bx1, by1) and its top-right corner (bx2, by2). * * Example 1: * Rectangle Area
java
* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
java
public int compare(Book o1, Book o2) { return new CompareToBuilder() .append(o1.getTitle(), o2.getTitle()) .append(o1.getPrice(), o2.getPrice()) .append(o1.getQuantity(), o2.getQuantity()).toComparison(); }
java
public class LoginFragment extends Fragment { @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view=inflater.inflate(R.layout.fragment_login,container,false); ButterKnife.bind(this,view); return view; } }
java
*/ Map<String, ProjectInfo> getProjects(); /** * @return Map of build type names and their configuration path'es */ Map<String, BuildTypeInfo> getBuildTypes();
java
@Autowired private AuthService authService; @Override public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> environment) { String targetAuthRole = (String) environment.getDirective().getArgument("role").getValue();
java
import com.ctrip.soa.artemis.Service; import com.ctrip.soa.artemis.discovery.DiscoveryConfig; /** * Created by fang_j on 10/07/2016. */ public interface DiscoveryClient {
java
* See the License for the specific language governing permissions and * limitations under the License. */ package swaydb.data.java; import swaydb.utils.OperatingSystem; import java.io.IOException; import java.nio.file.*; import java.nio.file.attribute.BasicFileAttributes;
java
} public TextureParameters setBorderA(float BORDER_A) { this.BORDER_A = BORDER_A; return this; } public TextureParameters setInternalFormat(int INTERNAL_FORMAT) {
java
return parent; } public static class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() {}
java
import org.junit.runner.RunWith; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @RunWith(PowerMockRunner.class) @PrepareForTest({GlobalMarketChest.class}) public class TestGlobalMarketChest { GlobalMarketChest gmc;
java
package com.hss.healthyManager.service; import com.hss.healthyManager.entity.CheckInfo; public interface CheckInfoService extends BaseService<CheckInfo> { }
java
import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; import org.junit.runner.RunWith; @RunWith(Cucumber.class) @CucumberOptions( format = {"pretty", "json:target/cucumber.json", "lv.ctco.cukes.core.formatter.CukesJsonFormatter:target/cucumber2.json"}, features = {"classpath:features/"}, glue = {"lv.ctco.cukes"}, strict = true ) public class RunCukesSOAPTest { }
java
hotspot.setSysCreateTime(DateUtils.getNowDate()); hotspot.setSysUpdateTime(DateUtils.getNowDate()); gmHotspotService.insertGmHotspot(hotspot); } } public void copyLastMonthSummary(Date currentDate) { Date lastMonth;GmSummary gmSummary = new GmSummary(); lastMonth = DateUtils.addMonths(currentDate, -1); gmSummary.setSysCreateBy(ShiroUtils.getLoginName());
java
subMsgRequest.setMask(TestConstants.mask); subMsgResponse = publishService.changeSubscription(subMsgRequest); Assert.assertNotNull("the session ID is null", publishService.getSessionId()); Assert.assertEquals("message body is not the same length", subMsgRequest.getDataLength(), subMsgResponse.getDataLength()); Assert.assertEquals("compression is not the same", subMsgRequest.isCompressed(), subMsgResponse.isCompressed()); publishService.unsubscribe(); Assert.assertNull("the session ID is not null", publishService.getSessionId()); } /** * Description: change subscription with the same mask<br>
java
* Encourage the use of target servers. * Code : TD002 * @author <NAME> */ @Rule(key = "UseTargetServersCheck") public class UseTargetServersCheck extends SonarXmlCheck {
java
@Override protected boolean onCommand(Player p, Command command, String label, String[] args, Sign sign) throws InvalidLineException, NumberFormatException { if (args.length < 1) return false;
java
public class BehandleInngaaendeJournalV1ServiceMock implements BehandleInngaaendeJournalV1 { private static final Logger LOG = LoggerFactory.getLogger(BehandleInngaaendeJournalV1ServiceMock.class); private JournalRepository journalRepository; public BehandleInngaaendeJournalV1ServiceMock(JournalRepository journalRepository) { this.journalRepository = journalRepository; } @WebMethod(
java
@ComponentId public ComboBoxPicker<String> comboBoxPickerId; @ComponentId public EntityComboBox<?> entityComboBoxId; @ComponentId
java
public final class Reflections { /** * Get all classes within a package * * @param loader * @param packageName * @return * @throws Exception */ public static List<Class<?>> getClassesFromPackage(ClassLoader loader, String packageName) throws Exception { List<Class<?>> classes = Lists.newArrayList(); for (final ClassPath.ClassInfo info : ClassPath.from(loader).getTopLevelClasses()) { if (info.getName().startsWith(packageName.concat("."))) {