Professional Documents
Culture Documents
INTRODUCTION
1.1 INTRODUCTION
A software bug or defect is a coding mistake that may cause an unintended or
unexpected behaviour of the software component. Upon discovering an abnormal
behaviour of the software project, a developer or a user will report it in a document,
called a bug report or issue report. A bug report provides information that could help
in fixing a bug, with the overall aim of improving the software quality. A large
number of bug reports could be opened during the development life-cycle of a
software product.
For example, there were 3,389 bug reports created for the Eclipse Platform
product in 2013 alone. In a software team, bug reports are extensively used by both
managers and developers in their daily development process. A developer who is
assigned a bug report usually needs to reproduce the abnormal behaviour and perform
code reviews in order to find the cause. However, the diversity and uneven quality of
bug reports can make this process nontrivial. Essential information is often missing
from a bug report.
Bacchelli and Bird surveyed 165 managers and 873 programmers, and
reported that finding defects requires a high level understanding of the code and
familiarity with the relevant source code files. In the survey, 798 respondents
answered that it takes time to review unfamiliar files. While the number of source
files in a project is usually large, the number of files that contain the bug is usually
very small. Therefore, we believe that an automatic approach that ranked the source
files with respect to their relevance for the bug report could speed up the bug finding
process by narrowing the search to a smaller number of possibly unfamiliar files. If
the bug report is construed as a query and the source code files in the software
repository are viewed as a collection of documents, then the problem of finding
source files that are relevant for a given bug report can be modelled as a standard task
in information retrieval (IR).
As such, we propose to approach it as a ranking problem, in which the source
files (documents) are ranked with respect to their relevance to a given bug report
(query). In this context, relevance is equated with the likelihood that a particular
source file contains the cause of the bug described in the bug report. The ranking
function is defined as a weighted combination of features, where the features draw
1
heavily on knowledge specific to the software engineering domain in order to measure
relevant relationships between the bug report and the source code file. While a bug
report may share textual tokens with its relevant source files, in general there is a
significant inherent mismatch between the natural language employed in the bug
report and the programming language used in the code.
Ranking methods that are based on simple lexical matching scores have
suboptimal performance, in part due to lexical mismatches between natural language
statements in bug reports and technical terms in software systems. Our system
contains features that bridge the corresponding lexical gap by using project specific
API documentation to connect natural language terms in the bug report with
programming language constructs in the code. Furthermore, source code files may
contain a large number of methods of which only a small number may be causing the
bug. Correspondingly, the source code is syntactically parsed into methods and the
features are designed to exploit method level measures of relevance for a bug report.
It has been previously observed that software process metrics (e.g., change
history) are more important than code metrics (e.g., size of codes) in detecting
defects. Consequently, we use the change history of source code as a strong signal for
linking fault-prone files with bug reports. Another useful domain specific observation
is that a buggy source file may cause more than one abnormal behaviour, and
therefore may be responsible for similar bug reports. If we equate a bug report with a
user and a source code file with an item that the user may like or not, then we can
draw an analogy with recommender systems and employ the concept of collaborative
filtering. Thus, if previously fixed bug reports are textually similar with the current
bug report, then files that have been associated with the similar reports may also be
relevant for the current report. We expect complex code to be more prone to bugs than
simple code.
Correspondingly, we design query-independent features that capture the code
complexity through proxy properties derived from the file dependency graph, such as
the PageRank score of a source file or the number of file dependencies. The resulting
ranking function is a linear combination of features, whose weights are automatically
trained on previously solved bug reports using a learning-to-rank technique. We have
conducted extensive empirical evaluations on six large-scale, open-source software
projects with more than 22,000 bug reports in total. To avoid contaminating the
training data with future bug-fixing information from previous reports, we created
2
fine-grained benchmarks by checking out the before-fix version of the project for
every bug report. Experimental results on the before-fix versions show that our
system significantly outperforms a number of strong baselines as well as three recent
state-of-the-art approaches. In particular, when evaluated on the Eclipse Platform UI
dataset containing over 6,400 solved bug reports, the learning-to-rank system is able
to successfully locate the true buggy files within the top 10 recommendations for over
70 per cent of the bug reports, corresponding to a mean average precision (MAP) of
over 40 per cent. Overall, we see our adaptive ranking approach as being generally
applicable to software projects for which a sufficient amount of project specific
knowledge, in the form of version control history, bug-fixing history, API
documentation, and syntactically parsed code, is readily available.
The main contributions of this paper include: a ranking approach to the
problem of mapping source files to bug reports that enables the seamless integration
of a wide diversity of features; exploiting previously fixed bug reports as training
examples for the proposed ranking model in conjunction with a learning-to-rank
technique; using the file dependency graph to define features that capture a measure
of code complexity; fine-grained benchmark datasets created by checking out a
before-fix version of the source code package for each bug report; extensive
evaluation and comparisons with existing state-of-the-art methods; and a thorough
evaluation of the impact that features have on the ranking accuracy.
3
Rao and Kak apply various IR models to measure the textual similarity
between the bug report and a fragment of a source file.
Their one-phase model uses only previously fixed files as labels in the training
process, and therefore cannot be used to recommend files that have not been
fixed before when being presented with a new bug report.
Existing methods require runtime executions.
Our approach can locate the relevant files within the top 10 recommendations
for over 70 per cent of the bug reports in Eclipse Platform and Tomcat.
Furthermore, the proposed ranking model outperforms three recent state-of-
the-art approaches.
Feature evaluation experiments employing greedy backward feature
elimination demonstrate that all features are useful.
4
2. LITERATURE SURVEY
1) Feature identification: A novel approach and a case study
AUTHORS: G. Antoniol and Y.-G. Gueheneuc
5
C) and ICE Browser (in Java), and another feature in JHOTDRAW and XFIG, to
highlight the generalizability of our metaphor.
6
classified hundreds of review comments across diverse teams at Microsoft. Our study
reveals that while finding defects remains the main motivation for review, reviews are
less about defects than expected and instead provide additional benefits such as
knowledge transfer, increased team awareness, and creation of alternative solutions to
problems. Moreover, we find that code and change understanding is the key aspect of
code reviewing and that developers employ a wide range of mechanisms to meet their
understanding needs, most of which are not met by current tools. We provide
recommendations for practitioners and researchers.
7
3. SYSTEM ANALYSIS
1. Problem/Requirement Analysis:
The process is order and more nebulous of the two , deals with understand the
problem, the goals and the constraints.
2. Requirement Specification:
Here, the focus is on specifying what has been found giving analysis such as
representation, specification languages and tools, and checking the specification are
addressed during this activity. The requirement phase terminates with the production
of the validate SRS document. Producing the SRS document is the basic goal of this
phase.
Role of SRS:
Scope:
This document is the only one that describes the requirement of system. It is meant for
the use by the developers, and will also be the basis for validating the final delivered
8
system. Any changes made to the requirement in the future will have to go through a
formal change approval process.
HARDWARE 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.
SOFTWARE REQUIREMENTS:
Operating system : Windows XP/7.
Coding Language : JAVA/J2EE
Data Base : MYSQL
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those
steps are necessary to put transaction data in to a usable form for processing can be
achieved by inspecting the computer to read data from a written or printed document
or it can occur by having people keying the data directly into the system. The design
of input focuses on controlling the amount of input required, controlling the errors,
avoiding delay, avoiding extra steps and keeping the process simple. The input is
designed in such a way so that it provides security and ease of use with retaining the
privacy. Input Design considered the following things:
9
OBJECTIVES
2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be free
from errors. The data entry screen is designed in such a way that all the data
manipulates can be performed. It also provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be entered with the
help of screens. Appropriate messages are provided as when needed so that the user
will not be in maize of instant. Thus the objective of input design is to create an input
layout that is easy to follow.
Our document plays a vital role in the development of life cycle (SDLC) as it
describes the complete requirement of the system. It means for use by developers and
will be the basic during testing phase. Any changes made to the requirements in the
future will have to go through formal change approval process.
SPIRAL MODEL was defined by Barry Boehm in his 1988 article, “A spiral
Model of Software Development and Enhancement. This model was not the first
model to discuss iterative development, but it was the first model to explain why the
iteration models.
The entire project can be aborted if the risk is deemed too great. Risk factors
might involve development cost overruns, operating-cost miscalculation.
10
The new system requirements are defined in as much details as possible. This
usually involves interviewing a number of users representing all the external or
internal users and other aspects of the existing system.
A first prototype of the new system is constructed from the preliminary design.
This is usually a scaled-down system, and represents an approximation of the
characteristics of the final product
1. Evaluating the first prototype in terms of its strengths, weakness, and risks.
At the customer option, the entire project can be aborted if the risk is deemed too
great.Risk factors might involve development cost overruns, operating-cost
miscalculation, or any other factor that could, in the customer’s judgment, result
in a less-than-satisfactory final product.
The existing prototype is evaluated in the same manner as was the previous
prototype, and if necessary, another prototype is developed from it according to
the fourfold procedure outlined above.
The preceding steps are iterated until the customer is satisfied that the refined
prototype represents the final product desired.
11
Fig 3.1: Spiral Model
FEASIBILITY STUDY
The feasibility of the project is analyzed in this phase and business proposal is
put forth with a very general plan for the project and some cost estimates. During
system analysis the feasibility study of the proposed system is to be carried out. This
is to ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.
ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY
ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
12
research and development of the system is limited. The expenditures must be justified.
Thus the developed system as well within the budget and this was achieved because
most of the technologies used are freely available. Only the customized products had
to be purchased.
TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a high demand on
the available technical resources. This will lead to high demands on the available
technical resources. This will lead to high demands being placed on the client. The
developed system must have a modest requirement, as only minimal or null changes
are required for implementing this system.
SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently. The
user must not feel threatened by the system, instead must accept it as a necessity. The
level of acceptance by the users solely depends on the methods that are employed to
educate the user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some constructive criticism,
which is welcomed, as he is the final user of the system.
13
4. DESIGN METHODOLOGY
The designer’s goal is how the output is to be produced and in what format.
Samples of the output and input are also presented. Second input data and database
files have to be designed to meet the requirements of the proposed output. The
processing phases are handled through the program Construction and Testing.
Finally, details related to justification of the system and an estimate of the impact of
the candidate system on the user and the organization are documented and evaluated
by management as a step toward implementation.
14
requirements contained in the system model as well as the implicit requirements
desired by the customer.
4.1.2 Overall System Design Objectives:
The overall system design objective is to provide an efficient, modular design
that will reduce the system’s complexity, facilitate change and result in an easy
implementation. This will be accomplished by designing strongly cohesion system
with minimal coupling. In addition, this document will provide interface design
models that are consistent user friendly and will provide straight forward transition
through the various system functions.
4.1.3 Structure of Design Document
System Architecture Design– The System architecture section has detailed diagram
of the system, server and client architecture.
Data Design – The data Design include an ERD as well as Database design.
Functional Design Description –This section has the functional partitioning from the
SRS, and goes into great detail to describe each function.
4.2 MODULES:
MODULES DESCRIPTION:
In the first module, we develop the system with the entities required to
evaluate our proposed model. When a new bug report is received, developers usually
need to reproduce the bug and perform code reviews to find the cause, a process that
can be tedious and time consuming. So In This paper introduces an adaptive ranking
approach that leverages project knowledge through functional decomposition of
source code, API descriptions of library components, the bug-fixing history, the code
change history, and the file dependency graph. Given a bug report, the ranking score
of each source file is computed as a weighted combination of an array of features,
15
where the weights are trained automatically on previously solved bug reports using a
learning-to-rank technique.
Ranking Function:
Ranking methods that are based on simple lexical matching scores have
suboptimal performance, in part due to lexical mismatches between natural language
statements in bug reports and technical terms in software systems. Our system
contains features that bridge the corresponding lexical gap by using project specific
API documentation to connect natural language terms in the bug report with
programming language constructs in the code.
Source Code files may contain a large number of methods of which only a
small number may be causing the bug. Correspondingly, the source code is
syntactically parsed into methods and the features are designed to exploit method
level measures of relevance for a bug report. It has been previously observed that
software process metrics (e.g., change history) are more important than code metrics
(e.g., size of codes) in detecting defects.
16
Feature Representation:
The proposed ranking model requires that a bug report - source file pair (r,s)
be represented as a vector of k features. We distinguish between two major categories
of features.
Query dependent: These are features that depend on both the bug report r and
the source code file s. A query dependent feature represents a specific relationship
between the bug report and the source file, and thus may be useful in determining
directly whether the source code file s contains a bug that is relevant for the bug
report r.
Query independent. These are features that depend only on the source code
file, i.e., their computation does not require knowledge of the bug report query. As
such, query independent features may be used to estimate the likelihood that a source
code file contains a bug, irrespective of the bug report.
In a Class Name Similarity a bug report may directly mention a class name in
the summary, which provides a useful signal that the corresponding source file
implementing that class may be relevant for the bug report. Our hypothesis is that the
signal becomes stronger when the class name is longer and thus more specific.
17
4.3 SYSTEM ARCHITECTURE
18
BLOCK DIAGRAM:
INPUT DESIGN
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those
steps are necessary to put transaction data in to a usable form for processing can be
achieved by inspecting the computer to read data from a written or printed document
or it can occur by having people keying the data directly into the system. The design
of input focuses on controlling the amount of input required, controlling the errors,
avoiding delay, avoiding extra steps and keeping the process simple. The input is
designed in such a way so that it provides security and ease of use with retaining the
privacy. Input Design considered the following things:
19
Methods for preparing input validations and steps to follow when error
occur.
OBJECTIVES
2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be free
from errors. The data entry screen is designed in such a way that all the data
manipulates can be performed. It also provides record viewing facilities.
3. When the data is entered it will check for its validity. Data can be entered with the
help of screens. Appropriate messages are provided as when needed so that the user
will not be in maize of instant. Thus the objective of input design is to create an input
layout that is easy to follow
OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are
communicated to the users and to other system through outputs. In output design it is
determined how the information is to be displaced for immediate need and also the
hard copy output. It is the most important and direct source information to the user.
Efficient and intelligent output design improves the system’s relationship to help user
decision-making.
20
3. Create document, report, or other formats that contain information produced by the
system.
The output form of an information system should accomplish one or more of the
following objectives.
21
Fig 4.5 Data flow diagram
22
The UML is a very important part of developing objects oriented software
and the software development process. The UML uses mostly graphical notations to
express the design of software projects.
GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modelling Language so that
they can develop and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core
concepts.
3. Be independent of particular programming languages and development
process.
4. Provide a formal basis for understanding the modelling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations,
frameworks, patterns and components.
7. Integrate best practices.
4.6.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.
23
Fig 4.6.1 Use case Daigram
24
Fig 4.6.2 Class Daigram
25
Fig 4.6.3 Sequence Daigram
26
Star
t
Split Bugs NO
Accept
Selection
Assigned bugs
Method
Rectified
Bugs History
Un rectified
Rectified details
Solution
27
5. TECHNOLOGY IMPLEMENTATION AND RESULTS
28
Fig 5.1.11 Compilation and Interpretation of a java program
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.
29
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.
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
30
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.
31
Fig 5.1.14 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++.
32
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.
ODBC
Microsoft Open Database Connectivity (ODBC) is a standard programming
interface for application developers and database systems providers. Before ODBC
became a de facto standard for Windows programs to interface with database systems,
programmers had to use proprietary languages for each database they wanted to
connect to. Now, ODBC has made the choice of the database system almost irrelevant
from a coding perspective, which is as it should be. Application developers have
much more important things to worry about than the syntax that is needed to port their
program from one database to another when business needs suddenly change.
Through the ODBC Administrator in Control Panel, you can specify the
particular database that is associated with a data source that an ODBC application
program is written to use. Think of an ODBC data source as a door with a name on it.
Each door will lead you to a particular database. For example, the data source named
Sales Figures might be a SQL Server database, whereas the Accounts Payable data
source could refer to an Access database. The physical database referred to by a data
source can reside anywhere on the LAN.
The ODBC system files are not installed on your system by Windows 95.
Rather, they are installed when you setup a separate database application, such as
SQL Server Client or Visual Basic 4.0. When the ODBC icon is installed in Control
Panel, it uses a file called ODBCINST.DLL.
33
From a programming perspective, the beauty of ODBC is that the application
can be written to use the same set of function calls to interface with any data source,
regardless of the database vendor. The source code of the application doesn’t change
whether it talks to Oracle or SQL Server. We only mention these two as an example.
There are ODBC drivers available for several dozen popular database systems. Even
Excel spreadsheets and plain text files can be turned into data sources. The operating
system uses the Registry information written by ODBC Administrator to determine
which low-level ODBC drivers are needed to talk to the data source (such as the
interface to Oracle or SQL Server). The loading of the ODBC drivers is transparent to
the ODBC application program. In a client/server environment, the ODBC API even
handles many of the network issues for the application programmer.
The advantages of this scheme are so numerous that you are probably thinking
there must be some catch. The only disadvantage of ODBC is that it isn’t as efficient
as talking directly to the native database interface. ODBC has had many detractors
make the charge that it is too slow. Microsoft has always claimed that the critical
factor in performance is the quality of the driver software that is used. In our humble
opinion, this is true. The availability of good ODBC drivers has improved a great deal
recently. And anyway, the criticism about performance is somewhat analogous to
those who said that compilers would never match the speed of pure assembly
language. Maybe not, but the compiler (or ODBC) gives you the opportunity to write
cleaner programs, which means you finish sooner. Meanwhile, computers get faster
every year.
JDBC
In an effort to set an independent database standard API for Java; Sun
Microsystems developed Java Database Connectivity, or JDBC. JDBC offers a
generic SQL database access mechanism that provides a consistent interface to a
variety of RDBMSs. This consistent interface is achieved through the use of “plug-in”
database connectivity modules, or drivers. If a database vendor wishes to have JDBC
support, he or she must provide the driver for each platform that the database and Java
run on.
To gain a wider acceptance of JDBC, Sun based JDBC’s framework on
ODBC. As you discovered earlier in this chapter, ODBC has widespread support on a
34
variety of platforms. Basing JDBC on ODBC will allow vendors to bring JDBC
drivers to market much faster than developing a completely new connectivity
solution.
JDBC was announced in March of 1996. It was released for a 90 day public
review that ended June 8, 1996. Because of user input, the final JDBC v1.0
specification was released soon after.
The remainder of this section will cover enough information about JDBC for you to
know what it is about and how to use it effectively. This is by no means a complete
overview of JDBC. That would fill an entire book.
JDBC Goals
Few software packages are designed without goals in mind. JDBC is one that,
because of its many goals, drove the development of the API. These goals, in
conjunction with early reviewer feedback, have finalized the JDBC class library into a
solid framework for building database applications in Java.
The goals that were set for JDBC are important. They will give you some insight
as to why certain classes and functionalities behave the way they do. The eight design
goals for JDBC are as follows:
SQL Conformance
SQL syntax varies as you move from database vendor to database vendor. In an
effort to support a wide variety of vendors, JDBC will allow any query statement to
be passed through it to the underlying database driver. This allows the connectivity
module to handle non-standard functionality in a manner that is suitable for its users.
35
This goal allows JDBC to use existing ODBC level drivers by the use of a
software interface. This interface would translate JDBC calls to ODBC and
vice versa.
2. Provide a Java interface that is consistent with the rest of the Java system
Because of Java’s acceptance in the user community thus far, the designers
feel that they should not stray from the current design of the core Java system.
3. Keep it simple
This goal probably appears in all software design goal listings. JDBC is no
exception. Sun felt that the design of JDBC should be very simple, allowing for
only one method of completing a task per mechanism. Allowing duplicate
functionality only serves to confuse the users of the API.
36
1. General J2ME architecture
J2ME uses configurations and profiles to customize the Java Runtime Environment
(JRE). As a complete JRE, J2ME is comprised of a configuration, which determines
the JVM used, and a profile, which defines the application by adding domain-specific
classes. The configuration defines the basic run-time environment as a set of core
classes and a specific JVM that run on specific types of devices. We'll discuss
configurations in detail in the The profile defines the application; specifically, it adds
domain-specific classes to the J2ME configuration to define certain uses for devices.
We'll cover profiles in depth in the The following graphic depicts the relationship
between the different virtual machines, configurations, and profiles. It also draws a
parallel with the J2SE API and its Java virtual machine. While the J2SE virtual
machine is generally referred to as a JVM, the J2ME virtual machines, KVM and
CVM, are subsets of JVM. Both KVM and CVM can be thought of as a kind of Java
virtual machine -- it's just that they are shrunken versions of the J2SE JVM and are
specific to J2ME.
Introduction In this section, we will go over some considerations you need to keep in
mind when developing applications for smaller devices. We'll take a look at the way
37
the compiler is invoked when using J2SE to compile J2ME applications. Finally, we'll
explore packaging and deployment and the role preverification plays in this process.
Developing applications for small devices requires you to keep certain strategies in
mind during the design phase. It is best to strategically design an application for a
small device before you begin coding. Correcting the code because you failed to
consider all of the "gotchas" before developing the application can be a painful
process. Here are some design strategies to consider:
4. Configurations overview
The configuration defines the basic run-time environment as a set of core classes and
a specific JVM that run on specific types of devices. Currently, two configurations
exist for J2ME, though others may be defined in the future:
38
(from a development point of view) than CDC. CLDC is also the
configuration that we will use for developing our drawing tool application. An
example of a small wireless device running small applications is a Palm hand-
held computer.
Connected Device Configuration (CDC) is used with the C virtual machine
(CVM) and is used for 32-bit architectures requiring more than 2 MB of
memory. An example of such a device is a Net TV box.
5. J2ME profiles
As we mentioned earlier in this tutorial, a profile defines the type of device supported.
The Mobile Information Device Profile (MIDP), for example, defines classes for
cellular phones. It adds domain-specific classes to the J2ME configuration to define
uses for similar devices. Two profiles have been defined for J2ME and are built upon
CLDC: KJava and MIDP. Both KJava and MIDP are associated with CLDC and
smaller devices. Profiles are built on top of configurations. Because profiles are
specific to the size of the device (amount of memory) on which an application runs,
certain profiles are associated with certain configurations.
A skeleton profile upon which you can create your own profile, the Foundation
Profile, is available for CDC.
Profile 1: KJava
KJava is Sun's proprietary profile and contains the KJava API. The KJava profile is
built on top of the CLDC configuration. The KJava virtual machine, KVM, accepts
the same byte codes and class file format as the classic J2SE virtual machine. KJava
contains a Sun-specific API that runs on the Palm OS. The KJava API has a great deal
in common with the J2SE Abstract Windowing Toolkit (AWT). However, because it
is not a standard J2ME package, its main package is com.sun.kjava. We'll learn more
about the KJava API later in this tutorial when we develop some sample applications.
Profile 2: MIDP :MIDP is geared toward mobile devices such as cellular phones
and pagers. The MIDP, like KJava, is built upon CLDC and provides a standard run-
39
time environment that allows new applications and services to be deployed
dynamically on end user devices. MIDP is a common, industry-standard profile for
mobile devices that is not dependent on a specific vendor. It is a complete and
supported foundation for mobile application
development. MIDP contains the following packages, the first three of which are core
CLDC packages, plus three MIDP-specific packages.
java.lang
java.io
java.util
javax.microedition.io
javax.microedition.lcdui
javax.microedition.midlet
javax.microedition.rms
5.1.2 MySQL:
MySQL is a relational database management system (RDBMS) that runs as a
server providing multi-user access to a number of databases. MySQL is a popular
choice of database for use in web applications and is an open source product.
The process of setting up a MySQL database varies from host to host, however we
will end up with a database name, a user name and a password. Before using our
database, we must create a table. Creating a table in phpMyAdmin is simple; we just
type the name, select the number of fields and click the ‘go’ button. we will then be
taken to a setup screen where you must create the fields for the database. Another way
of creating databases and tables in phpMyAdmin is by executing simple SQL
statements.
We have used this method in order to create our database and tables.
What is Database?
A database is a separate application that stores a collection of data. Each
database has one or more distinct APIs for creating, accessing, managing, searching
and replicating the data it holds.
40
Other kinds of data stores can be used, such as files on the file system or large
hash tables in memory but data fetching and writing would not be so fast and easy
with those types of systems. So now a day, we use relational database management
systems (RDBMS) to store and manage huge volume of data. This is called relational
database because all the data is stored into different tables and relations are
established using primary keys or other keys known as foreign keys.
RDBMS Terminology:
Before we proceed to explain MySQL database system, let's revise few definitions
related to database.
Table: A table is a matrix with data. A table in a database looks like a simple
spreadsheet.
Column: One column (data element) contains data of one and the same kind,
for example the column postcode.
Row: A row (= tuple, entry or record) is a group of related data, for example
the data of one subscription.
Primary Key: A primary key is unique. A key value cannot occur twice in
one table. With a key, you can find at most one row.
Foreign Key: A foreign key is the linking pin between two tables.
41
Compound Key: A compound key (composite key) is a key that consists of
multiple columns, because one column is not sufficiently unique.
MySQL Database:
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses.
MySQL is developed, marketed, and supported by MySQL AB, which is a Swedish
company. MySQL is becoming so popular because of many good reasons:
MySQL is a very powerful program in its own right. It handles a large subset
of the functionality of the most expensive and powerful database packages.
MySQL is very friendly to PHP, the most appreciated language for web
development.
Backup software:
MySQL dump is a logical backup tool included with both community and enterprise
editions of MySQL. It supports backing up from all storage engines. MySQL
Enterprise Backup is a hot backup utility included as part of MySQL Enterprise
subscription from Oracle ,offering native InnoDB hot backup,as well as backup for
other storage .
42
6. TESTING
6.1 Test Case description
The purpose of testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a
specific testing requirement.
43
System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An
example of system testing is the configuration oriented system integration test.
System testing is based on process descriptions and flows, emphasizing pre-driven
process links and integration points.
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most
other kinds of tests, must be written from a definitive source document, such as
specification or requirements document, such as specification or requirements
document. It is a testing in which the software under test is treated, as a black box
.you cannot “see” into it. The test provides inputs and responds to outputs without
considering how the software works.
Unit testing is usually conducted as part of a combined code and unit test
phase of the software lifecycle, although it is not uncommon for coding and unit
testing to be conducted as two distinct phases.
Test objectives
All field entries must work properly.
Pages must be activated from the identified link.
44
The entry screen, messages and responses must not be delayed.
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
6.4 Integration Testing
Software integration testing is the incremental integration testing of two or
more integrated software components on a single platform to produce failures caused
by interface defects.
Test Results:
All the test cases mentioned above passed successfully. No defects encountered.
Test Results:
All the test cases mentioned above passed successfully. No defects encountered.
45
7. OUTPUT SCREENS
46
SCR 7.2 Developer Application Form
47
SCR 7.5 Manager Home
48
SCR 7.6 Recruit Employee
49
SCR 7.9 Team lead Home
50
SCR 7.11 Data Assigned based on Feature Selection
51
SCR 7.13 Bug Report Analysis
52
SCR 7.15 Developer Login
53
SCR 7.17 Rectification Status
54
SCR 7.19 Team lead login
55
SCR 7.21 Data Reduction based on Instance Selection
56
SCR 7.23 Trace History of Bug
57
SCR 7.25 Data Reduction based on Instance Selection
58
8. CONCLUSION
To locate a bug, developers use not only the content of the bug report but also
domain knowledge relevant to the software project. We introduced a learning-to-rank
approach that emulates the bug finding process employed by developers. The ranking
model characterizes useful relationships between a bug report and source code files by
leveraging domain knowledge, such as API specifications, the syntactic structure of
code, or issue tracking data. Experimental evaluations on six Java projects show that
our approach can locate the relevant files within the top 10 recommendations for over
70 percent of the bug reports in Eclipse Platform and Tomcat. Furthermore, the
proposed ranking model outperforms three recent state-of-the-art approaches. Feature
evaluation experiments employing greedy backward feature elimination demonstrate
that all features are useful. When coupled with runtime analysis, the feature
evaluation results can be utilized to select a subset of features in order to achieve a
target trade-off between system accuracy and runtime complexity. The proposed
adaptive ranking approach is generally applicable to software projects for which there
exists a sufficient amount of project specific knowledge, such as a comprehensive
API documentation (Section 3.1.2) and an initial number of previously fixed bug
reports (Section 6.1). Furthermore, the ranking performance can benefit from
informative bug reports and well documented code leading to a better lexical
similarity (Section 3.1.1), and from source code files that already have a bug-fixing
history (Section 3.2). In future work, we will leverage additional types of domain
knowledge, such as the stack traces submitted with bug reports and the file change
history, as well as features previously used in defect prediction systems. We also plan
to use the ranking SVM with nonlinear kernels and further evaluate the approach on
projects in other programming languages.
59
9. REFERENCES
[1] G. Antoniol and Y.-G. Gueheneuc, “Feature identification: A novel approach and
a case study,” in Proc. 21st IEEE Int. Conf. Softw. Maintenance,Washington, DC,
USA, 2005, pp. 357–366.
[6] R. M. Bell, T. J. Ostrand, and E. J. Weyuker, “Looking for bugs in all the right
places,” in Proc. Int. Symp. Softw. Testing Anal., New York, NY, USA, 2006, pp.
61–72.
60