0% found this document useful (0 votes)
28 views141 pages

OSN User Walls FullDoc

For lab manual impound

Uploaded by

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

OSN User Walls FullDoc

For lab manual impound

Uploaded by

kalyan Siva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 141

A SYSTEM TO FILTER UNWANTED MESSAGES

FROM OSN USERWALLS


A PROJECT REPORT

Submitted to

Jawaharlal Nehru Technological University Kakinada, Kakinada

in partial fulfillment for the award of the degree of

BATCHELOR OF TECHNOLOGY

In

COMPUTER SCIENCE AND ENGINEERING

Submitted by

G.LIKHITA(17KN1A0546)

B.ROOPA SRI(17KN1A0513)

CH.TANMAI(17KN1A0530)

A.PHANI KUMAR(17KN1A0509)

Under the esteemed guidance of

Mrs.K.Udaya Sri
Associate Professor, CSE Department

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

NRI INSTITUTE OF TECHNOLOGY


Autonomous
(Approved by AICTE, Permanently Affiliated to JNTUK,Kakinada)
Accredited by NBA (CSE, ECE & EEE), Accredited by NAAC with ‘A’Grade
ISO 9001: 2015 Certified Institution
Pothavarappadu (V), (Via) Nunna, Agiripalli (M), Krishna Dist, PIN:521212, A.P, India.

2017-2021
NRI INSTITUTE OF TECHNOLOGY
(Approved by AICTE, Permanently Affiliated to JNTUK, Kakinada)

Accredited by NBA (CSE, ECE & EEE), Accredited by NAAC with


‘A’ Grade ISO 9001: 2015 Certified Institution
Pothavarappadu (V), (Via) Nunna, Agiripalli (M), Krishna Dist, PIN: 521212, A.P, India

Certificate
This is to certify that the Project entitled “A SYSTEM TO FILTER UNWANTED
MESSAGES FROM OSN USERWALLS” is a bonified work carriedout by
G.LIKHITHA (17KN1A0546) B.ROOPA SRI (17KN1A0513) CH.TANMAYI (17KN1A0530) and

A.PHANI KUMAR (17KN1A0509) in partial fulfillment for the award of degree of Bachelor of

Technology in Computer Science and Engineering of Jawaharlal Nehru Technological


University Kakinada, Kakinada during the year 2020-2021.

Project Guide Head of the Department


(Mrs. K.UDAYA SRI) (Dr. D.SUNEETHA)
Associate Professor

EXTERNAL EXAMINER
DECLARATION

We hereby declare that the project report titled “A System to Filter Unwanted

Messages from OSN Userwalls” is a bonafide work carried out in the Department of

Computer Science and Engineering, NRI Institute of Technology,

Agiripalli,Vijayawada, during the academic year 2020-2021, in partial fulfilment for

the award of the degree of Bachelor of Technology by JNTU Kakinada.

We further declare that this dissertation has not been submitted elsewhere for any
Degree.

17KN1A0546
17KN1A0513
17KN1A0530
17KN1A0509
ACKNOWLEDGEMENT
We take this opportunity to thank all who have rendered their full support to our work. The pleasure, the
achievement, the glory, the satisfaction, the reward, the appreciation and the construction of my project
cannot be expressed with a few words for their valuable suggestions.

We are grateful to our Project Guide Mrs.K. Udaya Sri , Associate Professor

for rendering the valuable suggestions and extended his support to complete the project
successfully.

We are expressing our heartfelt thanks to Head of the Department, Dr. D. Suneetha

garu for her continuous guidance for completion of our Project work.

We are extending our sincere thanks to Dean of the Department, Dr. K. V. Sambasiva Rao garu
for his continuous guidance and support to complete our project successfully.

We are thankful to the Principal, Dr. C. Naga Bhaskar garu for his encouragement to complete
the Project work.

We are extending our sincere and honest thanks to the Chairman, Dr. R. Venkata Rao garu &
Secretary, Sri K. Sridhar garu for their continuous support in completing the Project work.

Finally, we thank the Administrative Officer, Staff Members, Faculty of Department of CSE, NRI Institute
of Technology and our friends, directly or indirectly helped us in the completion of this project.

17KN1A0546
17KN1A0513
17KN1A0530
17KN1A0509
ABSTRACT

One fundamental issue in today On-line Social Networks (OSNs) is to give users
the ability to control the messages posted on their own private space to avoid
that unwanted content is displayed. Up to now OSNs provide little support to
this requirement. To fill the gap, in this paper, we propose a system allowing
OSN users to have a direct control on the messages posted on their walls. This is
achieved through a flexible rule-based system, that allows users to customize
the filtering criteria to be applied to their walls, and a Machine Learning based
soft classifier automatically labeling messages in support of content-based
filtering. Index Terms—On-line Social Networks, Information Filtering, Short Text
Classification, Policy-based Personalization.
INDEX
CHAPTER NO CONTENT PAGE NO

I. List of Figures………………………………...8
II. List of Output screens......................................9
III. List of Symbols……………………………….10
IV. List of Abbreviations.......................................11
1 Introduction. ...................................................12-18
1.1 Introduction & Objective..................................12
1.1.1 What is Data Mining?.......................................12
1.1.2 How Data Mining Works? ............................... 12-14
1.1.3 Different levels of analysis............................... 14-15
1.1.4 Characteristics of Data Mining.........................15
1.1.5 Benefits of Data Mining.................................. .15-16
1.1.6 Advantages of Data Mining............................. .16-17
1.1.7 Objective...........................................................18
1.2 IAU System........................................................18
2 Scope................................................................ 18-24
2.1 Process Model...................................................19
2.1.1 Diagram of Spiral model....................................20
2.1.2 Advantages of Spiral model...............................20
2.1.3 Disadvantages of Spiral model.......................... 20
2.1.4 When to use Spiral model................................. 20-21
2.1.5 Spiral Approach Phases..................................... 21-22
2.1.6 Analysis phase.................................................. .22-24
3 Functional Requirement Specification..............25-36
3.1 Performance Requirements............................... 28-29
3.2 Hardware Requirements.................................... 29
3.3 Software Requirements......................................29-30
3.4 Introduction to java............................................30-36
4 Unified modeling language................................36-54
4.1.1 Use case diagram................................................36-39
4.1.2 Identified use cases.............................................39-40
4.2 Flow- oriented modelling.................................... 41
4.2.1 Activity diagram............................................. .... 41-45
4.3 State chart diagram.............................................45
4.4 Sequence diagram...............................................45-48
4.5 Class based modelling......................................... 49
4.5.1 Class diagram...................................................... 49-51
4.6 Collaboration diagram......................................... 51-52
4.7 Component level class design............................ ..52-55
4.7.1 What is a Component? ........................................ 53
4.7.2 An Object Oriented View..................................... .53-54
5 System design specification..................................55-72
5.1 System architecture............................................ ..55
5.2 Data flow diagram.............................................. …56-58
5.3 Navigation diagrams.......................................... ….58-59
5.4 Drafts of user interface...................................... ..59-60
5.5 Data dictionary................................................... ..60-63
5.6 Database tables.................................................. 64-72
6 Implementation phase....................................... 72
7 Testing phase..................................................... 72-75
7.1 Test cases........................................................... 73-74
7.1.1 Admin test cases................................................ 73
7.1.2 User test cases...................................................74
7.2 Unit testing........................................................ 74-75
7.2.1 Admin class........................................................ 74-75
7.3 Functional Test plan.......................................... 75
8 Demo: Output Screen Shots.............................. 75-84
9 Appendix.............................................................85-132
10 Conclusion..........................................................132-134
11 Issues to Future Studies..................................... 134
12 References........................................................134-140
LIST OF FIGURES

FIGURE NO FIGURE NAME PAGE NO


1 Structure of Data Mining..................................12

2.1 Spiral model.......................................................20

2.2 Analysis phase ...................................................22

2.3 Designing stage ................................................ 23

2.4 Integration and test stage...............................24

2.5 Integration and acceptance test ....................24

4.1 Use case diagram ............................................... 40

4.2 User Registration Activity Diagram.................42

4.3 Admin Activity Diagram ....................................... 43

4.4 File upload............................................................ .. 44

4.9 State chart Diagram.............................................. 45

4.10 Sequence diagram............................................... 47-48

4.13 Class diagram........................................................ 50

4.14 User registration..................................................... 52

4.16 Status Update......................................................... 52

4.17 Component Diagram........................................... 53

4.18 Deployment Diagram........................................... 54

5.1 Login Data flow diagram...................................... 58

5.2 Admin Login Data flow diagram .........................58

5.3 Navigation diagram................................................59


LIST OF OUTPUT SCREENS

SCREENSHOT NO SCREENSHORT NAME PAGE NO


1 USER IINTERFACE……………………76
2 ADMIN PAGE……………………………76 -77
3 USERLIST ……………………………... 77
4 FILTER WORDLIST…………………….78
5 BLOCKED MESSAGES USERLIST… . 78
6 FILTERING PERFORMANCE………..... 79
7 USER REGISTRATION…………………79
8 MESSAGE FILTERING…………………79-80
9 STATUS UPDATE………………………80
10 FIND FRIENDS…………………………81
11 VIEW FRIEND REQUEST…………….. 81
12 VIEW REQUEST……………………….. 82
13 SEND REQUEST……………………….. 83
14 IMAGE UPLOAD……………………….. 84
15 VIEW FRIEND LIST……………………. 84
LIST OF SYMBOLS

Symbols Meaning

Use-case

Actor

Transition

Object
Name

Activities

Initial state of work flow

Final State of work flow


LIST OF ABBREVIATIONS

ABBREVIATIONS MEANING

OSN Online Social Networking

CHAID Chi Square Automatic Interaction Detection

CART Classification and Regression Trees

OSA Online Setup Assistant

BRS Business Requirement Specifications

SRS System Requirement specifications

RF Relative Frequency

VM Virtual Machine

API Application Programming Interface

TCP Transmission Control Protocol

UDP User Data gram Protocol

IP Internet Protocol

RMI Remote Method Invocation

JDBC Java Database Connectivity

UML Unified Modeling Language

DFD Data Flow Diagram


1. INTRODUCTION
1.1 Introduction & Objective
1.1.1 What is Data Mining?

Structure of Data Mining

Generally, data mining (sometimes called data or knowledge discovery) is the


process of analyzing data from different perspectives and summarizing it into
useful information - information that can be used to increase revenue, cuts costs, or
both. Data mining software is one of a number of analytical tools for analyzing
data. It allows users to analyze data from many different dimensions or angles,
categorize it, and summarize the relationships identified. Technically, data mining
is the process of finding correlations or patterns among dozens of fields in large
relational databases.

