test_class.file: wdtk-wikibaseapi/src/test/java/org/wikidata/wdtk/wikibaseapi/WbEditingActionTest.java
test_class.identifier: WbEditingActionTest
test_case.body: @Test(expected = TokenErrorException.class)
  	public void testNoTokenInReponse() throws IOException,
  			MediaWikiApiErrorException {
  		MockBasicApiConnection con = new MockBasicApiConnection();
  		Map<String, String> params = new HashMap<>();
  		params.put("action", "query");
  		params.put("meta", "tokens");
  		params.put("format", "json");
  		params.put("type", "csrf");
  		// This error makes no sense for this action, but that does not matter
  		// here:
  		con.setWebResource(params, "{}");
  
  		params.clear();
  		params.put("action", "wbeditentity");
  		params.put("id", "Q42");
  		params.put("token", null);
  		params.put("format", "json");
  		params.put("data", "{}");
  		params.put("maxlag", "5");
  		con.setWebResourceFromPath(params, this.getClass(),
  				"/error-badtoken.json", CompressionType.NONE);
  
  		WbEditingAction weea = new WbEditingAction(con,
  				Datamodel.SITE_WIKIDATA);
  
  		weea.wbEditEntity("Q42", null, null, null, "{}", false, false, 0, null, null);
  	}
