0% found this document useful (0 votes)
9 views70 pages

Fake News Detection Using Machine Learning System

This document discusses the growing issue of fake news on online social networks and proposes a machine learning-based system for its detection, particularly using a Naive Bayes classification model on Twitter data. It highlights the challenges of identifying fake news and the importance of developing reliable algorithms to improve information trustworthiness. The proposed system aims to enhance the accuracy of fake news detection while acknowledging its limitations and the need for further advancements in the field.

Uploaded by

nazar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views70 pages

Fake News Detection Using Machine Learning System

This document discusses the growing issue of fake news on online social networks and proposes a machine learning-based system for its detection, particularly using a Naive Bayes classification model on Twitter data. It highlights the challenges of identifying fake news and the importance of developing reliable algorithms to improve information trustworthiness. The proposed system aims to enhance the accuracy of fake news detection while acknowledging its limitations and the need for further advancements in the field.

Uploaded by

nazar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Fake news Detection using Machine Learning System

Abstract

In recent years, due to the booming development of online social networks, fake news for
various commercial and political purposes has been appearing in large numbers and
widespread in the online world. With deceptive words, online social network users can get
infected by these online fake news easily, which has brought about tremendous effects on the
offline society already. An important goal in improving the trustworthiness of information in
online social networks is to identify the fake news timely. This paper aims at investigating the
principles, methodologies and algorithms for detecting fake news articles, creators and
subjects from online social networks and evaluating the corresponding performance.
Information preciseness on Internet, especially on social media, is an increasingly important
concern, but web-scale data hampers, ability to identify, evaluate and correct such data, or so
called "fake news," present in these platforms. In this paper, we propose a method for "fake
news" detection and ways to apply it on Twitter, one of the most popular online social media
platforms. This method uses Naive Bayes classification model to predict whether a post on
Twitter will be labelled as real or fake. The results may be improved by applying several
techniques that are discussed in the paper. Received results suggest, that fake news detection
problem can be addressed with machine learning methods.
Introduction

Fake news might be a moderately new term yet it isn't really another new phenomenon.
However, the advances in technology and the spread of news through various kinds of media
have expanded the fake news expansion today. As such, fake news impacts have expanded
exponentially in the past and something must be done to keep this from proceeding later in
the future. This project includes using AI, ML and NLP techniques to make a modelthat can
uncover records that are, with high probability, fake news stories and articles. A large number
of the current computerized ways to deal with this issue are based on a "boycott" of creators
and sources that are known makers of fake news. However, shouldn't something be said
about when the creator is not known or when fake news is distributed through large number
of reliable sources? In these cases it is important to depend basically on the substance of the
news story to settle on a choice on whether it is fake or real. By gathering instances of both
genuine and fake news and preparing a model, it should be conceivable to arrange fake news
stories with a specific level of precision.

The objective of this project is to discover the viability and impediments of language-based
systems for detecting any type of fake news which is detected using the machine learning
algorithms, AI calculations including however not restricted to convolutional neural systems
and recurrent neural systems. The result of this project should be to decide how much can be
accomplished in this task by dissecting designs contained in the text and bind to the outside
data about the world. This kind of solution isn't expected to be an end to end solution for fake
news. Like the "boycott" approaches referenced, there are cases in which it fails and some for
which it succeeds. Rather than being an end to end solution, this project is expected to be one
solution that could be utilized to help people who are attempting to classify fake news. On the
other hand, it could be one tool that is used in future applications that intelligently combine
different devices to make an end to end solution for automation of the procedure of fake news
classification.

World is changing rapidly. No doubt we have a number of advantages of this digital world
but it also has its disadvantages as well. There are different issues in this digital world. One
of them is fake news. Someone can easily spread a fake news. Fake news is spread to harm
the reputation of a person or an organization. It can be a propaganda against someone that
can be a political party or an organization. There are different online platforms where the
person can spread the fake news. This includes the Facebook, Twitter etc. Machine learning
is the part of artificial intelligence that helps in making the systems that can learn and
perform different actions.

A variety of machine learning algorithms are available that include the supervised,
unsupervised, reinforcement machine learning algorithms. The algorithms first have to be
trained with a data set called train data set. After the training, these algorithms can be used
to perform different tasks. Machine learning is using in different sectors to perform different
tasks. Most of the time machine learning algorithms are used for prediction purpose or to
detect something that is hidden. Online platforms are helpful for the users because they can
easily access a news. But the problem is this gives the opportunity to the cyber criminals to
spread a fake news through these platforms.

This news can be proved harmful to a person or society. Readers read the news and start
believing it without its verification. Detecting the fake news is a big challenge because it is
not an easy task. If the fake news is not detected early then the people can spread it to
others and all the people will start believing it. Individuals, organizations or political parties
can be effected through the fake news. People opinions and their decisions are affected by
the fake news in the US election of 2016. Different researchers are working for the detection
of fake news. The use of Machine learning is proving helpful in this regard. Researchers are
using different algorithms to detect the false news. Researchers in said that fake news
detection is big challenge. They have used the machine learning for detecting fake news.
Researchers of found that the fake news are increasing with the passage of time. That is
why there is a need to detect fake news. The algorithms of machine learning are trained to
fulfill this purpose. Machine learning algorithms will detect the fake news automatically
once they have trained.
Existing System

Networking Sites have become a noteworthy method to speak for people with each other and
offer schemes and thoughts. Critical components of a person these networking sites is quick
sharing of information. Specifically in this situation, exactness of the news or information
distributed is critical. Fake news spreading on different networking sites has become the most
concerning issue. Fake news has majorly influenced everyday lives and the social requests of
many individuals & caused some negative impacts. Here, the most thorough electronic
databases have been broken down to take a greater look at articles about identification of
news that is fake on networking sites using an efficient practice of literature review. The
fundamental point to study this is revealing the advantages that AI uses for the knowledge
about fake news & its victory in one application or the other. These days, fake news is
creating different issues from sarcastic articles to a fabricated news and plan government
propaganda in some outlets. Fake news and lack of trust in the media are growing problems
with huge ramifications in our society. Obviously, a purposely misleading story is “fake
news” but lately blathering social media’s discourse is changing its definition. Some of them
now use the term to dismiss the facts counter to their preferred viewpoints. The importance of
disinformation within American political discourse was the subject of weighty attention,
particularly following the American president election. The term 'fake news' became common
parlance for the issue, particularly to describe factually incorrect and misleading articles
published mostly for the purpose of making money through page views. In this paper, it is
seeked to produce a model that can accurately predict the likelihood that a given article is
fake news. Facebook has been at the epicenter of much critique following media attention.
They have already implemented a feature to flag fake news on the site when a user sees it;
they have also said publicly they are working on to distinguish these articles in an automated
way. Certainly, it is not an easy task. A given algorithm must be politically unbiased – since
fake news exists on both ends of the spectrum – and also give equal balance to legitimate
news sources on either end of the spectrum. In addition, the question of legitimacy is a
difficult one. However, in order to solve this problem, it is necessary to have an
understanding on what Fake News is. Later, it is needed to look into how the techniques in
the fields of machine learning, natural language processing help us to detect fake news. The
main purpose of this system is to detect the fake news, which is a classic text classification
problem with a straight forward proposition. It is needed to build a model that can
differentiate between “Real” news and “Fake” news.
Disadvantages

 Prediction low accuracy


 Cannot Clean Existing Copy of Record

Proposed System

We have taken key expressions of the news affairs in the form of data that the individual
needs to verify. Data that gets filtered is stored in DB. Data Pre processing unit is considered
to be liable for setting up data for the additional processing required. The classification
depends of these features like twitter studies. Stance Detection is used for examining the
stance of the author. It is a psychological model that is used by the author. Stance Detection
has many other applications. The stance of the author can be considered as: Agreed, Neutral
or Disagreed. We can determine whether a news story is fake or genuine once we have
considered all the classes. Also the authenticity for a new story is given. After that we
classify the outputs and use Artificial Bee Colony algorithms. The creditability of
information was defined by many words such as trustworthiness, believability, reliability,
accuracy, fairness, objectivity, and other with the same concepts and definitions. There are
several researches that use the machine learning approach to calculate the creditability of
message. Fake news is the contents that claim people to believe with the falsification,
sometimes it is the sensitive messages. When the messages were received, they will rapidly
disperse it to other. The dissemination of fake news in today’s digital world has affected
beyond a specific group. Mixing both believable and unbelievable information on social
media has made the confusion of truth. That is the truth will be hardly classified. However,
the appearance of fake news causes great threat on the safety of people’s lives and property.
There is misinformation (the distributer believes there are true) or disinformation (the
distributer knows it is not fact but he intentionally hoax) in fake news proliferation. In this
paper, we develop computational resources and models for the task of fake news detection.
We present the construction of a novel dataset covering two different domains. The dataset is
collected using a combination of manual and crowdsourced annotation efforts. Using this
dataset, we conduct several exploratory analyses to identify linguistic properties that are
predominantly present in fake content, and we build fake news detectors relying on linguistic
features that achieve accuracies of up to 78%. To place our results in perspective, we also
compare the accuracy of our fake news detection models with an empirical human baseline
accuracy. Machine learning is an application of artificial intelligence (AI) that provides
systems the ability to automatically learn and improve from experience without being
explicitly programmed. Machine learning focuses on the development of computer programs
that can access data and use it learn for themselves. The process of learning begins with
observations or data, such as examples, direct experience, or instruction, in order to look for
patterns in data and make better decisions in the future based on the examples that we
provide. The primary aim is to allow the computers learn automatically without human
intervention or assistance and adjust actions accordingly.