1.1.2 How Data Mining Works?


While large-scale information technology has been evolving separate transaction
and analytical systems, data mining provides the link between the two. Data
mining software analyzes relationships and patterns in stored transaction data
based on open-ended user queries. Several types of analytical software are
available: statistical, machine learning, and neural networks. Generally, any of
four types of relationships are sought:

 Classes: Stored data is used to locate data in predetermined groups. For


example, a restaurant chain could mine customer purchase data to determine
when customers visit and what they typically order. This information could
be used to increase traffic by having daily specials.

 Clusters: Data items are grouped according to logical relationships or


consumer preferences. For example, data can be mined to identify market
segments or consumer affinities.

 Associations: Data can be mined to identify associations. The beer-diaper


example is an example of associative mining.

 Sequential patterns: Data is mined to anticipate behavior patterns and


trends. For example, an outdoor equipment retailer could predict the
likelihood of a backpack being purchased based on a consumer's purchase of
sleeping bags and hiking shoes.

Data mining consists of five major elements:

1) Extract, transform, and load transaction data onto the data warehouse
system.
2) Store and manage the data in a multidimensional database system.
3) Provide data access to business analysts and information technology
professionals.
4) Analyze the data by application software.
5) Present the data in a useful format, such as a graph or table.

1.1.3 Different levels of analysis are available:

 Artificial neural networks: Non-linear predictive models that learn through


training and resemble biological neural networks in structure.

 Genetic algorithms: Optimization techniques that use process such as


genetic combination, mutation, and natural selection in a design based on the
concepts of natural evolution.

 Decision trees: Tree-shaped structures that represent sets of decisions.


These decisions generate rules for the classification of a dataset. Specific
decision tree methods include Classification and Regression Trees (CART)
and Chi Square Automatic Interaction Detection (CHAID). CART and
CHAID are decision tree techniques used for classification of a dataset.
They provide a set of rules that you can apply to a new (unclassified) dataset
to predict which records will have a given outcome. CART segments a
dataset by creating 2-way splits while CHAID segments using chi square
tests to create multi-way splits. CART typically requires less data
preparation than CHAID.

 Nearest neighbor method: A technique that classifies each record in a


dataset based on a combination of the classes of the k record(s) most similar
to it in a historical dataset (where k=1). Sometimes called the k-nearest
neighbor technique.
 Rule induction: The extraction of useful if-then rules from data based on
statistical significance.

 Data visualization: The visual interpretation of complex relationships in


multidimensional data. Graphics tools are used to illustrate data
relationships.

1.1.4 Characteristics of Data Mining:

 Large quantities of data: The volume of data so great it has to be analyzed


by automated techniques e.g. satellite information, credit card transactions
etc.
 Noisy, incomplete data: Imprecise data is the characteristic of all data
collection.
 Complex data structure: conventional statistical analysis not possible
 Heterogeneous data stored in legacy systems

1.1.5 Benefits of Data Mining:

1) It’s one of the most effective services that are available today. With the help
of data mining, one can discover precious information about the customers
and their behavior for a specific set of products and evaluate and analyze,
store, mine and load data related to them
2) An analytical CRM model and strategic business related decisions can be
made with the help of data mining as it helps in providing a complete
synopsis of customers
3) An endless number of organizations have installed data mining projects and
it has helped them see their own companies make an unprecedented
improvement in their marketing strategies (Campaigns)
4) Data mining is generally used by organizations with a solid customer focus.
For its flexible nature as far as applicability is concerned is being used
vehemently in applications to foresee crucial data including industry analysis
and consumer buying behaviors
5) Fast paced and prompt access to data along with economic processing
techniques have made data mining one of the most suitable services that a
company seek

1.1.6 Advantages of Data Mining:

1. Marketing / Retail:

Data mining helps marketing companies build models based on historical data
to predict who will respond to the new marketing campaigns such as direct mail,
online marketing campaign…etc. Through the results, marketers will have
appropriate approach to sell profitable products to targeted customers.

Data mining brings a lot of benefits to retail companies in the same way as
marketing. Through market basket analysis, a store can have an appropriate
production arrangement in a way that customers can buy frequent buying products
together with pleasant. In addition, it also helps the retail companies offer certain
discounts for particular products that will attract more customers.

2. Finance / Banking

Data mining gives financial institutions information about loan information and
credit reporting. By building a model from historical customer’s data, the bank and
financial institution can determine good and bad loans. In addition, data mining
helps banks detect fraudulent credit card transactions to protect credit card’s
owner.

3. Manufacturing

By applying data mining in operational engineering data, manufacturers can


detect faulty equipments and determine optimal control parameters. For example
semi-conductor manufacturers has a challenge that even the conditions of
manufacturing environments at different wafer production plants are similar, the
quality of wafer are lot the same and some for unknown reasons even has defects.
Data mining has been applying to determine the ranges of control parameters that
lead to the production of golden wafer. Then those optimal control parameters are
used to manufacture wafers with desired quality.

4. Governments

Data mining helps government agency by digging and analyzing records of


financial transaction to build patterns that can detect money laundering or criminal
activities.

5. Law enforcement:

Data mining can aid law enforcers in identifying criminal suspects as well as
apprehending these criminals by examining trends in location, crime type, habit,
and other patterns of behaviors.

6. Researchers:

Data mining can assist researchers by speeding up their data analyzing process;
thus, allowing those more time to work on other projects.
1.1.7 Objective:
1.To give users the ability to control the messages posted on their own private
space.
2.To avoid that unwanted content is displayed.
3. To improve the quality of classification.
1.2 IAU System
 A system to automatically filter unwanted messages from user walls on the
basis of both message content and the message creator relationships and
characteristics.
 The current paper substantially extends for what concerns both the rule layer
and the classification module.
 Ability to control the messages posted on their own private space

2 scope:

Even if we have complemented our system with an online assistant to set FR


thresholds, the development of a complete system easily usable by average OSN
users is a wide topic which is out of the scope of the current paper. As such, the
developed Facebook application is to be meant
As a proof-of-concepts of the system core functionalities, rather than a fully
developed system.

1.To give users the ability to control the messages posted on their own private
space.
2.1 Process Model:

The spiral model is similar to the incremental model, with more emphasis placed
on risk analysis. The spiral model has four phases: Planning, Risk Analysis,
Engineering and Evaluation. A software project repeatedly passes through these
phases in iterations (called Spirals in this model). The baseline spiral, starting in
the planning phase, requirements are gathered and risk is assessed. Each
subsequent spirals builds on the baseline spiral.

Planning Phase: Requirements are gathered during the planning phase.


Requirements like ‘BRS’ that is ‘Bussiness Requirement Specifications’ and ‘SRS’
that is ‘System Requirement specifications’.

Risk Analysis: In the risk analysis phase, a process is undertaken to identify risk
and alternate solutions. A prototype is produced at the end of the risk analysis
phase. If any risk is found during the risk analysis then alternate solutions are
suggested and implemented.

Engineering Phase: In this phase software is developed, along with testing at the
end of the phase. Hence in this phase the development and testing is done.

Evaluation phase: This phase allows the customer to evaluate the output of the
project to date before the project continues to the next spiral.

2.1.1 Diagram of Spiral model:


2.1.2 Advantages of Spiral model:

 High amount of risk analysis hence, avoidance of Risk is enhanced.


 Good for large and mission-critical projects.
 Strong approval and documentation control.
 Additional Functionality can be added at a later date.
 Software is produced early in the software life cycle.

2.1.3 Disadvantages of Spiral model:

 Can be a costly model to use.


 Risk analysis requires highly specific expertise.
 Project’s success is highly dependent on the risk analysis phase.
 Doesn’t work well for smaller projects.

2.1.4 When to use Spiral model:

 When costs and risk evaluation is important


 For medium to high-risk projects
 Long-term project commitment unwise because of potential changes to
economic priorities
 Users are unsure of their needs
 Requirements are complex
 New product line
 Significant changes are expected (research and exploration)
 Requirement Gathering : 1.Designing 2. Coding 3. Testing 4. Maintenance

2.1.5 Spiral Approach Phases

1. Customer Communication: Includes understanding the system requirements


by continuous communication between the customer and the system analyst.
2. Planning: Includes estimating Schedule, cost, and resource for the iteration.
3. Risk Analysis: includes identifying, estimating, and monitoring technical
and management risks, such as schedule slippage and cost overrun.
4. Engineering: Includes requirement gathering and design of the software
system.
5. Construction and release: Includes coding, testing and deploying software at
the customer site and providing user-support documents.
6. Customer Evaluation: Includes evaluation of software by the customer and
implementing feedback in the next iteration of the software development.
2.1.6 Analysis phase
 3.Functional Requirement Specification.

MODULES:

1. User module
2. Filtering process module
3. Online setup assistant module
4. Blacklisting process
5. Admin module

MODULES DESCRIPTION:

1. User Module:

In this module, users can create and manage their own “groups” (such like the new
Face book groups pages). Each group has a homepage that provides a place for
subscribers to post and share (by posting messages, images, etc.) and a block that
provides basic information about the group. Users can also enable additional
features in their owned page like view friends list and add friends by using friend’s
requests as well as share their images with selected group’s members. The status of
their friends requests are also updated in this module

2. Filtering Process Module:

In defining the language for FRs specification, we consider three main issues that,
in our opinion, should affect a message filtering decision. First of all, in OSNs like
in everyday life, the same message may have different meanings and relevance
based on who writes it. As a consequence, FRs should allow users to state
constraints on message creators. Creators on which a FR applies can be selected on
the basis of several different criteria; one of the most relevant is by imposing
conditions on their profile’s attributes. In such a way it is, for instance, possible to
define rules applying only to young creators or to creators with a given
religious/political view. Given the social network scenario, creators may also be
identified by exploiting information on their social graph. This implies to state
conditions on type, depth and trust values of the relationship(s) creators should be
involved in order to apply them the specified rules.

3. Online setup assistant module:

In this module, we address the problem of setting thresholds to filter rules, by


conceiving and implementing within FW, an Online Setup Assistant (OSA)
procedure. For each message, the user tells the system the decision to accept or
reject the message. The collection and processing of user decisions on an adequate
set of messages distributed over all the classes allows computing customized
thresholds representing the user attitude in accepting or rejecting certain contents.
Such messages are selected according to the following process. A certain amount
of non neutral messages taken from a fraction of the dataset and not belonging to
the training/test sets, are classified by the ML in order to have, for each message,
the second level class membership values.

