Running Head: PHEROMONES
Total Page:16
File Type:pdf, Size:1020Kb
Concord McNair Scholars Research Journal Volume 8 (2005) Concord McNair Scholars Journal Table of Contents 5 Lonnie Bowe Mentor: Mr. Jim Johnston Detecting Plagiarism in Computer Programming Assignments Using Software Metrics 17 Sherrie S. Bowman Mentor: Dr. Darrell Crick The Water Quality of Brush Creek: A Baseline Study 34 James Edward Britt, II Mentor: Dr. Muhammad M. Islam Momentum Improvement and Returns from Investing in Fidelity Sector Funds 58 Holly A. Damron Mentors: Dr. Darla Wise & Dr. Eric Blough Translocation of Mitogen-Activated Protein Kinase Pathways in Skeletal Muscle 66 Justin S. Davis Mentor: Dr. Kendra Boggess Perception of Color in Health-Related Food Packaging 78 Jesse Farmer Mentors: Dr. Bob Riggins & Mr. Bruce Mutter A Modeling and Simulation of Sensor Data for An Autonomous Ground Robotic Vehicle 2 Concord McNair Scholars Journal 103 Jennifer L. Hedrick Mentor: Dr. Darla Wise A Study of the Effects of Therapeutic Massage on Individuals’ Stress Levels 119 Aaron Hellems Mentor: Dr. Rodney L. Klein The Role of Contextual Components in the Generalization of Operant Behavior 142 Samantha Lane Mentors: Dr. Darla Wise & Dr. Roger Sheppard Genetic Variation of Wood Cockroaches in Southern West Virginia 155 Andrea McCormick-Robinson Mentor: Dr. April Puzzuoli The Effects of Inclusion in an Early Childhood Environment 172 Stacy Miller Mentors: Dr. Roger Sheppard, Dr. Tom Ford, and Dr. Darla Wise Study of Factors Affecting the Distribution of Wood Cockroaches (Cryptocercus spp.) 186 Daniel “DJ” Puckett Mentors: Dr. Darrell Crick & Dr. Darla Wise Comparison of the Antibacterial Activity of Extracts Prepared from Ambrosia trifida and Ambrosia artemisiifolia 3 Concord McNair Scholars Journal 198 Shelia R. Robinett Mentors: Dr. Karen Griffee & Ms. Christina M. Rock Pheromones and Their Effects on the Sociosexual Behaviors of Lesbians 222 Kathy Stress Mentor: Dr. Pat Mulvey The Psychological Effects of the Vietnam War 4 Concord McNair Scholars Journal Detecting Plagiarism in Computer Programming Assignments Using Software Metrics Lonnie Bowe Mentor: Jim Johnston Concord University Athens, WV 24712 Abstract Due to the highly flexible nature of computer programming, the process of modifying someone else's assignment for the purposes of cheating has become an almost trivial task to some students. On the other hand, the large numbers of students in programming classes makes it difficult for professors to catch these changes. Further complicating matters is that in lower- level classes, the assignments normally do not provide any variation. This paper examines the methods used in plagiarism detection systems and their effectiveness in lower level class settings. 5 Concord McNair Scholars Journal 1. Introduction Merriam-Webster Online Dictionary [1] defines plagiarism as “an act or instance of plagiarizing”. It then defines plagiarizing as “to steal and pass off (the ideas or words of another) as one's own : use (another's production) without crediting the source“. When most people think of plagiarism, they think of writing papers, but it can be practically applied to any area of academics. It is out of the scope of this paper to speculate why students cheat, but it is safe to say that some students will cheat given the opportunity. For most of history, it has been the responsibility of the professor to set up rules to discourage plagiarism and to detect it when they are grading student work. However, given the large class sizes that institutions of learning face, it becomes quite a task to catch every instance of plagiarism. With the rise of technology, the problem of detecting plagiarism has been partly turned over to the computer. Perhaps the most well known of these plagiarism detection tools is Turnitin [2]. Turnitin is designed to detect plagiarism in papers using a large database of stored papers and internet searches. When a teacher uses Turnitin for multiple years, it can easily catch reused papers and Turnitin can catch snippets of text stolen directly from books or websites. While Turnitin seems to be very good at detecting plagiarism in papers, it fails to catch plagiarism in computer programming assignments. The author submitted two identical programming assignments which were then submitted to Turnitin to check for plagiarism. Turnitin's plagiarism detector returned a 0% similarity rating. While Turnitin does not detect plagiarism in programming assignments, systems have been developed to test for that kind of plagiarism. This paper looks at the problem of detecting plagiarism in those programming assignments and the detection systems that have been created. 2. The Problem Programming assignments are similar to English papers in that the professor gives a topic or problem and it is up to the student to create a solution to that problem. Each student's implementation of the solution may be different while still solving the problem. The complication with programming assignments, especially at a lower level, is that the range of solutions is much smaller than the solutions of English papers. While every student in an English class may come up with a different idea or take on a 6 Concord McNair Scholars Journal problem, programming students are often limited by the nature of the course. At the introductory level, assignments are often given to specifically introduce and enforce certain programming concepts. At this point, students do not have the experience needed to develop their own styles and methods of tackling their assignments. This results in many students turning in assignments that look very similar. Even though this is the case, many professors have the ability to look at their classes' assignments and pick out which ones have been plagiarized. This becomes harder and harder for professors to do as class sizes grow. The problem that needs to be solved is how to catch these plagiarized assignments with an automated system. 3. Background and Related Work This project used Joy and Luck's definitions of the two techniques for plagiarism. Instead of trying to paraphrase them, their definitions are presented below in it's entirety. [2] “1) Lexical Changes: By lexical changes, we mean changes which could, in principle, be performed by a text editor. They do not require knowledge of the language sufficient to parse to a program. 1Comments can be reworded, added and omitted. 2Formatting can be changed. 3Identifier names can be modified. 4Line numbers can be change (in languages such as FORTRAN). 2) Structural Changes: A structural change requires the sort of knowledge of a program that would be necessary to parse it. It is highly language dependent. Loops can be replaced (e.g. a while loop in Pascal can be substituted for an until loop). Nested if statements can be replaced by case statements, and vice-versa. Statement order can be changed, provided this does not affect the meaning of the program. Procedure calls may be replaced by function calls, and vice-versa. Calls to a procedure may be replaced by a copy of the body of the procedure. Ordering of operands may be changed (e.g. x < y may become y >= x).” 7 Concord McNair Scholars Journal Lexical changes are obviously the easiest method of attempting to plagiarize a programming assignment and most likely the plagiarism method of choice for introductory level programming classes. Changing variable names and comments will be the first thing a plagiarist will look at changing as they seem to be the most personal attribute of a piece of code. So, how can these changes be detected? First, we can remove the comments and formatting because, broadly speaking, they have nothing to do with the function of the program. Even in the case of languages like COBOL, where spacing matters, spacing can be removed for the purposes of plagiarism testing. Likewise, using a parser, identifier names can be replaced by token representations. These tokens can then be compared by looking at the number of them that correspond and their function. In an introductory class, this method can cause problems if students have been shown that there is only one way to perform a certain action or they are following an example from a book. In this case, it is best for a professor to review the results of the token comparison with the non-tokenized code and make a decision based on that. While this analysis may be good enough for some instructors, it is considered a weak test. Other systems have been designed to further this idea. [2][3] These systems count attributes of a program, like the tokens in the previous example. These systems are known as attribute counting systems. A popular method of attempting to detect plagiarism is to use what is known as the Halstead Metric. [11][12][13] The Halstead Metric is based on four numbers that are taken from attribute counting. These numbers are: n1 = the number of distinct operators n2 = the number of distinct operands N1 = the total number of operators N2 = the total number of operands These numbers are used to compute the following metrics to create a profile of a programming assignment. These metrics are: Program Length = N1 + N2 Program Vocabulary = n1 + n2 8 Concord McNair Scholars Journal Volume=N*(LOG2 n) Difficulty= (n1/2) * (N2/n2) Effort= Difficulty * Volume There is some debate about the effectiveness of the Halstead Metric. [7][8] One of the problems cited with it is that the Halstead metric ignores program structure and control flow which is an important thing to consider when determining plagiarism. Leach[11] suggests that these problems can be solved by using the Halstead Metric in combination with the Cyclomatic Complexity, which is also known as the McCabe Complexity. [5][6] The Cyclomatic Complexity is calculated by constructing a graph of a program's control flow and then using the following formula: Cyclomatic Complexity (CC) = E – N + P where E = the number of the edges of the graph N = the number of nodes of the graph p = the number of connected components.