Advantages

 which is a classic text classification problem with a straight forward proposition.


 It is needed to build a model that can differentiate between “Real” news and “Fake”
news

System Requirements

Hardware Specification
 Main Processor : 2GHz

 Ram : 2 GB

 Hard Disk : 240 GB

Software Specification
 Language : Java

 Web Server : Glassfish

 Server Side : Jsp,Servlet

 Operating System : Windows


Software Description

Java

History

The JAVA language was created by James Gosling in June 1991 for use in a set top box
project. The language was initially called Oak, after an oak tree that stood outside Gosling's office -
and also went by the name Green - and ended up later being renamed to Java, from a list of random
words. Gosling's goals were to implement a virtual machine and a language that had a familiar C/C++
style of notation. The first public implementation was Java 1.0 in 1995. It promised "Write Once, Run
Anywhere” (WORA), providing no-cost runtimes on popular platforms. It was fairly secure and its
security was configurable, allowing network and file access to be restricted. Major web browsers soon
incorporated the ability to run secure Java applets within web pages. Java quickly became popular.
With the advent of Java 2, new versions had multiple configurations built for different types of
platforms. For example, J2EE was for enterprise applications and the greatly stripped down version
J2ME was for mobile applications. J2SE was the designation for the Standard Edition. In 2006, for
marketing purposes, new J2 versions were renamed Java EE, Java ME, and Java SE, respectively.

In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards bodyand later the Ecma
International to formalize Java, but it soon withdrew from the process. Java remains a standard that is
controlled through the Java Community Process. At one time, Sun made most of its Java
implementations available without charge although they were proprietary software. Sun's revenue
from Java was generated by the selling of licenses for specialized products such as the Java Enterprise
System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment
(JRE)which is a subset of the SDK, the primary distinction being that in the JRE, the compiler, utility
programs, and many necessary header files are not present.

On 13 Novmber2006, Sun released much of Java as free softwareunder the terms of the GNU
General Public License(GPL). On 8 May2007Sun finished the process, making all of Java's core code
open source, aside from a small portion of code to which Sun did not hold the copyright.

Primary goals

There were five primary goals in the creation of the Java language:

 It should use the object-oriented programming methodology.


 It should allow the same program to be executed on multiple operating systems.
 It should contain built-in support for using computer networks.
 It should be designed to execute code from remote sources securely.
 It should be easy to use by selecting what were considered the good parts of other
object-oriented languages

The Java Programming Language:

The Java programming language is a high-level language that can be characterized by all of
the following buzzwords:

 Simple
 Architecture neutral
 Object oriented
 Portable
 Distributed
 High performance

Each of the preceding buzzwords is explained in The Java Language Environment , a white
paper written by James Gosling and Henry McGilton.

In the Java programming language, all source code is first written in plain text files ending
with the .java extension. Those source files are then compiled into .class files by the javac compiler.

A .class file does not contain code that is native to your processor; it instead contains byte
codes — the machine language of the Java Virtual Machine 1 (Java VM). The java launcher tool then
runs your application with an instance of the Java Virtual Machine.

An overview of the software development process.

Because the Java VM is available on many different operating systems, the same .class files
TM
are capable of running on Microsoft Windows, the Solaris Operating System (Solaris OS), Linux,
or Mac OS. Some virtual machines, such as the Java Hot Spot virtual machineperform additional steps
at runtime to give your application a performance boost. This include various tasks such as finding
performance bottlenecks and recompiling (to native code) frequently used sections of code.
Through the Java VM, the same application is capable of running on multiple
platforms.

The Java Platform


A platform is the hardware or software environment in which a program runs. We've already
mentioned some of the most popular platforms like Microsoft Windows, Linux, Solaris OS, and Mac
OS. Most platforms can be described as a combination of the operating system and underlying
hardware. The Java platform differs from most other platforms in that it's a software-only platform
that runs on top of other hardware-based platforms.

The Java platform has two components:

The Java Virtual Machine

The Java Application Programming Interface (API)

You've already been introduced to the Java Virtual Machine; it's the base for the Java
platform and is ported onto various hardware-based platforms.

The API is a large collection of ready-made software components that provide many useful
capabilities. It is grouped into libraries of related classes and interfaces; these libraries are known as
packages. The next section, What CanJavaTechnologyDo?Highlights some of the functionality
provided by the API.
The API and Java Virtual Machine insulate the program from the underlying
hardware.

As a platform-independent environment, the Java platform can be a bit slower than native
code. However, advances in compiler and virtual machine technologies are bringing performance
close to that of native code without threatening portability.

Java Runtime Environment

The Java Runtime Environment, or JRE, is the software required to run any application
deployed on the Java Platform. End-users commonly use a JRE in software packages and Web
browser plug-in. Sun also distributes a superset of the JRE called the Java 2 SDK(more commonly
known as the JDK), which includes development tools such as the Javacompiler,Javadoc, Jarand
debugger.

One of the unique advantages of the concept of a runtime engine is that errors (exceptions)
should not 'crash' the system. Moreover, in runtime engine environments such as Java there exist tools
that attach to the runtime engine and every time that an exception of interest occurs they record
debugging information that existed in memory at the time the exception was thrown (stack and heap
values). These Automated Exception Handling tools provide 'root-cause' information for exceptions in
Java programs that run in production, testing or development environments.

Uses OF JAVA

Blue is a smart card enabled with the secure, cross-platform, object-oriented Java Card API
and technology. Blue contains an actual on-card processing chip, allowing for enhance able and
multiple functionality within a single card. Applets that comply with the Java Card API specification
can run on any third-party vendor card that provides the necessary Java Card Application
Environment (JCAE). Not only can multiple applet programs run on a single card, but new applets
and functionality can be added after the card is issued to the customer

 Java Can be used in Chemistry.


 In NASA also Java is used.
 In 2D and 3D applications java is used.
 In Graphics Programming also Java is used.
 In Animations Java is used.
 In Online and Web Applications Java is used.

JSP :

JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically
generate HTML, XML or other types of documents in response to a Web client request. The
technology allows Java code and certain pre-defined actions to be embedded into static content.

The JSP syntax adds additional XML-like tags, called JSP actions, to be used to invoke built-
in functionality. Additionally, the technology allows for the creation of JSP tag libraries that act as
extensions to the standard HTML or XML tags. Tag libraries provide a platform independent way of
extending the capabilities of a Web server.

JSPs are compiled into Java Servlet by a JSP compiler. A JSP compiler may generate a servlet
in Java code that is then compiled by the Java compiler, or it may generate byte code for the servlet
directly. JSPs can also be interpreted on-the-fly reducing the time taken to reload changes

JavaServer Pages (JSP) technology provides a simplified, fast way to create dynamic web
content. JSP technology enables rapid development of web-based applications that are server and
platform-independent.

Architecture OF JSP
The Advantages of JSP
Active Server Pages (ASP). ASP is a similar technology from Microsoft. The advantages of
JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS-specific
language, so it is more powerful and easier to use. Second, it is portable to other operating systems
and non-Microsoft Web servers. Pure Servlet. JSP doesn't give you anything that you couldn't in
principle do with a Servlet. But it is more convenient to write (and to modify!) regular HTML than to
have a zillion println statements that generate the HTML. Plus, by separating the look from the
content you can put different people on different tasks: your Web page design experts can build the
HTML, leaving places for your Servlet programmers to insert the dynamic content.

Server-Side Includes (SSI). SSI is a widely-supported technology for including externally-


defined pieces into a static Web page. JSP is better because it lets you use Servlet instead of a separate
program to generate that dynamic part. Besides, SSI is really only intended for simple inclusions, not
for "real" programs that use form data, make database connections, and the like. JavaScript.
JavaScript can generate HTML dynamically on the client. This is a useful capability, but only handles
situations where the dynamic information is based on the client's environment.