4. Blacklisting Process module:


A further component of our system is a BL mechanism to avoid messages from
undesired creators, independent from their contents. BLs are directly managed by
the system, which should be able to determine who are the users to be inserted in
the BL and decide when users retention in the BL is finished. To enhance
flexibility, such information is given to the system through a set of rules, hereafter
called BL rules. Such rules are not defined by the SNM, therefore they are not
meant as general high level directives to be applied to the whole community.
Rather, we decide to let the users themselves, i.e., the wall’s owners to specify BL
rules regulating who has to be banned from their walls and for how long.
Therefore, a user might be banned from a wall, by, at the same time, being able to
post in other walls.

Similar to FRs, our BL rules make the wall owner able to identify users to be
blocked according to their profiles as well as their relationships in the OSN.
Therefore, by means of a BL rule, wall owners are for example able to ban from
their walls users they do not directly know (i.e., with which they have only indirect
relationships), or users that are friend of a given person as they may have a bad
opinion of this person. This banning can be adopted for an undetermined time
period or for a specific time window. Moreover, banning criteria may also take into
account users’ behavior in the OSN. More precisely, among possible information
denoting users’ bad behavior we have focused on two main measures. The first is
related to the principle that if within a given time interval a user has been inserted
into a BL for several times, say greater than a given threshold, he/she might
deserve to stay in the BL for another while, as his/her behavior is not improved.
This principle works for those users that have been already inserted in the
considered BL at least one time. In contrast, to catch new bad behaviors, we use
the Relative Frequency (RF) that let the system be able to detect those users whose
messages continue to fail the FRs. The two measures can be computed either
locally, that is, by considering only the messages and/or the BL of the user
specifying the BL rule or globally, that is, by considering all OSN users walls
and/or BLs.

5. Admin Module:
In this module, the admin manage all user’s information including posting
comments in the user status box. Each unwanted message has an alert from admin
that provides a place for post and share for the respective user walls. And admin
can see blocked message from the users and also that provides information about
the user who used the blocked message. Admin can also enable additional features
in their owned page like user list, adding unwanted message, update unwanted
messages, Blocked users list and finally filter performance graph. And also in this
module, we show the performance evaluation of the system in the graph.

Performance

The system must be interactive and the delays involved must be less .So in every
action-response of the system, there are no immediate delays. In case of opening
windows forms, of popping error messages and saving the settings or sessions
there is delay much below 2 seconds, In case of opening databases, sorting
questions and evaluation there are no delays and the operation is performed in less
than 2 seconds for opening ,sorting, computing, posting > 95% of the files. Also
when connecting to the server the delay is based editing on the distance of the 2
systems and the configuration between them so there is high probability that there
will be or not a successful connection in less than 20 seconds for sake of good
communication.

Safety

Information transmission should be securely transmitted to server without any


changes in information

3.2 software Requirements:

Reliability

As the system provide the right tools for discussion, problem solving it must be
made sure that the system is reliable in its operations and for securing the sensitive
details.

3.2HARDWARE REQUIREMENTS:

• System : Pentium IV 2.4 GHz.


• Hard Disk : 40 GB.
• Floppy Drive : 1.44 Mb.
• Monitor : 15 VGA Colour.
• Mouse : Logitech.
• Ram : 512 Mb.

3.3SOFTWARE REQUIREMENTS:
 Operating system : Windows XP/7.
 Coding Language : ASP.net, C#.net
 Tool : Visual Studio 2010
 Database : SQL SERVER 2008
3.4 introduction to java:
Software Environment

Java Technology

Java technology is both a programming language and a platform.

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
 Interpreted
 Multithreaded
 Robust
 Dynamic
 Secure

With most programming languages, you either compile or interpret a


program so that you can run it on your computer. The Java programming
language is unusual in that a program is both compiled and interpreted. With the
compiler, first you translate a program into an intermediate language called Java
byte codes —the platform-independent codes interpreted by the interpreter on the
Java platform. The interpreter parses and runs each Java byte code instruction on
the computer. Compilation happens just once; interpretation occurs each time the
program is executed. The following figure illustrates how this works.

You can think of Java byte codes as the machine code instructions for the
Java Virtual Machine (Java VM). Every Java interpreter, whether it’s a
development tool or a Web browser that can run applets, is an implementation of
the Java VM. Java byte codes help make “write once, run anywhere” possible. You
can compile your program into byte codes on any platform that has a Java
compiler. The byte codes can then be run on any implementation of the Java VM.
That means that as long as a computer has a Java VM, the same program written in
the Java programming language can run on Windows 2000, a Solaris workstation,
or on an iMac.
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 Windows 2000, Linux, Solaris, and MacOS. Most platforms can be
described as a combination of the operating system and 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 (Java VM)
 The Java Application Programming Interface (Java API)
You’ve already been introduced to the Java VM. It’s the base for the Java
platform and is ported onto various hardware-based platforms.

The Java API is a large collection of ready-made software components


that provide many useful capabilities, such as graphical user interface
(GUI) widgets. The Java API is grouped into libraries of related classes and
interfaces; these libraries are known as packages. The next section, What
Can Java Technology Do? Highlights what functionality some of the
packages in the Java API provide.
The following figure depicts a program that’s running on the Java
platform. As the figure shows, the Java API and the virtual machine insulate
the program from the hardware.

Native code is code that after you compile it, the compiled code runs
on a specific hardware platform. As a platform-independent environment,
the Java platform can be a bit slower than native code. However, smart
compilers, well-tuned interpreters, and just-in-time byte code compilers can
bring performance close to that of native code without threatening
portability.
What Can Java Technology Do?
The most common types of programs written in the Java programming
language are applets and applications. If you’ve surfed the Web, you’re
probably already familiar with applets. An applet is a program that adheres
to certain conventions that allow it to run within a Java-enabled browser.

However, the Java programming language is not just for writing cute,
entertaining applets for the Web. The general-purpose, high-level Java
programming language is also a powerful software platform. Using the
generous API, you can write many types of programs.
An application is a standalone program that runs directly on the Java
platform. A special kind of application known as a server serves and
supports clients on a network. Examples of servers are Web servers, proxy
servers, mail servers, and print servers. Another specialized program is a
servlet. A servlet can almost be thought of as an applet that runs on the
server side. Java Servlets are a popular choice for building interactive web
applications, replacing the use of CGI scripts. Servlets are similar to applets
in that they are runtime extensions of applications. Instead of working in
browsers, though, servlets run within Java Web servers, configuring or
tailoring the server.
How does the API support all these kinds of programs? It does so with
packages of software components that provides a wide range of
functionality. Every full implementation of the Java platform gives you the
following features:
 The essentials: Objects, strings, threads, numbers, input and output,
data structures, system properties, date and time, and so on.
 Applets: The set of conventions used by applets.
 Networking: URLs, TCP (Transmission Control Protocol), UDP
(User Data gram Protocol) sockets, and IP (Internet Protocol)
addresses.
 Internationalization: Help for writing programs that can be localized
for users worldwide. Programs can automatically adapt to specific
locales and be displayed in the appropriate language.
 Security: Both low level and high level, including electronic
signatures, public and private key management, access control, and
certificates.
 Software components: Known as JavaBeansTM, can plug into
existing component architectures.
 Object serialization: Allows lightweight persistence and
communication via Remote Method Invocation (RMI).
 Java Database Connectivity (JDBCTM): Provides uniform access to
a wide range of relational databases.
The Java platform also has APIs for 2D and 3D graphics, accessibility,
servers, collaboration, telephony, speech, animation, and more. The
following figure depicts what is included in the Java 2 SDK.

How Will Java Technology Change My Life?


We can’t promise you fame, fortune, or even a job if you learn the Java
programming language. Still, it is likely to make your programs better and
requires less effort than other languages. We believe that Java technology
will help you do the following:
 Get started quickly: Although the Java programming language is a
powerful object-oriented language, it’s easy to learn, especially for
programmers already familiar with C or C++.
 Write less code: Comparisons of program metrics (class counts,
method counts, and so on) suggest that a program written in the Java
programming language can be four times smaller than the same
program in C++.
 Write better code: The Java programming language encourages good
coding practices, and its garbage collection helps you avoid memory
leaks. Its object orientation, its JavaBeans component architecture,
and its wide-ranging, easily extendible API let you reuse other
people’s tested code and introduce fewer bugs.
 Develop programs more quickly: Your development time may be as
much as twice as fast versus writing the same program in C++. Why?
You write fewer lines of code and it is a simpler programming
language than C++.
 Avoid platform dependencies with 100% Pure Java: You can keep
your program portable by avoiding the use of libraries written in other
languages. The 100% Pure JavaTM Product Certification Program has a
repository of historical process manuals, white papers, brochures, and
similar materials online.
 Write once, run anywhere: Because 100% Pure Java programs are
compiled into machine-independent byte codes, they run consistently
on any Java platform.
 Distribute software more easily: You can upgrade applets easily
from a central server. Applets take advantage of the feature of
allowing new classes to be loaded “on the fly,” without recompiling
the entire program.
4. UNIFIED MODELLING LANGUAGE
4.1 USE CASE DIAGRAM
A Use Case Diagram in the Unified Modeling Language (UML) is a type of
behavioral diagram defined by and created from a Use-case analysis. Its purpose is
to present a graphical overview of the functionality provided by a system in terms
of actors, their goals (represented as use cases), and any dependencies between
those use cases.
The main purpose of a use case diagram is to show what system functions
are performed for which actor. Roles of the actors in the system can be depicted.
Interaction among actors is not shown on the use case diagram. If this
interaction is essential to a coherent description of the desired behavior, perhaps
the system or use case boundaries should be re-examined. Alternatively,
interaction among actors can be part of the assumptions used in the use case.
• Use cases
A use case describes a sequence of actions that provide something of
measurable value to an actor and is drawn as a horizontal ellipse.
 Actors
An actor is a person, organization, or external system that plays a role in
one or more interactions with the system.
 System boundary boxes (optional)