test_case.class_method_signature: WbEditingActionTest.testNoTokenInReponse()
test_case.full_signature: @Test(expected = TokenErrorException.class) public void testNoTokenInReponse()
test_case.identifier: testNoTokenInReponse
test_case.invocations: put put put put setWebResource clear put put put put put put setWebResourceFromPath getClass wbEditEntity
test_case.modifiers: @Test(expected = TokenErrorException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNoTokenInReponse()
focal_class.declarator: logger = LoggerFactory
  			.getLogger(WbEditingAction.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger logger = LoggerFactory
  			.getLogger(WbEditingAction.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: connection
focal_class.modifier: final
focal_class.original_string: final ApiConnection connection;
focal_class.type: ApiConnection
focal_class.var_name: connection
focal_class.declarator: siteIri
focal_class.modifier: final
focal_class.original_string: final String siteIri;
focal_class.type: String
focal_class.var_name: siteIri
focal_class.declarator: mapper
focal_class.modifier: final
focal_class.original_string: final ObjectMapper mapper;
focal_class.type: ObjectMapper
focal_class.var_name: mapper
focal_class.declarator: maxLag = 5
focal_class.original_string: int maxLag = 5;
focal_class.type: int
focal_class.var_name: maxLag
focal_class.declarator: maxLagMaxRetries = 14
focal_class.original_string: int maxLagMaxRetries = 14;
focal_class.type: int
focal_class.var_name: maxLagMaxRetries
focal_class.declarator: maxLagFirstWaitTime = 1000
focal_class.original_string: int maxLagFirstWaitTime = 1000;
focal_class.type: int
focal_class.var_name: maxLagFirstWaitTime
focal_class.declarator: maxLagBackOffFactor = 1.5
focal_class.original_string: double maxLagBackOffFactor = 1.5;
focal_class.type: double
focal_class.var_name: maxLagBackOffFactor
focal_class.declarator: editTimeWindow = 9
focal_class.modifier: final static
focal_class.original_string: final static int editTimeWindow = 9;
focal_class.type: int
focal_class.var_name: editTimeWindow
focal_class.declarator: averageMsecsPerEdit = 2000
focal_class.original_string: int averageMsecsPerEdit = 2000;
focal_class.type: int
focal_class.var_name: averageMsecsPerEdit
focal_class.declarator: recentEditTimes = new long[editTimeWindow]
focal_class.modifier: final
focal_class.original_string: final long[] recentEditTimes = new long[editTimeWindow];
focal_class.type: long[]
focal_class.var_name: recentEditTimes
focal_class.declarator: curEditTimeSlot = 0
focal_class.original_string: int curEditTimeSlot = 0;
focal_class.type: int
focal_class.var_name: curEditTimeSlot
focal_class.declarator: remainingEdits = -1
focal_class.original_string: int remainingEdits = -1;
focal_class.type: int
focal_class.var_name: remainingEdits
focal_class.file: wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/WbEditingAction.java
focal_class.identifier: WbEditingAction
focal_class.class_method_signature: WbEditingAction.WbEditingAction(ApiConnection connection, String siteIri)
focal_class.full_signature: public  WbEditingAction(ApiConnection connection, String siteIri)
focal_class.identifier: WbEditingAction
focal_class.modifiers: public
focal_class.parameters: (ApiConnection connection, String siteIri)
focal_class.signature:  WbEditingAction(ApiConnection connection, String siteIri)
focal_class.class_method_signature: WbEditingAction.getMaxLag()
focal_class.full_signature: public int getMaxLag()
focal_class.identifier: getMaxLag
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLag()
focal_class.class_method_signature: WbEditingAction.setMaxLag(int maxLag)
focal_class.full_signature: public void setMaxLag(int maxLag)
focal_class.identifier: setMaxLag
focal_class.modifiers: public
focal_class.parameters: (int maxLag)
focal_class.return: void
focal_class.signature: void setMaxLag(int maxLag)
focal_class.class_method_signature: WbEditingAction.getRemainingEdits()
focal_class.full_signature: public int getRemainingEdits()
focal_class.identifier: getRemainingEdits
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getRemainingEdits()
focal_class.class_method_signature: WbEditingAction.setRemainingEdits(int remainingEdits)
focal_class.full_signature: public void setRemainingEdits(int remainingEdits)
focal_class.identifier: setRemainingEdits
focal_class.modifiers: public
focal_class.parameters: (int remainingEdits)
focal_class.return: void
focal_class.signature: void setRemainingEdits(int remainingEdits)
focal_class.class_method_signature: WbEditingAction.getAverageTimePerEdit()
focal_class.full_signature: public int getAverageTimePerEdit()
focal_class.identifier: getAverageTimePerEdit
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAverageTimePerEdit()
focal_class.class_method_signature: WbEditingAction.setAverageTimePerEdit(int milliseconds)
focal_class.full_signature: public void setAverageTimePerEdit(int milliseconds)
focal_class.identifier: setAverageTimePerEdit
focal_class.modifiers: public
focal_class.parameters: (int milliseconds)
focal_class.return: void
focal_class.signature: void setAverageTimePerEdit(int milliseconds)
focal_class.class_method_signature: WbEditingAction.wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_class.full_signature: public EntityDocument wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_class.identifier: wbEditEntity
focal_class.modifiers: public
focal_class.parameters: (String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_class.return: EntityDocument
focal_class.signature: EntityDocument wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_class.class_method_signature: WbEditingAction.wbSetLabel(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.full_signature: public JsonNode wbSetLabel(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.identifier: wbSetLabel
focal_class.modifiers: public
focal_class.parameters: (String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.return: JsonNode
focal_class.signature: JsonNode wbSetLabel(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.class_method_signature: WbEditingAction.wbSetDescription(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.full_signature: public JsonNode wbSetDescription(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.identifier: wbSetDescription
focal_class.modifiers: public
focal_class.parameters: (String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.return: JsonNode
focal_class.signature: JsonNode wbSetDescription(String id, String site, String title,
  			String newEntity, String language, String value,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.class_method_signature: WbEditingAction.wbSetAliases(String id, String site, String title,
  			String newEntity, String language, List<String> add,
  			List<String> remove, List<String> set,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.full_signature: public JsonNode wbSetAliases(String id, String site, String title,
  			String newEntity, String language, List<String> add,
  			List<String> remove, List<String> set,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.identifier: wbSetAliases
focal_class.modifiers: public
focal_class.parameters: (String id, String site, String title,
  			String newEntity, String language, List<String> add,
  			List<String> remove, List<String> set,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.return: JsonNode
focal_class.signature: JsonNode wbSetAliases(String id, String site, String title,
  			String newEntity, String language, List<String> add,
  			List<String> remove, List<String> set,
  			boolean bot, long baserevid, String summary,
  			List<String> tags)
focal_class.class_method_signature: WbEditingAction.wbSetClaim(String statement,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.full_signature: public JsonNode wbSetClaim(String statement,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.identifier: wbSetClaim
focal_class.modifiers: public
focal_class.parameters: (String statement,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.return: JsonNode
focal_class.signature: JsonNode wbSetClaim(String statement,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.class_method_signature: WbEditingAction.wbRemoveClaims(List<String> statementIds,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.full_signature: public JsonNode wbRemoveClaims(List<String> statementIds,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.identifier: wbRemoveClaims
focal_class.modifiers: public
focal_class.parameters: (List<String> statementIds,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.return: JsonNode
focal_class.signature: JsonNode wbRemoveClaims(List<String> statementIds,
  			boolean bot, long baserevid, String summary, List<String> tags)
focal_class.class_method_signature: WbEditingAction.performAPIAction(
  			String action,
  			String id,
  			String site,
  			String title,
  			String newEntity,
  			Map<String, String> parameters,
  			String summary,
  			List<String> tags,
  			long baserevid,
  			boolean bot)
focal_class.full_signature: private JsonNode performAPIAction(
  			String action,
  			String id,
  			String site,
  			String title,
  			String newEntity,
  			Map<String, String> parameters,
  			String summary,
  			List<String> tags,
  			long baserevid,
  			boolean bot)
focal_class.identifier: performAPIAction
focal_class.modifiers: private
focal_class.parameters: (
  			String action,
  			String id,
  			String site,
  			String title,
  			String newEntity,
  			Map<String, String> parameters,
  			String summary,
  			List<String> tags,
  			long baserevid,
  			boolean bot)
focal_class.return: JsonNode
focal_class.signature: JsonNode performAPIAction(
  			String action,
  			String id,
  			String site,
  			String title,
  			String newEntity,
  			Map<String, String> parameters,
  			String summary,
  			List<String> tags,
  			long baserevid,
  			boolean bot)
focal_class.class_method_signature: WbEditingAction.getEntityDocumentFromResponse(JsonNode root)
focal_class.full_signature: protected EntityDocument getEntityDocumentFromResponse(JsonNode root)
focal_class.identifier: getEntityDocumentFromResponse
focal_class.modifiers: protected
focal_class.parameters: (JsonNode root)
focal_class.return: EntityDocument
focal_class.signature: EntityDocument getEntityDocumentFromResponse(JsonNode root)
focal_class.class_method_signature: WbEditingAction.parseJsonResponse(JsonNode entityNode)
focal_class.full_signature: private EntityDocument parseJsonResponse(JsonNode entityNode)
focal_class.identifier: parseJsonResponse
focal_class.modifiers: private
focal_class.parameters: (JsonNode entityNode)
focal_class.return: EntityDocument
focal_class.signature: EntityDocument parseJsonResponse(JsonNode entityNode)
focal_class.class_method_signature: WbEditingAction.checkEditSpeed()
focal_class.full_signature: private void checkEditSpeed()
focal_class.identifier: checkEditSpeed
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkEditSpeed()
focal_class.class_method_signature: WbEditingAction.getMaxLagMaxRetries()
focal_class.full_signature: public int getMaxLagMaxRetries()
focal_class.identifier: getMaxLagMaxRetries
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLagMaxRetries()
focal_class.class_method_signature: WbEditingAction.setMaxLagMaxRetries(int retries)
focal_class.full_signature: public void setMaxLagMaxRetries(int retries)
focal_class.identifier: setMaxLagMaxRetries
focal_class.modifiers: public
focal_class.parameters: (int retries)
focal_class.return: void
focal_class.signature: void setMaxLagMaxRetries(int retries)
focal_class.class_method_signature: WbEditingAction.getMaxLagFirstWaitTime()
focal_class.full_signature: public int getMaxLagFirstWaitTime()
focal_class.identifier: getMaxLagFirstWaitTime
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxLagFirstWaitTime()
focal_class.class_method_signature: WbEditingAction.setMaxLagFirstWaitTime(int time)
focal_class.full_signature: public void setMaxLagFirstWaitTime(int time)
focal_class.identifier: setMaxLagFirstWaitTime
focal_class.modifiers: public
focal_class.parameters: (int time)
focal_class.return: void
focal_class.signature: void setMaxLagFirstWaitTime(int time)
focal_class.class_method_signature: WbEditingAction.getMaxLagBackOffFactor()
focal_class.full_signature: public double getMaxLagBackOffFactor()
focal_class.identifier: getMaxLagBackOffFactor
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getMaxLagBackOffFactor()
focal_class.class_method_signature: WbEditingAction.setMaxLagBackOffFactor(double value)
focal_class.full_signature: public void setMaxLagBackOffFactor(double value)
focal_class.identifier: setMaxLagBackOffFactor
focal_class.modifiers: public
focal_class.parameters: (double value)
focal_class.return: void
focal_class.signature: void setMaxLagBackOffFactor(double value)
focal_class.class_method_signature: WbEditingAction.getCurrentLag()
focal_class.full_signature: public double getCurrentLag()
focal_class.identifier: getCurrentLag
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getCurrentLag()
focal_method.body: public EntityDocument wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
  					throws IOException, MediaWikiApiErrorException {
  
  		Validate.notNull(data,
  				"Data parameter cannot be null when editing entity data");
  
  		Map<String, String> parameters = new HashMap<>();
  		parameters.put("data", data);
  		if (clear) {
  			parameters.put("clear", "");
  		}
  		
  		JsonNode response = performAPIAction("wbeditentity", id, site, title,
  				newEntity, parameters, summary, tags, baserevid, bot);
  		return getEntityDocumentFromResponse(response);
  	}
focal_method.class_method_signature: WbEditingAction.wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_method.full_signature: public EntityDocument wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_method.identifier: wbEditEntity
focal_method.invocations: notNull put put performAPIAction getEntityDocumentFromResponse
focal_method.modifiers: public
focal_method.parameters: (String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)
focal_method.return: EntityDocument
focal_method.signature: EntityDocument wbEditEntity(String id, String site, String title,
  			String newEntity, String data, boolean clear, boolean bot,
  			long baserevid, String summary, List<String> tags)