With the exception of cookies, HTTP and form submission data is not available to JavaScript.
And, since it runs on the client, JavaScript can't access server-side resources like databases, catalogs,
pricing information, and the like. Static HTML. Regular HTML, of course, cannot contain dynamic
information. JSP is so easy and convenient that it is quite feasible to augment HTML pages that only
benefit marginally by the insertion of small amounts of dynamic data. Previously, the cost of using
dynamic data would preclude its use in all but the most valuable instances.

ARCHITECTURE OF JSP

 The browser sends a request to a JSP page.


 The JSP page communicates with a Java bean.
 The Java bean is connected to a database.
 The JSP page responds to the browser.

SERVLETS – FRONT END

The Java Servlet API allows a software developer to add dynamic content to a Web server
using the Java platform. The generated content is commonly HTML, but may be other data such as
XML. Servlet are the Java counterpart to non-Java dynamic Web content technologies such as PHP,
CGI and [Link]. Servlet can maintain state across many server transactions by using HTTP
cookies, session variables or URL rewriting.

The Servlet API, contained in the Java package hierarchy javax. Servlet, defines the expected
interactions of a Web container and a Servlet. A Web container is essentially the component of a Web
server that interacts with the Servlet. The Web container is responsible for managing the lifecycle of
Servlet, mapping a URL to a particular Servlet and ensuring that the URL requester has the correct
access rights.
A Servlet is an object that receives a request and generates a response based on that request.
The basic Servlet package defines Java objects to represent Servlet requests and responses, as well as
objects to reflect the Servlet configuration parameters and execution environment. The package
javax .Servlet. Http defines HTTP-specific subclasses of the generic Servlet elements, including
session management objects that track multiple requests and responses between the Web server and a
client. Servlet may be packaged in a WAR file as a Web application.

Servlet can be generated automatically by Java Server Pages(JSP), or alternately by template


engines such as Web Macro. Often Servlet are used in conjunction with JSPs in a pattern called
"Model 2”, which is a flavour of the model-view-controller pattern.

Servlet are Java technology's answer to CGI programming. They are programs that run on a
Web server and build Web pages. Building Web pages on the fly is useful (and commonly done) for a
number of reasons:.

The Web page is based on data submitted by the user. For example the results pages from
search engines are generated this way, and programs that process orders for e-commerce sites do this
as well. The data changes frequently. For example, a weather-report or news headlines page might
build the page dynamically, perhaps returning a previously built page if it is still up to date. The Web
page uses information from corporate databases or other such sources. For example, you would use
this for making a Web page at an on-line store that lists current prices and number of items in stock.

The Servlet Run-time Environment


A Servlet is a Java class and therefore needs to be executed in a Java VM by a service we call
a Servlet engine. The Servlet engine loads the servlet class the first time the Servlet is requested, or
optionally already when the Servlet engine is started. The Servlet then stays loaded to handle multiple
requests until it is explicitly unloaded or the Servlet engine is shut down.

Some Web servers, such as Sun's Java Web Server (JWS), W3C's Jigsaw and Gefion
Software's Lite Web Server (LWS) are implemented in Java and have a built-in Servlet engine. Other
Web servers, such as Netscape's Enterprise Server, Microsoft's Internet Information Server (IIS) and
the Apache Group's Apache, require a Servlet engine add-on module. The add-on intercepts all
requests for Servlet, executes them and returns the response through the Web server to the client.
Examples of Servlet engine add-ons are Gefion Software's WAI Cool Runner, IBM's Web Sphere,
Live Software's JRun and New Atlanta's Servlet Exec.

All Servlet API classes and a simple Servlet-enabled Web server are combined into the Java
Servlet Development Kit (JSDK), available for download at Sun's official Servlet site .To get started
with Servlet I recommend that you download the JSDK and play around with the sample Servlet.
Life Cycle OF Servlet

 The Servlet lifecycle consists of the following steps:


 The Servlet class is loaded by the container during start-up.

The container calls the init() method. This method initializes the Servlet and must be called
before the Servlet can service any requests. In the entire life of a Servlet, the init() method is called
only once. After initialization, the Servlet can service client-requests.

Each request is serviced in its own separate thread. The container calls the service() method
of the Servlet for every request.

The service() method determines the kind of request being made and dispatches it to an
appropriate method to handle the request. The developer of the Servlet must provide an
implementation for these methods. If a request for a method that is not implemented by the Servlet is
made, the method of the parent class is called, typically resulting in an error being returned to the
requester. Finally, the container calls the destroy() method which takes the Servlet out of service. The
destroy() method like init() is called only once in the lifecycle of a Servlet.

 Request and Response Objects


The do Get method has two interesting parameters: HttpServletRequest and
HttpServletResponse. These two objects give you full access to all information about the request and
let you control the output sent to the client as the response to the request. With CGI you read
environment variables and stdin to get information about the request, but the names of the
environment variables may vary between implementations and some are not provided by all Web
servers.

The HttpServletRequest object provides the same information as the CGI environment
variables, plus more, in a standardized way. It also provides methods for extracting HTTP parameters
from the query string or the request body depending on the type of request (GET or POST). As a
Servlet developer you access parameters the same way for both types of requests. Other methods give
you access to all request headers and help you parse date and cookie headers.

Instead of writing the response to stdout as you do with CGI, you get an OutputStream or a
PrintWriter from the HttpServletResponse. The OuputStream is intended for binary data, such as a
GIF or JPEG image, and the PrintWriter for text output. You can also set all response headers and the
status code, without having to rely on special Web server CGI configurations such as Non Parsed
Headers (NPH). This makes your Servlet easier to install.

ServletConfig and Servlet Context:


There is only one Servlet Context in every application. This object can be used by all the
Servlet to obtain application level information or container details. Every Servlet, on the other hand,
gets its own ServletConfig object. This object provides initialization parameters for a servlet. A
developer can obtain the reference to Servlet Context using either the ServletConfig object or Servlet
Request object.

All servlets belong to one servlet context. In implementations of the 1.0 and 2.0 versions of
the Servlet API all servlets on one host belongs to the same context, but with the 2.1 version of the
API the context becomes more powerful and can be seen as the humble beginnings of an Application
concept. Future versions of the API will make this even more pronounced.

Many servlet engines implementing the Servlet 2.1 API let you group a set of servlets into
one context and support more than one context on the same host. The Servlet Context in the 2.1 API is
responsible for the state of its servlets and knows about resources and attributes available to the
servlets in the context. Here we will only look at how Servlet Context attributes can be used to share
information among a group of servlets.

There are three Servlet Context methods dealing with context attributes: get Attribute, set
Attribute and remove Attribute. In addition the servlet engine may provide ways to configure a servlet
context with initial attribute values. This serves as a welcome addition to the servlet initialization
arguments for configuration information used by a group of servlets, for instance the database
identifier we talked about above, a style sheet URL for an application, the name of a mail server, etc.

JDBC

Java Database Connectivity (JDBC) is a programming framework for Java developers writing
programs that access information stored in databases, spreadsheets, and flat files. JDBC is commonly
used to connect a user program to a "behind the scenes" database, regardless of what database
management software is used to control the database. In this way, JDBC is cross-platform. This article
will provide an introduction and sample code that demonstrates database access from Java programs
that use the classes of the JDBC API, which is available for free download from Sun's site.

A database that another program links to is called a data source. Many data sources, including
products produced by Microsoft and Oracle, already use a standard called Open Database
Connectivity (ODBC). Many legacy C and Perl programs use ODBC to connect to data sources.
ODBC consolidated much of the commonality between database management systems. JDBC builds
on this feature, and increases the level of abstraction. JDBC-ODBC bridges have been created to
allow Java programs to connect to ODBC-enabled database software.
JDBC Architecture
Two-tier and Three-tier Processing Models

The JDBC API supports both two-tier and three-tier processing models for database access.

In the two-tier model, a Java applet or application talks directly to the data source. This
requires a JDBC driver that can communicate with the particular data source being accessed. A user's
commands are delivered to the database or other data source, and the results of those statements are
sent back to the user. The data source may be located on another machine to which the user is
connected via a network. This is referred to as a client/server configuration, with the user's machine as
the client, and the machine housing the data source as the server. The network can be an intranet,
which, for example, connects employees within a corporation, or it can be the Internet.

In the three-tier model, commands are sent to a "middle tier" of services, which then sends the
commands to the data source. The data source processes the commands and sends the results back to
the middle tier, which then sends them to the user.

MIS directors find the three-tier model very attractive because the middle tier makes it
possible to maintain control over access and the kinds of updates that can be made to corporate data.
Another advantage is that it simplifies the deployment of applications. Finally, in many cases, the
three-tier architecture can provide performance advantages.
Until recently, the middle tier has often been written in languages such as C or C++, which
offer fast performance. However, with the introduction of optimizing compilers that translate Java
byte code into efficient machine-specific code and technologies such as Enterprise JavaBeans™, the
Java platform is fast becoming the standard platform for middle-tier development. This is a big plus,
making it possible to take advantage of Java's robustness, multithreading, and security features.