A rectangle is drawn around the use cases, called the system boundary box,
to indicate the scope of system. Anything within the box represents functionality
that is in scope and anything outside the box is not.
Four relationships among use cases are used often in practice.
Include:
In one form of interaction, a given use case may include another. "Include is
a Directed Relationship between two use cases, implying that the behavior of the
included use case is inserted into the behavior of the including use case.
The first use case often depends on the outcome of the included use case.
This is useful for extracting truly common behaviors from multiple use cases into a
single description. The notation is a dashed arrow from the including to the
included use case, with the label "«include»".There are no parameters or return
values. To specify the location in a flow of events in which the base use case
includes the behavior of another, you simply write include followed by the name of
use case you want to include, as in the following flow for track order.
Extend:
In another form of interaction, a given use case (the extension) may extend
another. This relationship indicates that the behavior of the extension use case may
be inserted in the extended use case under some conditions. The notation is a
dashed arrow from the extension to the extended use case, with the label
"«extend»". Modelers use the «extend» relationship to indicate use cases that are
"optional" to the base use case.
Generalization:
In the third form of relationship among use cases, a
generalization/specialization relationship exists. A given use case may have
common behaviors, requirements, constraints, and assumptions with a more
general use case. In this case, describe them once, and deal with it in the same way,
describing any differences in the specialized cases. The notation is a solid line
ending in a hollow triangle drawn from the specialized to the more general use
case (following the standard generalization notation
Associations:
Associations between actors and use cases are indicated in use case diagrams
by solid lines. An association exists whenever an actor is involved with an
interaction described by a use case. Associations are modeled as lines connecting
use cases and actors to one another, with an optional arrowhead on one end of the
line. The arrowhead is often used to indicating the direction of the initial
invocation of the relationship or to indicate the primary actor within the use case.

4.1.1 IDENTIFIED USE CASES


The “user model view”encompasses a problem and solution from the
preservative of those individuals whose problem the solution addresses. The view
presents the goals and objectives of the problem owners and their requirements of
the solution. This view is composed of “use case diagrams”. These diagrams
describe the functionality provided by a system to external integrators. These
diagrams contain actors, use cases, and their relationships.
Registration

Login

upload files

view valid user details

search by keyword
Admin

search by name

User

file rank

file rank chart

file download

Fig:4.1 Usecase Diagram


4.2.FLOW-ORIENTED MODELLING
4.2.1 ACTIVITY DIAGRAM
Activity diagrams are graphical representations of workflows of stepwise
activities and actions with support for choice, iteration and concurrency. In the
Unified Modeling Language, activity diagrams can be used to describe the
business and operational step-by-step workflows of components in a system. An
activity diagram shows the overall flow of control.
Activity diagrams are constructed from a limited repertoire of shapes, connected
with arrows. The most important shape types:
 rounded rectangles represent activities;
 diamonds represent decisions;
 bars represent the start (split) or end (join) of concurrent activities;
 a black circle represents the start (initial state) of the workflow;
 An encircled black circle represents the end (final state).
Arrows run from the start towards the end and represent the order in which
activities happen. However, the join and split symbols in activity diagrams only
resolve this for simple cases; the meaning of the model is not clear when they are
arbitrarily combined with the decisions or loops.
user

enter user id

enter user
name

enter
password

enter address

enter email

Fig:4.2 User Registration Activity Diagram


F
i
g
: Admin

5
login

.
3 sucess

A
d
view user view rank chart
view file details
m upload files details error

i
n

A
c
t
Fig:4.3 ivity Diagram
enter username
and password

verify

correct

enter field

enter file name

enter file
keyword

enter capital

enter date

Fig:4.4 FILE UPLOAD


4.3 STATE CHART DIAGRAM

process

login update
status

status gets block the


update user

Fig:4.9 Statechart Diagram

4.4 SEQUENCE DIAGRAM


A sequence diagram in Unified Modeling Language (UML) is a kind of
interaction diagram that shows how processes operate with one another and in
what order. It is a construct of a Message Sequence Chart.
Sequence diagrams are sometimes called event diagrams, event scenarios,
and timing diagrams.A sequence diagram shows, as parallel vertical lines
(lifelines), different processes or objects that live simultaneously, and, as
horizontal arrows, the messages exchanged between them, in the order in which
they occur. This allows the specification of simple runtime scenarios in a graphical
manner. If the lifeline is that of an object, it demonstrates a role. Note that leaving
the instance name blank can represent anonymous and unnamed instances. In order
to display interaction, messages are used. These are horizontal arrows with the
message name written above them. Solid arrows with full heads are synchronous
calls, solid arrows with stick heads are asynchronous calls and dashed arrows with
stick heads are return messages. This definition is true as of UML 2, considerably
different from UML 1.x.
Activation boxes, or method-call boxes, are opaque rectangles drawn on top
of lifelines to represent that processes are being performed in response to the
message (Execution Specifications in UML).
Objects calling methods on themselves use messages and add new activation
boxes on top of any others to indicate a further level of processing. When an object
is destroyed (removed from memory), an X is drawn on top of the lifeline, and the
dashed line ceases to be drawn below it (this is not the case in the first example
though). It should be the result of a message, either from the object itself, or
another.
A message sent from outside the diagram can be represented by a message
originating from a filled-in circle (found message in UML) or from a border of
sequence diagram (gate in UML)
user interface database

enter user id

enter user name

enter password

enter address

enter mail id

send details

send response

Admin Interface Database

enter user name

enter password

send details

send response
Database
: User
: Admin Registration

upload files

view valid user details

search keyword

search name

download files

file rank analysis

rank results

file chart

file rank view

view file chart


4.5 CLASS BASED MODELING
4.5.1 CLASS DIAGRAM
Class-based Modeling, or more commonly class-orientation, refers to the
style of object-oriented programming in which inheritance is achieved by defining
classes of objects; as opposed to the objects themselves (compare Prototype-based
programming).
The most popular and developed model of OOP is a class-based model, as
opposed to an object-based model. In this model, objects are entities that combine
state (i.e., data), behavior (i.e., procedures, or methods) and identity (unique
existence among all other objects). The structure and behavior of an object are
defined by a class, which is a definition, or blueprint, of all objects of a specific
type. An object must be explicitly created based on a class and an object thus
created is considered to be an instance of that class. An object is similar to a
structure, with the addition of method pointers, member access control, and an
implicit data member which locates instances of the class (i.e. actual objects of that
class) in the class hierarchy (essential for runtime inheritance features).
User
Id : Number
Name : String Admin
password : String Username : String
Address : String Password : String
Email : String
sign_in()
sign_up() view_user_details()
sign_in() upload_file()
search_keyword() view_file_details()
search_name() rank_analysis()
rank()
view_rankchart()
file_download()

Database
provideservice

storage()

Fig:4.13 Class diagram


In software engineering, a class diagram in the Unified Modeling Language
(UML) is a type of static structure diagram that describes the structure of a system
by showing the system's classes, their attributes, and the relationships between the
classes.
The class diagram is the main building block in object oriented modeling. It is
used both for general conceptual modeling of the semantics of the application, and
for detailed modeling translating the models into programming code. The classes
in a class diagram represent both the main objects and or interactions in the
application and the objects to be programmed. In the class diagram these classes
are represented with boxes which contain the two parts:
 The upper part holds the name of the class.
 The middle part contains the attributes of theclass.
 The lower part contains the operations of the class.

4.6 COLLABORATION DIAGRAM


A Sequence diagram is dynamic, and, more importantly, is time ordered. A
Collaboration diagram is very similar to a Sequence diagram in the purpose it
achieves; in other words, it shows the dynamic interaction of the objects in a
system. A distinguishing feature of a Collaboration diagram is that it shows the
objects and their association with other objects in the system apart from how they
interact with each other. The association between objects is not represented in a
Sequence diagram.
A Collaboration diagram is easily represented by modeling objects in a
system and representing the associations between the objects as links. The
interaction between the objects is denoted by arrows. To identify the sequence of
invocation of these objects, a number is placed next to each of these arrows.
Defining a Collaboration Diagram:
A sophisticated modeling tool can easily convert a collaboration diagram
into a sequence diagram and the vice versa. Hence, the elements of a Collaboration
diagram are essentially the same as that of a Sequence diagram.
1: enter user id
2: enter user name
3: enter password
4: enter address
5: enter mail id
user interface

7: send response
6: send details
database

Fig:4.14 User registration

1: enter user name


2: enter password
Admin Interface

4: send response
3: send details

Database

Fig:4.16 Status Update

4.7 COMPONENT LEVEL CLASS DESIGN


This chapter discusses the portion of the software development process
where the design is elaborated and the individual data elements and operations are
designed in detail. First, different views of a “component” are introduced.
Guidelines for the design of object-oriented and traditional (conventional) program
components are presented.

4.7.1 What is a Component?


This section defines the term component and discusses the differences
between object oriented, traditional, and process related views of component level
design. Object Management Group OMG UML defines a component as “… a
modular, deployable, and replaceable part of a system that encapsulates
implementation and exposes a set of interfaces.”
4.7.2 An Object Oriented View
A component contains a set of collaborating classes. Each class within a
component has been fully elaborated to include all attributes and operations that
are relevant to its implementation. As part of the design elaboration, all interfaces
(messages) that enable the classes to communicate and collaborate with other
design classes must also be defined. To accomplish this, the designer begins with
the analysis model and elaborates analysis classes (for components that relate to
the problem domain) and infrastructure classes (or
components that provide support services for the problem domain).

user
admin

file
upload

search by search
keyword file
by name download
file
details
4.17 Component Diagram

admin user

Fig:4.18 Deployment Diagram


5

5.1
5.2 DATA FLOW DIAGRAM:

1. The DFD is also called as bubble chart. It is a simple graphical formalism


that can be used to represent a system in terms of input data to the system,
various processing carried out on this data, and the output data is generated
by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It
is used to model the system components. These components are the system
process, the data used by the process, an external entity that interacts with
the system and the information flows in the system.
3. DFD shows how the information moves through the system and how it is
modified by a series of transformations. It is a graphical technique that
depicts information flow and the transformations that are applied as data
moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a
system at any level of abstraction. DFD may be partitioned into levels that
represent increasing information flow and functional detail.
Lo g i n

YE S NO
Ch ec k

S tatu s U p d ate
U n a u th o r iz ed U s er

Fi n d Fr ie n d s

S e n d in g R eq u es t

S h ar e I m a g e s

Al lo w P i v a c y S etti n g

V ie w F ri e n d Lis t

E n d P r o c es s
A d m i n L o g in

YE S NO
Ch ec k

B l o c k U n w a n te d M e s sa g e
U n a u th o r iz ed U s er

U se r L i st

U p d ate B lo c k in g W o rd s

B lo c k e d W o rd s U s e rs

P e rf o rm a n c e G ra p h

E n d P r o c es s

5.3 Navigation diagrams:


5.4 Drafts of User Interfaces:
5.5Data Dictionary:

CREATE TABLE `admin` (

`cat` varchar(45) NOT NULL default '',

`word` varchar(45) NOT NULL default ''_);

CREATE TABLE `buser` (

`user` varchar(45) NOT NULL default '',

`statusa` varchar(45) NOT NULL default ''

CREATE TABLE `new_m` (


`user` varchar(45) NOT NULL default '',

`statusa` text NOT NULL

CREATE TABLE `reg` (

`id` int(20) NOT NULL,

`fname` varchar(255) NOT NULL,

`sname` varchar(255) NOT NULL,

`name` varchar(255) NOT NULL,

`userid` varchar(255) NOT NULL,

`remail` varchar(255) NOT NULL,

`pass` varchar(255) NOT NULL,

`gender` varchar(255) NOT NULL,

`date` varchar(255) NOT NULL,

`month` varchar(255) NOT NULL,

`year` varchar(255) NOT NULL,

`secondary` varchar(255) default NULL,

`university` varchar(255) default NULL,


`employee` varchar(255) default NULL,

`image` longblob

CREATE TABLE `request` (

`id` int(255) NOT NULL,

`name` varchar(255) NOT NULL,

`fid` int(255) NOT NULL,

`fname` varchar(255) NOT NULL,

`status` varchar(255) NOT NULL,

`relationship` varchar(255) default NULL,

`fgroup` varchar(255) default NULL

CREATE TABLE `update_` (

`user` varchar(45) NOT NULL default '',

`statusa` varchar(45) NOT NULL default ''

CREATE TABLE `view` (


`id` int(255) NOT NULL,

`image` longblob NOT NULL,

`uid` varchar(255) NOT NULL,

`name` varchar(255) NOT NULL,

`setting` varchar(255) default NULL,

`user` varchar(255) default NULL,

`statusa` varchar(255) default NULL,

`relationship` varchar(255) default NULL,

`statusb` varchar(255) default NULL,

`fgroup` varchar(255) default NULL,

`statusc` varchar(255) default NULL

CREATE TABLE `view_pri` (

`user_id` int(11) NOT NULL,

`view_id` int(11) NOT NULL,

`status` varchar(45) NOT NULL

)
5.6 Database Tables

Enter password: ****

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 458

Server version: 5.5.36 MySQL Community Server (GPL)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use socialnetwork;

Database changed

mysql> show tables;


+-------------------------+

| Tables_in_socialnetwork |

+-------------------------+

| admin |

| buser |

| new_m |

| reg |

| request |

| update_ |

| view |

| view_pri |

+-------------------------+

8 rows in set (0.00 sec)

mysql> select * from admin;

+------------------+----------+

| cat | word |
+------------------+----------+

| BAD WORDS | fuck |

| ILLEGAL WORDS | |

| RESTRICTED WORDS | xx |

| BAD WORDS | fuck |

| BAD WORDS | fuck |

| BAD WORDS | |

| BAD WORDS | |

| BAD WORDS | kill you |

+------------------+----------+

8 rows in set (0.00 sec)

mysql> desc reg;

+------------+--------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+------------+--------------+------+-----+---------+-------+

| id | int(20) | NO | | NULL | |
| fname | varchar(255) | NO | | NULL | |

| sname | varchar(255) | NO | | NULL | |

| name | varchar(255) | NO | | NULL | |

| userid | varchar(255) | NO | | NULL | |

| remail | varchar(255) | NO | | NULL | |

| pass | varchar(255) | NO | | NULL | |

| gender | varchar(255) | NO | | NULL | |

| date | varchar(255) | NO | | NULL | |

| month | varchar(255) | NO | | NULL | |

| year | varchar(255) | NO | | NULL | |

| secondary | varchar(255) | YES | | NULL | |

| university | varchar(255) | YES | | NULL | |

| employee | varchar(255) | YES | | NULL | |

| image | longblob | YES | | NULL | |

+------------+--------------+------+-----+---------+-------+

15 rows in set (0.04 sec)


mysql> desc view;

+--------------+--------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+--------------+--------------+------+-----+---------+-------+

| id | int(255) | NO | | NULL | |

| image | longblob | NO | | NULL | |

| uid | varchar(255) | NO | | NULL | |

| name | varchar(255) | NO | | NULL | |

| setting | varchar(255) | YES | | NULL | |

| user | varchar(255) | YES | | NULL | |

| statusa | varchar(255) | YES | | NULL | |

| relationship | varchar(255) | YES | | NULL | |

| statusb | varchar(255) | YES | | NULL | |

| fgroup | varchar(255) | YES | | NULL | |

| statusc | varchar(255) | YES | | NULL | |

+--------------+--------------+------+-----+---------+-------+

11 rows in set (0.01 sec)


mysql> desc view_pri;

+---------+-------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+---------+-------------+------+-----+---------+-------+

| user_id | int(11) | NO | | NULL | |

| view_id | int(11) | NO | | NULL | |

| status | varchar(45) | NO | | NULL | |

+---------+-------------+------+-----+---------+-------+

3 rows in set (0.03 sec)

mysql> desc update_;

+---------+-------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+---------+-------------+------+-----+---------+-------+

| user | varchar(45) | NO | | | |

| statusa | varchar(45) | NO | | | |
+---------+-------------+------+-----+---------+-------+

2 rows in set (0.03 sec)

mysql> desc new_n;

ERROR 1146 (42S02): Table 'socialnetwork.new_n' doesn't exist

mysql> desc new_m;

+---------+-------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+---------+-------------+------+-----+---------+-------+

| user | varchar(45) | NO | | | |

| statusa | text | NO | | NULL | |

+---------+-------------+------+-----+---------+-------+

2 rows in set (0.01 sec)

mysql> desc request;

+--------------+--------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |


+--------------+--------------+------+-----+---------+-------+

| id | int(255) | NO | | NULL | |

| name | varchar(255) | NO | | NULL | |

| fid | int(255) | NO | | NULL | |

| fname | varchar(255) | NO | | NULL | |

| status | varchar(255) | NO | | NULL | |

| relationship | varchar(255) | YES | | NULL | |

| fgroup | varchar(255) | YES | | NULL | |

+--------------+--------------+------+-----+---------+-------+

7 rows in set (0.01 sec)

mysql> desc buser;

+---------+-------------+------+-----+---------+-------+

| Field | Type | Null | Key | Default | Extra |

+---------+-------------+------+-----+---------+-------+

| user | varchar(45) | NO | | | |

| statusa | varchar(45) | NO | | | |
+---------+-------------+------+-----+---------+-------+

2 rows in set (0.01 sec)

6. Implementation Phase:
7. Testing Phase .

Testing Phase Testing is a process, which reveals errors in the program. It is


the major quality measure employed during software development. During
testing, the program is executed with a set of test cases and the output of the
program for the test cases is evaluated to determine if the program is
performing as it is expected to perform
Unit Testing: Unit testing is done on individual modules as they are completed
and become executable. It is confined only to the designer's requirements.
Each module can be tested using the following two Strategies:
Black Box Testing: In this strategy some test cases are generated as input
conditions that fully execute all functional requirements for the program. This
testing has been uses to find errors in the followingcategories:

Integrating Testing: Integration testing ensures that software and subsystems


work together a whole. It tests the interface of all the modules to make sure that
the modules behave properly when integrated together.
System Testing: Involves in-house testing of the entire system before delivery
to the user. It's aim is to satisfy the user the system meets all requirements of
the client's specifications.
Acceptance Testing: It is a pre-delivery testing in which entire system is tested
at client's site on real world data to find errors.
Testing can be done in two ways:
 Bottom up approach
 Top down approach
Bottom up Approach: Testing can be performed starting from smallest and
lowest level modules and proceeding one at a time. For each module in bottom
up testing a short program executes the module and provides the needed data so
that the module is asked to perform the way it will when embedded within the
larger system. When bottom level modules are tested attention turns to those on
the next level that use the lower level ones they are tested individually and then
linked with the previously examined lower level modules.
Topdown approach: This type of testing starts from upper level modules.
Since the detailed activities usually performed in the lower level routines are
not provided stubs are written. A stub is a module shell called by upper level
module and that when reached properly will return a message to the calling
module indicating that proper interaction occurred. No attempt is made to verify
the correctness of the
Test Cases
...............................................................................................................................
7.1 Test Cases:

7.1.1 Admin

1. Admin can login with user id and password.


2. Admin can view registered users.
3. Admin can view filter words list
4. Admin can view Filter Performance
5. Admin can deactivate the users
7.1.2 Test Cases: user

1.User can login with user id and password.

2.User can update the status.

3.user can find friends

4.user can send request to another user

5.share photo

6.view friends list

7.2Unittesting
7.2.1 Admin class

1 1 Validation for admin Pass


For Update class Updated
details successfully
User Test cases:

Test id description Success Pass fail


criteria
1 1 Validation for admin Pass
For Update class Updated
details successfully

7.3Functional Test plan

Test id Description Success Pass fail


criteria
1 Submit details Successfully pass
information page displayed

8. Demo: Output Screen Shots


9.

10.
11.
12.Userslist:

13.
14.Filter wordslist:
15.
16.Blocked users list:

17.
18.
19.User registration:

20.
21.

22.
23.

24.
25.

26.
27.

28.
29.
9.Appendix:

Adminlogin.jp:

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>A System to Filter Unwanted Messages from OSN User Walls</title>

<meta name="keywords" content="" />

<meta name="description" content="" />

<link href="default.css" rel="stylesheet" type="text/css" media="screen"


/>

<script language="JavaScript">

function validation()

var a = document.form.userid.value;

var b = document.form.pass.value;

if(a=="")

alert("Enter your UserId");


document.form.userid.focus();

return false;

if(b=="")

alert("Enter your Password");

document.form.pass.focus();

return false;

</script>

</head>

<body>

<!-- start header -->

<div id="header">

<div id="logo">
<h1 align="center"><font size="+3">A System to Filter Unwanted
Messages from OSN User Walls</font></h1>

<div style="position:absolute; right:50px; top:150px;">

<h1 align="center"><font size="+3"COLOR="RED">ADMIN


PAGE</font></h1></div>

</div>

</div>

<!-- end header -->

<!-- start page -->

<div id="page">

<div style="position:absolute; right:40px; top:180px;">

<div>
</div>

</div>

<div style="position:absolute; right:30px; top:230px;">

<fieldset>

<legend><font color="#FFFFFF"><strong><font size="4">Admin


Login</font></strong></font></legend>

<table height="160">

<form action="adminlogin.jsp" method="post" name="form"


onsubmit="return validation();">

<tr>

<td height="37">Admin</td>

<td><input type="text" name="userid" id="s" size="15" value=""


/></td>

</tr>
<tr>

<td height="35">Password</td>

<td><input type="password" name="pass" id="s" size="15" value=""


/></td>

</tr>

<tr>

<td height="39"></td>

<td><input type="submit" name="submit" class="button2"


value="Login">

<input type="reset" name="reset" class="button2" value="Clear">

</td>

</tr>

</form>

</table>

</fieldset>

<br><br><br>
<p><img src="images/newUser.png"><font size="3"><a
href="newuser.jsp">New User Signup Here?</a></font></p>

<p><img src="images/newUser.png"><font size="3"><a


href="index.html">For User</a></font></p>

</div>

<br><br>

<div id="content" align="right">

<div class="post">

<img src="images/s.JPG" align="center" width="700"


height="400">

</div>

</div>

<!-- end content -->

<!-- start rightbar -->

<!-- end rightbar -->

<div style="clear: both;">&nbsp;</div>

</div>

<!-- end page -->


<br><br><br><br><br><br><br>

<div id="footer">

<p align="right"><font color="#FFFFFF" size="2"><strong>Online


Social
Network</strong></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;<img
src="images/icon3.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon1.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon4.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon5.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/Icon7.png" width="30" height="30"></p>

</div>

</body>

</html>

Adminuser.jsp:

<%--

Document : newjsp

Created on : Oct 1, 2013, 6:24:03 PM

Author : ibn
--%>

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

<!DOCTYPE html>

<html>

<head>

<script>

function check()

var a = document.f1.opn.value;

var b = document.f1.t.value;

if(a ==""){

alert("Plese enter Select catgeory..!!");

return false;

if(b==""){

alert('Please enter your words');

return false;
}

</script>

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

<title>admin Page</title>

</head>

<body bgcolor="#B3D1B3">

<h1 align="center"><font size="+3">A System to Filter Unwanted


Messages from OSN User Walls

</font></h1>

<h1 align="center"><font size="+3"COLOR="RED">ADMIN


PAGE</font></h1><hr>

<div><img src="images/admin.png" alt="" width="120" height="99"


/><br>

<div id="menu">

<ul>

<li><a href ="index.html">Logout</a></li>

<li><a href ="UserTablee.jsp">User List</a></li>


<li><a href ="filterwordslist.jsp">Filter Words
List</a></li>

<li><a href ="blockuserlist.jsp">Blocked


Users</a></li>

<li><a href ="g.html">Filter Performance</a></li>

</ul>

</div>

<div style="position:absolute; right:500px; top:145px; left:550px; width:


625px; height: 421px;">

<form name="f1" action="foradmin.jsp" method="get"


onsubmit="return check();">

<h2>Word Category</h2>:

<select name="opn" id="opn"><option value="ILLEGAL


WORDS">Illegal Words</option>

<option value="BAD WORDS" selected>Bad Words</option>


<option value="RESTRICTED WORDS">Restricted words</option>

</select>

<h2>Words:</h2><input type="text" name="text"id="t"><br><br>

<input type="submit" value="Add">

<input type="reset" name="text" value="Clear">

<%

if (request.getParameter("msg") != null) {

out.println("<script>alert('Information
Saved..!')</script>");

if (request.getParameter("msgr") != null) {

out.println("<script>alert('fails')</script>");

%>
</form>

</div><BR>

<HR>

</body>

</html>

Userpage.jsp:

<%@ page language="java" import="java.sql.*,databaseconnection.*"


errorPage="" %>

<%

String name = null, userid = null, id = null, pname = null;

try {

Connection con;
con = databasecon.getconnection();

Statement st = con.createStatement();

userid = (String) session.getAttribute("userid");

String s = "select id,name,userid from reg where userid='" + userid +


"'";

ResultSet rs = st.executeQuery(s);

if (rs.next()) {

id = rs.getString(1);

name = rs.getString(2);

userid = rs.getString(3);

session.setAttribute("id", id);

} else {
out.print("Please check your login credentials");

%>

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>A System to Filter Unwanted Messages from OSN User Walls</title>

<meta name="keywords" content="" />

<meta name="description" content="" />

<link href="default.css" rel="stylesheet" type="text/css" media="screen"


/>

<link href="styles.css" rel="stylesheet" type="text/css" media="screen"


/>

</head>

<body>
<!-- start header -->

<div id="header">

<div id="logo">

<h1 align="center"><font size="+3">A System to Filter Unwanted


Messages from OSN User Walls

</font></h1>

</div>

</div>

<div class='cssmenu'>

<ul>

<li class='active '><a


href="userpage.jsp"><span>HomePage</span></a></li>
<li><a href="index.html"><span>Logout</span></a></li>

</ul>

</div>

<div id="page">

<h2>Welcome!&nbsp;

<font color="#FFFFCC"><font size="5"><%=name%></font></font>

</h2>

<div><img src="viewimage.jsp?id=<%=id%>" alt="" width="150"


height="120" /></div>

<%

} catch (Exception e) {

System.out.println(e);

%>

<div id="leftbar" class="sidebar">


<ul>

<li>

<ul>

<br><br>

<li><a href="status.jsp"><font color="FFFFFF" size="3">Status


Update</font></a></li>

<li><a href="friends.jsp"><font color="#FFFFFF" size="3">Find


Friends</font></a></li>

<li><a href="viewrequest.jsp"><font color="#FFFFFF"


size="3">ViewFriendRequest</font></a></li>

<li><a href="upload.jsp"><font color="#FFFFFF" size="3">Share


Photo</font></a></li>

<li><a href="holder.jsp"><font color="#FFFFFF"


size="3">FriendsList</font></a></li>

</ul>

</li>
</ul>

</div>

</div>

<br><br>

<div id="content">

<!--fragment-2-->

<div id="fragment-2" class="ui-tabs-panel ui-tabs-hide">

<%

int fid = 0;

String fname = null;

Connection con2 = null;

Statement st2 = null;

ResultSet rs2 = null;

String status = "Confirm";


String sql = "select distinct fid,fname from request where id='"
+ id + "' and status='" + status + "'";

try {

Class.forName("com.mysql.jdbc.Driver");

con2 =
DriverManager.getConnection("jdbc:mysql://localhost:3306/socialnetwork
", "root", "root");;

st2 = con2.createStatement();

rs2 = st2.executeQuery(sql);

%>

<div style="position:absolute; left:400px; top:240px;"><font


color="#FFFFFF" size="5"><font color="red">

Walls</font></font></div>

<div style="position:absolute; left:400px; top:325px; width: 358px; height:


166px;">

<fieldset>
<legend><font color="#FFFFFF"><strong><font size="4">Posted
Image</font></strong></font></legend>

<table align="center" height="174">

<%while (rs2.next()) {

fid = rs2.getInt("fid");

fname = rs2.getString("fname");

System.out.println("friend id" + fid);

Connection con3 = null;

Statement st3 = null;

ResultSet rs3 = null;

String statusb = "Allow";

String setting = "public";

String sql3 = "select * from view where (uid='" + fid


+ "' and statusb='" + statusb + "') or (uid='" + fid + "' and setting='" +
setting + "') or (user='" + fname + "' and statusa='" + statusb + "') or
(setting='" + setting + "')";

try {

Class.forName("com.mysql.jdbc.Driver");
con3 =
DriverManager.getConnection("jdbc:mysql://localhost:3306/socialnetwork
", "root", "root");

st3 = con3.createStatement();

rs3 = st3.executeQuery(sql3);

while (rs3.next()) {

System.out.println("image id" +
rs3.getInt("id"));

%>

<tr><td>

<img src="view1.jsp?id=<%=rs3.getInt("id")%>" alt="" width="120"


height="99" />

</td>

<td><font color="#FFFFCC"><strong>Posted
By</strong></font>:&nbsp;&nbsp;

<%=rs3.getString("name")%>

</td>

</tr>

<%}
} catch (Exception e3) {

System.out.println(e3);

}%>

</table>

</fieldset>

</div>

<%

} catch (Exception ex) {

System.out.println(ex);

} finally {

con2.close();

st2.close();

%>

</div><!--end fragment-2-->
</div>

</div>

<!-- end content -->

<!-- start rightbar -->

<!-- end rightbar -->

<div style="clear: both;">&nbsp;</div>

</div>

<!-- end page -->

</body>

</html>

Viewrequest.jsp:

<%@ page language="java" import="java.sql.*,databaseconnection.*"


errorPage="" %>

<%

String name = null, userid = null, id = null;


try {

Connection con;

con = databasecon.getconnection();

Statement st = con.createStatement();

//fname=(String)session.getAttribute("fname");

//sname=(String)session.getAttribute("sname");

userid = (String) session.getAttribute("userid");

String s = "select id,name,userid from reg where userid='" + userid +


"'";

ResultSet rs = st.executeQuery(s);

if (rs.next()) {

id = rs.getString(1);

name = rs.getString(2);
userid = rs.getString(3);

session.setAttribute("id", id);

} else {

out.print("Please check your login credentials");

%>

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>A System to Filter Unwanted Messages from OSN User Walls</title>

<meta name="keywords" content="" />

<meta name="description" content="" />


<link href="default.css" rel="stylesheet" type="text/css" media="screen"
/>

<link href="styles.css" rel="stylesheet" type="text/css" media="screen"


/>

</head>

<body>

<!-- start header -->

<div id="header">

<div id="logo">

<h1 align="center"><font size="+3">A System to Filter Unwanted


Messages from OSN User Walls

</font></h1>

</div>

</div>

<div class='cssmenu'>
<ul>

<li class='active '><a


href="userpage.jsp"><span>HomePage</span></a></li>

<li><a href="index.html"><span>Logout</span></a></li>

</ul>

</div>

<div id="page">

<h2>Welcome!&nbsp;

<font color="#FFFFCC"><font size="5"><%=name%></font></font>

</h2>

<div><img src="viewimage.jsp?id=<%=id%>" alt="" width="180"


height="180" /></div>

<%

} catch (Exception e) {

System.out.println(e);
}

%>

<div id="leftbar" class="sidebar">

<ul>

<li>

<ul>

<br><br>

<li><a href="status.jsp"><font color="FFFFFF" size="3">Status


Update</font></a></li>

<li><a href="friends.jsp"><font color="#FFFFFF" size="3">Find


Friends</font></a></li>

<li><a href="viewrequest.jsp"><font color="#FFFFFF"


size="3">ViewFriendRequest</font></a></li>

<li><a href="upload.jsp"><font color="#FFFFFF" size="3">Share


Photo</font></a></li>

<li><a href="holder.jsp"><font color="#FFFFFF"


size="3">FriendsList</font></a></li>

</ul>
</li>

</ul>

</div>

</div>

<br><br>

<div id="content">

<div style="position:absolute; left:400px; top:240px;"><font


color="#FFFFFF" size="5"><font color="red">

View Friend Request</font></font></div>

<div id="fragment-2" class="ui-tabs-panel ui-tabs-hide">

<%
int fid = 0;

String rid = null, rid1 = null, rid2 = null, fname = null;

Connection con2 = null;

Statement st2 = null;

ResultSet rs2 = null;

String status = "waiting for approve";

String sql = "select distinct id,name from request where fid='"


+ id + "' and status = '" + status + "'";

try {

Class.forName("com.mysql.jdbc.Driver");

con2 =
DriverManager.getConnection("jdbc:mysql://localhost:3306/socialnetwork
", "root", "root");;

st2 = con2.createStatement();

rs2 = st2.executeQuery(sql);

%>

<form name="f1" ENCTYPE="multipart/form-data" action="#"


method="post">
<div style="position:absolute; left:400px; top:325px; width: 358px; height:
166px;">

<fieldset>

<legend><font color="#FFFFFF"><strong><font size="4">View


Request</font></strong></font></legend>

<table align="center" height="150">

<%while (rs2.next()) {

fid = rs2.getInt("id");

fname = rs2.getString("name");

rid = id + "," + name + "," + Integer.toString(fid) +


"," + fname;

rid1 = id + "," + name + "," + Integer.toString(fid)


+ "," + fname + ",Confirm";

rid2 = id + "," + name + "," + Integer.toString(fid)


+ "," + fname + ",Ignore";

%>

<tr><td>Name:&nbsp;&nbsp;&nbsp;<%=rs2.getString("name")%></td>
</tr>
<tr><td><img src="viewimage.jsp?id=<%=fid%>" alt="" width="120"
height="99" /></td></tr>

<tr>

<td><a href="viewrequest1.jsp?id=<%=rid1%>"><font
color="#FFFFCC"><strong>Confirm</strong></font></a>&nbsp;&nbsp;
&nbsp;<a href="ignore.jsp?id=<%=rid2%>"><font
color="#FFFFCC"><strong>Ignore</strong></font></a></td>

</tr>

<%}%>

</table>

</fieldset>

</div>

</form>

<%

} catch (Exception ex) {

System.out.println(ex);

} finally {

con2.close();

st2.close();

}
%>

</div><!--end fragment-2-->

</div>

</div>

<!-- end content -->

<!-- start rightbar -->

<!-- end rightbar -->

<div style="clear: both;">&nbsp;</div>

</div>

<!-- end page -->

<br><br><br><br><br><br><br><br><br><br><br><br><br>

<div id="footer">
<p align="right"><font color="#FFFFFF" size="2"><strong>Online
Social
Network</strong></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;<img
src="images/icon3.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon1.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon4.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/icon5.jpg">&nbsp;&nbsp;&nbsp;&nbsp;<img
src="images/Icon7.png" width="30" height="30"></p>

</div>

</body>

</html>

Profileinsert.jsp:

<%@page
import="com.oreilly.servlet.*,java.sql.*,databaseconnection.*,java.util.*,ja
va.io.*,javax.servlet.*, javax.servlet.http.*"%>

<%@page import=" java.security.MessageDigest"%>

<%@page import=" java.security.*"%>

<%@page import="javax.crypto.*"%>

<html>

<head>
</head>

<body>

<%

Thread.sleep(100);

ArrayList list = new ArrayList();

ServletContext context = getServletContext();

String dirName =context.getRealPath("\\");

String paramname=null;

int id=0;

String secondary=null,university=null,employee=null,image=null;

int a1=(Integer)(session.getAttribute( "id" ));

File file1 = null;

try {

MultipartRequest multi = new MultipartRequest(request,


dirName, 10 * 1024 * 1024); // 10MB
Enumeration params = multi.getParameterNames();

while (params.hasMoreElements())

paramname = (String) params.nextElement();

if(paramname.equalsIgnoreCase("secondary"))

secondary=multi.getParameter(paramname);

if(paramname.equalsIgnoreCase("university"))

university=multi.getParameter(paramname);

if(paramname.equalsIgnoreCase("employee"))

employee=multi.getParameter(paramname);

}
if(paramname.equalsIgnoreCase("image"))

image=multi.getParameter(paramname);

int f = 0;

Enumeration files = multi.getFileNames();

while (files.hasMoreElements())

paramname = (String) files.nextElement();

if(paramname.equals("d1"))

paramname = null;

if(paramname != null)

{
f = 1;

image = multi.getFilesystemName(paramname);

String fPath = context.getRealPath("\\"+image);

file1 = new File(fPath);

FileInputStream fs = new FileInputStream(file1);

list.add(fs);

FileInputStream fs1 = null;

Connection con=databasecon.getconnection();

PreparedStatement ps=con.prepareStatement("update reg


set secondary=?,university=?,employee=?,image=? where id='"+a1+"'");

ps.setString(1,secondary);

ps.setString(2,university);

ps.setString(3,employee);

ps.setString(4,image);
if(f == 0)

ps.setObject(4,null);

else if(f == 1)

fs1 = (FileInputStream)list.get(0);

ps.setBinaryStream(4,fs1,fs1.available());

int x=ps.executeUpdate();

if(x!=0)

response.sendRedirect("userpage.jsp?message=success");

else

{
response.sendRedirect("userpage.jsp?message=fail");

catch (Exception e)

out.println(e.getMessage());

%>

</body>

</html>

Userinsert.jsp:

<%@page
import="com.oreilly.servlet.*,java.sql.*,java.lang.*,databaseconnection.*,j
ava.text.SimpleDateFormat,java.util.*,java.io.*,javax.servlet.*,
javax.servlet.http.*" errorPage="Error.jsp"%>

<%@ page import="java.sql.*,databaseconnection.*"%>

<html>

<head>
<body>

<title>Registration Insert Page</title>

<%

try

int a1=(Integer)(session.getAttribute( "id" ));

String a=request.getParameter("fname");

String b=request.getParameter("sname");

String c=request.getParameter("userid");

String d=request.getParameter("remail");

String e=request.getParameter("pass");

String f=request.getParameter("gender");

String g=request.getParameter("date");
String h=request.getParameter("month");

String i=request.getParameter("year");

String j=a+" "+b;

session.setAttribute("fname",a);

session.setAttribute("sname",b);

session.setAttribute("userid",c);

session.setAttribute("name",j);

Connection con=databasecon.getconnection();

Statement st=con.createStatement();

String sql="insert into


reg(id,fname,sname,name,userid,remail,pass,gender,date,month,year)
values
('"+a1+"','"+a+"','"+b+"','"+j+"','"+c+"','"+d+"','"+e+"','"+f+"','"+g+"
','"+h+"','"+i+"')";

int x=st.executeUpdate(sql);

if(x!=0){
response.sendRedirect("owner.jsp?message=Successfully
Registered");

else{

response.sendRedirect("owner.jsp?message=fail");

con.close();

st.close();

catch(Exception e)

out.println(e);

%>
</center>

</td>

</tr>

</body>

</table>

<!-- End ImageReady Slices -->

Viewrequest.jsp:

<%@page
import="com.oreilly.servlet.*,java.sql.*,databaseconnection.*,java.util.*,ja
va.io.*,javax.servlet.*, javax.servlet.http.*"%>
<%@page import=" java.security.MessageDigest"%>

<%@page import=" java.security.*"%>

<%@page import="javax.crypto.*"%>

<html>

<head>

</head>

<body>

<%

String str = (String)session.getAttribute("str");

String[] temp;

String delimiter = ",";

temp = str.split(delimiter,5);

for(int i =0; i < temp.length ; i++){

int id=Integer.parseInt((temp[0]));
String name = temp[1];

int fid=Integer.parseInt((temp[2]));

session.setAttribute("fid",fid);

String fname = temp[3];

session.setAttribute("fname",fname);

String status = temp[4];

try {

Connection con=databasecon.getconnection();

PreparedStatement ps=con.prepareStatement("update
request set status=? where id='"+fid+"' and fid='"+id+"'");

ps.setString(1,status);
/* if(f == 0)

ps.setObject(4,null);

else if(f == 1)

fs1 = (FileInputStream)list.get(0);

ps.setBinaryStream(4,fs1,fs1.available());

} */

int x=ps.executeUpdate();

if(x!=0)

response.sendRedirect("viewrequest3.jsp?message=success");

else

response.sendRedirect("viewrequest3.jsp?message=fail");

}
}

catch (Exception e)

out.println(e.getMessage());

%>

</body>

</html>

10. Conclusion

In this paper, we have presented a system to filter undesired messages from OSN
walls. The system exploits a ML soft classifier to enforce customizable content-
dependent FRs. Moreover, the flexibility of the system in terms of filtering options
is enhanced through the management of BLs. This work is the first step of a wider
project. The early encouraging results we have obtained on the classification
procedure prompt us to continue with other work that will aim to improve the
quality of classification. In particular, future plans contemplate a deeper
investigation on two interdependent tasks. The first concerns the extraction and/ or
selection of contextual features that have been shown to have a high discriminative
power. The second task involves the learning phase. Since the underlying domain
is dynamically changing, the collection of preclassified data may not be
representative in the longer term. The present batch learning strategy, based on the
preliminary collection of the entire set of labeled data from experts, allowed an
accurate experimental evaluation but needs to be evolved to include new
operational requirements. In future work, we plan to address this problem by
investigating the use of online learning paradigms able to include label feedbacks
from users. Additionally, we plan to enhance our system with a more sophisticated
approach to decide when a user should be inserted into a BL. The development of a
GUI and a set of related tools to make easier BL and FR specification is also a
direction we plan to investigate, since usability is a key requirement for such kind
of applications. In particular, we aim at investigating a tool able to automatically
recommend trust values for those contacts user does not personally known. We do
believe that such a tool should suggest trust value based on users actions,
behaviors, and reputation in OSN, which might imply to enhance OSN with audit
mechanisms. However, the design of these audit-based tools is complicated by
several issues, like the implications an audit system might have on users privacy
and/or the limitations on what it is possible to audit in current OSNs. A preliminary
work in this direction has been done in the context of trust values used for OSN
access control purposes [52]. However, we would like to remark that the system
proposed in this paper represents just the core set of functionalities needed to
provide a sophisticated tool for OSN message filtering. Even if we have
complemented our system with an online assistant to set FR thresholds, the
development of a complete system easily usable by average OSN users is a wide
topic which is out of the scope of the current paper. As such, the developed
Facebook application is to be meant as a proof-of-concepts of the system core
functionalities, rather than a fully developed system.

Moreover, we are aware that a usable GUI could not be enough, representing only
the first step. Indeed, the proposed system may suffer of problems similar to those
encountered in the specification of OSN privacy settings. In this context, many
empirical studies [53] have shown that average OSN users have difficulties in
understanding also the simple privacy settings provided by today OSNs. To
overcome this problem, a promising trend is to exploit data mining techniques to
infer the best privacy preferences to suggest to OSN users, on the basis of the
available social network data [54]. As future work, we intend to exploit similar
techniques to infer BL rules and FRs. Additionally, we plan to study strategies and
techniques limiting the inferences that a user can do on the enforced filtering rules
with the aim of bypassing the filtering system, such as for instance randomly
notifying a message that should instead be blocked, or detecting modifications to
profile attributes that have been made for the only purpose of defeating the filtering
system.

11. Issues to Future Studies

In future work, we plan to address this problem by investigating the use of


online learning paradigms able to include label feedbacks from users.
Additionally, we plan to enhance our system with a more sophisticated
approach to decide when a user should be inserted into a BL.

12.references

REFERENCES
[1] A. Adomavicius and G. Tuzhilin, “Toward the Next Generation of
Recommender Systems: A Survey of the State-of-the-Art and Possible
Extensions,” IEEE Trans. Knowledge and Data Eng., vol. 17, no. 6, pp. 734-749,
June 2005.

[2] M. Chau and H. Chen, “A Machine Learning Approach to Web Page Filtering
Using Content and Structure Analysis,” Decision Support Systems, vol. 44, no. 2,
pp. 482-494, 2008.

[3] R.J. Mooney and L. Roy, “Content-Based Book Recommending Using


Learning for Text Categorization,” Proc. Fifth ACM Conf. Digital Libraries, pp.
195-204, 2000.

[4] F. Sebastiani, “Machine Learning in Automated Text Categorization,” ACM


Computing Surveys, vol. 34, no. 1, pp. 1-47, 2002.

[5] M. Vanetti, E. Binaghi, B. Carminati, M. Carullo, and E. Ferrari, “Content-


Based Filtering in On-Line Social Networks,” Proc. ECML/PKDD Workshop
Privacy and Security Issues in Data Mining and Machine Learning (PSDML ’10),
2010.

[6] N.J. Belkin and W.B. Croft, “Information Filtering and Information Retrieval:
Two Sides of the Same Coin?” Comm. ACM, vol. 35, no. 12, pp. 29-38, 1992.

[7] P.J. Denning, “Electronic Junk,” Comm. ACM, vol. 25, no. 3, pp. 163-165,
1982.
[8] P.W. Foltz and S.T. Dumais, “Personalized Information Delivery: An Analysis
of Information Filtering Methods,” Comm. ACM, vol. 35, no. 12, pp. 51-60, 1992.

[9] P.S. Jacobs and L.F. Rau, “Scisor: Extracting Information from On-Line
News,” Comm. ACM, vol. 33, no. 11, pp. 88-97, 1990.

[10] S. Pollock, “A Rule-Based Message Filtering System,” ACM Trans. Office


Information Systems, vol. 6, no. 3, pp. 232-254, 1988.

[11] P.E. Baclace, “Competitive Agents for Information Filtering,” Comm. ACM,
vol. 35, no. 12, p. 50, 1992.

[12] P.J. Hayes, P.M. Andersen, I.B. Nirenburg, and L.M. Schmandt, “Tcs: A Shell
for Content-Based Text Categorization,” Proc. Sixth IEEE Conf. Artificial
Intelligence Applications (CAIA ’90), pp. 320-326, 1990.

[13] G. Amati and F. Crestani, “Probabilistic Learning for Selective Dissemination


of Information,” Information Processing and Management, vol. 35, no. 5, pp. 633-
54, 1999.

[14] M.J. Pazzani and D. Billsus, “Learning and Revising User Profiles: The
Identification of Interesting Web Sites,” Machine Learning, vol. 27, no. 3, pp. 313-
331, 1997.

[15] Y. Zhang and J. Callan, “Maximum Likelihood Estimation for Filtering


Thresholds,” Proc. 24th Ann. Int’l ACM SIGIR Conf. Research and Development
in Information Retrieval, pp. 294-302, 2001.
[16] C. Apte, F. Damerau, S.M. Weiss, D. Sholom, and M. Weiss, “Automated
Learning of Decision Rules for Text Categorization,” Trans. Information Systems,
vol. 12, no. 3, pp. 233-251, 1994.

[17] S. Dumais, J. Platt, D. Heckerman, and M. Sahami, “Inductive Learning


Algorithms and Representations for Text Categorization,” Proc. Seventh Int’l
Conf. Information and Knowledge Management (CIKM ’98), pp. 148-155, 1998.

[18] D.D. Lewis, “An Evaluation of Phrasal and Clustered Representations on a


Text Categorization Task,” Proc. 15th ACM Int’l Conf. Research and
Development in Information Retrieval (SIGIR ’92), N.J. Belkin, P. Ingwersen, and
A.M. Pejtersen, eds., pp. 37-50, 1992.

[19] R.E. Schapire and Y. Singer, “Boostexter: A Boosting-Based System for Text
Categorization,” Machine Learning, vol. 39, nos. 2/3, pp. 135-168, 2000.

[20] H. Schu¨ tze, D.A. Hull, and J.O. Pedersen, “A Comparison of Classifiers and
Document Representations for the Routing Problem,” Proc. 18th Ann.
ACM/SIGIR Conf. Research and Development in Information Retrieval , pp. 229-
237, 1995.

[21] E.D. Wiener, J.O. Pedersen, and A.S. Weigend, “A Neural Network Approach
to Topic Spotting,” Proc. Fourth Ann. Symp. Document Analysis and Information
Retrieval (SDAIR ’95), pp. 317-332, 1995.
[22] T. Joachims, “Text Categorization with Support Vector Machines: Learning
with Many Relevant Features,” Proc. European Conf. Machine Learning, pp. 137-
142, 1998.

[23] T. Joachims, “A Probabilistic Analysis of the Rocchio Algorithm with TFIDF


for Text Categorization,” Proc. Int’l Conf. Machine Learning, pp. 143-151, 1997.

[24] S.E. Robertson and K.S. Jones, “Relevance Weighting of Search Terms,” J.
Am. Soc. for Information Science, vol. 27, no. 3, pp. 129- 146, 1976.

[25] S. Zelikovitz and H. Hirsh, “Improving Short Text Classification Using


Unlabeled Background Knowledge,” Proc. 17th Int’l Conf. Machine Learning
(ICML ’00), P. Langley, ed., pp. 1183-1190, 2000.

[26] V. Bobicev and M. Sokolova, “An Effective and Robust Method for Short
Text Classification,” Proc. 23rd Nat’l Conf. Artificial Intelligence (AAAI), D. Fox
and C.P. Gomes, eds., pp. 1444-1445, 2008.

[27] B. Sriram, D. Fuhry, E. Demir, H. Ferhatosmanoglu, and M. Demirbas, “Short


Text Classification in Twitter to Improve Information Filtering,” Proc. 33rd Int’l
ACM SIGIR Conf. Research and Development in Information Retrieval (SIGIR
’10), pp. 841-842, 2010.

[28] J. Golbeck, “Combining Provenance with Trust in Social Networks for


Semantic Web Content Filtering,” Proc. Int’l Conf. Provenance and Annotation of
Data, L. Moreau and I. Foster, eds., pp. 101-108, 2006.
[29] F. Bonchi and E. Ferrari, Privacy-Aware Knowledge Discovery: Novel
Applications and New Techniques. Chapman and Hall/CRC Press, 2010.

[30] A. Uszok, J.M. Bradshaw, M. Johnson, R. Jeffers, A. Tate, J. Dalton, and S.


Aitken, “Kaos Policy Management for Semantic Web Services,” IEEE Intelligent
Systems, vol. 19, no. 4, pp. 32-41, July/ Aug. 2004.

[31] L. Kagal, M. Paolucci, N. Srinivasan, G. Denker, T. Finin, and K. Sycara,


“Authorization and Privacy for Semantic Web Services,” IEEE Intelligent
Systems, vol. 19, no. 4, pp. 50-56, July 2004.

[32] P. Bonatti and D. Olmedilla, “Driving and Monitoring Provisional Trust


Negotiation with Metapolicies,” Proc. Sixth IEEE Int’l Workshop Policies for
Distributed Systems and Networks (POLICY ’05), pp. 14-23, 2005.

[33] C. Bizer and R. Cyganiak, “Quality-Driven Information Filtering Using the


Wiqa Policy Framework,” Web Semantics: Science, Services and Agents on the
World Wide Web, vol. 7, pp. 1-10, Jan. 2009.

[34] D.D. Lewis, Y. Yang, T.G. Rose, and F. Li, “Rcv1: A New Benchmark
Collection for Text Categorization Research,” J. Machine Learning Research, vol.
5, pp. 361-397, 2004.

[35] M. Carullo, E. Binaghi, and I. Gallo, “An Online Document Clustering


Technique for Short Web Contents,” Pattern Recognition Letters, vol. 30, pp. 870-
876, July 2009.
[36] M. Carullo, E. Binaghi, I. Gallo, and N. Lamberti, “Clustering of Short
Commercial Documents for the Web,” Proc. 19th Int’l Conf. Pattern Recognition
(ICPR ’08), 2008.

[37] C.D. Manning, P. Raghavan, and H. Schu¨ tze, Introduction to Information


Retrieval. Cambridge Univ. Press, 2008.

[38] G. Salton and C. Buckley, “Term-Weighting Approaches in Automatic Text


Retrieval,” Information Processing and Management, vol. 24, no. 5, pp. 513-523,
1988.

[39] J. Moody and C. Darken, “Fast Learning in Networks of Locally-Tuned


Processing Units,” Neural Computation, vol. 1, no. 2, pp. 281-294, 1989.

[40] M.J.D. Powell, “Radial Basis Functions for Multivariable Interpolation: A


Review,” Algorithms for Approximation, pp. 143-167, Clarendon Press, 1987.

You might also like