rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
meta
stringlengths
141
403
String repl = expandTemplate(replace.convertToString().getValue(), false);
String repl = expandTemplate(replace.convertToString().toString(), false);
private String tr(IRubyObject search, IRubyObject replace, boolean squeeze) { String srchSpec = search.convertToString().getValue(); String srch = expandTemplate(srchSpec, true); if (srchSpec.startsWith("^")) { StringBuffer sbuf = new StringBuffer(256); for (int i = 0; i < 256; i++) { char c = (char) i; if (srch.indexOf(c) == -1) { sbuf.append(c); } } srch = sbuf.toString(); } String repl = expandTemplate(replace.convertToString().getValue(), false); int strLen = getValue().length(); if (strLen == 0 || srch.length() == 0) { return getValue(); } int repLen = repl.length(); StringBuffer sbuf = new StringBuffer(strLen); int last = -1; for (int i = 0; i < strLen; i++) { char cs = getValue().charAt(i); int pos = srch.indexOf(cs); if (pos == -1) { sbuf.append(cs); last = -1; } else if (repLen > 0) { char cr = repl.charAt(Math.min(pos, repLen - 1)); if (squeeze && cr == last) { continue; } sbuf.append(cr); last = cr; } } return sbuf.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
return getValue();
return toString();
private String tr(IRubyObject search, IRubyObject replace, boolean squeeze) { String srchSpec = search.convertToString().getValue(); String srch = expandTemplate(srchSpec, true); if (srchSpec.startsWith("^")) { StringBuffer sbuf = new StringBuffer(256); for (int i = 0; i < 256; i++) { char c = (char) i; if (srch.indexOf(c) == -1) { sbuf.append(c); } } srch = sbuf.toString(); } String repl = expandTemplate(replace.convertToString().getValue(), false); int strLen = getValue().length(); if (strLen == 0 || srch.length() == 0) { return getValue(); } int repLen = repl.length(); StringBuffer sbuf = new StringBuffer(strLen); int last = -1; for (int i = 0; i < strLen; i++) { char cs = getValue().charAt(i); int pos = srch.indexOf(cs); if (pos == -1) { sbuf.append(cs); last = -1; } else if (repLen > 0) { char cr = repl.charAt(Math.min(pos, repLen - 1)); if (squeeze && cr == last) { continue; } sbuf.append(cr); last = cr; } } return sbuf.toString(); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
if (newStr.equals(getValue())) {
if (sameAs(newStr)) {
public IRubyObject tr_bang(IRubyObject search, IRubyObject replace) { String newStr = tr(search, replace, false); if (newStr.equals(getValue())) { return getRuntime().getNil(); } setValue(newStr); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
setValue(newStr);
setValue(new StringBuffer(newStr));
public IRubyObject tr_bang(IRubyObject search, IRubyObject replace) { String newStr = tr(search, replace, false); if (newStr.equals(getValue())) { return getRuntime().getNil(); } setValue(newStr); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
if (newStr.equals(getValue())) {
if (sameAs(newStr)) {
public IRubyObject tr_s_bang(IRubyObject search, IRubyObject replace) { String newStr = tr(search, replace, true); if (newStr.equals(getValue())) { return getRuntime().getNil(); } setValue(newStr); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
setValue(newStr);
setValue(new StringBuffer(newStr));
public IRubyObject tr_s_bang(IRubyObject search, IRubyObject replace) { String newStr = tr(search, replace, true); if (newStr.equals(getValue())) { return getRuntime().getNil(); } setValue(newStr); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
return Pack.unpack(this.getValue(), stringValue(obj));
return Pack.unpack(this.toString(), stringValue(obj));
public RubyArray unpack(IRubyObject obj) { return Pack.unpack(this.getValue(), stringValue(obj)); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
return newString(getValue().toUpperCase());
return newString(toString().toUpperCase());
public RubyString upcase() { return newString(getValue().toUpperCase()); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
String result = getValue().toUpperCase(); if (result.equals(getValue())) {
String result = toString().toUpperCase(); if (sameAs(result)) {
public IRubyObject upcase_bang() { String result = getValue().toUpperCase(); if (result.equals(getValue())) { return getRuntime().getNil(); } setValue(result); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
setValue(result);
setValue(new StringBuffer(result));
public IRubyObject upcase_bang() { String result = getValue().toUpperCase(); if (result.equals(getValue())) { return getRuntime().getNil(); } setValue(result); return this; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/9f2efc63a858fa0507245b207025eab027840a04/RubyString.java/clean/src/org/jruby/RubyString.java
new RubyOperatorEntry(ruby, Token.tUPLUS, "+(unary)"),
new RubyOperatorEntry(ruby, Token.tUPLUS, "+(unary)"),
public static void initOperatorTable(Ruby ruby) { ruby.setOperatorTable(new RubyOperatorEntry[] { new RubyOperatorEntry(ruby, Token.tDOT2, ".."), new RubyOperatorEntry(ruby, Token.tDOT3, "..."), new RubyOperatorEntry(ruby, '+', "+"), new RubyOperatorEntry(ruby, '-', "-"), new RubyOperatorEntry(ruby, '+', "+(binary)"), new RubyOperatorEntry(ruby, '-', "-(binary)"), new RubyOperatorEntry(ruby, '*', "*"), new RubyOperatorEntry(ruby, '/', "/"), new RubyOperatorEntry(ruby, '%', "%"), new RubyOperatorEntry(ruby, Token.tPOW, "**"), new RubyOperatorEntry(ruby, Token.tUPLUS, "+@"), new RubyOperatorEntry(ruby, Token.tUMINUS, "-@"), new RubyOperatorEntry(ruby, Token.tUPLUS, "+(unary)"), new RubyOperatorEntry(ruby, Token.tUMINUS, "-(unary)"), new RubyOperatorEntry(ruby, '|', "|"), new RubyOperatorEntry(ruby, '^', "^"), new RubyOperatorEntry(ruby, '&', "&"), new RubyOperatorEntry(ruby, Token.tCMP, "<=>"), new RubyOperatorEntry(ruby, '>', ">"), new RubyOperatorEntry(ruby, Token.tGEQ, ">="), new RubyOperatorEntry(ruby, '<', "<"), new RubyOperatorEntry(ruby, Token.tLEQ, "<="), new RubyOperatorEntry(ruby, Token.tEQ, "=="), new RubyOperatorEntry(ruby, Token.tEQQ, "==="), new RubyOperatorEntry(ruby, Token.tNEQ, "!="), new RubyOperatorEntry(ruby, Token.tMATCH, "=~"), new RubyOperatorEntry(ruby, Token.tNMATCH, "!~"), new RubyOperatorEntry(ruby, '!', "!"), new RubyOperatorEntry(ruby, '~', "~"), new RubyOperatorEntry(ruby, '!', "!(unary)"), new RubyOperatorEntry(ruby, '~', "~(unary)"), new RubyOperatorEntry(ruby, '!', "!@"), new RubyOperatorEntry(ruby, '~', "~@"), new RubyOperatorEntry(ruby, Token.tAREF, "[]"), new RubyOperatorEntry(ruby, Token.tASET, "[]="), new RubyOperatorEntry(ruby, Token.tLSHFT, "<<"), new RubyOperatorEntry(ruby, Token.tRSHFT, ">>"), new RubyOperatorEntry(ruby, Token.tCOLON2, "::"), new RubyOperatorEntry(ruby, '`', "`"), // new RubyOperatorEntry(this, 0, null), }); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/0a7181933af700ea8025a4197f3a5ebcc08333c3/RubyOperatorEntry.java/buggy/org/jruby/util/RubyOperatorEntry.java
verifyTranslation("\\477", "\\477",false);
verifyTranslation("\\0477", "\\477",false);
public void testThreeDigitOctal() { verifyTranslation("\\0177", "\\177",false); verifyTranslation("\\0277", "\\277",false); verifyTranslation("\\0377", "\\377",false); verifyTranslation("\\477", "\\477",false); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/4d62d6f77d06ba34dda2ae56b8598e93f8ae39ad/TestRegexpTranslator.java/buggy/test/org/jruby/TestRegexpTranslator.java
regex = OCTAL_THREE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1");
regex = OCTAL_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1");
String translatePattern(String regex, boolean commentsAllowed) { regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"x0$1"); regex = OCTAL_THREE_DIGIT_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1"); regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll("\\\\"+"0$1"); if (commentsAllowed) { regex = SPACE_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x20$2"); regex = SHARP_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1\\\\x23$2"); } return regex; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1d0b663ce8136c942acc241be8f810fd2c2645b5/RegexpTranslator.java/buggy/src/org/jruby/RegexpTranslator.java
Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret;
ret = getLocal(names);
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getProperty(this,_bean,names); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2b701c8ed5490046510ded7c8aeab9dc1a2d4510/Context.java/clean/webmacro/src/org/webmacro/Context.java
return PropertyOperator.getProperty(this,_bean,names);
ret = PropertyOperator.getProperty(this,_bean,names);
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getProperty(this,_bean,names); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2b701c8ed5490046510ded7c8aeab9dc1a2d4510/Context.java/clean/webmacro/src/org/webmacro/Context.java
if (ret == null){ ret = getTool(names); } return ret;
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getProperty(this,_bean,names); } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/2b701c8ed5490046510ded7c8aeab9dc1a2d4510/Context.java/clean/webmacro/src/org/webmacro/Context.java
if (info.getInfoType() == DOInfo.INFO_TYPE) model.retrieveChannelsData();
switch (info.getInfoType()) { case DOInfo.INFO_TYPE: model.retrieveChannelsData(); break; } view.setEditorSelectedPane(index); } else { view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) loadClassifications(); }
public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JTabbedPane) { JTabbedPane tab = (JTabbedPane) e.getSource(); Component c = tab.getSelectedComponent(); int index = tab.getSelectedIndex(); if (c instanceof DOInfo) { DOInfo info = (DOInfo) c; if (info.getInfoType() == DOInfo.INFO_TYPE) model.retrieveChannelsData(); } view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) { if (!(model.isClassificationLoaded())) loadClassifications(); } } } else { view.onStateChanged(model.getState() == Editor.READY); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorControl.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorControl.java
view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) { if (!(model.isClassificationLoaded())) loadClassifications(); } }
public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JTabbedPane) { JTabbedPane tab = (JTabbedPane) e.getSource(); Component c = tab.getSelectedComponent(); int index = tab.getSelectedIndex(); if (c instanceof DOInfo) { DOInfo info = (DOInfo) c; if (info.getInfoType() == DOInfo.INFO_TYPE) model.retrieveChannelsData(); } view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) { if (!(model.isClassificationLoaded())) loadClassifications(); } } } else { view.onStateChanged(model.getState() == Editor.READY); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorControl.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorControl.java
view.onStateChanged(model.getState() == Editor.READY);
view.onStateChanged(model.getState() == Editor.READY);
public void stateChanged(ChangeEvent e) { if (e.getSource() instanceof JTabbedPane) { JTabbedPane tab = (JTabbedPane) e.getSource(); Component c = tab.getSelectedComponent(); int index = tab.getSelectedIndex(); if (c instanceof DOInfo) { DOInfo info = (DOInfo) c; if (info.getInfoType() == DOInfo.INFO_TYPE) model.retrieveChannelsData(); } view.setEditorSelectedPane(index); if (index == EditorUI.PROPERTIES_INDEX) { int subIndex = model.getSelectedSubPane(); if (subIndex == EditorUI.ANNOTATION_SUB_INDEX) retrieveAnnotations(); else if (subIndex == EditorUI.CLASSIFICATION_SUB_INDEX) { if (!(model.isClassificationLoaded())) loadClassifications(); } } } else { view.onStateChanged(model.getState() == Editor.READY); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/464efde90db6bc5095c0a7e5952f51ad0f37ca86/EditorControl.java/clean/SRC/org/openmicroscopy/shoola/agents/treeviewer/editors/EditorControl.java
return "AnalysisChain"+(analysisChainId==null ? ":Hash"+this.hashCode() : ":"+analysisChainId);
return "AnalysisChain"+(analysisChainId==null ? ":Hash_"+this.hashCode() : ":Id_"+analysisChainId);
public String toString(){ return "AnalysisChain"+(analysisChainId==null ? ":Hash"+this.hashCode() : ":"+analysisChainId); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/AnalysisChain.java/clean/components/common/src/ome/model/AnalysisChain.java
return getRubyClass().call(this, mid, args, 1);
return funcall(mid, new RubyPointer(args));
public RubyObject funcall(RubyId mid, RubyObject[] args) { return getRubyClass().call(this, mid, args, 1); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f629550c5947df9c1dbe414645f3dc76bcb70df4/RubyObject.java/clean/org/jruby/RubyObject.java
public RubyObject funcall3(RubyId mid, RubyObject[] args) {
public RubyObject funcall3(RubyId mid, RubyPointer args) {
public RubyObject funcall3(RubyId mid, RubyObject[] args) { return getRubyClass().call(this, mid, args, 0); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f629550c5947df9c1dbe414645f3dc76bcb70df4/RubyObject.java/clean/org/jruby/RubyObject.java
System.err.println("..link to "+to.getName());
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
LayoutLinkData semantiLayoutLinkData = link.getSemanticLink();
LayoutLinkData semanticLayoutLinkData = link.getSemanticLink(); System.err.println("link is ..."+semanticLayoutLinkData.getID());
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to);
LayoutLink dummyOutLink = new LayoutLink(semanticLayoutLinkData,dummy,to);
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy);
LayoutLink newOutLink = new LayoutLink(semanticLayoutLinkData,node,dummy);
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
System.err.println("adding a dummy node at layer"+(i-1)); System.err.println("node is "+dummy);
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
semantiLayoutLinkData.addIntermediate(node,dummy);
semanticLayoutLinkData.addIntermediate(node,dummy);
private void makeProperLink(GraphLayoutNode node,LayoutLink link,int i, HashSet newLinks) { // we know node is at i. GraphLayoutNode to = (GraphLayoutNode) link.getToNode(); //System.err.println("..link to "+to.getName()); int toLayer = to.getLayer(); if (toLayer == (i-1)) { // layer is correct newLinks.add(link); } else { // create new dummy node DummyNode dummy = new DummyNode(); //System.err.println("node is "+dummy); LayoutLinkData semantiLayoutLinkData = link.getSemanticLink(); // make this node point to "to" LayoutLink dummyOutLink = new LayoutLink(semantiLayoutLinkData,dummy,to); dummy.addSuccLink(dummyOutLink); // make node point to new node LayoutLink newOutLink = new LayoutLink(semantiLayoutLinkData,node,dummy); dummy.addPredLink(newOutLink); // add new link to links. newLinks.add(newOutLink); // remove successor from node // don't need to do this, as we set the successors of this node // en masse // adjust predecessors for to to.removePredLink(link); to.addPredLink(dummyOutLink); // add dummy to next layer. //System.err.println("adding a dummy node at layer"+(i-1)); //System.err.println("node is "+dummy); layering.addToLayer(i-1,dummy); // adjust the semantic link to put dummy in between "from" and "to". // invariant is that "from" is directly before "to", so just put it //after "from" semantiLayoutLinkData.addIntermediate(node,dummy); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/47793775b1a982f48137c979dfc13562fb727b52/LayoutChainData.java/buggy/SRC/org/openmicroscopy/shoola/agents/chainbuilder/data/layout/LayoutChainData.java
throw new InvalidContextException("The object used as the list of values in a foreach statement must have some way of returning a list type, or be a list type itself. See the documentation for PropertyOperator.getIterator() for more details. No such property was found on the supplied object: " + list);
throw new InvalidContextException("The object used as the list of values in a foreach statement must have some way of returning a list type, or be a list type itself. See the documentation for PropertyOperator.getIterator() for more details. No such property was found on the supplied object: " + list + ": " + e);
public void write(Writer out, Context context) throws InvalidContextException, IOException { // now clobber values outside the loop: // Map listMap = new HashMap(); // listMap.include(context); Object list = _list; if (_macro) { while (list instanceof Macro) { list = ((Macro) list).evaluate(context); } } Iterator iter; try { iter = PropertyOperator.getIterator(list); } catch (Exception e) { throw new InvalidContextException("The object used as the list of values in a foreach statement must have some way of returning a list type, or be a list type itself. See the documentation for PropertyOperator.getIterator() for more details. No such property was found on the supplied object: " + list); } Object listItem; // deals with an empty list substitute appropriate variables and // prints block out once if (iter == null) { listItem = "<!--\n " + _list + ": is empty \n-->"; try { _iterVar.setValue(context, listItem); } catch (InvalidContextException e) { Engine.log.exception(e); Engine.log.error("Unable to resolve list" + _list); out.write("<!--\n Unable to resolve list " + _list + " \n-->"); } _body.write(out, context); // iterates through all items including null ones which will // print error messages } else { while(iter.hasNext()) { if ((listItem = iter.next()) == null) { listItem = "<!--\n " + _list + ": contained a null item \n-->"; } try { _iterVar.setValue(context, listItem); _body.write(out, context); } catch (InvalidContextException e) { Engine.log.exception(e); Engine.log.error("unable to set a list item of list: " + _list); out.write("<!--\n Unable to resolve list " + _list + " \n-->"); } } } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/af8b9e04f0dcb3a0994b2882f87f1d6c81e86fc1/ForeachDirective.java/clean/webmacro/src/org/webmacro/engine/ForeachDirective.java
return "Experimenter"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId);
return "Experimenter"+(attributeId==null ? ":Hash_"+this.hashCode() : ":Id_"+attributeId);
public String toString(){ return "Experimenter"+(attributeId==null ? ":Hash"+this.hashCode() : ":"+attributeId); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/51a3c546dfc7a7a98b29771a459df19094fc5b51/Experimenter.java/clean/components/common/src/ome/model/Experimenter.java
nilClass.defineMethod("nil?", CallbackFactory.getTrueMethod());
nilClass.defineMethod("nil?", CallbackFactory.getTrueMethod(0));
public static RubyClass createNilClass(Ruby ruby) { RubyClass nilClass = ruby.defineClass("NilClass", ruby.getClasses().getObjectClass()); nilClass.defineMethod("type", CallbackFactory.getSingletonMethod(RubyNil.class, "type")); nilClass.defineMethod("to_i", CallbackFactory.getSingletonMethod(RubyNil.class, "to_i")); nilClass.defineMethod("to_s", CallbackFactory.getSingletonMethod(RubyNil.class, "to_s")); nilClass.defineMethod("to_a", CallbackFactory.getSingletonMethod(RubyNil.class, "to_a")); nilClass.defineMethod("inspect", CallbackFactory.getSingletonMethod(RubyNil.class, "inspect")); nilClass.defineMethod("&", CallbackFactory.getSingletonMethod(RubyNil.class, "op_and", RubyObject.class)); nilClass.defineMethod("|", CallbackFactory.getSingletonMethod(RubyNil.class, "op_or", RubyObject.class)); nilClass.defineMethod("^", CallbackFactory.getSingletonMethod(RubyNil.class, "op_xor", RubyObject.class)); nilClass.defineMethod("nil?", CallbackFactory.getTrueMethod()); nilClass.getRubyClass().undefMethod("new"); ruby.defineGlobalConstant("NIL", ruby.getNil()); return nilClass; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/RubyNil.java/buggy/org/jruby/RubyNil.java
public static Callback getTrueMethod() {
public static Callback getTrueMethod(final int arity) {
public static Callback getTrueMethod() { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getTrue(); } }; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/CallbackFactory.java/buggy/org/jruby/runtime/CallbackFactory.java
public int getArity() { return arity; }
public static Callback getTrueMethod() { return new Callback() { public RubyObject execute(RubyObject recv, RubyObject[] args, Ruby ruby) { return ruby.getTrue(); } }; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/6076c5ab87d25a488469aa1a32f1d2c9c9e470b2/CallbackFactory.java/buggy/org/jruby/runtime/CallbackFactory.java
ruby.getGlobalVar("$!").callMethod("set_backtrace", value.toRubyObject());
ruby.getGlobalVar("$!").callMethod("set_backtrace", value);
public IRubyObject set(IRubyObject value) { if (ruby.getGlobalVar("$!").isNil()) { throw new ArgumentError(ruby, "$! not set."); } ruby.getGlobalVar("$!").callMethod("set_backtrace", value.toRubyObject()); return value; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyGlobal.java/buggy/org/jruby/RubyGlobal.java
ruby.setLastline(value.toRubyObject());
ruby.setLastline(value);
public IRubyObject set(IRubyObject value) { ruby.setLastline(value.toRubyObject()); return value; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyGlobal.java/buggy/org/jruby/RubyGlobal.java
((RubyArgsFile) ruby.getGlobalVar("$<")).setCurrentLineNumber(RubyFixnum.fix2int(value.toRubyObject()));
((RubyArgsFile) ruby.getGlobalVar("$<")).setCurrentLineNumber(RubyFixnum.fix2int(value));
public IRubyObject set(IRubyObject value) { ((RubyArgsFile) ruby.getGlobalVar("$<")).setCurrentLineNumber(RubyFixnum.fix2int(value.toRubyObject())); return super.set(value); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyGlobal.java/buggy/org/jruby/RubyGlobal.java
int level = RubyFixnum.fix2int(value.toRubyObject());
int level = RubyFixnum.fix2int(value);
public IRubyObject set(IRubyObject value) { int level = RubyFixnum.fix2int(value.toRubyObject()); if (level < ruby.getSafeLevel()) { throw new SecurityException("tried to downgrade level from " + ruby.getSafeLevel() + " to " + level); } ruby.setSafeLevel(level); // thread.setSafeLevel(level); return value; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/f235ab756f32ea9496f8f880066b46ad95ebb692/RubyGlobal.java/buggy/org/jruby/RubyGlobal.java
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
private static void addInvitationListener() { // Add Invite Listener MultiUserChat.addInvitationListener(SparkManager.getConnection(), new InvitationListener() { public void invitationReceived(final XMPPConnection conn, final String room, final String inviter, final String reason, final String password, final Message message) { SwingUtilities.invokeLater(new Runnable() { public void run() { Collection listeners = new ArrayList(SparkManager.getChatManager().getInvitationListeners()); Iterator iter = listeners.iterator(); while (iter.hasNext()) { RoomInvitationListener listener = (RoomInvitationListener)iter.next(); boolean handle = listener.handleInvitation(conn, room, inviter, reason, password, message); if (handle) { return; } } // If no listeners handled the invitation, default to generic invite. final InvitationUI inviteDialog = new InvitationUI(conn, room, inviter, reason, password, message); SparkManager.getWorkspace().addAlert(inviteDialog); // Alert if necessary SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow()); } }); } }); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/a5ff357d94936262db1f8bcc669b7aab682110fe/Conferences.java/buggy/src/java/org/jivesoftware/spark/ui/conferences/Conferences.java
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
public void invitationReceived(final XMPPConnection conn, final String room, final String inviter, final String reason, final String password, final Message message) { SwingUtilities.invokeLater(new Runnable() { public void run() { Collection listeners = new ArrayList(SparkManager.getChatManager().getInvitationListeners()); Iterator iter = listeners.iterator(); while (iter.hasNext()) { RoomInvitationListener listener = (RoomInvitationListener)iter.next(); boolean handle = listener.handleInvitation(conn, room, inviter, reason, password, message); if (handle) { return; } } // If no listeners handled the invitation, default to generic invite. final InvitationUI inviteDialog = new InvitationUI(conn, room, inviter, reason, password, message); SparkManager.getWorkspace().addAlert(inviteDialog); // Alert if necessary SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow()); } }); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/a5ff357d94936262db1f8bcc669b7aab682110fe/Conferences.java/buggy/src/java/org/jivesoftware/spark/ui/conferences/Conferences.java
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
public void run() { Collection listeners = new ArrayList(SparkManager.getChatManager().getInvitationListeners()); Iterator iter = listeners.iterator(); while (iter.hasNext()) { RoomInvitationListener listener = (RoomInvitationListener)iter.next(); boolean handle = listener.handleInvitation(conn, room, inviter, reason, password, message); if (handle) { return; } } // If no listeners handled the invitation, default to generic invite. final InvitationUI inviteDialog = new InvitationUI(conn, room, inviter, reason, password, message); SparkManager.getWorkspace().addAlert(inviteDialog); // Alert if necessary SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow()); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/a5ff357d94936262db1f8bcc669b7aab682110fe/Conferences.java/buggy/src/java/org/jivesoftware/spark/ui/conferences/Conferences.java
this.bookmarks = bookmarks;
public void setBookmarks(Collection bookmarks) { Iterator iter = bookmarks.iterator(); while (iter.hasNext()) { Bookmark bookmark = (Bookmark)iter.next(); String serviceName = bookmark.getServiceName(); String roomJID = bookmark.getRoomJID(); String roomName = bookmark.getRoomName(); // Get Service Node TreePath path = tree.findByName(tree, new String[]{rootNode.getUserObject().toString(), serviceName}); JiveTreeNode serviceNode = null; if (path == null) { serviceNode = addServiceToList(serviceName); path = tree.findByName(tree, new String[]{rootNode.getUserObject().toString(), serviceName}); } else { serviceNode = (JiveTreeNode)path.getLastPathComponent(); } addBookmark(serviceNode, roomName, roomJID); tree.expandPath(path); } SwingWorker worker = new SwingWorker() { public Object construct() { try { Thread.sleep(2000); } catch (InterruptedException e) { Log.error(e); } return getAutoJoins(); } public void finished() { Collection col = (Collection)get(); if (col != null) { joinTaggedRooms(col); } } }; worker.start(); }
52006 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52006/028cde13fc23ea5cbdaa0191963cf1624ef656d0/BookmarkedConferences.java/buggy/src/java/org/jivesoftware/spark/ui/conferences/BookmarkedConferences.java
putValue(Action.NAME, NAME); name = (String) getValue(Action.NAME);
name = NAME;
public CreateAction(TreeViewer model) { super(model); putValue(Action.NAME, NAME); name = (String) getValue(Action.NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); IconManager im = IconManager.getInstance(); putValue(Action.SMALL_ICON, im.getIcon(IconManager.CREATE)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
description = (String) getValue(Action.SHORT_DESCRIPTION);
public CreateAction(TreeViewer model) { super(model); putValue(Action.NAME, NAME); name = (String) getValue(Action.NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); IconManager im = IconManager.getInstance(); putValue(Action.SMALL_ICON, im.getIcon(IconManager.CREATE)); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME);
name = NAME;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME);
name = NAME;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME_DATASET);
name = NAME_DATASET;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME_CATEGORY);
name = NAME_CATEGORY;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME_IMAGE);
name = NAME_IMAGE;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME_IMAGE);
name = NAME_IMAGE;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
putValue(Action.NAME, NAME);
name = NAME;
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
name = (String) getValue(Action.NAME);
description = (String) getValue(Action.SHORT_DESCRIPTION);
protected void onDisplayChange(TreeImageDisplay selectedDisplay) { if (selectedDisplay == null) { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); return; } Object ho = selectedDisplay.getUserObject(); if (ho instanceof String) { // root setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } else if (ho instanceof ProjectData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_DATASET); nodeType = CreateCmd.DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); } else if (ho instanceof CategoryGroupData) { setEnabled(model.isObjectWritable((DataObject) ho)); putValue(Action.NAME, NAME_CATEGORY); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_CATEGORY)); nodeType = CreateCmd.CATEGORY; } else if (ho instanceof CategoryData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); //TODO: remove when import putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else if (ho instanceof DatasetData) { setEnabled(model.isObjectWritable((DataObject) ho)); setEnabled(false); putValue(Action.NAME, NAME_IMAGE); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_IMAGE)); } else { setEnabled(false); putValue(Action.NAME, NAME); putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION)); } name = (String) getValue(Action.NAME); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateAction.java
RubyTime.createTimeClass(this);
new TimeMetaClass(this).initializeClass();
private void initCoreClasses() { ObjectMetaClass objectMetaClass = new ObjectMetaClass(this); objectMetaClass.initializeClass(); objectClass = objectMetaClass; objectClass.setConstant("Object", objectClass); RubyClass moduleClass = new ModuleMetaClass(this, objectClass); objectClass.setConstant("Module", moduleClass); RubyClass classClass = new RubyClass(this, null /* Would be Class if it could */, moduleClass, null, "Class"); objectClass.setConstant("Class", classClass); // I don't think the containment is correct here (parent cref) RubyClass metaClass = objectClass.makeMetaClass(classClass, objectMetaClass.getCRef()); metaClass = moduleClass.makeMetaClass(metaClass, objectMetaClass.getCRef()); metaClass = classClass.makeMetaClass(metaClass, objectMetaClass.getCRef()); ((ObjectMetaClass) moduleClass).initializeBootstrapClass(); objectClass.includeModule(RubyKernel.createKernelModule(this)); RubyClass.createClassClass(classClass); RubyNil.createNilClass(this); // We cannot define this constant until nil itself was made objectClass.defineConstant("NIL", getNil()); // Pre-create the core classes we know we will get referenced by starting up the runtime. RubyBoolean.createFalseClass(this); RubyBoolean.createTrueClass(this); RubyComparable.createComparable(this); defineModule("Enumerable"); // Impl: src/builtin/enumerable.rb new StringMetaClass(this).initializeClass(); new SymbolMetaClass(this).initializeClass(); RubyThreadGroup.createThreadGroupClass(this); RubyThread.createThreadClass(this); RubyException.createExceptionClass(this); new NumericMetaClass(this).initializeClass(); new IntegerMetaClass(this).initializeClass(); new FixnumMetaClass(this).initializeClass(); new HashMetaClass(this).initializeClass(); new IOMetaClass(this).initializeClass(); new ArrayMetaClass(this).initializeClass(); Java.createJavaModule(this); RubyStruct.createStructClass(this); RubyFloat.createFloatClass(this); new BignumMetaClass(this).initializeClass(); new BindingMetaClass(this).initializeClass(); RubyMath.createMathModule(this); // depends on all numeric types RubyRegexp.createRegexpClass(this); RubyRange.createRangeClass(this); RubyObjectSpace.createObjectSpaceModule(this); RubyGC.createGCModule(this); new ProcMetaClass(this).initializeClass(); RubyMethod.createMethodClass(this); RubyMatchData.createMatchDataClass(this); RubyMarshal.createMarshalModule(this); RubyDir.createDirClass(this); RubyFileTest.createFileTestModule(this); new FileMetaClass(this).initializeClass(); // depends on IO, FileTest RubyPrecision.createPrecisionModule(this); RubyProcess.createProcessModule(this); RubyTime.createTimeClass(this); RubyUnboundMethod.defineUnboundMethodClass(this); RubyClass exceptionClass = getClass("Exception"); RubyClass standardError = defineClass("StandardError", exceptionClass); RubyClass runtimeError = defineClass("RuntimeError", standardError); RubyClass ioError = defineClass("IOError", standardError); RubyClass scriptError = defineClass("ScriptError", exceptionClass); RubyClass nameError = defineClass("NameError", scriptError); defineClass("SystemExit", exceptionClass); defineClass("Fatal", exceptionClass); defineClass("Interrupt", exceptionClass); defineClass("SignalException", exceptionClass); defineClass("TypeError", standardError); defineClass("ArgumentError", standardError); defineClass("IndexError", standardError); defineClass("RangeError", standardError); defineClass("SyntaxError", scriptError); defineClass("LoadError", scriptError); defineClass("NotImplementedError", scriptError); defineClass("NoMethodError", nameError); defineClass("SecurityError", standardError); defineClass("NoMemError", exceptionClass); defineClass("RegexpError", standardError); defineClass("EOFError", ioError); defineClass("LocalJumpError", standardError); defineClass("ThreadError", standardError); defineClass("SystemStackError", exceptionClass); NativeException.createClass(this, runtimeError); systemCallError = defineClass("SystemCallError", standardError); errnoModule = defineModule("Errno"); initErrnoErrors(); getLoadService().addAutoload("UnboundMethod", new IAutoloadMethod() { public IRubyObject load(IRuby ruby, String name) { return RubyUnboundMethod.defineUnboundMethodClass(ruby); } }); }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/70d0ac3914a10ee21018f230c9b0bbf1910d47a3/Ruby.java/buggy/src/org/jruby/Ruby.java
} else if(argument.equals("--debug")) { debug = true; verbose = true; break;
private void processArgument() { String argument = arguments[argumentIndex]; FOR : for (characterIndex = 1; characterIndex < argument.length(); characterIndex++) { switch (argument.charAt(characterIndex)) { case 'h' : main.printUsage(); shouldRunInterpreter = false; break; case 'I' : String s = grabValue(" -I must be followed by a directory name to add to lib path"); String[] ls = s.split(":"); for(int i=0;i<ls.length;i++) { loadPaths.add(ls[i]); } break FOR; case 'r' : requiredLibraries.add(grabValue("-r must be followed by a package to require")); break FOR; case 'e' : inlineScript.append(grabValue(" -e must be followed by an expression to evaluate")); inlineScript.append('\n'); break FOR; case 'b' : benchmarking = true; break; case 'p' : assumePrinting = true; assumeLoop = true; break; case 'O' : objectSpaceEnabled = false; break; case 'C' : compilerEnabled = true; break; case 'n' : assumeLoop = true; break; case 'a' : split = true; break; case 'l' : processLineEnds = true; break; case 'v' : verbose = true; setShowVersion(true); break; case 'w' : verbose = true; break; case 'K': // FIXME: No argument seems to work for -K in MRI plus this should not // siphon off additional args 'jruby -K ~/scripts/foo'. Also better error // processing. String eArg = grabValue("provide a value for -K"); if ("u".equals(eArg) || "U".equals(eArg) || "UTF8".equals(eArg)) { encoding = "UTF-8"; } break; case '-' : if (argument.equals("--version")) { setShowVersion(true); break FOR; } else { if (argument.equals("--")) { // ruby interpreter compatibilty // Usage: ruby [switches] [--] [programfile] [arguments]) break FOR; } } default : throw new MainExitException(1, "unknown option " + argument.charAt(characterIndex)); } } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/a5d41074f98a47c0108b1a75c44775c0f6e4e87b/CommandlineParser.java/clean/src/org/jruby/util/CommandlineParser.java
throw runtime.newNameError("cannot load Java class " + className);
throw runtime.newNameError("cannot load Java class " + className, className);
public Class loadJavaClass(String className) { try { Class result = primitiveClass(className); if (result == null) { return Class.forName(className, true, javaClassLoader); } return result; } catch (ClassNotFoundException cnfExcptn) { throw runtime.newNameError("cannot load Java class " + className); } }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/1278c5bb3507a052d150d814f15453542ae41aed/JavaSupport.java/clean/src/org/jruby/javasupport/JavaSupport.java
protected static void checkContentType(HttpMethodBase response, String mimeType)
protected static void checkContentType(HttpMethod response, String mimeType)
protected static void checkContentType(HttpMethodBase response, String mimeType) throws ImageServiceException { Header header = response.getResponseHeader("Content-Type"); if (header == null) throw new ImageServiceException( "Unspecified content type (OMEIS internal error)."); String value = header.getValue(); if (!mimeType.equals(value)) { throw new ImageServiceException( "Wrong mime type: ["+value+ "] (OMEIS internal error)."); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0ee67611abddaf7c5a898ad8033ca4845e9d8fe/Reply.java/buggy/SRC/org/openmicroscopy/shoola/omeis/proxy/Reply.java
protected static void checkStatusCode(HttpMethodBase response)
protected static void checkStatusCode(HttpMethod response)
protected static void checkStatusCode(HttpMethodBase response) throws ImageServiceException { int status = response.getStatusCode(); if (status != HttpStatus.SC_OK) throw new ImageServiceException("OMEIS couldn't handle request: "+ HttpStatus.getStatusText(status)+"."); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0ee67611abddaf7c5a898ad8033ca4845e9d8fe/Reply.java/buggy/SRC/org/openmicroscopy/shoola/omeis/proxy/Reply.java
public abstract void unmarshal(HttpMethodBase response, HttpChannel context)
public abstract void unmarshal(HttpMethod response, HttpChannel context)
public abstract void unmarshal(HttpMethodBase response, HttpChannel context) throws ImageServiceException, IOException;
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/c0ee67611abddaf7c5a898ad8033ca4845e9d8fe/Reply.java/buggy/SRC/org/openmicroscopy/shoola/omeis/proxy/Reply.java
Node copy = new ScopeNode(null, refValue, getNextNode());
Node copy = new ScopeNode(null, refValue.cloneCRefNode(), getNextNode());
public Node copyNodeScope(CRefNode refValue) { Node copy = new ScopeNode(null, refValue, getNextNode()); if (getTable() != null) { RubyIdPointer newTable = new RubyIdPointer(getTable().getId(0).intValue() + 1); newTable.set(getTable(), getTable().getId(0).intValue() + 1); copy.setTable(newTable); } return copy; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ea333ae74f85b7ba58ee38a692c16b25f8047f57/Node.java/clean/org/jruby/nodes/Node.java
copy.setTable(newTable);
copy = new ScopeNode(newTable, refValue.cloneCRefNode(), getNextNode());
public Node copyNodeScope(CRefNode refValue) { Node copy = new ScopeNode(null, refValue, getNextNode()); if (getTable() != null) { RubyIdPointer newTable = new RubyIdPointer(getTable().getId(0).intValue() + 1); newTable.set(getTable(), getTable().getId(0).intValue() + 1); copy.setTable(newTable); } return copy; }
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ea333ae74f85b7ba58ee38a692c16b25f8047f57/Node.java/clean/org/jruby/nodes/Node.java
} else { this.displayButtons = new AbstractButton[0]; }
} else this.displayButtons = new AbstractButton[0];
public TopWindowManager(ManageableTopWindow window, AbstractButton[] displayButtons) { if (window == null) throw new NullPointerException("No window."); this.window = window; if (displayButtons != null) { ArrayList actualButtons = new ArrayList(displayButtons.length); for (int i = 0; i < displayButtons.length; ++i) if (displayButtons[i] != null) actualButtons.add(displayButtons[i]); this.displayButtons = new AbstractButton[actualButtons.size()]; actualButtons.toArray(this.displayButtons); } else { this.displayButtons = new AbstractButton[0]; } setInitialState(); attachWindowListeners(); attachButtonsListeners(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
public void continueHandleDisplay() { setOnScreen();
public void continueHandleDisplay() { window.setOnScreen();
public void continueHandleDisplay() { setOnScreen(); toForeground(); window.postHandleDisplay(); state = ON_SCREEN; //NOTE: setOnScreen() shows the window on screen, which will //eventually cause another call to componentShown() and, in turn, //another call to this method. However, the state is now ON_SCREEN //so we just invoke toForeground(). This could be avoided if we //kept track of the fg/bg state of the window as well, but it would //make the implementation more complex. As an extra call to //toForeground() is harmless, we favour an easier implementation //over logic soundness. }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
public int getState() { return state; }
public int getState() { return state; }
public int getState() { return state; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
else {
else
private void handleDisplay() { if (state == ON_SCREEN) toForeground(); else { //DISPLAYABLE or UNLINKED. window.preHandleDisplay(this); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
}
private void handleDisplay() { if (state == ON_SCREEN) toForeground(); else { //DISPLAYABLE or UNLINKED. window.preHandleDisplay(this); } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
private void handleDispose() { state = UNLINKED; }
private void handleDispose() { state = UNLINKED; }
private void handleDispose() { state = UNLINKED; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
state = (window.isShowing() ? ON_SCREEN : DISPLAYABLE); else state = UNLINKED;
state = (window.isShowing() ? ON_SCREEN : DISPLAYABLE); else state = UNLINKED;
private void setInitialState() { if (window.isDisplayable()) state = (window.isShowing() ? ON_SCREEN : DISPLAYABLE); else state = UNLINKED; }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/TopWindowManager.java/clean/SRC/org/openmicroscopy/shoola/env/ui/TopWindowManager.java
public void postHandleDisplay() { }
public void postHandleDisplay() {}
public void postHandleDisplay() { }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/ManageableTopWindow.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/ManageableTopWindow.java
public void preHandleDisplay(TopWindowManager manager) {
public void preHandleDisplay(TopWindowManager manager) {
public void preHandleDisplay(TopWindowManager manager) { manager.continueHandleDisplay(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/cf83d7e74fdf42d9c4357c3e575c08395991a878/ManageableTopWindow.java/buggy/SRC/org/openmicroscopy/shoola/env/ui/ManageableTopWindow.java
assertNotNull(obj);
public void testFoo() { SomeOtherClass obj = new SomeOtherClass(); obj.incrementCounter(); obj.incrementCounter(); obj.incrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.getCounter(); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/09421016268852f85f74b9774657dc46969a87d5/SomeOtherClassTest.java/buggy/cobertura/test/SomeOtherClassTest.java
int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min);
int vg = convertRealIntoGraphics(v, max-min, square, min);
void setInputWindowEnd(int v, int min, int max) { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputEndBox(vg); view.updateInputEnd(vg, v); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5f198f3677f9aa6bbdd6719a3abfc6406f1479/GraphicsRepresentationManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/GraphicsRepresentationManager.java
int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min);
int vg = convertRealIntoGraphics(v, max-min, square, min);
void setInputWindowStart(int v, int min, int max) { int vg = convertRealIntoGraphics(v, max-min, view.getInputGraphicsRange(), min); vg = vg + leftBorder; setInputStartBox(vg); view.updateInputStart(vg, v); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/de5f198f3677f9aa6bbdd6719a3abfc6406f1479/GraphicsRepresentationManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/GraphicsRepresentationManager.java
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowStart(w); }
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowStart(w); }
int getGlobalMinimum() { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowStart(w); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowEnd(w); }
{ int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowEnd(w); }
int getGlobalMaximum() { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); return (int) eventManager.getGlobalChannelWindowEnd(w); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
void setInputWindowEnd(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); setInputWindowEnd(value, w); }
void setInputWindowEnd(int value, int w) { DomainPaneManager dpManager = view.getDomainPane().getManager(); GraphicsRepresentationManager grManager = view.getGRepresentation().getManager(); dpManager.setInputWindowEnd(value); grManager.setInputWindowEnd(value, getGlobalChannelWindowStart(w), getGlobalChannelWindowEnd(w)); }
void setInputWindowEnd(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); setInputWindowEnd(value, w); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
void setInputWindowStart(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); setInputWindowStart(value, w); }
void setInputWindowStart(int value, int w) { DomainPaneManager dpManager = view.getDomainPane().getManager(); GraphicsRepresentationManager grManager = view.getGRepresentation().getManager(); dpManager.setInputWindowStart(value); grManager.setInputWindowStart(value, getGlobalChannelWindowStart(w), getGlobalChannelWindowEnd(w)); }
void setInputWindowStart(int value) { int w = view.getDomainPane().getWavelengths().getSelectedIndex(); setInputWindowStart(value, w); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
{ eventManager.setCodomainUpperBound(x); }
{ eventManager.setCodomainUpperBound(x); }
void setCodomainUpperBound(int x) { eventManager.setCodomainUpperBound(x); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
{ eventManager.setCodomainLowerBound(x); }
{ eventManager.setCodomainLowerBound(x); }
void setCodomainLowerBound(int x) { eventManager.setCodomainLowerBound(x); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/1722ebf9ac60fc8e45cdc8d0049e85db5b86715c/QuantumPaneManager.java/buggy/SRC/org/openmicroscopy/shoola/agents/rnd/pane/QuantumPaneManager.java
boolean load(String file);
void load(String file);
boolean load(String file);
50661 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50661/ee934b89304925fd623a76285f84cfb31cb3695f/ILoadService.java/clean/src/org/jruby/runtime/load/ILoadService.java
lens.setImageZoomFactor((float)model.getZoomFactor());
lens.setImageZoomFactor((float) model.getZoomFactor());
void setLensVisible(boolean b) { if (lens == null) lens = new LensComponent(this); if (b) { if (model.getMaxX() < lens.getLensUI().getWidth() || model.getMaxY() < lens.getLensUI().getHeight()) return; if (firstTimeLensShown) { firstTimeLensShown = false; int lensX = model.getMaxX()/2-lens.getLensUI().getWidth()/2; int lensY = model.getMaxY()/2-lens.getLensUI().getHeight()/2; if (lensX+lens.getLensUI().getWidth() > model.getMaxX()) lensX = model.getMaxX()-lens.getLensUI().getWidth(); if (lensY+lens.getLensUI().getHeight() > model.getMaxY()) lensY = model.getMaxY()-lens.getLensUI().getHeight(); lens.setImageZoomFactor((float)model.getZoomFactor()); lens.setLensLocation(lensX, lensY); lens.setXYPixelMicron(model.getPixelsSizeX(), model.getPixelsSizeY()); model.getBrowser().addComponent(lens.getLensUI()); lens.setZoomWindowLocation(getX()+getWidth(), getY()); } lens.setImageZoomFactor((float) model.getZoomFactor()); lens.setPlaneImage(model.getDisplayedImage()); lens.setLensPreferredColour(); } lens.setVisible(b); repaint(); }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/5aacd98a1cfb2219e218c87eed17b5a0f0e9738a/ImViewerUI.java/buggy/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java
name = NAME;;
name = NAME;
protected void onBrowserSelection(Browser browser) { nodeType = -1; if (browser == null) { setEnabled(false); name = NAME; } else { switch (browser.getBrowserType()) { case Browser.PROJECT_EXPLORER: setEnabled(true); name = NAME_PROJECT; nodeType = CreateCmd.PROJECT; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_PROJECT)); break; case Browser.CATEGORY_EXPLORER: setEnabled(true); name = NAME_CATEGORY_GROUP; nodeType = CreateCmd.CATEGORY_GROUP; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText( DESCRIPTION_CATEGORY_GROUP)); break; case Browser.IMAGES_EXPLORER: //setEnabled(true); setEnabled(false); name = NAME;; } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateTopContainerAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateTopContainerAction.java
description = (String) getValue(Action.SHORT_DESCRIPTION);
protected void onBrowserSelection(Browser browser) { nodeType = -1; if (browser == null) { setEnabled(false); name = NAME; } else { switch (browser.getBrowserType()) { case Browser.PROJECT_EXPLORER: setEnabled(true); name = NAME_PROJECT; nodeType = CreateCmd.PROJECT; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_PROJECT)); break; case Browser.CATEGORY_EXPLORER: setEnabled(true); name = NAME_CATEGORY_GROUP; nodeType = CreateCmd.CATEGORY_GROUP; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText( DESCRIPTION_CATEGORY_GROUP)); break; case Browser.IMAGES_EXPLORER: //setEnabled(true); setEnabled(false); name = NAME;; } } }
54698 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54698/ea7509babe2344eb702969105eb77096cc5b6bcf/CreateTopContainerAction.java/buggy/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateTopContainerAction.java
e = Expression();
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
list.addElement(e);
e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[30] = jj_gen; ; } list.addElement(e);
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[30] = jj_gen;
jj_la1[31] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[31] = jj_gen;
jj_la1[32] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[32] = jj_gen;
jj_la1[33] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
jj_la1[33] = jj_gen;
jj_la1[34] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[29] = jj_gen; ; } list.addElement(e); label_3: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case COMMA: ; break; default: jj_la1[30] = jj_gen; break label_3; } jj_consume_token(COMMA); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[31] = jj_gen; ; } e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[32] = jj_gen; ; } list.addElement(e); } break; default: jj_la1[33] = jj_gen; ; } {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[34] = jj_gen; ; }
final public ListBuilder BracketList() throws ParseException { ListBuilder list; jj_consume_token(LBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[34] = jj_gen; ; } list = ArgList(); jj_consume_token(RBRACKET); {if (true) return list;} throw new Error("Missing return statement in function"); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/64bd56a4ce2483ff64bf10258a0f60235710196b/WMParser_impl.java/clean/webmacro/src/org/webmacro/parser/WMParser_impl.java
public void ReInit(java.io.Reader dstream)
public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dce0ae9f6a6e6eacbbac0735ab43aa8a7241478/BackupCharStream.java/buggy/webmacro/src/org/webmacro/parser/BackupCharStream.java
ReInit(dstream, 1, 1, 4096);
inputStream = dstream; line = startline; column = startcolumn - 1; if (bufA == null || bufA.size != buffersize) bufA = new Buffer(buffersize); if (bufB == null || bufB.size != buffersize) bufB = new Buffer(buffersize); curBuf = bufA; otherBuf = bufB; curBuf.curPos = otherBuf.dataLen = -1; curBuf.dataLen = otherBuf.dataLen = 0; prevCharIsLF = prevCharIsCR = false; tokenBeginPos = -1; tokenBeginBuf = null; backupChars = 0;
public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dce0ae9f6a6e6eacbbac0735ab43aa8a7241478/BackupCharStream.java/buggy/webmacro/src/org/webmacro/parser/BackupCharStream.java
FastWriter fw = new FastWriter(os, "UTF8");
FastWriter fw = new FastWriter(os, context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(_content.length * 16 + 256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { Engine.log.exception(e); Engine.log.error("StringWriter through an IOException!"); return null; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/Block.java/buggy/webmacro/src/org/webmacro/engine/Block.java
return os.toString("UTF8");
return os.toString(context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(_content.length * 16 + 256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch (IOException e) { Engine.log.exception(e); Engine.log.error("StringWriter through an IOException!"); return null; } }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/9dc4324fb914abcbf2ec188e4eb77b1bf503f330/Block.java/buggy/webmacro/src/org/webmacro/engine/Block.java
try { directive = (Directive) desc.dirClass.newInstance(); } catch (Exception e) { };
public DirectiveBuilder(DirectiveDescriptor desc) { this.desc = desc; if (desc.args != null && desc.args.length > 0) buildArgs = new ArgsHolder(desc.args); if (desc.subdirectives != null && desc.subdirectives.length > 0) subdirectives = new Object[desc.subdirectives.length]; try { directive = (Directive) desc.dirClass.newInstance(); } catch (Exception e) { // If directive is null, we'll throw a build exception when we build }; }
52513 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52513/67f3bf2b9347218e8efc5ecece60bb5f03730152/DirectiveBuilder.java/buggy/webmacro/src/org/webmacro/directive/DirectiveBuilder.java
FileFinder finder) throws IOException
FileFinder finder, ComplexityCalculator complexity) throws IOException
public XMLReport(ProjectData projectData, File destinationDir, FileFinder finder) throws IOException { this.finder = finder; pw = new PrintWriter(new FileWriter(new File(destinationDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); println("<!DOCTYPE coverage SYSTEM \"http://cobertura.sourceforge.net/xml/" + coverageDTD + "\">"); println(""); // TODO: Set a schema? //println("<coverage " + sourceDirectories.toString() + " xmlns=\"http://cobertura.sourceforge.net\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://cobertura.sourceforge.net/xml/coverage.xsd\">"); println("<coverage line-rate=\"" + projectData.getLineCoverageRate() + "\" branch-rate=\"" + projectData.getBranchCoverageRate() + "\" version=\"" + Header.version() + "\" timestamp=\"" + new Date().getTime() + "\">"); increaseIndentation(); dumpSources(); dumpPackages(projectData); decreaseIndentation(); println("</coverage>"); } finally { pw.close(); } }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
this.complexity = complexity;
public XMLReport(ProjectData projectData, File destinationDir, FileFinder finder) throws IOException { this.finder = finder; pw = new PrintWriter(new FileWriter(new File(destinationDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); println("<!DOCTYPE coverage SYSTEM \"http://cobertura.sourceforge.net/xml/" + coverageDTD + "\">"); println(""); // TODO: Set a schema? //println("<coverage " + sourceDirectories.toString() + " xmlns=\"http://cobertura.sourceforge.net\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://cobertura.sourceforge.net/xml/coverage.xsd\">"); println("<coverage line-rate=\"" + projectData.getLineCoverageRate() + "\" branch-rate=\"" + projectData.getBranchCoverageRate() + "\" version=\"" + Header.version() + "\" timestamp=\"" + new Date().getTime() + "\">"); increaseIndentation(); dumpSources(); dumpPackages(projectData); decreaseIndentation(); println("</coverage>"); } finally { pw.close(); } }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false);
private void dumpClass(ClassData classData) { logger.debug("Dumping class " + classData.getName()); double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false); println("<class name=\"" + classData.getName() + "\" filename=\"" + classData.getSourceFileName() + "\" line-rate=\"" + classData.getLineCoverageRate() + "\" branch-rate=\"" + classData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpMethods(classData); dumpLines(classData); decreaseIndentation(); println("</class>"); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
+ ccn + "\"" + ">");
+ complexity.getCCNForClass(classData) + "\"" + ">");
private void dumpClass(ClassData classData) { logger.debug("Dumping class " + classData.getName()); double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false); println("<class name=\"" + classData.getName() + "\" filename=\"" + classData.getSourceFileName() + "\" line-rate=\"" + classData.getLineCoverageRate() + "\" branch-rate=\"" + classData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpMethods(classData); dumpLines(classData); decreaseIndentation(); println("</class>"); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
double ccn = packageData.getCCN(finder);
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = packageData.getCCN(finder); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpSourceFiles(packageData); decreaseIndentation(); println("</package>"); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
+ "\" complexity=\"" + ccn + "\"" + ">");
+ "\" complexity=\"" + complexity.getCCNForPackage(packageData) + "\"" + ">");
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = packageData.getCCN(finder); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchCoverageRate() + "\" complexity=\"" + ccn + "\"" + ">"); increaseIndentation(); dumpSourceFiles(packageData); decreaseIndentation(); println("</package>"); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java
private void dumpSource(File sourceDirectory)
private void dumpSource(String sourceDirectory)
private void dumpSource(File sourceDirectory) { println("<source>" + sourceDirectory.getAbsolutePath() + "</source>"); }
50197 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50197/c26f5a170c752d9d1d5b884dd7eb60b982637269/XMLReport.java/clean/cobertura/src/net/sourceforge/cobertura/reporting/xml/XMLReport.java