With enterprises increasingly using the Java programming language for writing server code,
the JDBC API is being used more and more in the middle tier of a three-tier architecture. Some of the
features that make JDBC a server technology are its support for connection pooling, distributed
transactions, and disconnected rowsets. The JDBC API is also what allows access to a data source
from a Java middle tier.

Modules

 Login
 Dataset
 Detecting Fake
 Feature Selection

Module Description

1. Login

It is the confirmation cycle, After Registration the Admin can login the record,
for login the Admin can give the mail id and secret key for his/him account. The
customers can login once they have successfully registered through this module. The
Login Module is a portal module that allows users to type a user name and password
to log in. You can add this module on any module tab to allow users to log in to the
system. The login module is the first page end-users. In most cases, end-users are the
customers using the product. see when logging in to your application. You can set up
your login page to verify end-user credentials or use an SSO (single sign-on)
authentication service. The login module provides user management features,
allowing administrators to create, modify, and delete user accounts. It also allows
users to reset their passwords, which enhances the overall user experience.

2. Data Set
The Concrete Slump Test informational index from UCI Machine Learning
Repository. The point of this paper is to accomplish high F-measure results by
diminishing the quantity of highlights utilized in the order cycle utilizing our
refreshed ABC-based element determination strategy.

3. Detecting Fake
In this paper a model is build based on the Artificial bee colony algorithm word
relatives to how often they are used in other articles in your dataset. Since this
problem is a kind of text classification, Implementing a best as this is standard for
text-based processing. The actual goal is in developing a model which was the text
transformation and choosing which type of text.

4. Feature Selection
Artificial Bee Colony calculation is an enhancement calculation that propelled by
astute scrounging conduct of bumble bees. In ABC model, there are three sorts of
honey bee gatherings, for example, utilized honey bees, spectator honey bees and
scout honey bees. The likely arrangements are addressed by food sources and the food
sources have a utilized honey bee that appointed to them. A big part of the settlement
is gotten from utilized honey bees and the other half incorporates passerby honey
bees. The quantity of each kind of honey bee bunches is equivalent. Likewise, number
of food sources is equivalent to number of honey bees in each gathering. Utilized
honey bees investigate food sources and their wellness quality addressed by F-
measure esteems. Passerby honey bees get data about sources and endeavor them.
Scout honey bees produce new food sources to be supplanted with depleted ones.

Dataflow Diagram

Implementation

[Link]

<html>

<head>

<title>Fake News Detection</title>

<link rel="stylesheet" href="css/[Link]" type="text/css" />


<link href="css/[Link]" rel="stylesheet" type="text/css" />

<link href="css/[Link]" rel="stylesheet" type="text/css" />

<link href="css/[Link]" rel="stylesheet" type="text/css" />

<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

<script type="text/javascript" src="JavaScript/[Link]"></script>

<style type="text/css">

body

background: url(images/[Link]) no-repeat center fixed;

position: relative;

.loginbg

margin-top: 26%;

margin-left: 64%;

.loginbg1

padding:20px;

background:#C0C0C0;
width:270px;

border-radius:10px;

border:2px solid #003263;

.slied

position:relative;

bottom: 580px;

-webkit-animation: slide 0.8s forwards;

-webkit-animation-delay: 1s;

animation: slide 0.8s forwards;

animation-delay: 1s;

overflow: hidden;

@-webkit-keyframes slide {

100% { bottom: 0; }

@keyframes slide {

100% { bottom: 0; }

</style>
<script type="text/javascript" language="javascript">

[Link](1)

</script>

</head>

<body>

<form name="form1" method="post" action="[Link]" id="form1">

<div>

<input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />

<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />

<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT"


value="" />

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"


value="/wEPDwUKLTc1ODIzODgyMWQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0Q
mFja0tleV9fFgIFDEltYWdlQnV0dG9uMQUMSW1hZ2VCdXR0b24yBpcmCyr76U6IxBq1
NLaESn4DjT0=" />

</div>

<script type="text/javascript">

//<![CDATA[

var theForm = [Link]['form1'];

if (!theForm) {

theForm = document.form1;

function __doPostBack(eventTarget, eventArgument) {

if (![Link] || ([Link]() != false)) {


theForm.__EVENTTARGET.value = eventTarget;

theForm.__EVENTARGUMENT.value = eventArgument;

[Link]();

//]]>

[Link]

<%--

Document : Login

Created on : Feb 23, 2021, 11:27:42 AM

Author : Admin

--%>

<%@page import="[Link].*;" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>JSP Page</title>

</head>

<body>

<%

String id = [Link]("id");

String pwd = [Link]("pwd");


[Link]("[Link]");

Connection con =
[Link]("jdbc:mysql://localhost:3306/fakenewsdetection","root","root
");

Statement stmt = [Link]();

ResultSet rss = [Link]("select * from admin where ID='"+id+"' and


PWD='"+pwd+"'");

if([Link]())

[Link]("[Link]");

else

[Link]("<script type=\"text/javascript\">");

[Link]("alert('This Login in Invalid');");

[Link]("location='[Link]';");

[Link]("</script>");

[Link]();

%>

</body>

</html>

[Link]

<html>
<head>

<title>Fake News Detection</title>

<link href="[Link]" rel="stylesheet"/>

</head>

<body bgcolor="#bdc3c7">

<div class="header">

<br>

<h2 align="center">Fake News Detection Using Machine Learning

</h2>

</div>

<div class="menu">

<br>

<ul class="nav">

<li><a href="[Link]" class="active">Home</a></li>

<li><a href="[Link]">View News </a></li>

<li><a href="[Link]">Logout</a></li>

</ul>

</div>

<div class="content">

<br><br>

<center><img src="images/[Link]" height="300" width="500" /></center>

</div>

<div class="footer">

<br>
<h4 align="center">All Rights Reserved 2021</h4>

</div>

</body>

</html>

[Link]

<%@page import="[Link].*;" %>

<html>

<head>

<title>Fake News Detection</title>

<link href="[Link]" rel="stylesheet"/>

<style>

.content a

background: red;

padding: 10px;

text-decoration: none;

margin-left: 100px;

color: white;

</style>

</head>

<body bgcolor="#bdc3c7">
<div class="header">

<br>

<h2 align="center">Fake News Detection Using Machine Learning

</h2>

</div>

<div class="menu">

<br>

<ul class="nav">

<li><a href="[Link]">Home</a></li>

<li><a href="[Link]" class="active">View News </a></li>

<li><a href="[Link]">Logout</a></li>

</ul>

</div>

<div class="content">

<br> <br> <br>

<a href="[Link]">Detection</a>

<br> <br> <br>

<br>

<table align="center">

<tr>

<th>Date</th>

<th>Name</th>

<th>Tweet_News</th>
</tr>

<%

[Link]("[Link]");

Connection con =
[Link]("jdbc:mysql://localhost:3306/fakenewsdetection","root","root
");

Statement stmt = [Link]();

ResultSet rss = [Link]("select * from data");

while([Link]())

%>

<tr>

<td><%=[Link]("date")%></td>

<td><%=[Link]("full_name")%></td>

<td><%=[Link]("tweet_text")%></td>

<%

%>

</tr>

</table>
</div>

<div class="footer">

<br>

<h4 align="center">All Rights Reserved 2021</h4>

</div>

</body>

</html>

[Link]

<%@page import="[Link]"%>

<%@page import="[Link].*;" %>

<html>

<head>

<title>Fake News Detection</title>

<link href="[Link]" rel="stylesheet"/>

</head>

<body bgcolor="#bdc3c7">

<div class="header">

<br>

<h2 align="center">Fake News Detection Using Machine Learning

</h2>

</div>

<div class="menu">

<br>
<ul class="nav">

<li><a href="[Link]">Home</a></li>

<li><a href="[Link]" class="active">View News </a></li>

<li><a href="[Link]">Logout</a></li>

</ul>

</div>

<div class="content">

<br><br>

<h2 align="center">Result</h2>

<br><br>

<table align="center" border="1">

<tr>

<th>Date</th>

<th>Name</th>

<th>Tweet_News</th>

</tr>

<%

[Link]("[Link]");

Connection con =
[Link]("jdbc:mysql://localhost:3306/fakenewsdetection","root","root
");

Statement stmt = [Link]();


double[] xvalues = new double[]{-6.0,-5.0,-4.0,-3.0,-2.0,-
1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0};

double[] yvalues = new double[]{0.002472623, 0.006692851, 0.01798621,


0.047425873, 0.119202922, 0.268941421,

0.5, 0.731058579, 0.880797078, 0.952574127, 0.98201379, 0.993307149,


0.997527377};

ResultSet rss = [Link]("select * from data where"

+ " retweets='0'");

while([Link]())

File abc = new File("[Link]");

for (int x = 0; x < [Link]; x++) {

double sp = yvalues[0];

double cm = yvalues[ [Link] -1 ];

double wtr = 1.0;

double[] xvalues1 = new double[]{-6.0,-5.0,-4.0,-3.0,-2.0,-


1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0};

double[] yvalues1 = new double[]{0.002472623, 0.006692851, 0.01798621,


0.047425873, 0.119202922, 0.268941421,
0.5, 0.731058579, 0.880797078, 0.952574127, 0.98201379, 0.993307149,
0.997527377};

double slg = 1.0;

double sl = 1.0;

double m = xvalues[ [Link] / 2];

double[] estimates = new double[]{sp, m, cm, wtr, slg, sl};

%>

<tr>

<td><%=[Link]("date")%></td>

<td><%=[Link]("full_name")%></td>

<td><%=[Link]("tweet_text")%></td>

<%

%>

</tr>

</table>

</div>

<div class="footer">
<br>

<h4 align="center">All Rights Reserved 2021</h4>

</div>

</body>

</html>

[Link]

import [Link];

import [Link];

import [Link];

public class ArtificialBeeColony {

public int MAX_LENGTH;

public int NP;

public int FOOD_NUMBER;

public int LIMIT;

public int MAX_EPOCH; /*The number of cycles for foraging {a stopping


criteria}*/

public int MIN_SHUFFLE;

public int MAX_SHUFFLE;

public int acc;

public Random rand;

public ArrayList<Honey> foodSources;

public ArrayList<Honey> solutions;


public Honey gBest;

public int epoch;

/* Instantiates the artificial bee colony algorithm along with its parameters.

* @param: size of n queens

*/

public ArtificialBeeColony(int n) {

MAX_LENGTH = n;

NP = 40; //pop size 20 to 40 or even 100

FOOD_NUMBER = NP/2;

LIMIT = 50;

MAX_EPOCH = 1000;

MIN_SHUFFLE = 8;

MAX_SHUFFLE = 20;

gBest = null;

epoch = 0;

acc=0;

/* Starts the particle swarm optimization algorithm solving for n queens.

*/
public boolean algorithm() {

foodSources = new ArrayList<Honey>();

solutions = new ArrayList<Honey>();

rand = new Random();

boolean done = false;

epoch = 0;

acc = 0;

initialize();

memorizeBestFoodSource();

while(!done) {

if(epoch < MAX_EPOCH) {

if([Link]() == 0) {

done = true;

sendEmployedBees();

memorizeBestFoodSource();

sendScoutBees();

epoch++;

// This is here simply to show the runtime status.

[Link]("Epoch: " + epoch);


} else {

done = true;

if(epoch == MAX_EPOCH) {

[Link]("No Solution found");

done = false;

[Link]("done.");

[Link]("Completed " + epoch + " epochs.");

for(Honey h: foodSources) {

if([Link]() == 0) {

[Link]("SOLUTION");

[Link](h);

printSolution(h);

[Link]("conflicts:"+[Link]());

}
return done;

/* Sends the employed bees to optimize the solution

*/

public void sendEmployedBees() {

int neighborBeeIndex = 0;

Honey currentBee = null;

Honey neighborBee = null;

for(int i = 0; i < FOOD_NUMBER; i++) {

//A randomly chosen solution is used in producing a mutant solution of the solution i

//neighborBee = getRandomNumber(0, Food_Number-1);

neighborBeeIndex = getExclusiveRandomNumber(FOOD_NUMBER-1, i);

currentBee = [Link](i);

neighborBee = [Link](neighborBeeIndex);

sendToWork(currentBee, neighborBee);

/* Sends the onlooker bees to optimize the solution. Onlooker bees work on the best
solutions from the employed bees. best solutions have high selection probability.

*/
public void sendOnlookerBees() {

int i = 0;

int t = 0;

int neighborBeeIndex = 0;

Honey currentBee = null;

Honey neighborBee = null;

while(t < FOOD_NUMBER) {

currentBee = [Link](i);

if([Link]() < [Link]()) {

t++;

neighborBeeIndex = getExclusiveRandomNumber(FOOD_NUMBER-1, i);

neighborBee = [Link](neighborBeeIndex);

sendToWork(currentBee, neighborBee);

i++;

if(i == FOOD_NUMBER) {

i = 0;

/* The optimization part of the algorithm. improves the currentbee by choosing a


random neighbor bee. the changes is a randomly generated number of times to try and
improve the current solution.
*

* @param: the currently selected bee

* @param: a randomly selected neighbor bee

* @param: the number of times to try and improve the solution

*/

public void sendToWork(Honey currentBee, Honey neighborBee) {

int newValue = 0;

int tempValue = 0;

int tempIndex = 0;

int prevConflicts = 0;

int currConflicts = 0;

int parameterToChange = 0;

//get number of conflicts

prevConflicts = [Link]();

//The parameter to be changed is determined randomly

parameterToChange = getRandomNumber(0, MAX_LENGTH-1);

/*v_{ij}=x_{ij}+\phi_{ij}*(x_{kj}-x_{ij})

solution[param2change]=Foods[i][param2change]+(Foods[i][param2change]-
Foods[neighbour][param2change])*(r-0.5)*2;

*/

tempValue = [Link](parameterToChange);
newValue = (int)(tempValue+(tempValue -
[Link](parameterToChange))*([Link]()-0.5)*2);

//trap the value within upper bound and lower bound limits

if(newValue < 0) {

newValue = 0;

if(newValue > MAX_LENGTH-1) {

newValue = MAX_LENGTH-1;

//get the index of the new value

tempIndex = [Link](newValue);

//swap

[Link](parameterToChange, newValue);

[Link](tempIndex, tempValue);

[Link]();

currConflicts = [Link]();

//greedy selection

if(prevConflicts < currConflicts) { //No


improvement

[Link](parameterToChange, tempValue);

[Link](tempIndex, newValue);
[Link]();

[Link]([Link]() + 1);

} else {
//improved solution

[Link](0);

/* Finds food sources which have been abandoned/reached the limit.

* Scout bees will generate a totally random solution from the existing and it will also reset
its trials back to zero.

*/

public void sendScoutBees() {

Honey currentBee = null;

int shuffles = 0;

for(int i =0; i < FOOD_NUMBER; i++) {

currentBee = [Link](i);

if([Link]() >= LIMIT) {

shuffles = getRandomNumber(MIN_SHUFFLE, MAX_SHUFFLE);

for(int j = 0; j < shuffles; j++) {

randomlyArrange(i);

}
[Link]();

[Link](0);

/* Sets the fitness of each solution based on its conflicts

*/

/* Sets the selection probability of each solution. the higher the fitness the greater the
probability

*/

/* Initializes all of the solutions' placement of queens in ramdom positions.

*/

public void initialize() {

int newFoodIndex = 0;

int shuffles = 0;
for(int i = 0; i < FOOD_NUMBER; i++) {

Honey newHoney = new Honey(MAX_LENGTH);

[Link](newHoney);

newFoodIndex = [Link](newHoney);

shuffles = getRandomNumber(MIN_SHUFFLE, MAX_SHUFFLE);

for(int j = 0; j < shuffles; j++) {

randomlyArrange(newFoodIndex);

[Link](newFoodIndex).computeConflicts();

} // i

/* Gets a random number in the range of the parameters

* @param: the minimum random number

* @param: the maximum random number

* @return: random number

*/

public int getRandomNumber(int low, int high) {

return (int)[Link]((high - low) * [Link]() + low);


}

/* Gets a random number with the exception of the parameter

* @param: the maximum random number

* @param: number to to be chosen

* @return: random number

*/

public int getExclusiveRandomNumber(int high, int except) {

boolean done = false;

int getRand = 0;

while(!done) {

getRand = [Link](high);

if(getRand != except){

done = true;

return getRand;

/* Changes a position of the queens in a particle by swapping a randomly selected position

*
* @param: index of the solution

*/

public void randomlyArrange(int index) {

int positionA = getRandomNumber(0, MAX_LENGTH - 1);

int positionB = getExclusiveRandomNumber(MAX_LENGTH - 1, positionA);

Honey thisHoney = [Link](index);

int temp = [Link](positionA);

[Link](positionA, [Link](positionB));

[Link](positionB, temp);

/* Memorizes the best solution

*/

public void memorizeBestFoodSource() {

/* Prints the nxn board with the queens

* @param: a chromosome

*/

public void printSolution(Honey solution) {

String board[][] = new String[MAX_LENGTH][MAX_LENGTH];


// Clear the board.

for(int x = 0; x < MAX_LENGTH; x++) {

for(int y = 0; y < MAX_LENGTH; y++) {

board[x][y] = "";

for(int x = 0; x < MAX_LENGTH; x++) {

board[x][[Link](x)] = "Q";

// Display the board.

[Link]("Board:");

for(int y = 0; y < MAX_LENGTH; y++) {

for(int x = 0; x < MAX_LENGTH; x++) {

if(board[x][y] == "Q") {

[Link]("Q ");

} else {

[Link](". ");

[Link]("\n");

}
}

/* gets the solutions

* @return: solutions

*/

public ArrayList<Honey> getSolutions() {

return solutions;

/* gets the epoch

* @return: epoch

*/

public int getEpoch() {

return epoch;

/* sets the max epoch

* @return: new max epoch value

*/

public void setMaxEpoch(int newMaxEpoch) {

this.MAX_EPOCH = newMaxEpoch;
}

/* gets the population size

* @return: pop size

*/

public int getPopSize() {

return [Link]();

/* gets the start size

* @return: start size

*/

public int getStartSize() {

return NP;

/* gets the number of food

* @return: food number

*/

public double getFoodNum() {

return FOOD_NUMBER;
}

/* gets the limit for trials for all food sources

* @return: number of trials limit

*/

public int getLimit() {

return LIMIT;

/* sets the limit for trials for all food sources

* @param: new trial limit

*/

public void setLimit(int newLimit) {

[Link] = newLimit;

/* gets the max epoch

* @return: max epoch

*/

public int getMaxEpoch() {

return MAX_EPOCH;
}

/* gets the min shuffle

* @return: min shuffle

*/

public int getShuffleMin() {

return MIN_SHUFFLE;

/* gets the max shuffle

* @return: max shuffle

*/

public int getShuffleMax() {

return MAX_SHUFFLE;

Design Page

.header

height: 100px;

width: 100%;
background: #0AA3F3;

.menu

height: 80px;

width: 100%;

background: #CAE7FC;

.content

min-height: 400px;

height: auto;

width: 100%;

background: white;

.footer

height: 80px;

width: 100%;

background: #0AA3F3;
}

.header h2

color: white;

[Link]

list-style:none;

margin:0;

padding:0;

margin-left : 150px;

[Link] li

float:left;

margin:5px 0px 5px 3px;

[Link] li a

color:white;

text-decoration:none;

background:#CAE7FC;
padding:10px 15px;

float:left;

[Link] li a:hover

background: #0AA3F3;

color: white;

[Link] li [Link]

background: #0AA3F3;

color: white;

.content img

margin-left: 50px;

System Testing And Validation

Testing

The various levels of testing are

1. White Box Testing


2. Black Box Testing
3. Unit Testing
4. Functional Testing
5. Performance Testing
6. Integration Testing
7. Objective
8. Integration Testing
9. Validation Testing
10. System Testing
11. Structure Testing
12. Output Testing
13. User Acceptance Testing

White Box Testing

White-box testing (also known as clear box testing, glass box testing, transparent
box testing, and structural testing) is a method of testing software that tests internal
structures or workings of an application, as opposed to its functionality (i.e. black-box
testing). In white-box testing an internal perspective of the system, as well as programming
skills, are used to design test cases. The tester chooses inputs to exercise paths through the
code and determine the appropriate outputs. This is analogous to testing nodes in a circuit,
e.g. in-circuit testing (ICT).

While white-box testing can be applied at the unit, integration and system levels of
the software testing process, it is usually done at the unit level. It can test paths within a unit,
paths between units during integration, and between subsystems during a system–level test.
Though this method of test design can uncover many errors or problems, it might not detect
unimplemented parts of the specification or missing requirements.

White-box test design techniques include:

 Control flow testing


 Data flow testing
 Branch testing
 Path testing
 Statement coverage
 Decision coverage
White-box testing is a method of testing the application at the level of the source code.
The test cases are derived through the use of the design techniques mentioned above: control
flow testing, data flow testing, branch testing, path testing, statement coverage and decision
coverage as well as modified condition/decision coverage. White-box testing is the use of
these techniques as guidelines to create an error free environment by examining any fragile
code.

These White-box testing techniques are the building blocks of white-box testing, whose
essence is the careful testing of the application at the source code level to prevent any hidden
errors later on. These different techniques exercise every visible path of the source code to
minimize errors and create an error-free environment. The whole point of white-box testing is
the ability to know which line of the code is being executed and being able to identify what
the correct output should be.

Levels

1. Unit testing. White-box testing is done during unit testing to ensure that the code is
working as intended, before any integration happens with previously tested code.
White-box testing during unit testing catches any defects early on and aids in any
defects that happen later on after the code is integrated with the rest of the application
and therefore prevents any type of errors later on.
2. Integration testing. White-box testing at this level are written to test the interactions of
each interface with each other. The Unit level testing made sure that each code was
tested and working accordingly in an isolated environment and integration examines
the correctness of the behavior in an open environment through the use of white-box
testing for any interactions of interfaces that are known to the programmer.
3. Regression testing. White-box testing during regression testing is the use of recycled
white-box test cases at the unit and integration testing levels.

White-box testing's basic procedures involve the understanding of the source code that
you are testing at a deep level to be able to test them. The programmer must have a deep
understanding of the application to know what kinds of test cases to create so that every
visible path is exercised for testing. Once the source code is understood then the source code
can be analysed for test cases to be created. These are the three basic steps that white-box
testing takes in order to create test cases:

1. Input, involves different types of requirements, functional specifications, detailed


designing of documents, proper source code, security specifications. This is the
preparation stage of white-box testing to layout all of the basic information.
2. Processing Unit, involves performing risk analysis to guide whole testing process,
proper test plan, execute test cases and communicate results. This is the phase of
building test cases to make sure they thoroughly test the application the given results
are recorded accordingly.
3. Output; prepare final report that encompasses all of the above preparations and
results.
Black Box Testing

Black-box testing is a method of software testing that examines the functionality of


an application (e.g. what the software does) without peering into its internal structures or
workings (see white-box testing). This method of test can be applied to virtually every level
of software testing: unit, integration, system and acceptance. It typically comprises most if
not all higher level testing, but can also dominate unit testing as well

Test procedures

Specific knowledge of the application's code/internal structure and programming


knowledge in general is not required. The tester is aware of what the software is supposed to
do but is not aware of how it does it. For instance, the tester is aware that a particular input
returns a certain, invariable output but is not aware of how the software produces the output
in the first place.

Test cases
Test cases are built around specifications and requirements, i.e., what the application
is supposed to do. Test cases are generally derived from external descriptions of the software,
including specifications, requirements and design parameters. Although the tests used are
primarily functional in nature, non-functional tests may also be used. The test designer selects
both valid and invalid inputs and determines the correct output without any knowledge of the
test object's internal structure.
Test design techniques
Typical black-box test design techniques include:

 Decision table testing


 All-pairs testing
 State transition tables
 Equivalence partitioning
 Boundary value analysis
Unit testing

In computer programming, unit testing is a method by which individual units


of source code, sets of one or more computer program modules together with associated
control data, usage procedures, and operating procedures are tested to determine if they are fit
for use. Intuitively, one can view a unit as the smallest testable part of an application.
In procedural programming, a unit could be an entire module, but is more commonly an
individual function or procedure. In object-oriented programming, a unit is often an entire
interface, such as a class, but could be an individual method. Unit tests are created by
programmers or occasionally by white box testers during the development process.

Ideally, each test case is independent from the others. Substitutes such as method
stubs, mock objects, fakes, and test harnesses can be used to assist testing a module in
isolation. Unit tests are typically written and run by software developers to ensure that code
meets its design and behaves as intended. Its implementation can vary from being very
manual (pencil and paper)to being formalized as part of build automation.

Testing will not catch every error in the program, since it cannot evaluate every
execution path in any but the most trivial programs. The same is true for unit testing.
Additionally, unit testing by definition only tests the functionality of the units themselves.
Therefore, it will not catch integration errors or broader system-level errors (such as functions
performed across multiple units, or non-functional test areas such as performance).

Unit testing should be done in conjunction with other software testing activities, as
they can only show the presence or absence of particular errors; they cannot prove a complete
absence of errors. In order to guarantee correct behaviour for every execution path and every
possible input, and ensure the absence of errors, other techniques are required, namely the
application of formal methods to proving that a software component has no unexpected
behaviour.

Software testing is a combinatorial problem. For example, every Boolean decision statement
requires at least two tests: one with an outcome of "true" and one with an outcome of "false".
As a result, for every line of code written, programmers often need 3 to 5 lines of test code.

This obviously takes time and its investment may not be worth the effort. There are
also many problems that cannot easily be tested at all – for example those that
are nondeterministic or involve multiple threads. In addition, code for a unit test is likely to
be at least as buggy as the code it is testing. Fred Brooks in The Mythical Man-
Month quotes: never take two chronometers to sea. Always take one or three. Meaning, if
two chronometers contradict, how do you know which one is correct?

Another challenge related to writing the unit tests is the difficulty of setting up
realistic and useful tests. It is necessary to create relevant initial conditions so the part of the
application being tested behaves like part of the complete system. If these initial conditions
are not set correctly, the test will not be exercising the code in a realistic context, which
diminishes the value and accuracy of unit test results.

To obtain the intended benefits from unit testing, rigorous discipline is needed
throughout the software development process. It is essential to keep careful records not only
of the tests that have been performed, but also of all changes that have been made to the
source code of this or any other unit in the software. Use of a version control system is
essential. If a later version of the unit fails a particular test that it had previously passed, the
version-control software can provide a list of the source code changes (if any) that have been
applied to the unit since that time.

It is also essential to implement a sustainable process for ensuring that test case
failures are reviewed daily and addressed immediately if such a process is not implemented
and ingrained into the team's workflow, the application will evolve out of sync with the unit
test suite, increasing false positives and reducing the effectiveness of the test suite.

Unit testing embedded system software presents a unique challenge: Since the
software is being developed on a different platform than the one it will eventually run on, you
cannot readily run a test program in the actual deployment environment, as is possible with
desktop programs.
Functional testing

Functional testing is a quality assurance (QA) process and a type of black box
testing that bases its test cases on the specifications of the software component under test.
Functions are tested by feeding them input and examining the output, and internal program
structure is rarely considered (not like in white-box testing). Functional Testing usually
describes what the system does.

Functional testing differs from system testing in that functional testing "verifies a program by
checking it against ... design document(s) or specification(s)", while system testing
"validate a program by checking it against the published user or system requirements"
(Kaner, Falk, Nguyen 1999, p. 52).

Functional testing typically involves five steps .The identification of functions that the
software is expected to perform

1. The creation of input data based on the function's specifications


2. The determination of output based on the function's specifications
3. The execution of the test case
4. The comparison of actual and expected outputs
Performance testing

In software engineering, performance testing is in general testing performed to


determine how a system performs in terms of responsiveness and stability under a particular
workload. It can also serve to investigate, measure, validate or verify
other quality attributes of the system, such as scalability, reliability and resource usage.

Performance testing is a subset of performance engineering, an emerging computer


science practice which strives to build performance into the implementation, design and
architecture of a system.

Testing types

Load testing

Load testing is the simplest form of performance testing. A load test is usually
conducted to understand the behaviour of the system under a specific expected load. This
load can be the expected concurrent number of users on the application performing a specific
number of transactions within the set duration. This test will give out the response times of all
the important business critical transactions. If the database, application server, etc. are also
monitored, then this simple test can itself point towards bottlenecks in the application
software.

Stress testing

Stress testing is normally used to understand the upper limits of capacity within the
system. This kind of test is done to determine the system's robustness in terms of extreme
load and helps application administrators to determine if the system will perform sufficiently
if the current load goes well above the expected maximum.

Soak testing

Soak testing, also known as endurance testing, is usually done to determine if the
system can sustain the continuous expected load. During soak tests, memory utilization is
monitored to detect potential leaks. Also important, but often overlooked is performance
degradation. That is, to ensure that the throughput and/or response times after some long
period of sustained activity are as good as or better than at the beginning of the test. It
essentially involves applying a significant load to a system for an extended, significant period
of time. The goal is to discover how the system behaves under sustained use.

Spike testing

Spike testing is done by suddenly increasing the number of or load generated by,
users by a very large amount and observing the behaviour of the system. The goal is to
determine whether performance will suffer, the system will fail, or it will be able to handle
dramatic changes in load.

Configuration testing

Rather than testing for performance from the perspective of load, tests are created to
determine the effects of configuration changes to the system's components on the system's
performance and behaviour. A common example would be experimenting with different
methods of load-balancing.

Isolation testing

Isolation testing is not unique to performance testing but involves repeating a test
execution that resulted in a system problem. Often used to isolate and confirm the fault
domain.

Integration testing
Integration testing (sometimes called integration and testing, abbreviated I&T) is
the phase in software testing in which individual software modules are combined and tested
as a group. It occurs after unit testing and before validation testing. Integration testing takes
as its input modules that have been unit tested, groups them in larger aggregates, applies tests
defined in an integration test plan to those aggregates, and delivers as its output the integrated
system ready for system testing.

Purpose

The purpose of integration testing is to verify functional, performance, and


reliability requirements placed on major design items. These "design items", i.e. assemblages
(or groups of units), are exercised through their interfaces using black box testing, success
and error cases being simulated via appropriate parameter and data inputs. Simulated usage of
shared data areas and inter-process communication is tested and individual subsystems are
exercised through their input interface.

Test cases are constructed to test whether all the components within assemblages
interact correctly, for example across procedure calls or process activations, and this is done
after testing individual modules, i.e. unit testing. The overall idea is a "building block"
approach, in which verified assemblages are added to a verified base which is then used to
support the integration testing of further assemblages.

Some different types of integration testing are big bang, top-down, and bottom-up.
Other Integration Patterns are: Collaboration Integration, Backbone Integration, Layer
Integration, Client/Server Integration, Distributed Services Integration and High-frequency
Integration.

Big Bang

In this approach, all or most of the developed modules are coupled together to form a
complete software system or major part of the system and then used for integration testing.
The Big Bang method is very effective for saving time in the integration testing process.
However, if the test cases and their results are not recorded properly, the entire integration
process will be more complicated and may prevent the testing team from achieving the goal
of integration testing.

A type of Big Bang Integration testing is called Usage Model testing. Usage Model
Testing can be used in both software and hardware integration testing. The basis behind this
type of integration testing is to run user-like workloads in integrated user-like environments.
In doing the testing in this manner, the environment is proofed, while the individual
components are proofed indirectly through their use.

Usage Model testing takes an optimistic approach to testing, because it expects to


have few problems with the individual components. The strategy relies heavily on the
component developers to do the isolated unit testing for their product. The goal of the
strategy is to avoid redoing the testing done by the developers, and instead flesh-out problems
caused by the interaction of the components in the environment.

For integration testing, Usage Model testing can be more efficient and provides better
test coverage than traditional focused functional integration testing. To be more efficient and
accurate, care must be used in defining the user-like workloads for creating realistic scenarios
in exercising the environment. This gives confidence that the integrated environment will
work as expected for the target customers.

Top-down and Bottom-up

Bottom Up Testing is an approach to integrated testing where the lowest level


components are tested first, then used to facilitate the testing of higher level components. The
process is repeated until the component at the top of the hierarchy is tested.

All the bottom or low-level modules, procedures or functions are integrated and then
tested. After the integration testing of lower level integrated modules, the next level of
modules will be formed and can be used for integration testing. This approach is helpful only
when all or most of the modules of the same development level are ready. This method also
helps to determine the levels of software developed and makes it easier to report testing
progress in the form of a percentage.

Top Down Testing is an approach to integrated testing where the top integrated
modules are tested and the branch of the module is tested step by step until the end of the
related module.

Sandwich Testing is an approach to combine top down testing with bottom up


testing.

The main advantage of the Bottom-Up approach is that bugs are more easily found. With
Top-Down, it is easier to find a missing branch link.
Validation

In that case, you can use the CustomValidator control. The CustomValidator control in Java
allows you to create your own custom logic to validate user data. The CustomValidator
Control can be used on the client side and server side. JavaScript is used for client validation;
you can use any. Some of the popular Java validators are RequiredFieldValidator,
CompareValidator, RangeValidator, RegularExpressionValidator, ValidationSummary, and
CustomValidator. Server-side validation helps prevent users from bypassing validation by
disabling or changing the client script. Security Note: By default, Java Web pages
automatically validate that malicious users are not attempting to send script or HTML
elements to your application.

Introduction

This article explains validation in the Web API. Here I show the step-by-step procedure to
create the application using validation.

Validation

How validation works is like testing to determine that what the user entered in the field is
valid. After validating the entered field, it checks that it is in the correct format, specified
length, and you can compare the input value in various fields or against values. We can use
the validation for various types of information. That will be explained by the sample
application.

Types of Validation

Here we define the various types of validation that we can be use in our application. These
are as follows:

1. Required entry: It ensures the required field. The user cannot skip the entry.
2. Compare Value: It is ensures that the comparison of the user's entry with the constant
value or against the value of another constant or a specific data type. We use the
comparison operator like equal, greater than, less than.
3. Range checking: It checks the range of the input values with the minimum and
maximum range that is required for the input value. We can use the range checker with
the pairs of numbers, dates and alphabetic characters.
4. Pattern matching: It is used for checking the pattern of an input value that specifies the
sequence of characters.
5. Remote: It is used for checking whether the value exists on the server side.

System Maintenance

Software implementation Java is a new computing platform that simplifies application


development in the highly distributed environment of the Internet. Computing relies on
sharing of resources to achieve coherence and economies of scale, similar to a utility over a
network.

This section describes the five software implementation process as:

1. The implementation processes contains software preparation and transition activities, such
as the conception and creation of the implementation plan, the preparation for handling
problems identified during development, and the follow-up medical records management,

2. The problem and modification analysis process, which is executed once the applications
has become the responsibility of the implementation group.

3. The process considering the implementation of the modification itself.

4. The process acceptance of the modification, by confirming the modified work with the
individual who submitted the request in order to make sure the modification provided a
solution.

5. Finally, the last implementation process, also an event which does not occur on daily basis,
is the retirement of a piece of software.
Screen Shots

Login Page

Home Page
View News

Fake Detection
Conclusion

Fake news is categorized as any kind of cooked-up story with an intention to deceive or to
mislead. In this paper we are trying to present the solution for fake news detection task by
using Machine Learning techniques. Many events have resulted to a rise in the prominence
and spread of Twitter news. The widespread impacts of the massive onset of fake news can
be seen, humans are conflicting if not outright poor detectors of fake news. With this,
endeavours are being made to automate the task of fake news detection. The most
mainstream of such actions include blacklisting of sources and authors that are unreliable.
Even though these tools are useful, but in order to produce a progressive complete end to end
solution, we are required to represent for tougher cases where reliable sources and authors are
responsible for releasing fake news. Here, the purpose of this project was to build a model
that help us to recognize the language patterns that can be used to classify fake and real news
with the help of ML techniques(ABC Algorithm). The outcomes of this project shows the
capability of ML to be fruitful in this task. We have tried to build a model that helps in
catching many intuitive indications of real and fake news as well as in the visualization of the
classification decision.

Future Enhancement

Now-a-days fake news is such a big problem that it is affecting our society as well as our
facts and opinions. The problem that needs to be solved can be solved using AI and Machine
learning techniques.

Reference

[1]. Economic and Social Research Council. Using Social Mmedia. Available at:
[Link]

[2]. Gil, P. Available at: [Link] 2019, April 22.

[3]. E. C. Tandoc Jr et al. “Defining fake news a typology of scholarly definitions”. Digital Journalism
, 1–17. 2017.

[4]. J. Radianti et al. “An Overview of Public Concerns During the Recovery Period after a Major
Earthquake: Nepal Twitter Analysis.” HICSS '16 Proceedings of the 2016 49th Hawaii International
Conference on System Sciences (HICSS) (pp. 136-145). Washington, DC, USA : IEEE. 2016.

[5]. Alkhodair S A, Ding S H.H, Fung B C M, Liu J 2020 “Detecting breaking news rumors of
emerging topics in social media” Inf. Process. Manag. 2020, 57, 102018.

[6]. Jeonghee Yi et al. “Sentiment analyzer: Extracting sentiments about a given topic using natural
language processing techniques. ”In Data Mining, 2003. ICDM 2003. Third IEEE International
Conference (pp. 427-434). [Link] 200).2003

[7]. Tapaswi et al. “Treebank based deep grammar acquisition and Part-Of-Speech Tagging for
Sanskrit m sentences.” Software Engineering (CONSEG), on Software Engineering (CONSEG), (pp.
1-4). IEEE. 2012

[8]. Ranjan et al. “Part of speech tagging and local word grouping techniques for natural language
parsing in Hindi”. In Proceedings of the 1st International Conference on Natural Language Processing
(ICON 2003). Semanticscholar. 2003
[9]. MonaDiab et al. Automatic Tagging of Arabic Text: From Raw Text to Base Phrase Chunks.
Proceedings of HLT-NAACL 2004: Short Papers (pp. 149–152). Boston, Massachusetts, USA:
Association for Computational Linguistics. 2004

[10]. Rouse, M. [Link] May 2018

Web Reference

[Link]

[Link]

[Link]

[Link]

Common questions

Powered by AI

Advancements in technology, especially the growth of online social networks, have facilitated the rapid spread of fake news by allowing deceptive information to reach widespread audiences quickly . Machine learning techniques help combat this issue by providing automated methods to detect and classify fake news through algorithms, such as the Naive Bayes classification model, which can identify fake content on platforms like Twitter . These algorithms analyze patterns in text and utilize natural language processing to distinguish between credible and fraudulent news . Despite these advancements, challenges remain in ensuring algorithms are politically unbiased and accurately measure the legitimacy of news sources .

Fake news detection models incorporate external data to validate news articles by cross-referencing information with credible sources outside of the initial content, allowing for verification against established facts and reliable data points . This process often involves extracting relevant data from large databases and using it as a baseline to measure the consistency and authenticity of news claims. Challenges include ensuring the external data sources themselves are current, unbiased, and authoritative, and managing the computational complexity and resources needed to handle and analyze these substantial data volumes effectively .

Failing to address the spread of fake news can lead to significant consequences impacting societal safety and property. The rapid dissemination of misleading and false information can incite panic, misinform public opinion, and sometimes provoke harmful actions based on incorrect premises . In some instances, fake news specifically targets sensitive topics, potentially leading to violence, property damage, and a general erosion of trust in public institutions and media sources. These impacts stress the essential need for robust detection systems and public education on media literacy to curb the proliferation of harmful misinformation .

Computational resources and novel datasets are crucial for developing effective fake news detection models as they provide the necessary data and computational power to train sophisticated algorithms. Large datasets, compiled using manual and crowdsourced annotation, cover diverse news domains and offer rich insights into linguistic properties prevalent in fake news . These datasets enable algorithms to learn patterns and enhance their ability to accurately classify news authenticity. Additionally, computational resources allow for the deployment of complex models like convolutional and recurrent neural networks that require significant processing power to identify and correlate intricate features in the data .

Automated systems for fake news detection can ensure political neutrality by employing strategies such as balancing datasets with diverse ideological content, using unsupervised learning methods that avoid human bias, and continuously evaluating algorithms against bias assessments . Political neutrality is essential to prevent the reinforcement of existing biases and ensure that detection systems are equitable, maintaining credibility across political spectrums. This is critical because fake news spans across all ideological divisions, and unbiased systems help build trust in automated news verification processes .

The interpretation of 'fake news' has evolved from referring to deliberately misleading articles created for profit or political gain to encompassing a broader range of misinformation, including news that simply contradicts someone's beliefs . This evolution in definition complicates detection methodologies as it broadens the scope of what is considered fake, demanding more sophisticated tools to discern intent and context. Detection systems must now address a more diverse set of criteria beyond factual inaccuracies, assessing rhetorical styles, author intent, and ideological bias, further challenging the development of objective and effective fake news detection models .

Stance detection plays a significant role in analyzing fake news by evaluating an author's position towards the content they produce, categorizing it as agreed, neutral, or disagreed . This psychological model aids in understanding the intent and stance of the author, helping to differentiate between genuine reporting and fabricated stories. Stance detection's potential advantage is in its ability to uncover bias or intent, thereby improving the algorithm's capacity to accurately determine authenticity and, consequently, increase the overall detection accuracy in identifying fake news .

The proliferation of fake news has significant social implications, influencing public perception and trust in media, often leading to societal polarization and confusion regarding factual accuracy . Disinformation, particularly in political discourse, has heightened these issues by spreading misleading narratives for strategic gains, as seen during events like the 2016 US elections . This has resulted in challenges for democratic processes, where public opinion can be swayed by fabricated stories designed to manipulate voters . Combating this requires comprehensive efforts to educate the public on media literacy and enhance detection systems to prevent such disinformation from gaining traction .

Machine learning algorithms face several challenges in identifying legitimate news sources, including the need for the algorithms to remain politically unbiased and effectively balance between different news spectrums . They must also handle the complexity of content blending truthful and misleading information, which complicates credibility assessment . These challenges can be addressed by improving data preprocessing, enhancing the algorithms' ability to process diverse linguistic properties, and employing techniques like Stance Detection to analyze the authors' perspectives towards the content .

Verification of news articles is critical within online social networks to maintain the trustworthiness of shared information and mitigate the spread of misinformation that impacts offline society . Methodologies to enhance detection accuracy include using machine learning models trained on both fake and real news datasets, natural language processing to analyze text patterns, and stance detection to understand authors' intent . Improvements in preprocessing and model refinement, such as adopting ensemble techniques or neural networks, can further enhance detection accuracy .

You might also like